@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +839 -0
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OCookieNotice.vue.d.ts +6 -5
  5. package/dist/components/OFooter.vue.d.ts +46 -0
  6. package/dist/components/OHeaderSearch.vue.d.ts +4 -4
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +20 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
  12. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  13. package/dist/components/activity/config.d.ts +1 -0
  14. package/dist/components/activity/index.d.ts +623 -0
  15. package/dist/components/activity/types.d.ts +81 -0
  16. package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
  17. package/dist/components/element-plus/index.d.ts +2 -0
  18. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  19. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  20. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  21. package/dist/components/events/config.d.ts +27 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +66 -0
  24. package/dist/components/events/utils.d.ts +7 -0
  25. package/dist/components/header/OHeader.vue.d.ts +30 -0
  26. package/dist/components/header/OHeaderMobile.vue.d.ts +171 -0
  27. package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
  28. package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
  29. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +33 -0
  30. package/dist/components/header/index.d.ts +145 -0
  31. package/dist/components/header/types.d.ts +80 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +299 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
  34. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
  35. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  36. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  37. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  38. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  39. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  41. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  42. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  43. package/dist/components/meeting/config.d.ts +12 -0
  44. package/dist/components/meeting/types.d.ts +168 -0
  45. package/dist/components/meeting/utils.d.ts +8 -0
  46. package/dist/components.cjs.js +224 -1
  47. package/dist/components.css +1 -1
  48. package/dist/components.element.cjs.js +1 -0
  49. package/dist/components.element.es.js +4 -0
  50. package/dist/components.es.js +44348 -785
  51. package/dist/index.d.ts +9 -2
  52. package/docs/design.md +27 -27
  53. package/docs/design_banner.md +41 -41
  54. package/docs/design_section.md +27 -27
  55. package/package.json +12 -3
  56. package/scripts/generate-components-index.js +103 -80
  57. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  58. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  59. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  60. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  61. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  62. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  63. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  67. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  68. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  69. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  70. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  71. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  72. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  73. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  74. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  75. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  76. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  77. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  78. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  79. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  80. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  82. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  83. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  84. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  86. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  88. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  90. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  91. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  94. package/src/assets/meeting/transparent.png +0 -0
  95. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  96. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  97. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  99. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  100. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  101. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  102. package/src/assets/svg-icons/icon-close.svg +3 -3
  103. package/src/assets/svg-icons/icon-delete.svg +3 -3
  104. package/src/assets/svg-icons/icon-filter.svg +3 -0
  105. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  106. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  107. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  108. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  109. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  110. package/src/assets/svg-icons/icon-loading.svg +4 -0
  111. package/src/assets/svg-icons/icon-locale.svg +3 -0
  112. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  113. package/src/assets/svg-icons/icon-message.svg +3 -0
  114. package/src/assets/svg-icons/icon-moon.svg +3 -3
  115. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  116. package/src/assets/svg-icons/icon-overview.svg +3 -0
  117. package/src/assets/svg-icons/icon-search.svg +3 -0
  118. package/src/assets/svg-icons/icon-setting.svg +3 -0
  119. package/src/assets/svg-icons/icon-sun.svg +3 -3
  120. package/src/assets/svg-icons/icon-tips.svg +3 -0
  121. package/src/components/OBanner.vue +398 -390
  122. package/src/components/OCookieNotice.vue +575 -424
  123. package/src/components/OFooter.vue +576 -0
  124. package/src/components/OHeaderSearch.vue +601 -601
  125. package/src/components/OHeaderUser.vue +237 -0
  126. package/src/components/OPlusConfigProvider.vue +32 -32
  127. package/src/components/OSection.vue +178 -178
  128. package/src/components/OSourceCode.vue +153 -0
  129. package/src/components/OThemeSwitcher.vue +108 -108
  130. package/src/components/activity/OActivityApproval.vue +864 -0
  131. package/src/components/activity/OActivityForm.vue +542 -0
  132. package/src/components/activity/OMyActivityCalendar.vue +1486 -0
  133. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  134. package/src/components/activity/config.ts +1 -0
  135. package/src/components/activity/index.ts +24 -0
  136. package/src/components/activity/types.ts +88 -0
  137. package/src/components/common/AppAvatar.vue +83 -0
  138. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  139. package/src/components/common/ContentWrapper.vue +85 -85
  140. package/src/components/common/MoreText.vue +124 -0
  141. package/src/components/common/ThFilter.vue +330 -0
  142. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  143. package/src/components/element-plus/index.ts +3 -0
  144. package/src/components/events/OEventsApply.vue +418 -0
  145. package/src/components/events/OEventsCalendar.vue +598 -0
  146. package/src/components/events/OEventsList.vue +362 -0
  147. package/src/components/events/config.ts +35 -0
  148. package/src/components/events/index.ts +24 -0
  149. package/src/components/events/types.ts +80 -0
  150. package/src/components/events/utils.ts +9 -0
  151. package/src/components/header/OHeader.vue +157 -0
  152. package/src/components/header/OHeaderMobile.vue +177 -0
  153. package/src/components/header/components/HeaderContent.vue +1121 -0
  154. package/src/components/header/components/HeaderNav.vue +278 -0
  155. package/src/components/header/components/HeaderNavMobile.vue +377 -0
  156. package/src/components/header/index.ts +16 -0
  157. package/src/components/header/types.ts +91 -0
  158. package/src/components/meeting/OMeetingCalendar.vue +878 -0
  159. package/src/components/meeting/OMeetingForm.vue +1053 -0
  160. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  161. package/src/components/meeting/OMyMeetingCalendar.vue +1497 -0
  162. package/src/components/meeting/OSigMeetingCalendar.vue +410 -0
  163. package/src/components/meeting/components/OMeetingCalendarList.vue +510 -0
  164. package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
  165. package/src/components/meeting/components/OMeetingDetail.vue +229 -0
  166. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  167. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  168. package/src/components/meeting/components/OSigMeetingAside.vue +200 -0
  169. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  170. package/src/components/meeting/config.ts +48 -0
  171. package/src/components/meeting/index.ts +45 -0
  172. package/src/components/meeting/types.ts +195 -0
  173. package/src/components/meeting/utils.ts +70 -0
  174. package/src/draft/Banner.vue +265 -265
  175. package/src/draft/ButtonCards.vue +105 -105
  176. package/src/draft/Feature.vue +133 -133
  177. package/src/draft/Footer.vue +512 -512
  178. package/src/draft/HorizontalAnchor.vue +165 -165
  179. package/src/draft/ItemSwiper.vue +133 -133
  180. package/src/draft/Logo.vue +141 -141
  181. package/src/draft/LogoCard.vue +74 -74
  182. package/src/draft/LogoV2.vue +19 -19
  183. package/src/draft/MainCard.vue +38 -38
  184. package/src/draft/MultiCard.vue +94 -94
  185. package/src/draft/MultiIconCard.vue +73 -73
  186. package/src/draft/OInfoCard.vue +176 -176
  187. package/src/draft/Process.vue +81 -81
  188. package/src/draft/Section.vue +167 -167
  189. package/src/draft/SingleTabCard.vue +84 -84
  190. package/src/draft/SliderCard.vue +110 -110
  191. package/src/env.d.ts +16 -1
  192. package/src/i18n/en.ts +264 -20
  193. package/src/i18n/index.ts +56 -42
  194. package/src/i18n/zh.ts +253 -9
  195. package/src/index.ts +14 -3
  196. package/src/shared/provide.ts +6 -6
  197. package/src/shims-vue-dompurify-html.d.ts +17 -0
  198. package/src/vue.d.ts +9 -9
  199. package/tsconfig.json +37 -33
  200. package/vite.config.ts +118 -94
  201. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  202. package/dist/components.umd.js +0 -1
  203. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -1 +1,224 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@opensig/opendesign"),O=require("@opendesign-plus/composables"),P=require("@vueuse/core"),x=require("element-plus");require("element-plus/es/components/button/style/index");require("element-plus/es/components/dialog/style/index");require("element-plus/es/components/switch/style/index");require("element-plus/es/components/icon/style/index");const ee=e.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(t){const o=Symbol("default"),n=t,m=e.computed(()=>n.verticalPadding?i.isBoolean(n.verticalPadding)?o:i.isString(n.verticalPadding)?n.verticalPadding:n.verticalPadding[0]:0),c=e.computed(()=>n.verticalPadding?i.isBoolean(n.verticalPadding)?o:i.isString(n.verticalPadding)?n.verticalPadding:i.isUndefined(n.verticalPadding[1])?n.verticalPadding[0]:n.verticalPadding[1]:0);return(u,d)=>(e.openBlock(),e.createElementBlock("div",{class:"content-wrapper",style:e.normalizeStyle({"--content-wrapper-vertical-paddingTop":m.value===e.unref(o)?void 0:m.value,"--content-wrapper-vertical-paddingBottom":c.value===e.unref(o)?void 0:c.value})},[e.renderSlot(u.$slots,"default",{},void 0,!0)],4))}}),I=(t,o)=>{const n=t.__vccOpts||t;for(const[m,c]of o)n[m]=c;return n},U=I(ee,[["__scopeId","data-v-a0f91aed"]]),te={key:0},oe={class:"banner-content"},ne=["src"],le={key:1,class:"banner-title"},ae={key:2,class:"banner-subtitle"},re={key:4,class:"banner-opts"},ce=e.defineComponent({__name:"OBanner",props:{options:void 0,size:"large",contentJustifyCenter:!1},setup(t){const o=t,{isLight:n}=O.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:m}=O.useScreen(),c=e.computed(()=>o.options),u=e.ref(""),d=l=>{setTimeout(()=>{u.value=c.value[l].bg_theme??"light"},100)},r=(l,p)=>{l&&!p&&window.open(l)};return(l,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["home-banner",t.size])},[t.size==="tiny"?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(c.value[1].title),1)):e.unref(m)?(e.openBlock(),e.createBlock(e.unref(i.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":u.value,arrow:"never","auto-play":!0,onBeforeChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,f)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{class:e.normalizeClass(["banner-item",`banner-item${f}`])},{default:e.withCtx(()=>[e.createVNode(U,{class:"banner-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:"banner-bg",src:a.bg,onClick:y=>r(a.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),256))]),_:1},8,["data-o-theme"])):(e.openBlock(),e.createBlock(e.unref(i.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":u.value,onBeforeChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,f)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{key:f,class:e.normalizeClass(["banner-item",`banner-item${f}`])},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:e.normalizeClass(["banner-bg",{"with-sticky-bg":a.withStickyBg,"in-dark":!e.unref(n),"cursor-pointer":a.href&&!a.btn}]),src:a.bg,style:e.normalizeStyle({"--pad-offset":a.pad_offset}),onClick:y=>r(a.href,a.btn)},{default:e.withCtx(()=>[e.createVNode(U,{class:e.normalizeClass(["banner-wrapper",["banner-wrapper",t.contentJustifyCenter?"content-center":""]])},{default:e.withCtx(()=>[e.createElementVNode("div",oe,[!e.unref(m)&&a.attach?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.attach,class:"banner-attach"},null,8,ne)):e.createCommentVNode("",!0),a.title?(e.openBlock(),e.createElementBlock("div",le,e.toDisplayString(a.title),1)):e.createCommentVNode("",!0),a.subtitle?(e.openBlock(),e.createElementBlock("div",ae,e.toDisplayString(a.subtitle),1)):e.createCommentVNode("",!0),a.bg_text?(e.openBlock(),e.createElementBlock("div",{key:3,class:"banner-text",style:e.normalizeStyle({backgroundImage:`url(${a.bg_text})`,"--pc-width":a.pc_text_width,"--pc-height":a.pc_text_height,"--pad-width":a.pad_text_width,"--pad-height":a.pad_text_height})},null,4)):e.createCommentVNode("",!0),a.btn?(e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(i.OButton),{href:a.href,target:"_blank",variant:"solid",color:"primary",size:t.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.btn),1)]),_:2},1032,["href","size"])])):e.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),K=I(ce,[["__scopeId","data-v-38a33983"]]),se=t=>{const o=e.ref(!1);return e.onMounted(()=>{o.value=!0}),()=>o.value&&t.default?t.default():null},G=e.defineComponent({setup(t,{slots:o}){const n=e.resolveComponent("ClientOnly");return n&&typeof n!="string"?()=>e.h(n,null,{default:()=>o.default?o.default():null}):se(o)}}),ie={search:"搜索","search.hot":"热门搜索","search.placeholder":"搜索","search.expandedPlaceholder":"请输入搜索内容","search.history":"历史搜索","cookie.desc":"我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。","cookie.about":"查看详情"},de={search:"Search","search.hot":"Top search","search.placeholder":"Please enter the content","search.expandedPlaceholder":"Please enter the content","search.history":"History","cookie.title":"{0} Community Respects Your Privacy","cookie.desc":'This site uses cookies from us and our partners to improve your browsing experience and make the site work properly. By clicking "Accept All", you consent to the use of cookies. By clicking "Reject All", you disable the use of unnecessary cookies. You can manage your cookie settings by clicking "Manage Cookies". For more information or to change your cookie settings, please refer to our ',"cookie.about":"About Cookies","cookie.acceptAll":"Accept All","cookie.rejectAll":"Reject All","cookie.manage":"Manage Cookies","cookie.necessaryCookie":"Strictly Necessary Cookies","cookie.alwaysOn":"Always active","cookie.necessaryCookieDetail":"These cookies are necessary for the site to work properly and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as logging in or filling in forms. You can set the browser to block these cookies, but that can make parts of the site not work. These cookies do not store any personally identifiable information.","cookie.analyticalCookie":"Analytics Cookies","cookie.analyticalCookieDetail":"We will use these cookies only with your consent. These cookies help us make improvements by collecting statistics such as the number of visits and traffic sources.","cookie.saveSetting":"Save Settings","cookie.setting":"Cookie settings"},F=Symbol("provide-config-provider"),ue=e.ref({zh:ie,en:de});function M(){const o=e.getCurrentInstance()?e.inject(F):null,n=e.computed(()=>(o==null?void 0:o.locale)||"zh");return{locale:n,t:(c,...u)=>{const r=ue.value[n.value][c];return u.length>0&&i.isString(r)?r.replace(/{(\d+)}/g,(l,p)=>u[p]??l):(i.isUndefined(r)&&console.warn(`Cannot translate the value of keypath '${c}'`),r)}}}const he={key:0,class:"cookie-notice"},me={class:"cookie-notice-content"},pe=["type"],fe={class:"cookie-notice-left"},ke={key:0,class:"cookie-desc",style:{"margin-top":"0"}},ve=["href"],ge={class:"cookie-title"},ye={class:"cookie-desc"},Ce=["href"],Ve={key:0,class:"cookie-notice-right"},we={class:"cookie-dlg-title"},_e={class:"cookie-dlg-content"},Be={class:"content-item"},Ne={class:"item-header"},Ee={class:"item-title"},be={class:"item-extra"},Se={class:"item-detail"},$e={class:"content-item"},xe={class:"item-header"},Ie={class:"item-title"},Oe={class:"item-extra"},De={class:"item-detail"},ze="0",H="1",Te="2",D="3",Ae="agreed-cookiepolicy-zh",Pe="agreed-cookiepolicy-en",Me=e.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},aboutPathZh:{},aboutPathEn:{},teleportTarget:{}},emits:["update:visible"],setup(t,{expose:o,emit:n}){const m=t,c=n,{lePadV:u,leLaptop:d}=O.useScreen(),{locale:r,t:l}=M(),p=e.computed(()=>r.value==="zh"),a=e.computed(()=>p.value?Ae:Pe),f=e.ref(!1),y=P.useVModel(m,"visible",c,{defaultValue:!1}),C=h=>{const g=document.cookie.split(";").find(B=>B.split("=")[0].trim()===encodeURIComponent(h));return g?decodeURIComponent(g.split("=")[1]):null},_=(h,g,B,Q)=>{const X=`; max-age=${B*24*60*60}`;document.cookie=`${encodeURIComponent(h)}=${encodeURIComponent(g)}${X}; path=/; domain=${Q}`},S=(h,g)=>{document.cookie=`${encodeURIComponent(h)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${g}`},V=h=>{typeof h=="boolean"?y.value=h:y.value=!y.value,e.nextTick(()=>{!y.value&&p.value&&C(a.value)!==D&&_(a.value,D,180,location.hostname)})},E=e.ref(!1),N=h=>{typeof h=="boolean"?E.value=h:E.value=!E.value},s=()=>p.value?C(a.value)!==D:(C(a.value)??"0")===ze,b=()=>p.value?C(a.value)===D:C(a.value)===H;e.onMounted(()=>{s()&&V(!0)}),e.watch(r,()=>{V(s())});const k=()=>{f.value=!0,S(a.value,location.hostname),_(a.value,H,180,location.hostname),V(!1)},$=()=>{f.value=!1,S(a.value,location.hostname),_(a.value,Te,180,location.hostname),V(!1)},w=e.computed(()=>[{id:"save",color:"primary",label:l("cookie.saveSetting"),variant:"outline",size:"large",round:"pill",onClick:()=>{f.value?k():$(),N(!1)}},{id:"allowAll",color:"primary",label:l("cookie.acceptAll"),variant:"outline",size:"large",round:"pill",onClick:()=>{f.value=!0,k(),N(!1)}}]),v=h=>{h&&(f.value=b())};return o({check(){b()===y.value&&V()}}),(h,g)=>(e.openBlock(),e.createBlock(e.unref(G),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTarget||"#app"},[e.unref(y)?(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",me,[e.createElementVNode("div",{type:e.unref(r),class:e.normalizeClass({"cookie-notice-wrap-grid":t.enableGrid,"cookie-notice-wrap":!t.enableGrid})},[e.createElementVNode("div",fe,[p.value?(e.openBlock(),e.createElementBlock("p",ke,[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathZh,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(l)("cookie.about")),9,ve)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("p",ge,e.toDisplayString(e.unref(l)("cookie.title",[t.community])),1),e.createElementVNode("p",ye,[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathEn,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(l)("cookie.about")),9,Ce),g[4]||(g[4]=e.createTextVNode(". ",-1))])],64))]),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.acceptAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:$},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.rejectAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:g[0]||(g[0]=B=>N(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.manage")),1)]),_:1})])),e.createVNode(e.unref(i.OIcon),{class:"cookie-notice-close",type:e.unref(r),onClick:g[1]||(g[1]=B=>V(!1))},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconClose))]),_:1},8,["type"])],10,pe)]),e.createVNode(e.unref(i.ODialog),{visible:E.value,"onUpdate:visible":g[3]||(g[3]=B=>E.value=B),size:e.unref(d)?"medium":"large","phone-half-full":e.unref(u),class:"cookie-dlg",actions:w.value,onChange:v},{header:e.withCtx(()=>[e.createElementVNode("span",we,e.toDisplayString(e.unref(l)("cookie.manage")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("div",Be,[e.createElementVNode("div",Ne,[e.createElementVNode("span",Ee,e.toDisplayString(e.unref(l)("cookie.necessaryCookie")),1),e.createElementVNode("span",be,e.toDisplayString(e.unref(l)("cookie.alwaysOn")),1)]),e.createElementVNode("div",Se,e.toDisplayString(e.unref(l)("cookie.necessaryCookieDetail")),1)]),e.createElementVNode("div",$e,[e.createElementVNode("div",xe,[e.createElementVNode("span",Ie,e.toDisplayString(e.unref(l)("cookie.analyticalCookie")),1),e.createElementVNode("span",Oe,[e.createVNode(e.unref(i.OSwitch),{modelValue:f.value,"onUpdate:modelValue":g[2]||(g[2]=B=>f.value=B)},null,8,["modelValue"])])]),e.createElementVNode("div",De,e.toDisplayString(e.unref(l)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","actions"])])):e.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),j=I(Me,[["__scopeId","data-v-5ba95c2f"]]),Ue={key:0,class:"cookie-notice"},He={class:"cookie-notice-content"},Re=["type"],Le={class:"cookie-notice-left"},Ke={key:0,class:"cookie-desc",style:{"margin-top":"0"}},Ge=["href"],Fe={class:"cookie-title"},je={class:"cookie-desc"},qe=["href"],Ye={key:0,class:"cookie-notice-right"},Je={class:"cookie-dlg-content"},We={class:"content-item"},Ze={class:"item-header"},Qe={class:"item-title"},Xe={class:"item-extra"},et={class:"item-detail"},tt={class:"content-item"},ot={class:"item-header"},nt={class:"item-title"},lt={class:"item-extra"},at={class:"item-detail"},rt="0",R="1",ct="2",z="3",st="agreed-cookiepolicy-zh",it="agreed-cookiepolicy-en",dt=e.defineComponent({__name:"OCookieNoticeEl",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},aboutPathZh:{},aboutPathEn:{},teleportTarget:{}},emits:["update:visible"],setup(t,{emit:o}){const n=t,m=o,{lePadV:c}=O.useScreen(),{locale:u,t:d}=M(),r=e.computed(()=>u.value==="zh"),l=e.computed(()=>r.value?st:it),p=e.ref(!1),a=P.useVModel(n,"visible",m,{defaultValue:!1}),f=w=>{const v=document.cookie.split(";").find(h=>h.split("=")[0].trim()===encodeURIComponent(w));return v?decodeURIComponent(v.split("=")[1]):null},y=(w,v,h,g)=>{const B=`; max-age=${h*24*60*60}`;document.cookie=`${encodeURIComponent(w)}=${encodeURIComponent(v)}${B}; path=/; domain=${g}`},C=w=>{typeof w=="boolean"?a.value=w:a.value=!a.value,e.nextTick(()=>{!a.value&&r.value&&f(l.value)!==z&&y(l.value,z,180,location.hostname)})},_=e.ref(!1),S=w=>{typeof w=="boolean"?_.value=w:_.value=!_.value},V=()=>r.value?f(l.value)!==z:(f(l.value)??"0")===rt,E=()=>r.value?f(l.value)===z:f(l.value)===R;e.onMounted(()=>{V()&&C(!0)}),e.watch(u,()=>{C(V())});const N=()=>{p.value=!0,y(l.value,R,180,location.hostname),C(!1)},s=()=>{p.value=!1,y(l.value,ct,180,location.hostname),C(!1)},b=()=>{p.value?N():s(),S(!1)},k=()=>{p.value=!0,N(),S(!1)},$=()=>{p.value=E()};return(w,v)=>(e.openBlock(),e.createBlock(e.unref(G),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTarget||"#app"},[e.unref(a)?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",He,[e.createElementVNode("div",{type:e.unref(u),class:e.normalizeClass({"cookie-notice-wrap-grid":t.enableGrid,"cookie-notice-wrap":!t.enableGrid})},[e.createElementVNode("div",Le,[r.value?(e.openBlock(),e.createElementBlock("p",Ke,[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathZh,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(d)("cookie.about")),9,Ge)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("p",Fe,e.toDisplayString(e.unref(d)("cookie.title",[t.community])),1),e.createElementVNode("p",je,[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathEn,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(d)("cookie.about")),9,qe),v[4]||(v[4]=e.createTextVNode(". ",-1))])],64))]),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(e.unref(x.ElButton),{round:"",type:"primary",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.acceptAll")),1)]),_:1}),e.createVNode(e.unref(x.ElButton),{round:"",type:"primary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.rejectAll")),1)]),_:1}),e.createVNode(e.unref(x.ElButton),{round:"",type:"primary",onClick:v[0]||(v[0]=h=>S(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.manage")),1)]),_:1})])),e.createVNode(e.unref(x.ElIcon),{class:"cookie-notice-close",type:e.unref(u),onClick:v[1]||(v[1]=h=>C(!1))},{default:e.withCtx(()=>[e.renderSlot(w.$slots,"close-icon",{},()=>[v[5]||(v[5]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1))],!0)]),_:3},8,["type"])],10,Re)]),e.createVNode(e.unref(x.ElDialog),{modelValue:_.value,"onUpdate:modelValue":v[3]||(v[3]=h=>_.value=h),width:e.unref(c)?"90%":"50%",title:e.unref(d)("cookie.manage"),"destroy-on-close":"",onOpen:$},{footer:e.withCtx(()=>[e.createVNode(e.unref(x.ElButton),{round:"",type:"primary",onClick:b,style:{"margin-right":"16px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.saveSetting")),1)]),_:1}),e.createVNode(e.unref(x.ElButton),{round:"",type:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("cookie.acceptAll")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Je,[e.createElementVNode("div",We,[e.createElementVNode("div",Ze,[e.createElementVNode("span",Qe,e.toDisplayString(e.unref(d)("cookie.necessaryCookie")),1),e.createElementVNode("span",Xe,e.toDisplayString(e.unref(d)("cookie.alwaysOn")),1)]),e.createElementVNode("div",et,e.toDisplayString(e.unref(d)("cookie.necessaryCookieDetail")),1)]),e.createElementVNode("div",tt,[e.createElementVNode("div",ot,[e.createElementVNode("span",nt,e.toDisplayString(e.unref(d)("cookie.analyticalCookie")),1),e.createElementVNode("span",lt,[e.createVNode(e.unref(x.ElSwitch),{modelValue:p.value,"onUpdate:modelValue":v[2]||(v[2]=h=>p.value=h)},null,8,["modelValue"])])]),e.createElementVNode("div",at,e.toDisplayString(e.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["modelValue","width","title"])])):e.createCommentVNode("",!0)],8,["to"]))]),_:3}))}}),q=I(dt,[["__scopeId","data-v-72bd84ae"]]),ut={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ht(t,o){return e.openBlock(),e.createElementBlock("svg",ut,[...o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const mt={name:"components-icon-close",render:ht},pt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function ft(t,o){return e.openBlock(),e.createElementBlock("svg",pt,[...o[0]||(o[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const L={name:"components-icon-header-search",render:ft},kt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function vt(t,o){return e.openBlock(),e.createElementBlock("svg",kt,[...o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"},null,-1)])])}const gt={name:"components-icon-header-delete",render:vt},yt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Ct(t,o){return e.openBlock(),e.createElementBlock("svg",yt,[...o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"},null,-1)])])}const Vt={name:"components-icon-delete",render:Ct},wt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function _t(t,o){return e.openBlock(),e.createElementBlock("svg",wt,[...o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const Bt={name:"components-icon-header-back",render:_t},Nt={class:"o-header-search"},Et={class:"o-header-search-drawer"},bt={key:0,class:"o-header-search-recommend-container"},St=["onClick"],$t={key:1,class:"o-header-search-history-container"},xt={class:"o-header-search-history-header"},It={class:"o-header-search-history-header-title"},Ot={class:"o-header-search-history-item-container"},Dt=["onClick"],zt={class:"o-header-search-history-item-text"},Tt={key:3,class:"o-header-search-hot-container"},At={class:"o-header-search-hot-header"},Pt={class:"o-header-search-hot-item-container"},Mt=["onClick"],Ut=e.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{}},emits:["update:modelValue","update:historyItems","clear","search","delete-history","delete-history-item"],setup(t,{emit:o}){const{lePadV:n}=O.useScreen(),{t:m}=M(),c=t,u=o,d=e.ref(c.modelValue),r=e.ref(c.historyItems),l=e.ref(!1),p=e.ref(),a=e.computed(()=>!n.value&&l.value||n.value&&d.value);e.watch(()=>c.modelValue,s=>{d.value!==s&&(d.value=s)}),e.watch(()=>d.value,s=>{u("update:modelValue",s)}),e.watch(()=>c.historyItems,s=>{r.value!==s&&(r.value=s)}),e.watch(()=>r.value,s=>{u("update:historyItems",s)}),e.onMounted(()=>{if(c.storeHistory&&c.storageKey)try{const s=JSON.parse(localStorage.getItem(c.storageKey)||"[]");Array.isArray(s)&&s.length&&(r.value=Array.from(new Set([...r.value,...s])))}catch{}});const f=()=>{l.value=!0},y=()=>{const s=d.value.trim();s&&(l.value=!1,r.value.unshift(s),r.value=Array.from(new Set(r.value)),r.value.length>c.maxHistoryCount&&r.value.pop(),c.storeHistory&&c.storeHistory&&localStorage.setItem(c.storageKey,JSON.stringify(r.value)),u("search",s),c.searchUrl&&window.open(c.searchUrl+s,c.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},C=()=>{d.value="",u("clear"),n.value||(l.value=!1)},_=()=>{const s=[...r.value];r.value=[],c.storeHistory&&c.storeHistory&&localStorage.removeItem(c.storageKey),u("delete-history",s)},S=s=>{r.value=r.value.filter(b=>b!==s),c.storeHistory&&c.storeHistory&&(r.value.length?localStorage.setItem(c.storageKey,JSON.stringify(r.value)):localStorage.removeItem(c.storageKey)),u("delete-history-item",s)},V=s=>{d.value=s,y()},E=()=>{d.value="",l.value=!1},N=e.ref();return P.onClickOutside(N,C),(s,b)=>(e.openBlock(),e.createElementBlock("div",Nt,[e.createElementVNode("div",{ref_key:"posWrapper",ref:N,class:e.normalizeClass({"o-header-search-input-pc-wrapper":!e.unref(n),"o-header-search-input-pc-wrapper-left":!e.unref(n)&&t.expandDirection==="left","o-header-search-input-pc-wrapper-right":!e.unref(n)&&t.expandDirection==="right","o-header-search-input-mobile-wrapper":e.unref(n),focus:l.value})},[e.createElementVNode("div",{class:e.normalizeClass(["o-header-search-input-wrapper",{focus:l.value}])},[e.unref(n)&&l.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(Bt))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.OInput),{ref_key:"inputRef",ref:p,modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=k=>d.value=k),class:"o-header-search-input",placeholder:l.value?t.expandedPlaceholder??e.unref(m)("search.expandedPlaceholder"):t.placeholder??e.unref(m)("search.placeholder"),onFocus:f,onKeyup:e.withKeys(y,["enter"])},{prefix:e.withCtx(()=>[e.renderSlot(s.$slots,"input-prefix",{},()=>[e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:1})],!0)]),suffix:e.withCtx(()=>[e.renderSlot(s.$slots,"input-suffix",{},()=>[t.clearable&&a.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon close",onClick:C},{default:e.withCtx(()=>[e.createVNode(e.unref(mt))]),_:1})):e.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),e.unref(n)&&l.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:y},e.toDisplayString(t.searchTextMobile??e.unref(m)("search")),1)):e.createCommentVNode("",!0)],2),e.withDirectives(e.createElementVNode("div",Et,[e.renderSlot(s.$slots,"drawer",{recommendItems:t.recommendItems,historyItems:r.value,hotItems:t.hotItems},()=>[t.recommendItems.length?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(s.$slots,"recommend-header",{recommend:t.recommendItems},void 0,!0),e.renderSlot(s.$slots,"recommend-content",{recommend:t.recommendItems},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.recommendItems,k=>(e.openBlock(),e.createElementBlock("div",{class:"o-header-search-recommend-item",key:k,onClick:$=>V(k)},e.toDisplayString(k),9,St))),128))],!0)])):r.value.length?(e.openBlock(),e.createElementBlock("div",$t,[e.renderSlot(s.$slots,"history-header",{history:r.value},()=>[e.createElementVNode("div",xt,[e.createElementVNode("span",It,e.toDisplayString(t.historyTitle??e.unref(m)("search.history")),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon",onClick:_},{default:e.withCtx(()=>[e.createVNode(e.unref(Vt))]),_:1})])],!0),e.renderSlot(s.$slots,"history-content",{history:r.value},()=>[e.createElementVNode("div",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,k=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"o-header-search-history-item",onClick:$=>V(k)},[e.createElementVNode("span",zt,e.toDisplayString(k),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-history-item-icon",onClick:e.withModifiers($=>S(k),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(gt),{class:"icon-delete"})]),_:1},8,["onClick"])],8,Dt))),128))])],!0)])):e.createCommentVNode("",!0),(t.recommendItems.length||r.value.length)&&t.hotItems.length?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:2,class:"o-header-search-drawer-divider"})):e.createCommentVNode("",!0),t.hotItems.length?(e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(s.$slots,"hot-header",{hot:t.hotItems},()=>[e.createElementVNode("div",At,e.toDisplayString(t.hotTitle??e.unref(m)("search.hot")),1)],!0),e.renderSlot(s.$slots,"hot-content",{hot:t.hotItems},()=>[e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hotItems,k=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"o-header-search-hot-item",onClick:$=>V(k)},e.toDisplayString(k),9,Mt))),128))])],!0)])):e.createCommentVNode("",!0)],!0)],512),[[e.vShow,l.value]])],2),e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:f},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:1})):e.createCommentVNode("",!0)]))}}),Y=I(Ut,[["__scopeId","data-v-cce80de4"]]),Ht={locale:"zh-CN","common.empty":"暂无数据","common.loading":"加载中...","pagination.goto":"前往","pagination.page":"页","pagination.countPerPage":"条/页","pagination.total":"共 {0} 条","upload.buttonLabel":"点击上传","upload.drag":"点击或拖拽文件到此处上传","upload.dragHover":"释放文件并开始上传","upload.retry":"点击重试","upload.delete":"删除","upload.preview":"预览","upload.edit":"编辑","select.cancel":"取消","select.confirm":"确定","input.limit":"<b>{0}</b>/{1}"},Rt={locale:"en-US","common.empty":"No Data","common.loading":"Loading...","pagination.goto":"Go to","pagination.page":"Page","pagination.countPerPage":"/page","pagination.total":"Total: {0}","upload.buttonLabel":"Upload","upload.drag":"Click or drag file to this area to upload","upload.dragHover":"Release to upload","upload.retry":"Click to retry","upload.delete":"Delete","upload.preview":"Preview","upload.edit":"Edit","select.cancel":"Cancel","select.confirm":"Ok","input.limit":"<b>{0}</b>/{1}"},J=e.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(t){const o=t,n=e.reactive({locale:e.computed(()=>o.locale),theme:e.computed(()=>o.theme)});return e.provide(F,n),(m,c)=>(e.openBlock(),e.createBlock(e.unref(i.OConfigProvider),{locale:t.locale==="zh"?e.unref(Ht):e.unref(Rt)},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default")]),_:3},8,["locale"]))}}),Lt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Kt(t,o){return e.openBlock(),e.createElementBlock("svg",Lt,[...o[0]||(o[0]=[e.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const Gt={name:"components-icon-chevron-right",render:Kt},Ft={class:"section-wrapper"},jt={key:1,class:"section-title"},qt={key:2,class:"section-subtitle"},Yt={key:1,class:"section-body"},Jt={key:2,class:"section-footer"},Wt=e.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(t){const o=t;return(n,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["app-section",{"is-full":o.full}])},[e.createElementVNode("div",Ft,[e.renderSlot(n.$slots,"main",{},()=>[n.$slots.header||o.title||o.subtitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["section-header",{"is-left":!o.headerJustifyCenter}])},[e.renderSlot(n.$slots,"header",{},()=>[e.unref(i.isArray)(o.title)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.title,c=>(e.openBlock(),e.createElementBlock("h2",{key:c,class:"section-title"},e.toDisplayString(c),1))),128)):n.$slots.title||o.title?(e.openBlock(),e.createElementBlock("h2",jt,[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)])):e.createCommentVNode("",!0),n.$slots.subtitle||o.subtitle?(e.openBlock(),e.createElementBlock("p",qt,[e.renderSlot(n.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(o.subtitle),1)],!0)])):e.createCommentVNode("",!0)],!0)],2)):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.footer||o.footer?(e.openBlock(),e.createElementBlock("div",Jt,[e.renderSlot(n.$slots,"footer",{},()=>[e.createVNode(e.unref(i.OLink),{href:o.footerHref,target:"_blank"},{suffix:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"footer-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Gt))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.footer)+" ",1)]),_:1},8,["href"])],!0)])):e.createCommentVNode("",!0)],!0)])],2))}}),W=I(Wt,[["__scopeId","data-v-57b81782"]]),Zt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Qt(t,o){return e.openBlock(),e.createElementBlock("svg",Zt,[...o[0]||(o[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const T={name:"components-icon-sun",render:Qt},Xt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function eo(t,o){return e.openBlock(),e.createElementBlock("svg",Xt,[...o[0]||(o[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const A={name:"components-icon-moon",render:eo},to={class:"o-theme-switcher"},oo={key:1,class:"o-theme-switcher-mobile"},no=e.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:T},darkIcon:{default:A}},emits:["update:theme","change"],setup(t,{emit:o}){const n=t,m=o,{gtPhone:c}=O.useScreen(),u=e.computed({get(){return n.theme},set(l){m("update:theme",l),m("change",l)}}),d=e.computed(()=>n.type==="common"||n.type==="auto"&&c.value),r=()=>{u.value=u.value===n.lightValue?n.darkValue:n.lightValue};return(l,p)=>(e.openBlock(),e.createElementBlock("div",to,[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:r},[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[u.value===t.lightValue?(e.openBlock(),e.createBlock(e.unref(A),{key:0})):(e.openBlock(),e.createBlock(e.unref(T),{key:1}))]),_:1})])):(e.openBlock(),e.createElementBlock("div",oo,[e.createVNode(e.unref(i.OSwitch),{modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=a=>u.value=a),class:"o-theme-switch","checked-value":t.darkValue,"unchecked-value":t.lightValue},{on:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(T))]),_:1})]),off:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(A))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),Z=I(no,[["__scopeId","data-v-837e14fb"]]),lo={OBanner:K,OCookieNotice:j,OCookieNoticeEl:q,OHeaderSearch:Y,OPlusConfigProvider:J,OSection:W,OThemeSwitcher:Z},ao={install:t=>{Object.entries(lo).forEach(([o,n])=>{t.component(o,n)})}};exports.OBanner=K;exports.OCookieNotice=j;exports.OCookieNoticeEl=q;exports.OHeaderSearch=Y;exports.OPlusConfigProvider=J;exports.OSection=W;exports.OThemeSwitcher=Z;exports.default=ao;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),A=require("@opensig/opendesign"),Nt=require("@opendesign-plus/composables"),Qe=require("./chunk-OElCookieNotice.cjs.js"),qi=require("@vueuse/core"),Um=require("@opensig/opendesign/es/locale/lang/zh-cn"),qm=require("@opensig/opendesign/es/locale/lang/en-us"),nt=require("element-plus"),jm=i.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),t=r,n=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:t.verticalPadding[0]:0),s=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:A.isUndefined(t.verticalPadding[1])?t.verticalPadding[0]:t.verticalPadding[1]:0);return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:"content-wrapper",style:i.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===i.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===i.unref(e)?void 0:s.value})},[i.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),mn=Qe._export_sfc(jm,[["__scopeId","data-v-29de9f52"]]),Hm={key:0},zm={class:"banner-content"},Gm=["src"],Wm={key:1,class:"banner-title"},Ym={key:2,class:"banner-subtitle"},Xm={key:4,class:"banner-opts"},Km=i.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:t}=Nt.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=Nt.useScreen(),s=i.computed(()=>e.options),a=i.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,d)=>{c&&!d&&window.open(c)};return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(i.openBlock(),i.createElementBlock("div",Hm,i.toDisplayString(s.value[1].title),1)):i.unref(n)?i.unref(n)?(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":a.value,arrow:"never","auto-play":!0,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{class:i.normalizeClass(["banner-item",`banner-item${m}`]),key:m},{default:i.withCtx(()=>[i.createVNode(mn,{class:"banner-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:"banner-bg",src:g.bg,onClick:S=>l(g.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":a.value,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{key:m,class:i.normalizeClass(["banner-item",`banner-item${m}`])},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:i.normalizeClass(["banner-bg",{"with-sticky-bg":g.withStickyBg,"in-dark":!i.unref(t),"cursor-pointer":g.href&&!g.btn}]),src:g.bg,style:i.normalizeStyle({"--pad-offset":g.pad_offset}),onClick:S=>l(g.href,g.btn)},{default:i.withCtx(()=>[i.createVNode(mn,{class:i.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:i.withCtx(()=>[i.createElementVNode("div",zm,[!i.unref(n)&&g.attach?(i.openBlock(),i.createElementBlock("img",{key:0,src:g.attach,class:"banner-attach"},null,8,Gm)):i.createCommentVNode("",!0),g.title?(i.openBlock(),i.createElementBlock("div",Wm,i.toDisplayString(g.title),1)):i.createCommentVNode("",!0),g.subtitle?(i.openBlock(),i.createElementBlock("div",Ym,i.toDisplayString(g.subtitle),1)):i.createCommentVNode("",!0),g.bg_text?(i.openBlock(),i.createElementBlock("div",{key:3,class:"banner-text",style:i.normalizeStyle({backgroundImage:`url(${g.bg_text})`,"--pc-width":g.pc_text_width,"--pc-height":g.pc_text_height,"--pad-width":g.pad_text_width,"--pad-height":g.pad_text_height})},null,4)):i.createCommentVNode("",!0),g.btn?(i.openBlock(),i.createElementBlock("div",Xm,[i.createVNode(i.unref(A.OButton),{href:g.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.btn),1)]),_:2},1032,["href","size"])])):i.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),sh=Qe._export_sfc(Km,[["__scopeId","data-v-2356da15"]]),Qm={class:"cookie-notice-content"},Zm=["type"],Jm={class:"cookie-title"},eg={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},tg={class:"cookie-zh-title",style:{"margin-top":"0"}},ig=["href"],ng={key:1,class:"cookie-en-title"},rg={key:0,class:"cookie-en-content"},sg={class:"cookie-en-desc"},ag=["href"],og={class:"cookie-notice-right"},lg={class:"cookie-dlg-title"},ug={class:"cookie-dlg-content"},cg={class:"content-item"},dg={class:"item-header"},hg={class:"item-title"},fg={class:"item-extra"},pg={class:"item-detail"},mg={class:"content-item"},gg={class:"item-header"},vg={class:"item-title"},yg={class:"item-extra"},_g={class:"item-detail"},Tg="0",ec="1",bg="2",Ls="3",xg="agreed-cookiepolicy-zh",Cg="agreed-cookiepolicy-en",Sg=i.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:t}){const n=r,s=t,{lePadV:a,leLaptop:o,isPhone:l}=Nt.useScreen(),{locale:c,t:d}=Qe.useI18n(),g=i.computed(()=>c.value==="zh"),m=i.ref(),S=i.computed(()=>m.value?!!getComputedStyle(m.value).getPropertyValue("--grid-content-width"):!1),T=i.computed(()=>g.value?xg:Cg),C=i.ref(!1),y=qi.useVModel(n,"visible",s,{defaultValue:!1}),k=Q=>{const L=document.cookie.split(";").find(V=>V.split("=")[0].trim()===encodeURIComponent(Q));return L?decodeURIComponent(L.split("=")[1]):null},O=(Q,L,V,M)=>{const j=`; max-age=${V*24*60*60}`;document.cookie=`${encodeURIComponent(Q)}=${encodeURIComponent(L)}${j}; path=/; domain=${M}`},I=(Q,L)=>{document.cookie=`${encodeURIComponent(Q)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${L}`},D=Q=>{typeof Q=="boolean"?y.value=Q:y.value=!y.value,i.nextTick(()=>{!y.value&&g.value&&k(T.value)!==Ls&&O(T.value,Ls,180,n.cookieDomain??location.hostname)})},q=i.ref(!1),$=Q=>{typeof Q=="boolean"?q.value=Q:q.value=!q.value},U=()=>g.value?k(T.value)!==Ls:(k(T.value)??"0")===Tg,N=()=>g.value?k(T.value)===Ls:k(T.value)===ec;i.onMounted(()=>{U()&&D(!0)}),i.watch(c,()=>{D(U())});const z=()=>{C.value=!0,I(T.value,n.cookieDomain??location.hostname),O(T.value,ec,180,n.cookieDomain??location.hostname),D(!1)},b=()=>{C.value=!1,I(T.value,n.cookieDomain??location.hostname),O(T.value,bg,180,n.cookieDomain??location.hostname),D(!1)},E=i.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{C.value?z():b(),$(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{C.value=!0,z(),$(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{C.value?z():b(),$(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{C.value=!0,z(),$(!1)}}]),P=Q=>{Q&&(C.value=N())};return e({check(){N()===y.value&&D()}}),(Q,L)=>(i.openBlock(),i.createBlock(i.unref(Qe.ClientOnly),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.Teleport,{to:r.wrapper||"#app"},[i.unref(y)?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:m,class:"cookie-notice"},[i.createElementVNode("div",Qm,[i.createElementVNode("div",{type:i.unref(c),class:i.normalizeClass({"cookie-notice-wrap-grid":S.value,"cookie-notice-wrap":!S.value})},[i.createElementVNode("div",Jm,[g.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",eg,[...L[4]||(L[4]=[i.createElementVNode("path",{fill:"#002fa7",d:"M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z"},null,-1),i.createElementVNode("path",{fill:"#fff",d:"M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"},null,-1)])]))]),_:1}),i.createElementVNode("p",tg,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,ig)])],64)):(i.openBlock(),i.createElementBlock("p",ng,i.toDisplayString(i.unref(d)("cookie.title",[r.community])),1)),i.createVNode(i.unref(A.OIcon),{class:"cookie-notice-close",onClick:L[0]||(L[0]=V=>D(!1))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconClose))]),_:1})]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",rg,[i.createElementVNode("p",sg,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,ag),L[5]||(L[5]=i.createTextVNode(". ",-1))]),i.createElementVNode("div",og,[i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.acceptAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.rejectAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:L[1]||(L[1]=V=>$(!0))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.manage")),1)]),_:1})])]))],10,Zm)]),i.createVNode(i.unref(A.ODialog),{visible:q.value,"onUpdate:visible":L[3]||(L[3]=V=>q.value=V),size:i.unref(o)?"medium":"large","phone-half-full":i.unref(a),"main-class":S.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:E.value,onChange:P,style:{"--dlg-radius":"4px"}},{header:i.withCtx(()=>[i.createElementVNode("span",lg,i.toDisplayString(i.unref(d)("cookie.manage")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",ug,[i.createElementVNode("div",cg,[i.createElementVNode("div",dg,[i.createElementVNode("span",hg,i.toDisplayString(i.unref(d)("cookie.necessaryCookie")),1),i.createElementVNode("span",fg,i.toDisplayString(i.unref(d)("cookie.alwaysOn")),1)]),i.createElementVNode("div",pg,i.toDisplayString(i.unref(d)("cookie.necessaryCookieDetail")),1)]),i.createElementVNode("div",mg,[i.createElementVNode("div",gg,[i.createElementVNode("span",vg,i.toDisplayString(i.unref(d)("cookie.analyticalCookie")),1),i.createElementVNode("span",yg,[i.createVNode(i.unref(A.OSwitch),{modelValue:C.value,"onUpdate:modelValue":L[2]||(L[2]=V=>C.value=V)},null,8,["modelValue"])])]),i.createElementVNode("div",_g,i.toDisplayString(i.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):i.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),ah=Qe._export_sfc(Sg,[["__scopeId","data-v-f7b7244e"]]),Eg={key:0,class:"atom"},kg={class:"atom-text"},wg=["href"],Dg=["src"],Ag={key:0,class:"quick-nav"},Ng={class:"category-title"},Ig={class:"navs"},Og=["href"],Bg={key:0,class:"friendship-link"},Lg={class:"friendship-link-title"},Mg={class:"friendship-link-box"},Pg=["href"],Rg={key:0,class:"footer-logo"},Vg=["src"],Fg=["src"],$g=["href"],Ug={key:1,class:"footer-option"},qg={class:"footer-option-item"},jg=["href"],Hg={class:"license"},zg={class:"copyright"},Gg={class:"filing"},Wg=["href"],Yg=["src"],Xg={key:2,class:"footer-right"},Kg={key:0,class:"code-box"},Qg=["src"],Zg={class:"code-layer"},Jg=["src"],e1={class:"txt"},t1={class:"app-footer-pc"},i1={key:0,class:"footer-left"},n1=["href"],r1=["src"],s1={key:0,class:"footer-right"},a1=["href"],o1={class:"app-footer-mb"},l1={key:0,class:"links"},u1=["href"],c1={class:"copyright"},d1={key:0,class:"approval"},h1=["href"],f1=["src"],p1=i.defineComponent({__name:"OFooter",props:{simple:{default:!1},atom:{default:void 0},lang:{default:void 0},quickNav:{default:void 0},friendshipLink:{default:void 0},footerLogo:{default:void 0},footerOption:{default:void 0},qrcode:{default:void 0},footerBg:{default:void 0}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(i.openBlock(),i.createBlock(mn,{key:1},{default:i.withCtx(()=>[i.createElementVNode("div",t1,[t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",i1,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,n1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,r1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",s1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,a1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)]),i.createElementVNode("div",o1,[t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",l1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,u1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"copyright",{},()=>[i.createElementVNode("div",c1,i.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",d1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,h1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,f1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)])]),_:3})):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.$slots.atom||e.atom?(i.openBlock(),i.createBlock(mn,{key:0},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"atom",{},()=>[e.atom?(i.openBlock(),i.createElementBlock("div",Eg,[i.createElementVNode("p",kg,i.toDisplayString(e.atom[e.lang].title),1),i.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[i.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Dg)],8,wg)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.ODivider),{class:"atom-divider"})],!0)]),_:3})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"footer-content",style:i.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[i.createVNode(mn,null,{default:i.withCtx(()=>[t.$slots.quickNav||e.quickNav?i.renderSlot(t.$slots,"quickNav",{key:0},()=>[e.quickNav?(i.openBlock(),i.createElementBlock("div",Ag,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.quickNav[e.lang],s=>(i.openBlock(),i.createElementBlock("div",{key:s.title,class:"category"},[i.createElementVNode("div",Ng,i.toDisplayString(s.title),1),i.createElementVNode("ul",Ig,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.list,a=>(i.openBlock(),i.createElementBlock("li",{key:a.title,class:"nav"},[i.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(a.title),9,Og)]))),128))])]))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.friendshipLink||e.friendshipLink?i.renderSlot(t.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(i.openBlock(),i.createElementBlock("div",Bg,[i.createElementVNode("div",Lg,i.toDisplayString(e.friendshipLink.title[e.lang]),1),i.createElementVNode("div",Mg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.friendshipLink.link[e.lang],s=>(i.openBlock(),i.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},i.toDisplayString(s.title),9,Pg))),128))])])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"footer",{},()=>[i.createElementVNode("div",{class:i.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(i.openBlock(),i.createElementBlock("div",Rg,[i.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Vg),i.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Fg),i.createElementVNode("p",null,[i.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},i.toDisplayString(e.footerLogo.email),9,$g)])])):i.createCommentVNode("",!0),e.footerOption?(i.openBlock(),i.createElementBlock("div",Ug,[i.createElementVNode("div",qg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url},i.toDisplayString(s.name),9,jg),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):i.createCommentVNode("",!0)],64))),128))]),i.createElementVNode("p",Hg,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].licenseText),1),i.createTextVNode(" "+i.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),i.createElementVNode("div",zg,[i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("div",Gg,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,Wg),i.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,Yg),i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):i.createCommentVNode("",!0),e.qrcode?(i.openBlock(),i.createElementBlock("div",Xg,[e.lang==="zh"?(i.openBlock(),i.createElementBlock("div",Kg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.qrcode,(s,a)=>(i.openBlock(),i.createElementBlock("div",{key:a,class:"code-pop"},[i.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,Qg),i.createElementVNode("div",Zg,[i.createElementVNode("img",{src:s.code,alt:""},null,8,Jg),i.createElementVNode("p",e1,i.toDisplayString(s.label),1)])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),oh=Qe._export_sfc(p1,[["__scopeId","data-v-e6208e27"]]),m1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function g1(r,e){return i.openBlock(),i.createElementBlock("svg",m1,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const El={name:"components-icon-close",render:g1},v1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function y1(r,e){return i.openBlock(),i.createElementBlock("svg",v1,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),i.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const tc={name:"components-icon-header-search",render:y1},_1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function T1(r,e){return i.openBlock(),i.createElementBlock("svg",_1,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"},null,-1)])])}const b1={name:"components-icon-header-delete",render:T1},x1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function C1(r,e){return i.openBlock(),i.createElementBlock("svg",x1,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"},null,-1)])])}const S1={name:"components-icon-delete",render:C1},E1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function k1(r,e){return i.openBlock(),i.createElementBlock("svg",E1,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const w1={name:"components-icon-header-back",render:k1},D1={class:"o-header-search"},A1={class:"o-header-search-drawer"},N1={key:0,class:"o-header-search-recommend-container"},I1=["onClick"],O1={key:1,class:"o-header-search-history-container"},B1={class:"o-header-search-history-header"},L1={class:"o-header-search-history-header-title"},M1={class:"o-header-search-history-item-container"},P1=["onClick"],R1={class:"o-header-search-history-item-text"},V1={key:3,class:"o-header-search-hot-container"},F1={class:"o-header-search-hot-header"},$1={class:"o-header-search-hot-item-container"},U1=["onClick"],q1=i.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{}},emits:["update:modelValue","update:historyItems","clear","search","delete-history","delete-history-item"],setup(r,{emit:e}){const{lePadV:t}=Nt.useScreen(),{t:n}=Qe.useI18n(),s=r,a=e,o=i.ref(s.modelValue),l=i.ref(s.historyItems),c=i.ref(!1),d=i.ref(),g=i.computed(()=>!t.value&&c.value||t.value&&o.value);i.watch(()=>s.modelValue,D=>{o.value!==D&&(o.value=D)}),i.watch(()=>o.value,D=>{a("update:modelValue",D)}),i.watch(()=>s.historyItems,D=>{l.value!==D&&(l.value=D)}),i.watch(()=>l.value,D=>{a("update:historyItems",D)}),i.onMounted(()=>{if(s.storeHistory&&s.storageKey)try{const D=JSON.parse(localStorage.getItem(s.storageKey)||"[]");Array.isArray(D)&&D.length&&(l.value=Array.from(new Set([...l.value,...D])))}catch{}});const m=()=>{c.value=!0},S=()=>{const D=o.value.trim();D&&(c.value=!1,l.value.unshift(D),l.value=Array.from(new Set(l.value)),l.value.length>s.maxHistoryCount&&l.value.pop(),s.storeHistory&&s.storeHistory&&localStorage.setItem(s.storageKey,JSON.stringify(l.value)),a("search",D),s.searchUrl&&window.open(s.searchUrl+D,s.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},T=()=>{o.value="",a("clear"),t.value||(c.value=!1)},C=()=>{const D=[...l.value];l.value=[],s.storeHistory&&s.storeHistory&&localStorage.removeItem(s.storageKey),a("delete-history",D)},y=D=>{l.value=l.value.filter(q=>q!==D),s.storeHistory&&s.storeHistory&&(l.value.length?localStorage.setItem(s.storageKey,JSON.stringify(l.value)):localStorage.removeItem(s.storageKey)),a("delete-history-item",D)},k=D=>{o.value=D,S()},O=()=>{o.value="",c.value=!1},I=i.ref();return qi.onClickOutside(I,T),(D,q)=>(i.openBlock(),i.createElementBlock("div",D1,[i.createElementVNode("div",{ref_key:"posWrapper",ref:I,class:i.normalizeClass({"o-header-search-input-pc-wrapper":!i.unref(t),"o-header-search-input-pc-wrapper-left":!i.unref(t)&&r.expandDirection==="left","o-header-search-input-pc-wrapper-right":!i.unref(t)&&r.expandDirection==="right","o-header-search-input-mobile-wrapper":i.unref(t),focus:c.value})},[i.createElementVNode("div",{class:i.normalizeClass(["o-header-search-input-wrapper",{focus:c.value}])},[i.unref(t)&&c.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon",onClick:O},{default:i.withCtx(()=>[i.createVNode(i.unref(w1))]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OInput),{ref_key:"inputRef",ref:d,modelValue:o.value,"onUpdate:modelValue":q[0]||(q[0]=$=>o.value=$),class:"o-header-search-input",placeholder:c.value?r.expandedPlaceholder??i.unref(n)("search.expandedPlaceholder"):r.placeholder??i.unref(n)("search.placeholder"),onFocus:m,onKeyup:i.withKeys(S,["enter"])},{prefix:i.withCtx(()=>[i.renderSlot(D.$slots,"input-prefix",{},()=>[i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})],!0)]),suffix:i.withCtx(()=>[i.renderSlot(D.$slots,"input-suffix",{},()=>[r.clearable&&g.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon close",onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})):i.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),i.unref(t)&&c.value?(i.openBlock(),i.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:S},i.toDisplayString(r.searchTextMobile??i.unref(n)("search")),1)):i.createCommentVNode("",!0)],2),i.withDirectives(i.createElementVNode("div",A1,[i.renderSlot(D.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:l.value,hotItems:r.hotItems},()=>[r.recommendItems.length?(i.openBlock(),i.createElementBlock("div",N1,[i.renderSlot(D.$slots,"recommend-header",{recommend:r.recommendItems},void 0,!0),i.renderSlot(D.$slots,"recommend-content",{recommend:r.recommendItems},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.recommendItems,$=>(i.openBlock(),i.createElementBlock("div",{class:"o-header-search-recommend-item",key:$,onClick:U=>k($)},i.toDisplayString($),9,I1))),128))],!0)])):l.value.length?(i.openBlock(),i.createElementBlock("div",O1,[i.renderSlot(D.$slots,"history-header",{history:l.value},()=>[i.createElementVNode("div",B1,[i.createElementVNode("span",L1,i.toDisplayString(r.historyTitle??i.unref(n)("search.history")),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon",onClick:C},{default:i.withCtx(()=>[i.createVNode(i.unref(S1))]),_:1})])],!0),i.renderSlot(D.$slots,"history-content",{history:l.value},()=>[i.createElementVNode("div",M1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-history-item",onClick:U=>k($)},[i.createElementVNode("span",R1,i.toDisplayString($),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-history-item-icon",onClick:i.withModifiers(U=>y($),["stop"])},{default:i.withCtx(()=>[i.createVNode(i.unref(b1),{class:"icon-delete"})]),_:1},8,["onClick"])],8,P1))),128))])],!0)])):i.createCommentVNode("",!0),(r.recommendItems.length||l.value.length)&&r.hotItems.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"o-header-search-drawer-divider"})):i.createCommentVNode("",!0),r.hotItems.length?(i.openBlock(),i.createElementBlock("div",V1,[i.renderSlot(D.$slots,"hot-header",{hot:r.hotItems},()=>[i.createElementVNode("div",F1,i.toDisplayString(r.hotTitle??i.unref(n)("search.hot")),1)],!0),i.renderSlot(D.$slots,"hot-content",{hot:r.hotItems},()=>[i.createElementVNode("div",$1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.hotItems,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-hot-item",onClick:U=>k($)},i.toDisplayString($),9,U1))),128))])],!0)])):i.createCommentVNode("",!0)],!0)],512),[[i.vShow,c.value]])],2),i.unref(t)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:m},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})):i.createCommentVNode("",!0)]))}}),lh=Qe._export_sfc(q1,[["__scopeId","data-v-9f1bd8fc"]]),j1=["src"],H1=i.defineComponent({__name:"AppAvatar",props:{avatar:{type:String,default:""},name:{type:String,default:"",required:!0},size:{type:String,default:"medium"},customSize:{type:Number,default:0},variant:{type:String,default:"round"}},setup(r){const e=r,t=["#058EF0","#FA7305","#03B5A5"],n=i.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=i.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?t[((l=e.name)==null?void 0:l.length)%t.length]:"transparent";let o=0;return e.customSize?o=Number(e.customSize):o={mini:16,small:24,medium:40,large:64}[e.size],a.height=`${o}px`,a.width=`${o}px`,a["font-size"]=`${o/2}px`,a});return(a,o)=>r.avatar&&!r.avatar.includes("gitcode")?(i.openBlock(),i.createElementBlock("img",{key:0,src:r.avatar,class:i.normalizeClass(["img-avatar",r.variant]),style:i.normalizeStyle(s.value),alt:""},null,14,j1)):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["word-avatar",r.variant]),style:i.normalizeStyle(s.value)},i.toDisplayString(n.value),7))}}),z1=Qe._export_sfc(H1,[["__scopeId","data-v-340348ce"]]),G1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function W1(r,e){return i.openBlock(),i.createElementBlock("svg",G1,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M9.412 10.332c0 2.188 1.066 4.127 2.708 5.326-4.858 1.582-8.364 6.052-8.364 11.328 0 0.515 0.418 0.933 0.933 0.933s0.933-0.418 0.933-0.933c0-5.465 4.487-9.922 10.092-10.070 0.095 0.004 0.191 0.006 0.288 0.006 3.639 0 6.59-2.95 6.59-6.59s-2.951-6.59-6.59-6.59-6.59 2.95-6.59 6.59zM16.088 15.049c-0.028-0.003-0.057-0.004-0.087-0.004-0.061 0-0.122 0-0.183 0.001-2.524-0.096-4.541-2.172-4.541-4.72 0-2.608 2.115-4.723 4.723-4.723s4.723 2.115 4.723 4.723c0 2.579-2.067 4.676-4.635 4.722zM21.784 16.465c3.945 2.064 6.463 6.077 6.463 10.528 0 0.515-0.418 0.933-0.933 0.933s-0.933-0.418-0.933-0.933c0-3.744-2.123-7.127-5.462-8.874-0.457-0.239-0.633-0.803-0.394-1.26s0.803-0.633 1.26-0.394z"},null,-1)])])}const Y1={name:"components-icon-avatar-line",render:W1},X1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function K1(r,e){return i.openBlock(),i.createElementBlock("svg",X1,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M5.759 8.873c0.251-0.251 0.644-0.271 0.918-0.063l0.072 0.063 5.016 5.016c0.1 0.1 0.254 0.115 0.37 0.043l0.054-0.043 5.062-5.062c0.273-0.273 0.717-0.273 0.99 0 0.251 0.251 0.271 0.644 0.063 0.918l-0.063 0.072-5.062 5.062c-0.629 0.629-1.628 0.662-2.296 0.099l-0.108-0.099-5.016-5.016c-0.273-0.273-0.273-0.717 0-0.99z"},null,-1)])])}const kl={name:"components-icon-chevron-down",render:K1},Q1={class:"header-user"},Z1={key:0,class:"user-info"},J1={class:"info-wrap hover-icon-rotate"},e2={class:"user-account"},t2={key:1},i2=i.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:t}=Nt.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(i.openBlock(),i.createElementBlock("div",Q1,[r.token?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Y1))]),_:1})),i.createVNode(i.Transition,{name:"header-user-zoom-in"},{default:i.withCtx(()=>[r.token?(i.openBlock(),i.createElementBlock("div",Z1,[i.createVNode(i.unref(A.ODropdown),{trigger:i.unref(t)?"click":"hover",optionPosition:i.unref(t)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,c=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:d=>a(c)},{default:i.withCtx(()=>[c!=null&&c.total?(i.openBlock(),i.createBlock(i.unref(A.OBadge),{key:0,value:c.total,color:"danger",class:i.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(i.openBlock(),i.createElementBlock("span",t2,i.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",J1,[i.createVNode(i.unref(A.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:i.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:i.withCtx(()=>[i.createVNode(z1,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),i.createElementVNode("p",e2,i.toDisplayString(r.userInfo.username),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):i.createCommentVNode("",!0)]),_:1})]))}}),uh=Qe._export_sfc(i2,[["__scopeId","data-v-1db9d470"]]),ch=i.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(r){const e=r,t=i.reactive({locale:i.computed(()=>e.locale),theme:i.computed(()=>e.theme)});return i.provide(Qe.configProviderInjectKey,t),(n,s)=>(i.openBlock(),i.createBlock(i.unref(A.OConfigProvider),{locale:r.locale==="zh"?i.unref(Um):i.unref(qm)},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),n2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function r2(r,e){return i.openBlock(),i.createElementBlock("svg",n2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const zr={name:"components-icon-chevron-right",render:r2},s2={class:"section-wrapper"},a2={key:1,class:"section-title"},o2={key:2,class:"section-subtitle"},l2={key:1,class:"section-body"},u2={key:2,class:"section-footer"},c2=i.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(r){const e=r;return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["app-section",{"is-full":e.full}])},[i.createElementVNode("div",s2,[i.renderSlot(t.$slots,"main",{},()=>[t.$slots.header||e.title||e.subtitle?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[i.renderSlot(t.$slots,"header",{},()=>[i.unref(A.isArray)(e.title)?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.title,s=>(i.openBlock(),i.createElementBlock("h2",{key:s,class:"section-title"},i.toDisplayString(s),1))),128)):t.$slots.title||e.title?(i.openBlock(),i.createElementBlock("h2",a2,[i.renderSlot(t.$slots,"title",{},()=>[i.createTextVNode(i.toDisplayString(e.title),1)],!0)])):i.createCommentVNode("",!0),t.$slots.subtitle||e.subtitle?(i.openBlock(),i.createElementBlock("p",o2,[i.renderSlot(t.$slots,"subtitle",{},()=>[i.createTextVNode(i.toDisplayString(e.subtitle),1)],!0)])):i.createCommentVNode("",!0)],!0)],2)):i.createCommentVNode("",!0),t.$slots.default?(i.openBlock(),i.createElementBlock("div",l2,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer||e.footer?(i.openBlock(),i.createElementBlock("div",u2,[i.renderSlot(t.$slots,"footer",{},()=>[i.createVNode(i.unref(A.OLink),{href:e.footerHref,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"footer-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(zr))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):i.createCommentVNode("",!0)],!0)])],2))}}),dh=Qe._export_sfc(c2,[["__scopeId","data-v-2fc90e8a"]]),d2={class:"source-code"},h2={class:"title"},f2={class:"info-wrap hover-icon-rotate"},p2={class:"title"},m2=i.defineComponent({__name:"OSourceCode",props:{title:{default:void 0},options:{default:void 0},url:{default:void 0},icon:{default:void 0},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.url,"_blank")},t=i.ref(!1),n=s=>{t.value=s};return(s,a)=>(i.openBlock(),i.createElementBlock("div",d2,[r.url?(i.openBlock(),i.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({url:r.url}))},[i.createElementVNode("span",h2,i.toDisplayString(r.title),1),r.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):i.createCommentVNode("",!0)])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:i.normalizeClass({"dropdown-active":t.value}),onVisibleChange:n},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,o=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{onClick:l=>e(o),key:o.url,class:"list",style:i.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.label)+" ",1),o.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",f2,[i.createElementVNode("span",p2,i.toDisplayString(r.title),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1})])]),_:1},8,["class"]))]))}}),hh=Qe._export_sfc(m2,[["__scopeId","data-v-bcc2b46a"]]),g2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function v2(r,e){return i.openBlock(),i.createElementBlock("svg",g2,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const no={name:"components-icon-sun",render:v2},y2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function _2(r,e){return i.openBlock(),i.createElementBlock("svg",y2,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const ro={name:"components-icon-moon",render:_2},T2={class:"o-theme-switcher"},b2={key:1,class:"o-theme-switcher-mobile"},x2=i.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:no},darkIcon:{default:ro}},emits:["update:theme","change"],setup(r,{emit:e}){const t=r,n=e,{gtPhone:s}=Nt.useScreen(),a=i.computed({get(){return t.theme},set(c){n("update:theme",c),n("change",c)}}),o=i.computed(()=>t.type==="common"||t.type==="auto"&&s.value),l=()=>{a.value=a.value===t.lightValue?t.darkValue:t.lightValue};return(c,d)=>(i.openBlock(),i.createElementBlock("div",T2,[o.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[a.value===r.lightValue?(i.openBlock(),i.createBlock(i.unref(ro),{key:0})):(i.openBlock(),i.createBlock(i.unref(no),{key:1}))]),_:1})])):(i.openBlock(),i.createElementBlock("div",b2,[i.createVNode(i.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=g=>a.value=g),class:"o-theme-switch","checked-value":r.darkValue,"unchecked-value":r.lightValue},{on:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(no))]),_:1})]),off:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(ro))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),fh=Qe._export_sfc(x2,[["__scopeId","data-v-9aaa2610"]]),ic=/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/;var Me=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Me||{}),gi=(r=>(r.SIG="sig",r.GROUP="group",r))(gi||{});const C2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function S2(r,e){return i.openBlock(),i.createElementBlock("svg",C2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const E2={name:"meeting-icon-all",render:S2},k2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function w2(r,e){return i.openBlock(),i.createElementBlock("svg",k2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const wl={name:"meeting-icon-event",render:w2},D2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function A2(r,e){return i.openBlock(),i.createElementBlock("svg",D2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Dl={name:"meeting-icon-meet",render:A2},N2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function I2(r,e){return i.openBlock(),i.createElementBlock("svg",N2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const ph={name:"meeting-icon-summit",render:I2},so={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deep-blue-6))"},pn=0,gn=1,tn=2,mh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,O2=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],Ta=()=>{const{t:r}=Qe.useI18n(),e=i.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),t=i.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=i.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:t,approvalStatusMap:n}},B2={class:"o-activity-form"},L2={class:"time-config"},M2={class:"form-btns"},nc=i.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:t}){const n=t,s=A.useMessage(null),{lePadV:a}=Nt.useScreen(),{t:o}=Qe.useI18n(),l=o,{activityTypeMap:c}=Ta(),d=r,g=i.computed(()=>!!d.data),m=i.ref({title:"",organizer:"",start_date:"",end_date:"",register_end_date:"",activity_type:"",synopsis:"",register_url:"",content_url:"",address:"",start:"",end:"",is_publish:"true",email_list:"",approver:""}),S=i.ref(),T=i.ref(!1),C=i.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:U=>{if(U.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:U,end_date:N}=m.value,z=U.split(" "),b=N.split(" ");if(!U||!N)return{type:"danger",message:o("meeting.selectActivityDate")};const E=z[1].split(":").map(Number),P=b[1].split(":").map(Number);if(E[0]<8||E[0]>21||P[0]<8||P[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(nt.dayjs(U).valueOf()>nt.dayjs(N).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};m.value.start_date=z[0],m.value.end_date=b[0],m.value.start=z[1],m.value.end=b[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:U,end_date:N,end:z}=m.value;if(U&&nt.dayjs(`${N} ${z}`).valueOf()<nt.dayjs(U).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:U=>{if(U.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:U=>{const N=U.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(b=>!ic.test(b)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:U=>{const N=U.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(b=>!ic.test(b)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:U=>{if(U.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:U=>{const N=U.replaceAll(" ","").replaceAll(",",";")||"";if(N.length){if(N.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const z=N.split(";")||[];if(z.some(b=>!mh.test(b)))return{type:"danger",message:o("meeting.emailInvalid")};if(z.some(b=>b.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(z.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),y=i.computed(()=>d.admins||[]),k=i.ref(""),O=i.ref([]);c.value.forEach(U=>{O.value.push(U)});const I=U=>{const N=O.value.find(z=>z.label===U);m.value.activity_type=N==null?void 0:N.value},D=U=>U.getTime()<Date.now()-1440*60*1e3;i.watch(()=>d.data,U=>{var N;if(U){const{title:z,start_date:b,end_date:E,register_end_date:P,activity_type:Q,register_url:L,content_url:V,address:M,start:j,end:F,is_publish:Y,approver:K,update_activity_id:J,synopsis:Z,email_list:ie,organizer:ae}=U;let fe={title:z,start_date:b,end_date:E,register_end_date:P,activity_type:Q,register_url:L,content_url:V,address:M,start:j,end:F,is_publish:Y,approver:K,update_activity_id:J,synopsis:Z,email_list:ie,organizer:ae};m.value={...fe},k.value=(N=c.value.get(U.activity_type))==null?void 0:N.label,m.value.start_date=`${m.value.start_date} ${m.value.start}`,m.value.end_date=`${m.value.end_date} ${m.value.end}`}},{immediate:!0,deep:!0});const q=async U=>{var z,b,E,P,Q,L,V;let N=g.value?o("meeting.modifyActivity"):o(U?"meeting.create":"meeting.saveDraft");try{if((await((z=S.value)==null?void 0:z.validate())).some(j=>!!j))return;T.value=!0,m.value.is_publish=`${U}`,g.value&&((b=d.data)==null?void 0:b.status)===3?(m.value.update_activity_id=(E=d.data)==null?void 0:E.id,await((P=d.creatActivity)==null?void 0:P.call(d,m.value))):g.value?await((L=d.editActivity)==null?void 0:L.call(d,(Q=d.data)==null?void 0:Q.id,m.value)):await((V=d.creatActivity)==null?void 0:V.call(d,m.value)),s.success({content:o("meeting.activityActionSuccess",[m.value.title,N.toLowerCase()])}),$(),n("confirm")}finally{T.value=!1}},$=()=>{m.value={},n("close")};return e({confirm:q}),(U,N)=>(i.openBlock(),i.createElementBlock("div",B2,[i.createVNode(i.unref(A.OForm),{model:m.value,ref_key:"formRef",ref:S,"has-required":"","label-width":"108px",layout:i.unref(a)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:C.value.title,label:i.unref(o)("meeting.activityName"),field:"title"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityName"),modelValue:m.value.title,"onUpdate:modelValue":N[0]||(N[0]=z=>m.value.title=z)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.organizer,label:i.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:m.value.organizer,"onUpdate:modelValue":N[1]||(N[1]=z=>m.value.organizer=z)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.organizers,z=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:z.name,value:z.name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(z.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.activity_type,label:i.unref(o)("meeting.activityType"),field:"activity_type"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityType"),size:"large",modelValue:k.value,"onUpdate:modelValue":N[2]||(N[2]=z=>k.value=z),onChange:I},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,z=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:z.value,value:z.label},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(z.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),m.value.activity_type===1||m.value.activity_type===3?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:C.value.address,label:i.unref(o)("meeting.activityAddress"),field:"address"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityAddress"),modelValue:m.value.address,"onUpdate:modelValue":N[3]||(N[3]=z=>m.value.address=z)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{rules:C.value.start_date,label:i.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",L2,[i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.startDate"),field:"start_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElDatePicker),{size:"large",modelValue:m.value.start_date,"onUpdate:modelValue":N[4]||(N[4]=z=>m.value.start_date=z),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.endDate"),field:"end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElDatePicker),{size:"large",modelValue:m.value.end_date,"onUpdate:modelValue":N[5]||(N[5]=z=>m.value.end_date=z),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.register_end_date,label:i.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElDatePicker),{size:"large",modelValue:m.value.register_end_date,"onUpdate:modelValue":N[6]||(N[6]=z=>m.value.register_end_date=z),type:"datetime",placeholder:i.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.register_url,label:i.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:m.value.register_url,"onUpdate:modelValue":N[7]||(N[7]=z=>m.value.register_url=z)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.content_url,label:i.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityDetailUrl"),modelValue:m.value.content_url,"onUpdate:modelValue":N[8]||(N[8]=z=>m.value.content_url=z)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.synopsis,label:i.unref(o)("meeting.activityContent"),field:"synopsis"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(o)("meeting.enterActivityContent"),modelValue:m.value.synopsis,"onUpdate:modelValue":N[9]||(N[9]=z=>m.value.synopsis=z)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:C.value.email_list,label:i.unref(o)("meeting.email")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:g.value,size:"large",placeholder:i.unref(l)("meeting.enterEmail"),rows:4,modelValue:m.value.email_list,"onUpdate:modelValue":N[10]||(N[10]=z=>m.value.email_list=z)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:C.value.approver,label:i.unref(o)("meeting.activityApprover"),field:"approver"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:m.value.approver,"onUpdate:modelValue":N[11]||(N[11]=z=>m.value.approver=z)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.value,z=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:z,value:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(z),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),i.createElementVNode("div",M2,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:N[12]||(N[12]=z=>q(!0)),loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.value?i.unref(o)("common.save"):i.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:N[13]||(N[13]=z=>q(!1)),loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:$},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),P2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function R2(r,e){return i.openBlock(),i.createElementBlock("svg",P2,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const rc={name:"components-icon-filter",render:R2};/*! @license DOMPurify 2.5.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.9/LICENSE */function fn(r){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(r)}function Yo(r,e){return Yo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Yo(r,e)}function V2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gs(r,e,t){return V2()?Gs=Reflect.construct:Gs=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Yo(d,o.prototype),d},Gs.apply(null,arguments)}function Ai(r){return F2(r)||$2(r)||U2(r)||q2()}function F2(r){if(Array.isArray(r))return Xo(r)}function $2(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function U2(r,e){if(r){if(typeof r=="string")return Xo(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xo(r,e)}}function Xo(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function q2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var j2=Object.hasOwnProperty,sc=Object.setPrototypeOf,H2=Object.isFrozen,z2=Object.getPrototypeOf,G2=Object.getOwnPropertyDescriptor,ti=Object.freeze,yi=Object.seal,W2=Object.create,gh=typeof Reflect<"u"&&Reflect,Zs=gh.apply,Ko=gh.construct;Zs||(Zs=function(e,t,n){return e.apply(t,n)});ti||(ti=function(e){return e});yi||(yi=function(e){return e});Ko||(Ko=function(e,t){return Gs(e,Ai(t))});var Y2=_i(Array.prototype.forEach),ac=_i(Array.prototype.pop),Fr=_i(Array.prototype.push),Ws=_i(String.prototype.toLowerCase),ao=_i(String.prototype.toString),oc=_i(String.prototype.match),Di=_i(String.prototype.replace),X2=_i(String.prototype.indexOf),K2=_i(String.prototype.trim),Rt=_i(RegExp.prototype.test),oo=Q2(TypeError);function _i(r){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return Zs(r,e,n)}}function Q2(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ko(r,t)}}function je(r,e,t){var n;t=(n=t)!==null&&n!==void 0?n:Ws,sc&&sc(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=t(a);o!==a&&(H2(e)||(e[s]=o),a=o)}r[a]=!0}return r}function Cn(r){var e=W2(null),t;for(t in r)Zs(j2,r,[t])===!0&&(e[t]=r[t]);return e}function Ms(r,e){for(;r!==null;){var t=G2(r,e);if(t){if(t.get)return _i(t.get);if(typeof t.value=="function")return _i(t.value)}r=z2(r)}function n(s){return console.warn("fallback value for",s),null}return n}var lc=ti(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lo=ti(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),uo=ti(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z2=ti(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),co=ti(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),J2=ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uc=ti(["#text"]),cc=ti(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ho=ti(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dc=ti(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ps=ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ev=yi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tv=yi(/<%[\w\W]*|[\w\W]*%>/gm),iv=yi(/\${[\w\W]*}/gm),nv=yi(/^data-[\-\w.\u00B7-\uFFFF]+$/),rv=yi(/^aria-[\-\w]+$/),sv=yi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),av=yi(/^(?:\w+script|data):/i),ov=yi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lv=yi(/^html$/i),uv=yi(/^[a-z][.\w]*(-[.\w]+)+$/i),cv=function(){return typeof window>"u"?null:window},dv=function(e,t){if(fn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(s)&&(n=t.currentScript.getAttribute(s));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function vh(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cv(),e=function(ee){return vh(ee)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,d=r.NamedNodeMap,g=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,m=r.HTMLFormElement,S=r.DOMParser,T=r.trustedTypes,C=l.prototype,y=Ms(C,"cloneNode"),k=Ms(C,"nextSibling"),O=Ms(C,"childNodes"),I=Ms(C,"parentNode");if(typeof a=="function"){var D=n.createElement("template");D.content&&D.content.ownerDocument&&(n=D.content.ownerDocument)}var q=dv(T,t),$=q?q.createHTML(""):"",U=n,N=U.implementation,z=U.createNodeIterator,b=U.createDocumentFragment,E=U.getElementsByTagName,P=t.importNode,Q={};try{Q=Cn(n).documentMode?n.documentMode:{}}catch{}var L={};e.isSupported=typeof I=="function"&&N&&N.createHTMLDocument!==void 0&&Q!==9;var V=ev,M=tv,j=iv,F=nv,Y=rv,K=av,J=ov,Z=uv,ie=sv,ae=null,fe=je({},[].concat(Ai(lc),Ai(lo),Ai(uo),Ai(co),Ai(uc))),ce=null,Ae=je({},[].concat(Ai(cc),Ai(ho),Ai(dc),Ai(Ps))),we=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,Pe=null,$e=!0,We=!0,Ze=!1,Ye=!0,He=!1,ze=!0,Xe=!1,Ct=!1,ot=!1,Ee=!1,Ce=!1,pe=!1,Re=!0,tt=!1,ge="user-content-",ne=!0,oe=!1,de={},me=null,De=je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,ht=je({},["audio","video","img","source","image","track"]),Ve=null,Gt=je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),St="http://www.w3.org/1998/Math/MathML",li="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml",Et=It,pi=!1,Ft=null,Gi=je({},[St,li,It],ao),$t,Wi=["application/xhtml+xml","text/html"],x="text/html",w,X=null,se=n.createElement("form"),ve=function(ee){return ee instanceof RegExp||ee instanceof Function},Ie=function(ee){X&&X===ee||((!ee||fn(ee)!=="object")&&(ee={}),ee=Cn(ee),$t=Wi.indexOf(ee.PARSER_MEDIA_TYPE)===-1?$t=x:$t=ee.PARSER_MEDIA_TYPE,w=$t==="application/xhtml+xml"?ao:Ws,ae="ALLOWED_TAGS"in ee?je({},ee.ALLOWED_TAGS,w):fe,ce="ALLOWED_ATTR"in ee?je({},ee.ALLOWED_ATTR,w):Ae,Ft="ALLOWED_NAMESPACES"in ee?je({},ee.ALLOWED_NAMESPACES,ao):Gi,Ve="ADD_URI_SAFE_ATTR"in ee?je(Cn(Gt),ee.ADD_URI_SAFE_ATTR,w):Gt,Ke="ADD_DATA_URI_TAGS"in ee?je(Cn(ht),ee.ADD_DATA_URI_TAGS,w):ht,me="FORBID_CONTENTS"in ee?je({},ee.FORBID_CONTENTS,w):De,Ne="FORBID_TAGS"in ee?je({},ee.FORBID_TAGS,w):{},Pe="FORBID_ATTR"in ee?je({},ee.FORBID_ATTR,w):{},de="USE_PROFILES"in ee?ee.USE_PROFILES:!1,$e=ee.ALLOW_ARIA_ATTR!==!1,We=ee.ALLOW_DATA_ATTR!==!1,Ze=ee.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=ee.SAFE_FOR_TEMPLATES||!1,ze=ee.SAFE_FOR_XML!==!1,Xe=ee.WHOLE_DOCUMENT||!1,Ee=ee.RETURN_DOM||!1,Ce=ee.RETURN_DOM_FRAGMENT||!1,pe=ee.RETURN_TRUSTED_TYPE||!1,ot=ee.FORCE_BODY||!1,Re=ee.SANITIZE_DOM!==!1,tt=ee.SANITIZE_NAMED_PROPS||!1,ne=ee.KEEP_CONTENT!==!1,oe=ee.IN_PLACE||!1,ie=ee.ALLOWED_URI_REGEXP||ie,Et=ee.NAMESPACE||It,we=ee.CUSTOM_ELEMENT_HANDLING||{},ee.CUSTOM_ELEMENT_HANDLING&&ve(ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&ve(ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&typeof ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(we.allowCustomizedBuiltInElements=ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),He&&(We=!1),Ce&&(Ee=!0),de&&(ae=je({},Ai(uc)),ce=[],de.html===!0&&(je(ae,lc),je(ce,cc)),de.svg===!0&&(je(ae,lo),je(ce,ho),je(ce,Ps)),de.svgFilters===!0&&(je(ae,uo),je(ce,ho),je(ce,Ps)),de.mathMl===!0&&(je(ae,co),je(ce,dc),je(ce,Ps))),ee.ADD_TAGS&&(ae===fe&&(ae=Cn(ae)),je(ae,ee.ADD_TAGS,w)),ee.ADD_ATTR&&(ce===Ae&&(ce=Cn(ce)),je(ce,ee.ADD_ATTR,w)),ee.ADD_URI_SAFE_ATTR&&je(Ve,ee.ADD_URI_SAFE_ATTR,w),ee.FORBID_CONTENTS&&(me===De&&(me=Cn(me)),je(me,ee.FORBID_CONTENTS,w)),ne&&(ae["#text"]=!0),Xe&&je(ae,["html","head","body"]),ae.table&&(je(ae,["tbody"]),delete Ne.tbody),ti&&ti(ee),X=ee)},it=je({},["mi","mo","mn","ms","mtext"]),wt=je({},["annotation-xml"]),Wt=je({},["title","style","font","a","script"]),Ut=je({},lo);je(Ut,uo),je(Ut,Z2);var Pt=je({},co);je(Pt,J2);var ii=function(ee){var ye=I(ee);(!ye||!ye.tagName)&&(ye={namespaceURI:Et,tagName:"template"});var Se=Ws(ee.tagName),et=Ws(ye.tagName);return Ft[ee.namespaceURI]?ee.namespaceURI===li?ye.namespaceURI===It?Se==="svg":ye.namespaceURI===St?Se==="svg"&&(et==="annotation-xml"||it[et]):!!Ut[Se]:ee.namespaceURI===St?ye.namespaceURI===It?Se==="math":ye.namespaceURI===li?Se==="math"&&wt[et]:!!Pt[Se]:ee.namespaceURI===It?ye.namespaceURI===li&&!wt[et]||ye.namespaceURI===St&&!it[et]?!1:!Pt[Se]&&(Wt[Se]||!Ut[Se]):!!($t==="application/xhtml+xml"&&Ft[ee.namespaceURI]):!1},Je=function(ee){Fr(e.removed,{element:ee});try{ee.parentNode.removeChild(ee)}catch{try{ee.outerHTML=$}catch{ee.remove()}}},ni=function(ee,ye){try{Fr(e.removed,{attribute:ye.getAttributeNode(ee),from:ye})}catch{Fr(e.removed,{attribute:null,from:ye})}if(ye.removeAttribute(ee),ee==="is"&&!ce[ee])if(Ee||Ce)try{Je(ye)}catch{}else try{ye.setAttribute(ee,"")}catch{}},Yt=function(ee){var ye,Se;if(ot)ee="<remove></remove>"+ee;else{var et=oc(ee,/^[\r\n\t ]+/);Se=et&&et[0]}$t==="application/xhtml+xml"&&Et===It&&(ee='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ee+"</body></html>");var qt=q?q.createHTML(ee):ee;if(Et===It)try{ye=new S().parseFromString(qt,$t)}catch{}if(!ye||!ye.documentElement){ye=N.createDocument(Et,"template",null);try{ye.documentElement.innerHTML=pi?$:qt}catch{}}var At=ye.body||ye.documentElement;return ee&&Se&&At.insertBefore(n.createTextNode(Se),At.childNodes[0]||null),Et===It?E.call(ye,Xe?"html":"body")[0]:Xe?ye.documentElement:At},Xt=function(ee){return z.call(ee.ownerDocument||ee,ee,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},Dt=function(ee){return ee instanceof m&&(typeof ee.nodeName!="string"||typeof ee.textContent!="string"||typeof ee.removeChild!="function"||!(ee.attributes instanceof g)||typeof ee.removeAttribute!="function"||typeof ee.setAttribute!="function"||typeof ee.namespaceURI!="string"||typeof ee.insertBefore!="function"||typeof ee.hasChildNodes!="function")},ut=function(ee){return fn(o)==="object"?ee instanceof o:ee&&fn(ee)==="object"&&typeof ee.nodeType=="number"&&typeof ee.nodeName=="string"},qe=function(ee,ye,Se){L[ee]&&Y2(L[ee],function(et){et.call(e,ye,Se,X)})},Ci=function(ee){var ye;if(qe("beforeSanitizeElements",ee,null),Dt(ee)||Rt(/[\u0080-\uFFFF]/,ee.nodeName))return Je(ee),!0;var Se=w(ee.nodeName);if(qe("uponSanitizeElement",ee,{tagName:Se,allowedTags:ae}),ee.hasChildNodes()&&!ut(ee.firstElementChild)&&(!ut(ee.content)||!ut(ee.content.firstElementChild))&&Rt(/<[/\w]/g,ee.innerHTML)&&Rt(/<[/\w]/g,ee.textContent)||Se==="select"&&Rt(/<template/i,ee.innerHTML)||ee.nodeType===7||ze&&ee.nodeType===8&&Rt(/<[/\w]/g,ee.data))return Je(ee),!0;if(!ae[Se]||Ne[Se]){if(!Ne[Se]&&Tn(Se)&&(we.tagNameCheck instanceof RegExp&&Rt(we.tagNameCheck,Se)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Se)))return!1;if(ne&&!me[Se]){var et=I(ee)||ee.parentNode,qt=O(ee)||ee.childNodes;if(qt&&et)for(var At=qt.length,Tt=At-1;Tt>=0;--Tt){var Si=y(qt[Tt],!0);Si.__removalCount=(ee.__removalCount||0)+1,et.insertBefore(Si,k(ee))}}return Je(ee),!0}return ee instanceof l&&!ii(ee)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&Rt(/<\/no(script|embed|frames)/i,ee.innerHTML)?(Je(ee),!0):(He&&ee.nodeType===3&&(ye=ee.textContent,ye=Di(ye,V," "),ye=Di(ye,M," "),ye=Di(ye,j," "),ee.textContent!==ye&&(Fr(e.removed,{element:ee.cloneNode()}),ee.textContent=ye)),qe("afterSanitizeElements",ee,null),!1)},Bi=function(ee,ye,Se){if(Re&&(ye==="id"||ye==="name")&&(Se in n||Se in se))return!1;if(!(We&&!Pe[ye]&&Rt(F,ye))){if(!($e&&Rt(Y,ye))){if(!ce[ye]||Pe[ye]){if(!(Tn(ee)&&(we.tagNameCheck instanceof RegExp&&Rt(we.tagNameCheck,ee)||we.tagNameCheck instanceof Function&&we.tagNameCheck(ee))&&(we.attributeNameCheck instanceof RegExp&&Rt(we.attributeNameCheck,ye)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(ye))||ye==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&Rt(we.tagNameCheck,Se)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Se))))return!1}else if(!Ve[ye]){if(!Rt(ie,Di(Se,J,""))){if(!((ye==="src"||ye==="xlink:href"||ye==="href")&&ee!=="script"&&X2(Se,"data:")===0&&Ke[ee])){if(!(Ze&&!Rt(K,Di(Se,J,"")))){if(Se)return!1}}}}}}return!0},Tn=function(ee){return ee!=="annotation-xml"&&oc(ee,Z)},fs=function(ee){var ye,Se,et,qt;qe("beforeSanitizeAttributes",ee,null);var At=ee.attributes;if(!(!At||Dt(ee))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce};for(qt=At.length;qt--;){ye=At[qt];var Si=ye,yt=Si.name,br=Si.namespaceURI;if(Se=yt==="value"?ye.value:K2(ye.value),et=w(yt),Tt.attrName=et,Tt.attrValue=Se,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,qe("uponSanitizeAttribute",ee,Tt),Se=Tt.attrValue,!Tt.forceKeepAttr&&(ni(yt,ee),!!Tt.keepAttr)){if(!Ye&&Rt(/\/>/i,Se)){ni(yt,ee);continue}He&&(Se=Di(Se,V," "),Se=Di(Se,M," "),Se=Di(Se,j," "));var ps=w(ee.nodeName);if(Bi(ps,et,Se)){if(tt&&(et==="id"||et==="name")&&(ni(yt,ee),Se=ge+Se),ze&&Rt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Se)){ni(yt,ee);continue}if(q&&fn(T)==="object"&&typeof T.getAttributeType=="function"&&!br)switch(T.getAttributeType(ps,et)){case"TrustedHTML":{Se=q.createHTML(Se);break}case"TrustedScriptURL":{Se=q.createScriptURL(Se);break}}try{br?ee.setAttributeNS(br,yt,Se):ee.setAttribute(yt,Se),Dt(ee)?Je(ee):ac(e.removed)}catch{}}}}qe("afterSanitizeAttributes",ee,null)}},Yi=function be(ee){var ye,Se=Xt(ee);for(qe("beforeSanitizeShadowDOM",ee,null);ye=Se.nextNode();)qe("uponSanitizeShadowNode",ye,null),Ci(ye),fs(ye),ye.content instanceof s&&be(ye.content);qe("afterSanitizeShadowDOM",ee,null)};return e.sanitize=function(be){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye,Se,et,qt,At;if(pi=!be,pi&&(be="<!-->"),typeof be!="string"&&!ut(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw oo("dirty is not a string, aborting")}else throw oo("toString is not a function");if(!e.isSupported){if(fn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof be=="string")return r.toStaticHTML(be);if(ut(be))return r.toStaticHTML(be.outerHTML)}return be}if(Ct||Ie(ee),e.removed=[],typeof be=="string"&&(oe=!1),oe){if(be.nodeName){var Tt=w(be.nodeName);if(!ae[Tt]||Ne[Tt])throw oo("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof o)ye=Yt("<!---->"),Se=ye.ownerDocument.importNode(be,!0),Se.nodeType===1&&Se.nodeName==="BODY"||Se.nodeName==="HTML"?ye=Se:ye.appendChild(Se);else{if(!Ee&&!He&&!Xe&&be.indexOf("<")===-1)return q&&pe?q.createHTML(be):be;if(ye=Yt(be),!ye)return Ee?null:pe?$:""}ye&&ot&&Je(ye.firstChild);for(var Si=Xt(oe?be:ye);et=Si.nextNode();)et.nodeType===3&&et===qt||(Ci(et),fs(et),et.content instanceof s&&Yi(et.content),qt=et);if(qt=null,oe)return be;if(Ee){if(Ce)for(At=b.call(ye.ownerDocument);ye.firstChild;)At.appendChild(ye.firstChild);else At=ye;return(ce.shadowroot||ce.shadowrootmod)&&(At=P.call(t,At,!0)),At}var yt=Xe?ye.outerHTML:ye.innerHTML;return Xe&&ae["!doctype"]&&ye.ownerDocument&&ye.ownerDocument.doctype&&ye.ownerDocument.doctype.name&&Rt(lv,ye.ownerDocument.doctype.name)&&(yt="<!DOCTYPE "+ye.ownerDocument.doctype.name+`>
3
+ `+yt),He&&(yt=Di(yt,V," "),yt=Di(yt,M," "),yt=Di(yt,j," ")),q&&pe?q.createHTML(yt):yt},e.setConfig=function(be){Ie(be),Ct=!0},e.clearConfig=function(){X=null,Ct=!1},e.isValidAttribute=function(be,ee,ye){X||Ie({});var Se=w(be),et=w(ee);return Bi(Se,et,ye)},e.addHook=function(be,ee){typeof ee=="function"&&(L[be]=L[be]||[],Fr(L[be],ee))},e.removeHook=function(be){if(L[be])return ac(L[be])},e.removeHooks=function(be){L[be]&&(L[be]=[])},e.removeAllHooks=function(){L={}},e}var hv=vh();function fv(r,e){const t=r.hooks??{};let n;for(n in t){const s=t[n];s!==void 0&&e.addHook(n,s)}}function pv(){return hv()}function ba(r={},e=pv){const t=e();fv(r,t);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,g=r.default??{};if(d&&c!==void 0){s.innerHTML=t.sanitize(l,d[c]??g);return}s.innerHTML=t.sanitize(l,g)};return{mounted:n,updated:n}}const mv={class:"th-filter-wrapper",ref:"filterRef"},gv={key:1,class:"list-content-wrapper"},vv={class:"btn-wrapper"},hc=i.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const t=ba(),{t:n}=Qe.useI18n(),s=r,a=e,o=i.computed(()=>s.list.some(q=>{var $;return($=q.children)==null?void 0:$.length})),l=i.computed(()=>s.list.map(q=>{const $=(q.children||[]).map(U=>({label:U.label,value:U.value}));return{label:q.label,value:q.value,children:o.value?$:void 0}})),c=i.ref(!1);i.watch(()=>s.modelValue,q=>{s.multiple?d.value=q:S.value=q});const d=i.ref([]),g=q=>{d.value=q},m=i.ref([]),S=i.ref(null),T=q=>{S.value===q?S.value=null:S.value=q,y()},C=()=>{d.value=[],m.value=[],S.value=null,y()},y=()=>{let q=null;s.multiple?o.value?q=m.value:q=d.value:q=S.value,a("update:model-value",q),c.value=!0,i.nextTick(()=>{a("confirm"),c.value=!1})},k=i.computed(()=>d.value.length||m.value.length||S.value||s.modelValue),O=i.ref(null),I=async q=>{var N,z;const $=q.target.parentElement.parentElement;await i.nextTick();const U=$.querySelector("input");U.click(),await i.nextTick(),(N=U.change)==null||N.call(U,U),await i.nextTick(),(z=O.value)==null||z.$forceUpdate(),m.value=JSON.parse(JSON.stringify(m.value))},D=({data:q})=>i.h("span",{onclick:I},q.label);return(q,$)=>{const U=i.resolveComponent("ElCascaderPanel");return i.openBlock(),i.createElementBlock("div",mv,[i.createElementVNode("span",null,[i.renderSlot(q.$slots,"default")]),r.multiple?(i.openBlock(),i.createBlock(i.unref(A.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",k.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(rc))]),_:1})],2)]),default:i.withCtx(()=>[o.value?(i.openBlock(),i.createElementBlock("div",gv,[i.createVNode(U,{ref_key:"aref",ref:O,expandTrigger:"hover",renderLabel:D,modelValue:m.value,"onUpdate:modelValue":$[1]||($[1]=N=>m.value=N),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OCheckboxGroup),{direction:"v",onChange:g,modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=N=>d.value=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OCheckbox),{key:N.value,value:N.value},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),i.createVNode(i.unref(A.ODivider)),i.createElementVNode("div",vv,[i.createVNode(i.unref(A.OLink),{onClick:C},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.reset")),1)]),_:1}),i.createVNode(i.unref(A.OLink),{onClick:y},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:S.value,"onUpdate:modelValue":$[3]||($[3]=N=>S.value=N)},{dropdown:i.withCtx(()=>[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:i.unref(n)("common.all"),onClick:$[2]||($[2]=N=>T(""))},null,8,["style","class","label"]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":N.value===r.modelValue}]),key:N.value,value:N.value,onClick:z=>T(N.value)},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):i.createCommentVNode("",!0),l.value.length?i.createCommentVNode("",!0):i.renderSlot(q.$slots,"empty",{key:1})]),default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",k.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(rc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),yv={class:"more-text-wrapper"},_v={key:0},Tv={key:1},bv=i.defineComponent({__name:"MoreText",props:{text:{default:""},link:{type:Boolean,default:!1},lines:{default:3},show:{type:Boolean,default:!1}},setup(r){const e=r,{t}=Qe.useI18n(),n=i.ref(!1),s=i.ref(!1),a=i.ref(0),o=i.ref(null);i.onMounted(()=>{l()}),i.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{i.nextTick(()=>{const d=o.value;if(d){const g=document.createRange();g.setStart(d,0),g.setEnd(d,d.childNodes.length),s.value=g.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=g.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,g)=>(i.openBlock(),i.createElementBlock("div",yv,[i.createElementVNode("div",{class:i.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:i.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},i.toDisplayString(r.text),7),s.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"more-text-btn",onClick:g[0]||(g[0]=m=>n.value=!n.value)},[n.value?(i.openBlock(),i.createElementBlock("div",Tv,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.collapse")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronUp))]),_:1})])):(i.openBlock(),i.createElementBlock("div",_v,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.expand")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronDown))]),_:1})]))])):i.createCommentVNode("",!0)]))}}),xv=Qe._export_sfc(bv,[["__scopeId","data-v-15764adb"]]);var Js=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Cv(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),t}var Ys={exports:{}},Sv=Ys.exports,fc;function Ev(){return fc||(fc=1,(function(r,e){(function(t,n){r.exports=n()})(Sv,(function(){var t=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",g="week",m="month",S="quarter",T="year",C="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var M=["th","st","nd","rd"],j=V%100;return"["+V+(M[(j-20)%10]||M[j]||M[0])+"]"}},D=function(V,M,j){var F=String(V);return!F||F.length>=M?V:""+Array(M+1-F.length).join(j)+V},q={s:D,z:function(V){var M=-V.utcOffset(),j=Math.abs(M),F=Math.floor(j/60),Y=j%60;return(M<=0?"+":"-")+D(F,2,"0")+":"+D(Y,2,"0")},m:function V(M,j){if(M.date()<j.date())return-V(j,M);var F=12*(j.year()-M.year())+(j.month()-M.month()),Y=M.clone().add(F,m),K=j-Y<0,J=M.clone().add(F+(K?-1:1),m);return+(-(F+(j-Y)/(K?Y-J:J-Y))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:m,y:T,w:g,d,D:C,h:c,m:l,s:o,ms:a,Q:S}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},$="en",U={};U[$]=I;var N="$isDayjsObject",z=function(V){return V instanceof Q||!(!V||!V[N])},b=function V(M,j,F){var Y;if(!M)return $;if(typeof M=="string"){var K=M.toLowerCase();U[K]&&(Y=K),j&&(U[K]=j,Y=K);var J=M.split("-");if(!Y&&J.length>1)return V(J[0])}else{var Z=M.name;U[Z]=M,Y=Z}return!F&&Y&&($=Y),Y||!F&&$},E=function(V,M){if(z(V))return V.clone();var j=typeof M=="object"?M:{};return j.date=V,j.args=arguments,new Q(j)},P=q;P.l=b,P.i=z,P.w=function(V,M){return E(V,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var Q=(function(){function V(j){this.$L=b(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[N]=!0}var M=V.prototype;return M.parse=function(j){this.$d=(function(F){var Y=F.date,K=F.utc;if(Y===null)return new Date(NaN);if(P.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var J=Y.match(k);if(J){var Z=J[2]-1||0,ie=(J[7]||"0").substring(0,3);return K?new Date(Date.UTC(J[1],Z,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)):new Date(J[1],Z,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)}}return new Date(Y)})(j),this.init()},M.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(j,F){var Y=E(j);return this.startOf(F)<=Y&&Y<=this.endOf(F)},M.isAfter=function(j,F){return E(j)<this.startOf(F)},M.isBefore=function(j,F){return this.endOf(F)<E(j)},M.$g=function(j,F,Y){return P.u(j)?this[F]:this.set(Y,j)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(j,F){var Y=this,K=!!P.u(F)||F,J=P.p(j),Z=function(Pe,$e){var We=P.w(Y.$u?Date.UTC(Y.$y,$e,Pe):new Date(Y.$y,$e,Pe),Y);return K?We:We.endOf(d)},ie=function(Pe,$e){return P.w(Y.toDate()[Pe].apply(Y.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice($e)),Y)},ae=this.$W,fe=this.$M,ce=this.$D,Ae="set"+(this.$u?"UTC":"");switch(J){case T:return K?Z(1,0):Z(31,11);case m:return K?Z(1,fe):Z(0,fe+1);case g:var we=this.$locale().weekStart||0,Ne=(ae<we?ae+7:ae)-we;return Z(K?ce-Ne:ce+(6-Ne),fe);case d:case C:return ie(Ae+"Hours",0);case c:return ie(Ae+"Minutes",1);case l:return ie(Ae+"Seconds",2);case o:return ie(Ae+"Milliseconds",3);default:return this.clone()}},M.endOf=function(j){return this.startOf(j,!1)},M.$set=function(j,F){var Y,K=P.p(j),J="set"+(this.$u?"UTC":""),Z=(Y={},Y[d]=J+"Date",Y[C]=J+"Date",Y[m]=J+"Month",Y[T]=J+"FullYear",Y[c]=J+"Hours",Y[l]=J+"Minutes",Y[o]=J+"Seconds",Y[a]=J+"Milliseconds",Y)[K],ie=K===d?this.$D+(F-this.$W):F;if(K===m||K===T){var ae=this.clone().set(C,1);ae.$d[Z](ie),ae.init(),this.$d=ae.set(C,Math.min(this.$D,ae.daysInMonth())).$d}else Z&&this.$d[Z](ie);return this.init(),this},M.set=function(j,F){return this.clone().$set(j,F)},M.get=function(j){return this[P.p(j)]()},M.add=function(j,F){var Y,K=this;j=Number(j);var J=P.p(F),Z=function(fe){var ce=E(K);return P.w(ce.date(ce.date()+Math.round(fe*j)),K)};if(J===m)return this.set(m,this.$M+j);if(J===T)return this.set(T,this.$y+j);if(J===d)return Z(1);if(J===g)return Z(7);var ie=(Y={},Y[l]=n,Y[c]=s,Y[o]=t,Y)[J]||1,ae=this.$d.getTime()+j*ie;return P.w(ae,this)},M.subtract=function(j,F){return this.add(-1*j,F)},M.format=function(j){var F=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||y;var K=j||"YYYY-MM-DDTHH:mm:ssZ",J=P.z(this),Z=this.$H,ie=this.$m,ae=this.$M,fe=Y.weekdays,ce=Y.months,Ae=Y.meridiem,we=function($e,We,Ze,Ye){return $e&&($e[We]||$e(F,K))||Ze[We].slice(0,Ye)},Ne=function($e){return P.s(Z%12||12,$e,"0")},Pe=Ae||function($e,We,Ze){var Ye=$e<12?"AM":"PM";return Ze?Ye.toLowerCase():Ye};return K.replace(O,(function($e,We){return We||(function(Ze){switch(Ze){case"YY":return String(F.$y).slice(-2);case"YYYY":return P.s(F.$y,4,"0");case"M":return ae+1;case"MM":return P.s(ae+1,2,"0");case"MMM":return we(Y.monthsShort,ae,ce,3);case"MMMM":return we(ce,ae);case"D":return F.$D;case"DD":return P.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return we(Y.weekdaysMin,F.$W,fe,2);case"ddd":return we(Y.weekdaysShort,F.$W,fe,3);case"dddd":return fe[F.$W];case"H":return String(Z);case"HH":return P.s(Z,2,"0");case"h":return Ne(1);case"hh":return Ne(2);case"a":return Pe(Z,ie,!0);case"A":return Pe(Z,ie,!1);case"m":return String(ie);case"mm":return P.s(ie,2,"0");case"s":return String(F.$s);case"ss":return P.s(F.$s,2,"0");case"SSS":return P.s(F.$ms,3,"0");case"Z":return J}return null})($e)||J.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(j,F,Y){var K,J=this,Z=P.p(F),ie=E(j),ae=(ie.utcOffset()-this.utcOffset())*n,fe=this-ie,ce=function(){return P.m(J,ie)};switch(Z){case T:K=ce()/12;break;case m:K=ce();break;case S:K=ce()/3;break;case g:K=(fe-ae)/6048e5;break;case d:K=(fe-ae)/864e5;break;case c:K=fe/s;break;case l:K=fe/n;break;case o:K=fe/t;break;default:K=fe}return Y?K:P.a(K)},M.daysInMonth=function(){return this.endOf(m).$D},M.$locale=function(){return U[this.$L]},M.locale=function(j,F){if(!j)return this.$L;var Y=this.clone(),K=b(j,F,!0);return K&&(Y.$L=K),Y},M.clone=function(){return P.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},V})(),L=Q.prototype;return E.prototype=L,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",m],["$y",T],["$D",C]].forEach((function(V){L[V[1]]=function(M){return this.$g(M,V[0],V[1])}})),E.extend=function(V,M){return V.$i||(V(M,Q,E),V.$i=!0),E},E.locale=b,E.isDayjs=z,E.unix=function(V){return E(1e3*V)},E.en=U[$],E.Ls=U,E.p={},E}))})(Ys)),Ys.exports}var kv=Ev();const Te=fr(kv),mt=(r=new Date,e="YYYY-MM-DD")=>{let t=r;return t||(t=new Date),Te(new Date(t)).isValid()?Te(new Date(t)).format(e):t},wv=(r,e,t="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[t])||r},Dv=r=>{const e=/\d+/g,t=r.match(e)||"";return parseInt(t[0])},In=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let t=0,n=1;for(;e.length>0;){const s=e.pop();t+=parseInt(s)*n,n*=60}return t},fo=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,pc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),t=Math.floor((r-e*60*60)/60),n=r%60;return`${fo(e)}:${fo(t)}:${fo(n)}`},Qo=r=>{const e=r.split(":"),t=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return t*60*60+n*60+s},Av=r=>{const e=Math.floor(r/3600),t=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-t*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},Fn=()=>{const{t:r,locale:e}=Qe.useI18n(),t=i.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Me.ALL,icon:E2},{label:r("meeting.meetingTypeMeet"),value:Me.MEETING,icon:Dl,color:so.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Me.EVENTS,icon:wl,color:so.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Me.SUMMIT,icon:ph,color:so.summit,zIndex:1}]),n=i.computed(()=>[{label:r("meeting.day0"),value:pn,max:7},{label:r("meeting.week0"),value:gn,max:2},{label:r("meeting.month0"),value:tn,max:1}]),s=i.computed(()=>[{label:r("meeting.day"),value:pn,max:7},{label:r("meeting.week"),value:gn,max:2},{label:r("meeting.month"),value:tn,max:1}]),a=i.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=i.computed(()=>{const m=[];for(let S=1;S<=7;S++){const T=S%7;m.push({value:T,label:a.value[T]})}return m});return{t:r,locale:e,meetingTabs:t,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(m,S)=>m===gn?S.sort((T,C)=>{const y=o.value.findIndex(O=>O.value===T),k=o.value.findIndex(O=>O.value===C);return y-k}).map(T=>{const C=o.value.find(y=>y.value===T);return(C==null?void 0:C.label)||String(T)}).join(r("meeting.cycleSplit")):m===tn?S.join(r("meeting.cycleSplit")):"",getConfig:(m,S)=>{let T=m;const C=t.value.find(y=>y.value===T);return(C==null?void 0:C[S])||""},getPlatformLabel:m=>{switch(m){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return m}},getWeekFromDate:m=>a.value[Te(m).day()]}},Nv={class:"o-meeting-detail"},Iv={class:"label"},Ov={key:2},Bv={key:3,class:"value"},Lv={key:0,class:"extra"},Mv={class:"label"},Pv=i.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const t=r,{t:n,getPlatformLabel:s}=Fn(),a=i.computed(()=>[{label:n("meeting.meetingDetail"),key:"agenda",ellipsis:!0},{label:n("meeting.meetingCreator"),key:"sponsor"},{label:n("meeting.meetingDate2"),key:"timeRange",extra:"date"},{label:n("meeting.meetingId"),key:"mid"},{label:n("meeting.meetingPlatform"),key:"platform"},{label:n("meeting.meetingLink"),key:"join_url",isLink:!0},{label:n("meeting.meetingEtherpad"),key:"etherpad",isLink:!0},{label:n("meeting.meetingReplay"),key:"replay_url",isLink:!0}].slice(0,t.from==="my"?7:8)),o=i.computed(()=>{var S;const m=((S=t.data.live_url)==null?void 0:S.length)>0;return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(m?"meeting.livePlatform":"meeting.activityAddress"),key:m?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,t.from==="home"?5:8)}),l=i.computed(()=>{var S;const m=((S=t.data.live_url)==null?void 0:S.length)>0;return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(m?"meeting.livePlatform":"meeting.activityAddress"),key:m?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),c=i.computed(()=>t.data.type===Me.EVENTS?t.page===Me.APPROVAL?l.value:o.value:a.value),d=i.ref([]);return e({copyInfo:()=>{try{let m=`${n("meeting.meetingTopic")+t.data.topic}
4
+ `;return m+=[...d.value].reduce((S,T)=>`${S}${T.textContent}
5
+ `,""),navigator.clipboard.writeText(m),Promise.resolve()}catch(m){return Promise.reject(m)}}}),(m,S)=>(i.openBlock(),i.createElementBlock("div",Nv,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(T,C)=>{var y,k,O;return i.openBlock(),i.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:d,class:i.normalizeClass(["label-item",{"record-item":T.isRecord&&((y=r.data[T.key])==null?void 0:y.length),"link-item":T.isLink,"is-empty":!((k=r.data[T.key])!=null&&k.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:C},[r.data[T.key]&&!T.isRecord?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",Iv,i.toDisplayString(T.label),1),T.ellipsis?(i.openBlock(),i.createBlock(xv,{key:0,show:r.show,text:r.data[T.key]||"-"},null,8,["show","text"])):T.isLink?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:r.data[T.key]},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.data[T.key]),1)]),_:2},1032,["href"])):T.key==="platform"?(i.openBlock(),i.createElementBlock("span",Ov,i.toDisplayString(i.unref(s)(r.data[T.key])),1)):(i.openBlock(),i.createElementBlock("span",Bv,[T.extra?(i.openBlock(),i.createElementBlock("i",Lv,i.toDisplayString(r.data[T.extra]),1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(r.data[T.key]||"-"),1)]))],64)):i.createCommentVNode("",!0),T.isRecord&&((O=r.data[T.key])!=null&&O.length)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",Mv,i.toDisplayString(T.label),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data[T.key],I=>(i.openBlock(),i.createElementBlock("p",{key:I.create_time,class:"value"},i.toDisplayString(I.reason)+"   "+i.toDisplayString(i.unref(mt)(I.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+i.toDisplayString(I.action===1?i.unref(n)("meeting.approveReview"):i.unref(n)("meeting.rejectReview")),1))),128))])],64)):i.createCommentVNode("",!0)],2)}),128))]))}}),ts=Qe._export_sfc(Pv,[["__scopeId","data-v-7523f60f"]]),Rv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function Vv(r,e){return i.openBlock(),i.createElementBlock("svg",Rv,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M12.983 5.523c0.341 0 0.667 0.14 0.902 0.388l6.569 6.917c0.142 0.15 0.243 0.331 0.297 0.526 0.054 0.141 0.085 0.295 0.085 0.457 0 0.108-0.014 0.213-0.040 0.314l-0 13.942c0 1.964-1.592 3.556-3.556 3.556h-13.296c-1.964 0-3.556-1.592-3.556-3.556v-18.987c0-1.964 1.592-3.556 3.556-3.556zM11.528 8.011l-7.582 0.001c-0.589 0-1.067 0.478-1.067 1.067v18.987c0 0.589 0.478 1.067 1.067 1.067h13.296c0.589 0 1.067-0.478 1.067-1.067l-0.002-13.012-3.149 0.002c-1.935 0-3.515-1.547-3.555-3.482l-0.075-3.561zM9.777 24.987c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-4.432c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h4.432zM26.256 0.269c1.964 0 3.556 1.592 3.556 3.556v18.012c0 1.964-1.592 3.556-3.556 3.556h-2.586c-0.687 0-1.244-0.557-1.244-1.244s0.557-1.244 1.244-1.244h2.586c0.589 0 1.067-0.478 1.067-1.067v-18.012c0-0.589-0.478-1.067-1.067-1.067h-13.27c-0.496 0-0.912 0.338-1.032 0.796l-2.514 0.002c0.137-1.838 1.672-3.287 3.546-3.287h13.27zM12.112 21.432c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-6.743c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h6.743zM14.234 17.876c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-8.853c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h8.853zM14.052 9.7l0.039 1.821c0.012 0.58 0.486 1.045 1.066 1.045l1.617-0.002-2.722-2.864z"},null,-1)])])}const Al={name:"meeting-icon-copy",render:Vv},Fv={class:"meet-title-left"},$v=["title"],Uv={class:"text"},qv={key:0,class:"tag-wrapper"},jv={class:"start-time"},Hv={class:"calendar-info"},yh=i.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const{activityTypeMap:e}=Ta(),t=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Fn(),l=i.ref([]),c=A.useMessage(null),d=async y=>{await l.value[y].copyInfo(),c.success({content:n("common.copySuccess")})},g=i.ref([]),m=i.computed(()=>({SIG_GROUP:`${t.groupType===gi.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),S=i.ref(),T=new ResizeObserver(y=>{for(let k of y){const{height:O}=k.contentRect;k.target.classList.remove("hidden-divider"),O>=30&&k.target.classList.add("hidden-divider")}});i.watch(()=>t.list,()=>{t.list.length===1?g.value=[t.list[0].id]:g.value=[],i.nextTick(()=>{var y;(y=S.value)==null||y.forEach(k=>{T.observe(k)})})});const C=i.computed(()=>t.list.map(y=>{var F,Y;const k=y.type;let O="";if(k!=="meeting"){let K=(F=e.value.get(y.activity_type))==null?void 0:F.label;return y.start&&y.end?y.end_date===y.start_date?O=`${mt(y.start_date)} ${y.start}-${y.end}`:O=`${mt(y.start_date)} ${y.start}-${mt(y.end_date)} ${y.end}`:O=`${mt(y.start_date,"YYYY/MM/DD HH:mm")} ${mt(y.end_date,"YYYY/MM/DD HH:mm")}`,{...y,activity_type:K,dateRange:O}}const{is_cycle:I,date:D,start:q,end:$,cycle_start_date:U,cycle_end_date:N,cycle_start:z,cycle_end:b,cycle_type:E,cycle_interval:P,cycle_point:Q}=y;O=`${mt(D)} ${q} - ${$}`,I&&(O=`${mt(U)} - ${mt(N)}`);let L=`${q} - ${$}`,V=null,M=!1;const j=((Y=y.obs_data)==null?void 0:Y.filter(K=>K.text_video_url))||[];if(I){let K="";E===pn&&(K=n("meeting.cycleDay")),E===gn&&(P>1?K=n("meeting.cycleWeek.other",[o(E,Q),P]):K=n("meeting.cycleWeek.one",[o(E,Q)])),E===tn&&(K=n("meeting.cycleMonth",[o(E,Q)])),L=n("meeting.cycleMeetingText2",{startDate:U,endDate:N,startTime:z,endTime:b,cycleType:K}),M=j.some(J=>{var Z;return J.sub_id===((Z=y.cycle_sub.find(ie=>ie.date===D))==null?void 0:Z.sub_id)})}else M=j.length>0;return M&&(V=`${location.origin}/${s.value}/video/${y.group_name}/${y.mid}/${D}`),{...y,dateRange:O,timeRange:L,replay_url:V}}));return(y,k)=>{var O,I;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-list",(O=C.value)!=null&&O.length?"":"is-empty"])},[(I=C.value)!=null&&I.length?(i.openBlock(),i.createBlock(i.unref(A.OCollapse),{key:1,modelValue:g.value,"onUpdate:modelValue":k[0]||(k[0]=D=>g.value=D),style:{"--collapse-padding":"0"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(C.value,(D,q)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:D.id,value:D.id},{title:i.withCtx(()=>[i.createElementVNode("div",Fv,[i.createElementVNode("div",{class:"meet-title",title:D.topic||D.name},[i.createVNode(i.unref(A.OIcon),{style:i.normalizeStyle({backgroundColor:`${i.unref(a)(D.type,"color")}`})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(a)(D.type,"icon"))))]),_:2},1032,["style"]),i.createElementVNode("div",Uv,i.toDisplayString(D.topic||D.name||D.title),1),D.is_cycle?(i.openBlock(),i.createElementBlock("div",qv,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],8,$v),i.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:S},[i.createElementVNode("span",jv,[i.createElementVNode("span",null,i.toDisplayString(D.dateRange),1)]),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("div",null,[D.group_name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(m.value.SIG_GROUP)+" "+i.toDisplayString(D.group_name),1)],64)):i.createCommentVNode("",!0),D.activity_type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(D.activity_type),1)],64)):i.createCommentVNode("",!0)])],512),D.url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:D.url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(zr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.LEARN_MORE),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.join_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:D.join_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(zr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.JOIN_MEETING),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,href:D.content_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(zr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.DETAILS),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.register_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,href:D.register_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(zr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.SIGN),1)]),_:1},8,["href"])):i.createCommentVNode("",!0)]),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>d(q),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Al))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",Hv,[i.createVNode(ts,{show:g.value.includes(D.id),data:D,ref_for:!0,ref:$=>l.value[q]=$,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):i.renderSlot(y.$slots,"empty",{key:0})],2)}}}),zv={class:"o-meeting-calendar"},Gv={class:"calendar-body"},Wv={class:"calender-header-left"},Yv={class:"left-title"},Xv={class:"month-date"},Kv={class:"right-title"},Qv=["onClick"],Zv={class:"day-box"},Jv={class:"icon-box"},ey={class:"detail-list"},ty={class:"current-day"},iy={class:"right-title"},ny={class:"title-list"},ry="2021-01-01",mc=i.defineComponent({__name:"OMeetingCalendar",props:{getDateListRequest:{},getMeetingListRequest:{},getSummitListRequest:{default:async()=>[]},getSummitDatesRequest:{},getEventsListRequest:{default:async()=>[]},getEventsDatesRequest:{},hiddenEvents:{type:Boolean,default:!1},hiddenSummit:{type:Boolean,default:!1},groupType:{default:gi.SIG},groups:{default:()=>[]}},setup(r){i.useCssVars(Z=>({v5c3733fe:I.value}));const e=r,{t,locale:n,meetingTabs:s,getConfig:a}=Fn(),o=i.computed(()=>n.value===Qe.Locales.EN),l=i.ref(""),c=i.ref([]),d=i.ref([]),g=i.ref([]),m=i.ref([]),S=i.ref([]),T=i.ref([]),C=i.ref([]),y=i.ref(Me.ALL),k=i.computed(()=>{let Z=s.value;return e.hiddenEvents&&(Z=Z.filter(ie=>ie.value!==Me.EVENTS)),e.hiddenSummit&&(Z=Z.filter(ie=>ie.value!==Me.SUMMIT)),Z.filter(ie=>ie.value!==Me.ALL).length===1?[]:Z});i.watch(()=>k.value,()=>{var Z;y.value=((Z=k.value[0])==null?void 0:Z.value)??Me.MEETING});const O=i.ref(),I=i.ref("407px"),D=i.ref(!1),q=i.ref(""),$=i.ref(!1),U=i.ref(""),N=async Z=>{if(e.getSummitListRequest){const ie=await e.getSummitListRequest(Z);d.value=(ie||[]).map(ae=>({...ae,type:Me.SUMMIT}))}else d.value=[]},z=async Z=>{if(e.getEventsListRequest){const ie=await e.getEventsListRequest(Z);m.value=(ie||[]).map(ae=>({...ae,type:Me.EVENTS,start_date_time:`${mt(ae.start_date)} ${ae.start}`,end_date_time:`${mt(ae.end_date)} ${ae.end}`}))}else m.value=[]},b=async Z=>{e.getDateListRequest&&e.getDateListRequest(Z,U.value||"").then(ie=>{c.value=ie}),e.getEventsDatesRequest&&e.getEventsDatesRequest(Z).then(ie=>{S.value=ie}),e.getSummitDatesRequest&&e.getSummitDatesRequest(Z).then(ie=>{g.value=ie})},E=async Z=>{if(e.getMeetingListRequest&&Z.date)try{const ie=await e.getMeetingListRequest(Z.date,U.value,"");C.value=ie.map(ae=>({...ae,time:`${ae.start}-${ae.end}`,type:"meeting",date:ae.date||Z.date})).sort((ae,fe)=>{var ce,Ae;return parseInt((ce=ae.start||ae.cycle_start)==null?void 0:ce.replace(":",""))-parseInt(fe.end||((Ae=fe.cycle_end)==null?void 0:Ae.replace(":","")))})}catch{C.value=[]}},P=i.computed(()=>[...C.value,...m.value.filter(Z=>{var ie;return!Te(Z.start_date).isAfter(Te(q.value))&&!Te(q.value).isAfter(Te(Z.end_date))||((ie=Z.dates)==null?void 0:ie.includes(q.value))}),...d.value.filter(Z=>{var ie;return(ie=Z.dates)==null?void 0:ie.includes(q.value)})].filter(Z=>y.value==="all"?!0:Z.type===y.value)),Q=async Z=>{const ie=Te(Z).format("YYYY-MM-DD");if(q.value=ie,N(ie),z(ie),b(ie),T.value=[...new Set([...c.value,...g.value,...S.value])].flat().sort((ae,fe)=>Te(ae).isAfter(Te(fe))?1:-1),!Z)if(!T.value.length)l.value=mt(new Date);else{let ae=[...T.value].reverse().find(fe=>Te().isAfter(Te(fe)));ae||(ae=T.value.find(fe=>Te(fe).isAfter(Te()))),l.value=mt(ae)}E({date:ie,type:y.value})},L=qi.useDebounceFn((Z,ie)=>{if($.value){$.value=!1;return}if(new Date(Z).getTime()/1e3<1610380800){ie==null||ie.stopPropagation();return}Q(Z)},300),V=(Z,ie)=>{if(mt(ie)===mt(ry)&&Z==="prev-month"){D.value=!0;return}D.value=!1,O.value.selectDate(Z),L(mt(O.value.selectedDay))},M=()=>{i.nextTick(()=>{E({date:q.value,type:y.value}),b(q.value)})},j=Z=>Z.replace(/^0+(?=\d)/,""),F=Z=>{new MutationObserver(function(){I.value=`${Z.offsetHeight-2}px`}).observe(Z,{childList:!0,subtree:!0,characterData:!0})};i.onMounted(()=>{const Z=document.querySelector(".calendar-body .el-calendar__body");Z&&(F(Z),I.value=`${Z.offsetHeight-2}px`),Q()});const Y=i.watch(()=>T.value.length,()=>{A.isClient&&!q.value&&i.nextTick(()=>{const Z=document.querySelector(".is-today .out-box");Z&&($.value=!0,Z.click(),Y())})}),K=Z=>o.value?Z.split(" ").reverse().join(" "):Z,J=(Z,ie)=>Z===Me.MEETING?[Me.ALL,Me.MEETING].includes(y.value)&&c.value.includes(ie):Z===Me.SUMMIT?[Me.ALL,Me.SUMMIT].includes(y.value)&&g.value.includes(ie):Z===Me.EVENTS?[Me.ALL,Me.EVENTS].includes(y.value)&&S.value.includes(ie):!1;return(Z,ie)=>(i.openBlock(),i.createElementBlock("div",zv,[i.createElementVNode("div",Gv,[i.createVNode(i.unref(nt.ElCalendar),{ref_key:"calendar",ref:O,class:"calender"},{header:i.withCtx(({date:ae})=>[i.createElementVNode("div",Wv,[i.createElementVNode("div",Yv,[i.createVNode(i.unref(A.OIcon),{onClick:fe=>V("prev-month",ae)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft),{class:i.normalizeClass({disable:D.value})},null,8,["class"])]),_:1},8,["onClick"]),i.createElementVNode("span",Xv,i.toDisplayString(K(ae)),1),i.createVNode(i.unref(A.OIcon),{onClick:fe=>V("next-month",ae)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),i.createVNode(i.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":ie[0]||(ie[0]=fe=>U.value=fe),placeholder:i.unref(t)(r.groupType===i.unref(gi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,fe=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:fe,key:fe},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(fe),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",Kv,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(l.value).format("YYYY/MM/DD")),1)])]),"date-cell":i.withCtx(({data:ae})=>[i.createElementVNode("div",{class:i.normalizeClass(["out-box",{"has-calender":T.value.includes(ae.day)}]),onClick:fe=>i.unref(L)(ae.day,fe)},[i.createElementVNode("div",Zv,[i.createElementVNode("p",{class:i.normalizeClass([ae.isSelected?"is-selected":"","date-calender"])},i.toDisplayString(j(ae.day.split("-").at(-1)||"")),3),i.createElementVNode("div",Jv,[J(i.unref(Me).MEETING,ae.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"meeting",style:i.normalizeStyle({zIndex:i.unref(a)(i.unref(Me).MEETING,"zIndex"),backgroundColor:i.unref(a)(i.unref(Me).MEETING,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Dl))]),_:1},8,["style"])):i.createCommentVNode("",!0),J(i.unref(Me).EVENTS,ae.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"events",style:i.normalizeStyle({zIndex:i.unref(a)(i.unref(Me).EVENTS,"zIndex"),backgroundColor:i.unref(a)(i.unref(Me).EVENTS,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(wl))]),_:1},8,["style"])):i.createCommentVNode("",!0),J(i.unref(Me).SUMMIT,ae.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:2,class:"summit",style:i.normalizeStyle({zIndex:i.unref(a)(i.unref(Me).SUMMIT,"zIndex"),backgroundColor:i.unref(a)(i.unref(Me).SUMMIT,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(ph))]),_:1},8,["style"])):i.createCommentVNode("",!0)])])],10,Qv)]),_:1},512),i.createElementVNode("div",ey,[i.createElementVNode("div",ty,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(q.value).format("YYYY/MM/DD")),1)]),i.createElementVNode("div",iy,[i.createElementVNode("div",ny,[i.createVNode(i.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":ie[1]||(ie[1]=ae=>U.value=ae),placeholder:i.unref(t)(r.groupType===i.unref(gi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,ae=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:ae,key:ae},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ae),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),i.createVNode(i.unref(A.OTab),{modelValue:y.value,"onUpdate:modelValue":ie[2]||(ie[2]=ae=>y.value=ae),line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(k.value,ae=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:ae.value,value:ae.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(ae.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(ae.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OScroller),{class:"meeting-list","show-type":"hover",size:"small"},{default:i.withCtx(()=>[i.createVNode(yh,{list:P.value,groupType:r.groupType},{empty:i.withCtx(()=>[i.renderSlot(Z.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3})])])])]))}}),sy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function ay(r,e){return i.openBlock(),i.createElementBlock("svg",sy,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M16 0.371c1.623 0 3.214 0.248 4.731 0.729 0.59 0.187 0.916 0.817 0.729 1.406s-0.817 0.916-1.406 0.729c-1.299-0.412-2.662-0.624-4.054-0.624-7.394 0-13.389 5.994-13.389 13.389s5.994 13.389 13.389 13.389c7.394 0 13.389-5.994 13.389-13.389 0-4.287-2.027-8.235-5.402-10.747-0.496-0.369-0.599-1.071-0.23-1.567s1.071-0.599 1.567-0.23c3.937 2.931 6.305 7.541 6.305 12.544 0 8.632-6.997 15.629-15.629 15.629s-15.629-6.997-15.629-15.629c0-8.632 6.997-15.629 15.629-15.629zM16 22.816c1.002 0 1.814 0.812 1.814 1.814s-0.812 1.814-1.814 1.814c-1.002 0-1.814-0.812-1.814-1.814s0.812-1.814 1.814-1.814zM16.349 6.831c3.423 0 6.198 2.775 6.198 6.198 0 3.086-2.268 5.689-5.196 6.114-0.085 0.020-0.255 0.278-0.302 0.479 0 0-0.004 0.031-0.012 0.094v1.317c0 0.619-0.501 1.12-1.12 1.12-0.567 0-1.036-0.421-1.11-0.968 0 0-0.003-0.051-0.010-0.152v-1.317c0-1.154 0.814-2.461 2.133-2.77 1.929-0.283 3.378-1.946 3.378-3.916 0-2.186-1.772-3.958-3.958-3.958s-3.958 1.772-3.958 3.958c0 0.619-0.501 1.12-1.12 1.12s-1.12-0.501-1.12-1.12c0-3.423 2.775-6.198 6.198-6.198z"},null,-1)])])}const gc={name:"meeting-icon-help",render:ay},oy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function ly(r,e){return i.openBlock(),i.createElementBlock("svg",oy,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.6",fill:"#000",d:"M16.050 0.559c2.61 0 5.13 0.646 7.377 1.862 0.544 0.294 0.746 0.974 0.452 1.518s-0.974 0.746-1.518 0.452c-1.922-1.040-4.075-1.592-6.31-1.592-7.334 0-13.28 5.946-13.28 13.28s5.946 13.28 13.28 13.28c7.334 0 13.28-5.946 13.28-13.28 0-3.3-1.207-6.409-3.355-8.824-0.411-0.462-0.37-1.17 0.092-1.581s1.17-0.37 1.581 0.092c2.51 2.821 3.922 6.459 3.922 10.313 0 8.571-6.949 15.52-15.52 15.52s-15.52-6.949-15.52-15.52c0-8.571 6.949-15.52 15.52-15.52zM16.024 11.822c0.567 0.002 1.034 0.425 1.106 0.972l0.010 0.152-0.040 10.822c-0.002 0.619-0.506 1.118-1.124 1.116-0.567-0.002-1.034-0.425-1.106-0.972l-0.010-0.152 0.040-10.822c0.002-0.619 0.506-1.118 1.124-1.116zM16 7.232c1.001 0 1.813 0.812 1.813 1.813s-0.812 1.813-1.813 1.813c-1.001 0-1.813-0.812-1.813-1.813s0.812-1.813 1.813-1.813z"},null,-1)])])}const vc={name:"meeting-icon-tip",render:ly},uy=i.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t}=Qe.useI18n(),n=r,s=e,a=()=>{let y=[];for(let k=1;k<=31;k++)y.push(k);return y},o=i.computed(()=>a()),l=i.ref([]),c=i.ref([]),d=i.ref(null),g=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};i.watchEffect(()=>{g()});const m=()=>{s("update:modelValue",c.value),d.value.expanded=!1},S=()=>{g(),d.value.expanded=!1},T=y=>{if(n.multiple){const k=c.value.indexOf(y);k===-1?c.value.push(y):c.value.splice(k,1),c.value.sort()}else c.value=[y],m()},C=y=>{n.multiple?T(y):c.value=[],m()};return(y,k)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["calendar-selector",!r.multiple&&"is-single"])},[i.createVNode(i.unref(nt.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"calendar-selector-popper",placeholder:i.unref(t)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:"3",modelValue:l.value,onRemoveTag:C},i.createSlots({default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,O=>(i.openBlock(),i.createBlock(i.unref(nt.ElOption),{key:O,label:O,value:O,onClick:I=>T(O),class:i.normalizeClass(c.value.includes(O)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:i.withCtx(()=>[i.createVNode(i.unref(A.OButton),{round:"pill",color:"primary",variant:"outline",onClick:m},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.confirm")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{variant:"text",onClick:S},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),cy=Qe._export_sfc(uy,[["__scopeId","data-v-7b619c59"]]),dy={class:"o-meeting-form"},hy={class:"label-wrapper"},fy={class:"o-meeting-form-popover-content etherpad"},py={class:"repeat-config-wrapper"},my={class:"repeat-config"},gy={class:"repeat-config-item"},vy={class:"time-select-wrapper"},yy={key:1},_y={key:1,class:"switch-wrapper"},Ty={class:"switch-text"},by={key:1,class:"switch-wrapper"},xy={class:"switch-text"},Cy={class:"label-wrapper"},Sy={class:"o-meeting-form-popover-content"},Ey=["href"],ky={key:0,class:"form-btns"},yc=i.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:gi.SIG},bookText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:t}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Fn(),c=r,d=A.useMessage(null),g=a,m=o,S=i.computed(()=>wv(C.value.cycle_type,g.value,"max")),T={is_record:!1,agenda:"",email_list:"",platform:"",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:pn,cycle_point:[]},C=i.ref(Object.assign({},T)),y=i.ref(null),k=i.ref(!1),O=i.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:M=>{if(M.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:M=>{if(M.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===gi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],time:[{validator:M=>{var ae;const{is_cycle:j,cycle_type:F,cycle_interval:Y,cycle_point:K,date:J,date_range:Z}=C.value;if(j){const fe={type:"danger",message:n("meeting.finishMeetingConfig")};if(F===pn&&!Y||F===gn&&(!Y||!(K!=null&&K.length))||F===tn&&(!Y||!(K!=null&&K.length)))return fe;if(!(Z!=null&&Z.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const ce=n("meeting.invalidMeetingDuration");let Ae=Z[0];const we=Z[1];if(F===gn){const Ne=new Set;for(;!Te(Ae).isAfter(Te(we));)Ne.add(Te(Ae).day()),Ae=Te(Ae).add(1,"day");if(K.every(Pe=>!Ne.has(Pe)))return{type:"danger",message:ce}}if(F===tn){const Ne=new Set;for(;!Te(Ae).isAfter(Te(we));)Ne.add(Te(Ae).date()),Ae=Te(Ae).add(1,"day");if(K.every(Pe=>!Ne.has(Pe)))return{type:"danger",message:ce}}}else if(!J)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((ae=M==null?void 0:M.trim())!=null&&ae.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const ie=M.split("-").map(fe=>fe.split(":").map(Number));if(ie[0][0]>ie[1][0]||ie[0][0]===ie[1][0]&&ie[0][1]>=ie[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!C.value.is_cycle&&C.value.date&&C.value.start){const fe=Te(`${C.value.date} ${C.value.start}`);if(new Date(fe).getTime()<new Date().getTime())return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],platform:[{required:!0,message:n("meeting.selectPlatform")}],email_list:[{validator:M=>{if(c.isEdit)return{};const j=M.replaceAll(" ","").replaceAll(",",";")||"";if(j.length){if(j.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const F=j.split(";")||[];if(F.some(Y=>!mh.test(Y)))return{type:"danger",message:n("meeting.emailInvalid")};if(F.some(Y=>Y.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(F.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),I=i.ref([]),D=async()=>{if(!c.getGroupsRequest)return;const M=await c.getGroupsRequest();I.value=M.map(j=>({label:j.group_name,value:j.group_name,...j})),c.data&&Q(C.value.group_name)},q=i.ref([]),$=async()=>{if(!c.getPlatformsRequest)return;const M=await c.getPlatformsRequest();q.value=M.map(j=>({label:l(j),value:j})),c.data||(C.value.platform=q.value[0].value)},U=t;i.watch(()=>c.data,M=>{var j;if(M){const F=((j=M==null?void 0:M.cycle_sub)==null?void 0:j.find(ae=>ae.sub_id===c.subId))||{},{mid:Y,date:K,start:J,end:Z,sub_id:ie}=F;Object.assign(C.value,M,c.isSub?{is_cycle:!1,mid:Y,date:K,start:J,end:Z,sub_id:ie}:{})}else{const F=Te().format("YYYY-MM-DD"),Y=Te().format("HH:mm");let K="",J="";const Z=In(Y);if(Z<=In("08:00"))K="08:00",J="09:00";else if(In("22:15")<=Z)K="08:00",J="09:00";else{let[ae,fe]=Y.split(":").map(Number);fe>=45?(ae++,fe=0):fe=(Math.floor(fe/15)+1)*15,K=pc(ae*60+fe).slice(3),J=pc(ae*60+fe+60).slice(3)}const ie=[Te().format("YYYY-MM-DD"),Te().add(1,"month").format("YYYY-MM-DD")];Object.assign(C.value,{date:F,start:K,end:J,time:`${K}-${J}`,date_range:ie})}},{immediate:!0,deep:!0});const N=()=>{C.value=Object.assign({},T),y.value.clearValidate(),y.value.resetFields(),U("cancel")},z=()=>{C.value.cycle_point=[],C.value.cycle_interval=1},b=()=>{C.value.platform="WELINK"},{lePadV:E}=Nt.useScreen(),P=async()=>{let M=c.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{if(k.value=!0,(await y.value.validate()).some(Ye=>!!Ye))return;const{topic:F,etherpad:Y,group_name:K,platform:J,date:Z,start:ie,end:ae,agenda:fe,is_record:ce,is_cycle:Ae,date_range:we,cycle_type:Ne,cycle_interval:Pe,cycle_point:$e}=C.value;let We={topic:F,etherpad:Y,agenda:fe,is_record:ce,group_name:K,platform:J,is_cycle:Ae};if(Ae?(We={...We,cycle_interval:Pe,cycle_type:Ne,cycle_start_date:(we==null?void 0:we[0])||"",cycle_end_date:(we==null?void 0:we[1])||"",cycle_start:ie,cycle_end:ae},Ne!==pn&&(We={...We,cycle_point:$e.join(",")})):We={...We,date:(Z==null?void 0:Z.split(" ")[0])||"",start:ie,end:ae},c.isEdit)if(c.isSub){const{mid:Ye,sub_id:He}=C.value,{date:ze,start:Xe,end:Ct}=We;await(c==null?void 0:c.editSubMeetingRequest(He,{mid:Ye,date:ze,start:Xe,end:Ct,is_notify:!0}))}else{const{email_list:Ye,platform:He,group_name:ze,etherpad:Xe,...Ct}=We;await(c==null?void 0:c.editMeetingRequest(c.data.id,{...Ct,is_notify:!0}))}else await(c==null?void 0:c.createMeetingRequest({...We,email_list:C.value.email_list.replaceAll(" ","")}));const Ze=n("meeting.meetingHandleSuccess",[C.value.topic,M]);d.success({content:Ze}),U("confirm")}finally{k.value=!1}};i.onMounted(()=>{D(),$()});const Q=M=>{const j=I.value.find(F=>F.value===M);c.isEdit||(C.value.etherpad=(j==null?void 0:j.etherpad)||"",C.value.email_list=(j==null?void 0:j.email_list)||"")},L=M=>M.getTime()<Date.now()-1440*60*1e3,V=()=>{C.value.start&&C.value.end?C.value.time=`${C.value.start}-${C.value.end}`:C.value.time=""};return e({confirm:P}),(M,j)=>(i.openBlock(),i.createElementBlock("div",dy,[i.createVNode(i.unref(A.OForm),{model:C.value,ref_key:"formRef",ref:y,"has-required":"",layout:i.unref(E)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:O.value.topic,label:i.unref(n)("meeting.meetingName"),field:"topic"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:C.value.topic,"onUpdate:modelValue":j[0]||(j[0]=F=>C.value.topic=F)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:O.value.group_name,label:r.groupType===i.unref(gi).GROUP?i.unref(n)("meeting.meetingGroup"):i.unref(n)("meeting.meetingSig"),field:"group_name"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{disabled:r.isEdit,placeholder:r.groupType===i.unref(gi).GROUP?i.unref(n)("meeting.selectGroup"):i.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:C.value.group_name,"onUpdate:modelValue":j[1]||(j[1]=F=>C.value.group_name=F),onChange:Q},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,F=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:F.value,value:F.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(F.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),C.value.group_name?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:O.value.etherpad,label:"Etherpad",field:"etherpad"},{label:i.withCtx(()=>[i.createElementVNode("div",hy,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.etherpad"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(gc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",fy,i.toDisplayString(i.unref(n)("meeting.etherpadDesc")),1)]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:C.value.etherpad,"onUpdate:modelValue":j[2]||(j[2]=F=>C.value.etherpad=F)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime"),field:"time",rules:O.value.time,class:"repeat-row",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",py,[r.isSub?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:C.value.is_cycle,"onUpdate:modelValue":j[3]||(j[3]=F=>C.value.is_cycle=F),onChange:b,disabled:r.isEdit},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadio),{value:!1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.nonRepeat")),1)]),_:1}),i.createVNode(i.unref(A.ORadio),{value:!0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),i.createElementVNode("div",my,[C.value.is_cycle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.every"),class:"full-width-item"},{default:i.withCtx(()=>[i.createElementVNode("div",gy,[C.value.cycle_type!==i.unref(tn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElInputNumber),{size:"large",modelValue:C.value.cycle_interval,"onUpdate:modelValue":j[4]||(j[4]=F=>C.value.cycle_interval=F),min:1,max:S.value},null,8,["modelValue","max"])]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{size:"large",modelValue:C.value.cycle_type,"onUpdate:modelValue":j[5]||(j[5]=F=>C.value.cycle_type=F),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:z},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(g),F=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:F.value,value:F.value,label:F.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),C.value.cycle_type!==i.unref(pn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,label:i.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:i.withCtx(()=>[C.value.cycle_type===i.unref(gn)?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:C.value.cycle_point,"onUpdate:modelValue":j[6]||(j[6]=F=>C.value.cycle_point=F),placeholder:i.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(m),F=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:F.value,value:F.value,label:F.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):i.createCommentVNode("",!0),C.value.cycle_type===i.unref(tn)?(i.openBlock(),i.createBlock(cy,{key:1,modelValue:C.value.cycle_point,"onUpdate:modelValue":j[7]||(j[7]=F=>C.value.cycle_point=F)},null,8,["modelValue"])):i.createCommentVNode("",!0)]),_:1},8,["label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElDatePicker),{size:"large",modelValue:C.value.date_range,"onUpdate:modelValue":j[8]||(j[8]=F=>C.value.date_range=F),"start-placeholder":i.unref(n)("meeting.startDate"),"end-placeholder":i.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:1,label:i.unref(n)("meeting.meetingDate"),field:"date"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:C.value.date,"onUpdate:modelValue":j[9]||(j[9]=F=>C.value.date=F),placeholder:i.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime")},{default:i.withCtx(()=>[i.createElementVNode("div",vy,[i.createVNode(i.unref(A.OFormItem),{field:"start"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.startTime"),modelValue:C.value.start,"onUpdate:modelValue":j[10]||(j[10]=F=>C.value.start=F),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),j[17]||(j[17]=i.createElementVNode("span",null,"-",-1)),i.createVNode(i.unref(A.OFormItem),{field:"end"},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.endTime"),modelValue:C.value.end,"onUpdate:modelValue":j[11]||(j[11]=F=>C.value.end=F),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),i.createVNode(i.unref(A.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingPlatform"),field:"platform",rules:O.value.platform,class:"platform-item"},{default:i.withCtx(()=>[r.data?(i.openBlock(),i.createElementBlock("span",yy,i.toDisplayString(i.unref(l)(C.value.platform)),1)):(i.openBlock(),i.createBlock(i.unref(A.ORadioGroup),{key:0,modelValue:C.value.platform,"onUpdate:modelValue":j[12]||(j[12]=F=>C.value.platform=F),disabled:C.value.is_cycle},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,F=>(i.openBlock(),i.createBlock(i.unref(A.ORadio),{key:F.value,value:F.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(l)(F.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{field:"agenda",label:i.unref(n)("meeting.meetingAgenda"),rules:O.value.genda},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:C.value.agenda,"onUpdate:modelValue":j[13]||(j[13]=F=>C.value.agenda=F)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:i.withCtx(()=>[i.unref(E)?(i.openBlock(),i.createBlock(i.unref(A.OSwitch),{key:0,modelValue:C.value.is_record,"onUpdate:modelValue":j[14]||(j[14]=F=>C.value.is_record=F),disabled:r.isSub},null,8,["modelValue","disabled"])):(i.openBlock(),i.createElementBlock("div",_y,[i.createVNode(i.unref(A.OSwitch),{modelValue:C.value.is_record,"onUpdate:modelValue":j[15]||(j[15]=F=>C.value.is_record=F),disabled:r.isSub},null,8,["modelValue","disabled"]),i.createElementVNode("div",Ty,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(vc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(C.value.platform)])),1)])]))]),_:1},8,["label"]),i.unref(E)?(i.openBlock(),i.createElementBlock("div",by,[i.createElementVNode("div",xy,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(vc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(C.value.platform)])),1)])])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:O.value.email_list},{label:i.withCtx(()=>[i.createElementVNode("div",Cy,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingEmail"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(gc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",Sy,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.meetingEmailDesc"))+" ",1),i.createElementVNode("a",{class:"link-text",href:`/${i.unref(s)}/sig`},i.toDisplayString(i.unref(n)("meeting.sigGroupEmail")),9,Ey)])]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:C.value.email_list,"onUpdate:modelValue":j[16]||(j[16]=F=>C.value.email_list=F)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(i.openBlock(),i.createElementBlock("div",ky,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:P,loading:k.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.isEdit?i.unref(n)("common.save"):r.bookText||i.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",onClick:N},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.cancel")),1)]),_:1})])):i.createCommentVNode("",!0)]))}}),wy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Dy(r,e){return i.openBlock(),i.createElementBlock("svg",wy,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"#0071f3",d:"M9.669 4.029l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM12.669 7.526l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM6.669 8.52l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM15.669 9.531l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM3.669 11.023l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM18.669 11.777l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM20.349 13.234l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM5.349 13.989l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM17.349 15.497l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM8.349 16.474l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM14.349 17.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM11.349 20.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857z"},null,-1),i.createElementVNode("path",{fill:"none",stroke:"#0071f3","stroke-linejoin":"round","stroke-linecap":"round","stroke-miterlimit":"4","stroke-width":"1.71",d:"M4.491 10.989v3M7.491 8.486v7.989M10.491 3.994v16.491M13.491 7.491v9.994M16.491 9.497v6M19.491 11.743v1.491"},null,-1),i.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const Ay={name:"meeting-icon-playing",render:Dy},Ny={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Iy(r,e){return i.openBlock(),i.createElementBlock("svg",Ny,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const Oy={name:"components-icon-search",render:Iy},By={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Ly(r,e){return i.openBlock(),i.createElementBlock("svg",By,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const My={name:"components-icon-chevron-up",render:Ly},Py={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Ry(r,e){return i.openBlock(),i.createElementBlock("svg",Py,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const Vy={name:"meeting-icon-speaker",render:Ry},Fy={class:"o-meeting-playback-subtitles"},$y={class:"search-captions"},Uy={key:0,class:"suffix-box"},qy={class:"right-handle"},jy=["onClick"],Hy={class:"info"},zy={class:"num"},Gy={class:"speaker"},Wy={class:"start-time"},Yy={class:"text"},Xy={key:1},Ky=i.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=ba(),t=r,{t:n}=Qe.useI18n(),s=i.computed(()=>t.trackIdx),a=i.ref(),o=i.ref(!1),l=()=>{o.value=!0},c=qi.useDebounceFn(()=>{o.value=!1},3e3);i.watch(()=>o.value,L=>{L&&c()});const d=i.ref([]);i.watch(()=>t.captions,()=>{d.value=t.captions||[],i.nextTick(()=>{var L;a.value&&((L=a.value)==null||L.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const g=L=>`00:${L.split(".")[0]}`.slice(-8),m=L=>{const V=L.split(":"),M=V[V.length-3]?parseInt(V[V.length-3]):0,j=parseInt(V[V.length-2]),F=parseFloat(V[V.length-1]);return M*60*60+j*60+F};i.onMounted(()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)}),i.watch(()=>d.value,()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)});const S=i.ref(0),T=()=>{},C=L=>{const V=t.instance;if(!V)return;const M=m(L);V.currentTime(M)},y=i.ref(""),k=i.ref(0),O=i.ref(0),I=i.ref([]),D=n("common.all"),q=i.computed(()=>[...new Set(t.captions.map(L=>L.speakerLabel).sort().reverse())]);i.watch(()=>s.value,()=>{var V,M;if(o.value&&y.value)return;const L=(V=a.value)==null?void 0:V.querySelectorAll(".captions-item")[s.value-1];(M=a.value)==null||M.scrollTo({top:(L==null?void 0:L.offsetTop)-16,behavior:"smooth"})}),i.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const $=(L,V)=>{var K,J,Z,ie,ae,fe;const M=document.getElementsByClassName("light-keyword")[L-1],j=document.getElementsByClassName("light-keyword")[L-V];j==null||j.classList.remove("light-keyword-active"),M==null||M.classList.add("light-keyword-active");const F=M.offsetTop+M.offsetHeight<((K=a.value)==null?void 0:K.scrollTop),Y=M.offsetTop>((J=a.value)==null?void 0:J.offsetHeight)+((Z=a.value)==null?void 0:Z.scrollTop);(F||Y)&&((fe=a.value)==null||fe.scrollTo({top:(ae=(ie=M.parentElement)==null?void 0:ie.parentElement)==null?void 0:ae.offsetTop,behavior:"smooth"}))},U=()=>{!k.value||O.value===1||(O.value--,$(O.value,0))},N=L=>{L!=null&&L.shiftKey||!k.value||O.value===k.value||(O.value++,$(O.value,2))},z=L=>{d.value=t.captions.filter(V=>I.value.includes(V.speakerLabel)).map(V=>({...V,contentHtml:L?V.contentHtml.replaceAll(L,`<span class="light-keyword">${L}</span>`):V.contentHtml})),i.nextTick(()=>{var M;const V=document.getElementsByClassName("light-keyword");k.value=V.length,k.value?N():(M=a.value)==null||M.scrollTo({top:0,behavior:"smooth"})})},b=qi.useDebounceFn(z,300);i.watch(()=>y.value,L=>{O.value=0,b(L)}),i.watch(()=>q.value,L=>{I.value=L},{immediate:!0});const E=i.ref(!1),P=i.ref(!1),Q=L=>{P.value=!1,L?I.value=q.value:I.value=[]};return i.watch(()=>I.value,L=>{L.length===0?(E.value=!1,P.value=!1):L.length===q.value.length?(E.value=!0,P.value=!1):P.value=!0,b(y.value)},{deep:!0}),(L,V)=>(i.openBlock(),i.createElementBlock("div",Fy,[i.createElementVNode("div",$y,[i.createVNode(i.unref(A.OInput),{modelValue:y.value,"onUpdate:modelValue":V[1]||(V[1]=M=>y.value=M),onKeydown:[i.withKeys(N,["enter"]),i.withKeys(i.withModifiers(U,["shift","stop"]),["enter"])],placeholder:i.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Oy))]),_:1})]),suffix:i.withCtx(()=>[y.value?(i.openBlock(),i.createElementBlock("div",Uy,[i.createElementVNode("span",null,i.toDisplayString(O.value)+"/"+i.toDisplayString(k.value),1),i.createVNode(i.unref(A.OIcon),{onClick:U},{default:i.withCtx(()=>[i.createVNode(i.unref(My))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:N},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1}),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createVNode(i.unref(A.OIcon),{class:"hover-close",onClick:V[0]||(V[0]=M=>y.value="")},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})])):i.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),i.createElementVNode("div",qy,[i.createVNode(i.unref(nt.ElSelect),{multiple:"",modelValue:I.value,"onUpdate:modelValue":V[3]||(V[3]=M=>I.value=M),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Vy))]),_:1})]),header:i.withCtx(()=>[i.createVNode(i.unref(nt.ElCheckbox),{modelValue:E.value,"onUpdate:modelValue":V[2]||(V[2]=M=>E.value=M),indeterminate:P.value,onChange:Q},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(D)),1)]),_:1},8,["modelValue","indeterminate"])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,M=>(i.openBlock(),i.createBlock(i.unref(nt.ElOption),{key:M,label:M,value:M},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElCheckbox),{"model-value":I.value.includes(M)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),i.createVNode(i.unref(A.OTab),{modelValue:S.value,"onUpdate:modelValue":V[4]||(V[4]=M=>S.value=M),variant:"text",class:"captions-tab",onChange:T},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTabPane),{value:0,label:i.unref(n)("meeting.audioToText")},{default:i.withCtx(()=>[d.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORow),{gap:"0 12px",wrap:"wrap"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(M,j)=>(i.openBlock(),i.createBlock(i.unref(A.OCol),{flex:"0 0 100%",key:j},{default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["captions-item",{"captions-item-active":s.value===j+1}]),onClick:F=>C(M.start_time)},[i.createElementVNode("div",Hy,[i.createElementVNode("div",zy,i.toDisplayString(M.speakerIdx),1),i.createElementVNode("div",Gy,i.toDisplayString(M.speakerLabel),1),i.createElementVNode("div",Wy,i.toDisplayString(g(M.start_time)),1),s.value===j+1?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ay))]),_:1})):i.createCommentVNode("",!0)]),i.withDirectives(i.createElementVNode("div",Yy,null,512),[[i.unref(e),M.contentHtml]])],10,jy)]),_:2},1024))),128))]),_:1})]),_:1})):(i.openBlock(),i.createElementBlock("div",Xy,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var po,_c;function xa(){if(_c)return po;_c=1;var r;return typeof window<"u"?r=window:typeof Js<"u"?r=Js:typeof self<"u"?r=self:r={},po=r,po}var Qy=xa();const G=fr(Qy),Zy={},Jy=Object.freeze(Object.defineProperty({__proto__:null,default:Zy},Symbol.toStringTag,{value:"Module"})),e_=Cv(Jy);var mo,Tc;function _h(){if(Tc)return mo;Tc=1;var r=typeof Js<"u"?Js:typeof window<"u"?window:{},e=e_,t;return typeof document<"u"?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"],t||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),mo=t,mo}var t_=_h();const _e=fr(t_);var Rs={exports:{}},go={exports:{}},bc;function i_(){return bc||(bc=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(t[a]=s[a])}return t},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(go)),go.exports}var vo,xc;function n_(){if(xc)return vo;xc=1,vo=e;var r=Object.prototype.toString;function e(t){if(!t)return!1;var n=r.call(t);return n==="[object Function]"||typeof t=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}return vo}var yo,Cc;function r_(){if(Cc)return yo;Cc=1;function r(s,a){var o=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(o)return(o=o.call(s)).next.bind(o);if(Array.isArray(s)||(o=e(s))||a){o&&(s=o);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e(s,a){if(s){if(typeof s=="string")return t(s,a);var o=Object.prototype.toString.call(s).slice(8,-1);if(o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set")return Array.from(s);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return t(s,a)}}function t(s,a){(a==null||a>s.length)&&(a=s.length);for(var o=0,l=new Array(a);o<a;o++)l[o]=s[o];return l}var n=(function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var a=s.prototype;return a.getIsEnabled=function(){return this.enabled_},a.enable=function(){this.enabled_=!0},a.disable=function(){this.enabled_=!1},a.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},a.addInterceptor=function(l,c){this.typeToInterceptorsMap_.has(l)||this.typeToInterceptorsMap_.set(l,new Set);var d=this.typeToInterceptorsMap_.get(l);return d.has(c)?!1:(d.add(c),!0)},a.removeInterceptor=function(l,c){var d=this.typeToInterceptorsMap_.get(l);return d&&d.has(c)?(d.delete(c),!0):!1},a.clearInterceptorsByType=function(l){var c=this.typeToInterceptorsMap_.get(l);return c?(this.typeToInterceptorsMap_.delete(l),this.typeToInterceptorsMap_.set(l,new Set),!0):!1},a.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},a.getForType=function(l){return this.typeToInterceptorsMap_.get(l)||new Set},a.execute=function(l,c){for(var d=this.getForType(l),g=r(d),m;!(m=g()).done;){var S=m.value;try{c=S(c)}catch{}}return c},s})();return yo=n,yo}var _o,Sc;function s_(){if(Sc)return _o;Sc=1;var r=(function(){function t(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var n=t.prototype;return n.getIsEnabled=function(){return this.enabled_},n.enable=function(){this.enabled_=!0},n.disable=function(){this.enabled_=!1},n.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},n.getMaxAttempts=function(){return this.maxAttempts_},n.setMaxAttempts=function(a){this.maxAttempts_=a},n.getDelayFactor=function(){return this.delayFactor_},n.setDelayFactor=function(a){this.delayFactor_=a},n.getFuzzFactor=function(){return this.fuzzFactor_},n.setFuzzFactor=function(a){this.fuzzFactor_=a},n.getInitialDelay=function(){return this.initialDelay_},n.setInitialDelay=function(a){this.initialDelay_=a},n.createRetry=function(a){var o=a===void 0?{}:a,l=o.maxAttempts,c=o.delayFactor,d=o.fuzzFactor,g=o.initialDelay;return new e({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:d||this.fuzzFactor_,initialDelay:g||this.initialDelay_})},t})(),e=(function(){function t(s){this.maxAttempts_=s.maxAttempts,this.delayFactor_=s.delayFactor,this.fuzzFactor_=s.fuzzFactor,this.currentDelay_=s.initialDelay,this.currentAttempt_=1}var n=t.prototype;return n.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},n.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},n.getCurrentDelay=function(){return this.currentDelay_},n.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},n.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},n.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return a+Math.random()*(o-a)},t})();return _o=r,_o}var To,Ec;function a_(){if(Ec)return To;Ec=1;var r=xa(),e=function(s,a){return a===void 0&&(a=!1),function(o,l,c){if(o){s(o);return}if(l.statusCode>=400&&l.statusCode<=599){var d=c;if(a)if(r.TextDecoder){var g=t(l.headers&&l.headers["content-type"]);try{d=new TextDecoder(g).decode(c)}catch{}}else d=String.fromCharCode.apply(null,new Uint8Array(c));s({cause:d});return}s(null,c)}};function t(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(s,a){var o=a.split("="),l=o[0],c=o[1];return l.trim()==="charset"?c.trim():s},"utf-8")}return To=e,To}var kc;function o_(){if(kc)return Rs.exports;kc=1;var r=xa(),e=i_(),t=n_(),n=r_(),s=s_();d.httpHandler=a_(),d.requestInterceptorsStorage=new n,d.responseInterceptorsStorage=new n,d.retryManager=new s;/**
7
+ * @license
8
+ * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
9
+ * Copyright (c) 2014 David Björklund
10
+ * Available under the MIT license
11
+ * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
12
+ */var a=function(C){var y={};return C&&C.trim().split(`
13
+ `).forEach(function(k){var O=k.indexOf(":"),I=k.slice(0,O).trim().toLowerCase(),D=k.slice(O+1).trim();typeof y[I]>"u"?y[I]=D:Array.isArray(y[I])?y[I].push(D):y[I]=[y[I],D]}),y};Rs.exports=d,Rs.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||S,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){d[T==="delete"?"del":T]=function(C,y,k){return y=c(C,y,k),y.method=T.toUpperCase(),g(y)}});function o(T,C){for(var y=0;y<T.length;y++)C(T[y])}function l(T){for(var C in T)if(T.hasOwnProperty(C))return!1;return!0}function c(T,C,y){var k=T;return t(C)?(y=C,typeof T=="string"&&(k={uri:T})):k=e({},C,{uri:T}),k.callback=y,k}function d(T,C,y){return C=c(T,C,y),g(C)}function g(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var C={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},y=d.requestInterceptorsStorage.execute(T.requestType,C);T.uri=y.uri,T.headers=y.headers,T.body=y.body,T.metadata=y.metadata,T.retry=y.retry,T.timeout=y.timeout}var k=!1,O=function(Y,K,J){k||(k=!0,T.callback(Y,K,J))};function I(){U.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout($,0)}function D(){var F=void 0;if(U.response?F=U.response:F=U.responseText||m(U),V)try{F=JSON.parse(F)}catch{}return F}function q(F){if(clearTimeout(M),clearTimeout(T.retryTimeout),F instanceof Error||(F=new Error(""+(F||"Unknown XMLHttpRequest Error"))),F.statusCode=0,!z&&d.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=U,g(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var Y={headers:j.headers||{},body:j.body,responseUrl:U.responseURL,responseType:U.responseType},K=d.responseInterceptorsStorage.execute(T.requestType,Y);j.body=K.body,j.headers=K.headers}return O(F,j)}function $(){if(!z){var F;clearTimeout(M),clearTimeout(T.retryTimeout),T.useXDR&&U.status===void 0?F=200:F=U.status===1223?204:U.status;var Y=j,K=null;if(F!==0?(Y={body:D(),statusCode:F,method:E,headers:{},url:b,rawRequest:U},U.getAllResponseHeaders&&(Y.headers=a(U.getAllResponseHeaders()))):K=new Error("Internal XMLHttpRequest Error"),T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var J={headers:Y.headers||{},body:Y.body,responseUrl:U.responseURL,responseType:U.responseType},Z=d.responseInterceptorsStorage.execute(T.requestType,J);Y.body=Z.body,Y.headers=Z.headers}return O(K,Y,Y.body)}}var U=T.xhr||null;U||(T.cors||T.useXDR?U=new d.XDomainRequest:U=new d.XMLHttpRequest);var N,z,b=U.url=T.uri||T.url,E=U.method=T.method||"GET",P=T.body||T.data,Q=U.headers=T.headers||{},L=!!T.sync,V=!1,M,j={body:void 0,headers:{},statusCode:0,method:E,url:b,rawRequest:U};if("json"in T&&T.json!==!1&&(V=!0,Q.accept||Q.Accept||(Q.Accept="application/json"),E!=="GET"&&E!=="HEAD"&&(Q["content-type"]||Q["Content-Type"]||(Q["Content-Type"]="application/json"),P=JSON.stringify(T.json===!0?P:T.json))),U.onreadystatechange=I,U.onload=$,U.onerror=q,U.onprogress=function(){},U.onabort=function(){z=!0,clearTimeout(T.retryTimeout)},U.ontimeout=q,U.open(E,b,!L,T.username,T.password),L||(U.withCredentials=!!T.withCredentials),!L&&T.timeout>0&&(M=setTimeout(function(){if(!z){z=!0,U.abort("timeout");var F=new Error("XMLHttpRequest timeout");F.code="ETIMEDOUT",q(F)}},T.timeout)),U.setRequestHeader)for(N in Q)Q.hasOwnProperty(N)&&U.setRequestHeader(N,Q[N]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(U.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(U),U.send(P||null),U}function m(T){try{if(T.responseType==="document")return T.responseXML;var C=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!C)return T.responseXML}catch{}return null}function S(){}return Rs.exports}var l_=o_();const Th=fr(l_);var bo={exports:{}},xo,wc;function u_(){if(wc)return xo;wc=1;var r=_h(),e=Object.create||(function(){function b(){}return function(E){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return b.prototype=E,new b}})();function t(b,E){this.name="ParsingError",this.code=b.code,this.message=E||b.message}t.prototype=e(Error.prototype),t.prototype.constructor=t,t.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(b){function E(Q,L,V,M){return(Q|0)*3600+(L|0)*60+(V|0)+(M|0)/1e3}var P=b.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return P?P[3]?E(P[1],P[2],P[3].replace(":",""),P[4]):P[1]>59?E(P[1],P[2],0,P[4]):E(0,P[1],P[2],P[4]):null}function s(){this.values=e(null)}s.prototype={set:function(b,E){!this.get(b)&&E!==""&&(this.values[b]=E)},get:function(b,E,P){return P?this.has(b)?this.values[b]:E[P]:this.has(b)?this.values[b]:E},has:function(b){return b in this.values},alt:function(b,E,P){for(var Q=0;Q<P.length;++Q)if(E===P[Q]){this.set(b,E);break}},integer:function(b,E){/^-?\d+$/.test(E)&&this.set(b,parseInt(E,10))},percent:function(b,E){return E.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(E=parseFloat(E),E>=0&&E<=100)?(this.set(b,E),!0):!1}};function a(b,E,P,Q){var L=Q?b.split(Q):[b];for(var V in L)if(typeof L[V]=="string"){var M=L[V].split(P);if(M.length===2){var j=M[0].trim(),F=M[1].trim();E(j,F)}}}function o(b,E,P){var Q=b;function L(){var j=n(b);if(j===null)throw new t(t.Errors.BadTimeStamp,"Malformed timestamp: "+Q);return b=b.replace(/^[^\sa-zA-Z-]+/,""),j}function V(j,F){var Y=new s;a(j,function(K,J){switch(K){case"region":for(var Z=P.length-1;Z>=0;Z--)if(P[Z].id===J){Y.set(K,P[Z].region);break}break;case"vertical":Y.alt(K,J,["rl","lr"]);break;case"line":var ie=J.split(","),ae=ie[0];Y.integer(K,ae),Y.percent(K,ae)&&Y.set("snapToLines",!1),Y.alt(K,ae,["auto"]),ie.length===2&&Y.alt("lineAlign",ie[1],["start","center","end"]);break;case"position":ie=J.split(","),Y.percent(K,ie[0]),ie.length===2&&Y.alt("positionAlign",ie[1],["start","center","end"]);break;case"size":Y.percent(K,J);break;case"align":Y.alt(K,J,["start","center","end","left","right"]);break}},/:/,/\s/),F.region=Y.get("region",null),F.vertical=Y.get("vertical","");try{F.line=Y.get("line","auto")}catch{}F.lineAlign=Y.get("lineAlign","start"),F.snapToLines=Y.get("snapToLines",!0),F.size=Y.get("size",100);try{F.align=Y.get("align","center")}catch{F.align=Y.get("align","middle")}try{F.position=Y.get("position","auto")}catch{F.position=Y.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},F.align)}F.positionAlign=Y.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},F.align)}function M(){b=b.replace(/^\s+/,"")}if(M(),E.startTime=L(),M(),b.substr(0,3)!=="-->")throw new t(t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+Q);b=b.substr(3),M(),E.endTime=L(),M(),V(b,E)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},g={v:"title",lang:"lang"},m={rt:"ruby"};function S(b,E){function P(){if(!E)return null;function ae(ce){return E=E.substr(ce.length),ce}var fe=E.match(/^([^<]*)(<[^>]*>?)?/);return ae(fe[1]?fe[1]:fe[2])}function Q(ae){return l.innerHTML=ae,ae=l.textContent,l.textContent="",ae}function L(ae,fe){return!m[fe.localName]||m[fe.localName]===ae.localName}function V(ae,fe){var ce=c[ae];if(!ce)return null;var Ae=b.document.createElement(ce),we=g[ae];return we&&fe&&(Ae[we]=fe.trim()),Ae}for(var M=b.document.createElement("div"),j=M,F,Y=[];(F=P())!==null;){if(F[0]==="<"){if(F[1]==="/"){Y.length&&Y[Y.length-1]===F.substr(2).replace(">","")&&(Y.pop(),j=j.parentNode);continue}var K=n(F.substr(1,F.length-2)),J;if(K){J=b.document.createProcessingInstruction("timestamp",K),j.appendChild(J);continue}var Z=F.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Z||(J=V(Z[1],Z[3]),!J)||!L(j,J))continue;if(Z[2]){var ie=Z[2].split(".");ie.forEach(function(ae){var fe=/^bg_/.test(ae),ce=fe?ae.slice(3):ae;if(d.hasOwnProperty(ce)){var Ae=fe?"background-color":"color",we=d[ce];J.style[Ae]=we}}),J.className=ie.join(" ")}Y.push(Z[1]),j.appendChild(J),j=J;continue}j.appendChild(b.document.createTextNode(Q(F)))}return M}var T=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function C(b){for(var E=0;E<T.length;E++){var P=T[E];if(b>=P[0]&&b<=P[1])return!0}return!1}function y(b){var E=[],P="",Q;if(!b||!b.childNodes)return"ltr";function L(j,F){for(var Y=F.childNodes.length-1;Y>=0;Y--)j.push(F.childNodes[Y])}function V(j){if(!j||!j.length)return null;var F=j.pop(),Y=F.textContent||F.innerText;if(Y){var K=Y.match(/^.*(\n|\r)/);return K?(j.length=0,K[0]):Y}if(F.tagName==="ruby")return V(j);if(F.childNodes)return L(j,F),V(j)}for(L(E,b);P=V(E);)for(var M=0;M<P.length;M++)if(Q=P.charCodeAt(M),C(Q))return"rtl";return"ltr"}function k(b){if(typeof b.line=="number"&&(b.snapToLines||b.line>=0&&b.line<=100))return b.line;if(!b.track||!b.track.textTrackList||!b.track.textTrackList.mediaElement)return-1;for(var E=b.track,P=E.textTrackList,Q=0,L=0;L<P.length&&P[L]!==E;L++)P[L].mode==="showing"&&Q++;return++Q*-1}function O(){}O.prototype.applyStyles=function(b,E){E=E||this.div;for(var P in b)b.hasOwnProperty(P)&&(E.style[P]=b[P])},O.prototype.formatStyle=function(b,E){return b===0?0:b+E};function I(b,E,P){O.call(this),this.cue=E,this.cueDiv=S(b,E.text);var Q={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:E.vertical===""?"horizontal-tb":E.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(Q,this.cueDiv),this.div=b.document.createElement("div"),Q={direction:y(this.cueDiv),writingMode:E.vertical===""?"horizontal-tb":E.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:E.align==="middle"?"center":E.align,font:P.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(Q),this.div.appendChild(this.cueDiv);var L=0;switch(E.positionAlign){case"start":case"line-left":L=E.position;break;case"center":L=E.position-E.size/2;break;case"end":case"line-right":L=E.position-E.size;break}E.vertical===""?this.applyStyles({left:this.formatStyle(L,"%"),width:this.formatStyle(E.size,"%")}):this.applyStyles({top:this.formatStyle(L,"%"),height:this.formatStyle(E.size,"%")}),this.move=function(V){this.applyStyles({top:this.formatStyle(V.top,"px"),bottom:this.formatStyle(V.bottom,"px"),left:this.formatStyle(V.left,"px"),right:this.formatStyle(V.right,"px"),height:this.formatStyle(V.height,"px"),width:this.formatStyle(V.width,"px")})}}I.prototype=e(O.prototype),I.prototype.constructor=I;function D(b){var E,P,Q,L;if(b.div){P=b.div.offsetHeight,Q=b.div.offsetWidth,L=b.div.offsetTop;var V=(V=b.div.childNodes)&&(V=V[0])&&V.getClientRects&&V.getClientRects();b=b.div.getBoundingClientRect(),E=V?Math.max(V[0]&&V[0].height||0,b.height/V.length):0}this.left=b.left,this.right=b.right,this.top=b.top||L,this.height=b.height||P,this.bottom=b.bottom||L+(b.height||P),this.width=b.width||Q,this.lineHeight=E!==void 0?E:b.lineHeight}D.prototype.move=function(b,E){switch(E=E!==void 0?E:this.lineHeight,b){case"+x":this.left+=E,this.right+=E;break;case"-x":this.left-=E,this.right-=E;break;case"+y":this.top+=E,this.bottom+=E;break;case"-y":this.top-=E,this.bottom-=E;break}},D.prototype.overlaps=function(b){return this.left<b.right&&this.right>b.left&&this.top<b.bottom&&this.bottom>b.top},D.prototype.overlapsAny=function(b){for(var E=0;E<b.length;E++)if(this.overlaps(b[E]))return!0;return!1},D.prototype.within=function(b){return this.top>=b.top&&this.bottom<=b.bottom&&this.left>=b.left&&this.right<=b.right},D.prototype.overlapsOppositeAxis=function(b,E){switch(E){case"+x":return this.left<b.left;case"-x":return this.right>b.right;case"+y":return this.top<b.top;case"-y":return this.bottom>b.bottom}},D.prototype.intersectPercentage=function(b){var E=Math.max(0,Math.min(this.right,b.right)-Math.max(this.left,b.left)),P=Math.max(0,Math.min(this.bottom,b.bottom)-Math.max(this.top,b.top)),Q=E*P;return Q/(this.height*this.width)},D.prototype.toCSSCompatValues=function(b){return{top:this.top-b.top,bottom:b.bottom-this.bottom,left:this.left-b.left,right:b.right-this.right,height:this.height,width:this.width}},D.getSimpleBoxPosition=function(b){var E=b.div?b.div.offsetHeight:b.tagName?b.offsetHeight:0,P=b.div?b.div.offsetWidth:b.tagName?b.offsetWidth:0,Q=b.div?b.div.offsetTop:b.tagName?b.offsetTop:0;b=b.div?b.div.getBoundingClientRect():b.tagName?b.getBoundingClientRect():b;var L={left:b.left,right:b.right,top:b.top||Q,height:b.height||E,bottom:b.bottom||Q+(b.height||E),width:b.width||P};return L};function q(b,E,P,Q){function L(ce,Ae){for(var we,Ne=new D(ce),Pe=1,$e=0;$e<Ae.length;$e++){for(;ce.overlapsOppositeAxis(P,Ae[$e])||ce.within(P)&&ce.overlapsAny(Q);)ce.move(Ae[$e]);if(ce.within(P))return ce;var We=ce.intersectPercentage(P);Pe>We&&(we=new D(ce),Pe=We),ce=new D(Ne)}return we||Ne}var V=new D(E),M=E.cue,j=k(M),F=[];if(M.snapToLines){var Y;switch(M.vertical){case"":F=["+y","-y"],Y="height";break;case"rl":F=["+x","-x"],Y="width";break;case"lr":F=["-x","+x"],Y="width";break}var K=V.lineHeight,J=K*Math.round(j),Z=P[Y]+K,ie=F[0];Math.abs(J)>Z&&(J=J<0?-1:1,J*=Math.ceil(Z/K)*K),j<0&&(J+=M.vertical===""?P.height:P.width,F=F.reverse()),V.move(ie,J)}else{var ae=V.lineHeight/P.height*100;switch(M.lineAlign){case"center":j-=ae/2;break;case"end":j-=ae;break}switch(M.vertical){case"":E.applyStyles({top:E.formatStyle(j,"%")});break;case"rl":E.applyStyles({left:E.formatStyle(j,"%")});break;case"lr":E.applyStyles({right:E.formatStyle(j,"%")});break}F=["+y","-x","+x","-y"],V=new D(E)}var fe=L(V,F);E.move(fe.toCSSCompatValues(P))}function $(){}$.StringDecoder=function(){return{decode:function(b){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))}}},$.convertCueToDOMTree=function(b,E){return!b||!E?null:S(b,E)};var U=.05,N="sans-serif",z="1.5%";return $.processCues=function(b,E,P){if(!b||!E||!P)return null;for(;P.firstChild;)P.removeChild(P.firstChild);var Q=b.document.createElement("div");Q.style.position="absolute",Q.style.left="0",Q.style.right="0",Q.style.top="0",Q.style.bottom="0",Q.style.margin=z,P.appendChild(Q);function L(K){for(var J=0;J<K.length;J++)if(K[J].hasBeenReset||!K[J].displayState)return!0;return!1}if(!L(E)){for(var V=0;V<E.length;V++)Q.appendChild(E[V].displayState);return}var M=[],j=D.getSimpleBoxPosition(Q),F=Math.round(j.height*U*100)/100,Y={font:F+"px "+N};(function(){for(var K,J,Z=0;Z<E.length;Z++)J=E[Z],K=new I(b,J,Y),Q.appendChild(K.div),q(b,K,j,M),J.displayState=K.div,M.push(D.getSimpleBoxPosition(K))})()},$.Parser=function(b,E,P){P||(P=E,E={}),E||(E={}),this.window=b,this.vttjs=E,this.state="INITIAL",this.buffer="",this.decoder=P||new TextDecoder("utf8"),this.regionList=[]},$.Parser.prototype={reportOrThrowError:function(b){if(b instanceof t)this.onparsingerror&&this.onparsingerror(b);else throw b},parse:function(b){var E=this;b&&(E.buffer+=E.decoder.decode(b,{stream:!0}));function P(){for(var K=E.buffer,J=0;J<K.length&&K[J]!=="\r"&&K[J]!==`
14
+ `;)++J;var Z=K.substr(0,J);return K[J]==="\r"&&++J,K[J]===`
15
+ `&&++J,E.buffer=K.substr(J),Z}function Q(K){var J=new s;if(a(K,function(ie,ae){switch(ie){case"id":J.set(ie,ae);break;case"width":J.percent(ie,ae);break;case"lines":J.integer(ie,ae);break;case"regionanchor":case"viewportanchor":var fe=ae.split(",");if(fe.length!==2)break;var ce=new s;if(ce.percent("x",fe[0]),ce.percent("y",fe[1]),!ce.has("x")||!ce.has("y"))break;J.set(ie+"X",ce.get("x")),J.set(ie+"Y",ce.get("y"));break;case"scroll":J.alt(ie,ae,["up"]);break}},/=/,/\s/),J.has("id")){var Z=new(E.vttjs.VTTRegion||E.window.VTTRegion);Z.width=J.get("width",100),Z.lines=J.get("lines",3),Z.regionAnchorX=J.get("regionanchorX",0),Z.regionAnchorY=J.get("regionanchorY",100),Z.viewportAnchorX=J.get("viewportanchorX",0),Z.viewportAnchorY=J.get("viewportanchorY",100),Z.scroll=J.get("scroll",""),E.onregion&&E.onregion(Z),E.regionList.push({id:J.get("id"),region:Z})}}function L(K){var J=new s;a(K,function(Z,ie){switch(Z){case"MPEGT":J.integer(Z+"S",ie);break;case"LOCA":J.set(Z+"L",n(ie));break}},/[^\d]:/,/,/),E.ontimestampmap&&E.ontimestampmap({MPEGTS:J.get("MPEGTS"),LOCAL:J.get("LOCAL")})}function V(K){K.match(/X-TIMESTAMP-MAP/)?a(K,function(J,Z){switch(J){case"X-TIMESTAMP-MAP":L(Z);break}},/=/):a(K,function(J,Z){switch(J){case"Region":Q(Z);break}},/:/)}try{var M;if(E.state==="INITIAL"){if(!/\r\n|\n/.test(E.buffer))return this;M=P();var j=M.match(/^WEBVTT([ \t].*)?$/);if(!j||!j[0])throw new t(t.Errors.BadSignature);E.state="HEADER"}for(var F=!1;E.buffer;){if(!/\r\n|\n/.test(E.buffer))return this;switch(F?F=!1:M=P(),E.state){case"HEADER":/:/.test(M)?V(M):M||(E.state="ID");continue;case"NOTE":M||(E.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(M)){E.state="NOTE";break}if(!M)continue;E.cue=new(E.vttjs.VTTCue||E.window.VTTCue)(0,0,"");try{E.cue.align="center"}catch{E.cue.align="middle"}if(E.state="CUE",M.indexOf("-->")===-1){E.cue.id=M;continue}case"CUE":try{o(M,E.cue,E.regionList)}catch(K){E.reportOrThrowError(K),E.cue=null,E.state="BADCUE";continue}E.state="CUETEXT";continue;case"CUETEXT":var Y=M.indexOf("-->")!==-1;if(!M||Y&&(F=!0)){E.oncue&&E.oncue(E.cue),E.cue=null,E.state="ID";continue}E.cue.text&&(E.cue.text+=`
16
+ `),E.cue.text+=M.replace(/\u2028/g,`
17
+ `).replace(/u2029/g,`
18
+ `);continue;case"BADCUE":M||(E.state="ID");continue}}}catch(K){E.reportOrThrowError(K),E.state==="CUETEXT"&&E.cue&&E.oncue&&E.oncue(E.cue),E.cue=null,E.state=E.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var b=this;try{if(b.buffer+=b.decoder.decode(),(b.cue||b.state==="HEADER")&&(b.buffer+=`
19
+
20
+ `,b.parse()),b.state==="INITIAL")throw new t(t.Errors.BadSignature)}catch(E){b.reportOrThrowError(E)}return b.onflush&&b.onflush(),this}},xo=$,xo}var Co,Dc;function c_(){if(Dc)return Co;Dc=1;var r="auto",e={"":1,lr:1,rl:1},t={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(o){if(typeof o!="string")return!1;var l=e[o.toLowerCase()];return l?o.toLowerCase():!1}function s(o){if(typeof o!="string")return!1;var l=t[o.toLowerCase()];return l?o.toLowerCase():!1}function a(o,l,c){this.hasBeenReset=!1;var d="",g=!1,m=o,S=l,T=c,C=null,y="",k=!0,O="auto",I="start",D="auto",q="auto",$=100,U="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return d},set:function(N){d=""+N}},pauseOnExit:{enumerable:!0,get:function(){return g},set:function(N){g=!!N}},startTime:{enumerable:!0,get:function(){return m},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");m=N,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return S},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");S=N,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return T},set:function(N){T=""+N,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return C},set:function(N){C=N,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return y},set:function(N){var z=n(N);if(z===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");y=z,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return k},set:function(N){k=!!N,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return O},set:function(N){if(typeof N!="number"&&N!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");O=N,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return I},set:function(N){var z=s(N);z?(I=z,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return D},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");D=N,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return q},set:function(N){var z=s(N);z?(q=z,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return $},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");$=N,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return U},set:function(N){var z=s(N);if(!z)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");U=z,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},Co=a,Co}var So,Ac;function d_(){if(Ac)return So;Ac=1;var r={"":!0,up:!0};function e(s){if(typeof s!="string")return!1;var a=r[s.toLowerCase()];return a?s.toLowerCase():!1}function t(s){return typeof s=="number"&&s>=0&&s<=100}function n(){var s=100,a=3,o=0,l=100,c=0,d=100,g="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(m){if(!t(m))throw new Error("Width must be between 0 and 100.");s=m}},lines:{enumerable:!0,get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Lines must be set to a number.");a=m}},regionAnchorY:{enumerable:!0,get:function(){return l},set:function(m){if(!t(m))throw new Error("RegionAnchorX must be between 0 and 100.");l=m}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(m){if(!t(m))throw new Error("RegionAnchorY must be between 0 and 100.");o=m}},viewportAnchorY:{enumerable:!0,get:function(){return d},set:function(m){if(!t(m))throw new Error("ViewportAnchorY must be between 0 and 100.");d=m}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(m){if(!t(m))throw new Error("ViewportAnchorX must be between 0 and 100.");c=m}},scroll:{enumerable:!0,get:function(){return g},set:function(m){var S=e(m);S===!1?console.warn("Scroll: an invalid or illegal string was specified."):g=S}}})}return So=n,So}var Nc;function h_(){if(Nc)return bo.exports;Nc=1;var r=xa(),e=bo.exports={WebVTT:u_(),VTTCue:c_(),VTTRegion:d_()};r.vttjs=e,r.WebVTT=e.WebVTT;var t=e.VTTCue,n=e.VTTRegion,s=r.VTTCue,a=r.VTTRegion;return e.shim=function(){r.VTTCue=t,r.VTTRegion=n},e.restore=function(){r.VTTCue=s,r.VTTRegion=a},r.VTTCue||e.shim(),bo.exports}var f_=h_();const Ic=fr(f_);function xt(){return xt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},xt.apply(null,arguments)}var Oc="https://example.com",Ca=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=G.location&&G.location.href||"");var n=/^\/\//.test(e),s=!G.location&&!/\/\//i.test(e);e=new G.URL(e,G.location||Oc);var a=new URL(t,e);return s?a.href.slice(Oc.length):n?a.href.slice(a.protocol.length):a.href},Nl=(function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(n,s){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s)},e.off=function(n,s){if(!this.listeners[n])return!1;var a=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(a,1),a>-1},e.trigger=function(n){var s=this.listeners[n];if(s)if(arguments.length===2)for(var a=s.length,o=0;o<a;++o)s[o].call(this,arguments[1]);else for(var l=Array.prototype.slice.call(arguments,1),c=s.length,d=0;d<c;++d)s[d].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),p_=function(e){return G.atob?G.atob(e):Buffer.from(e,"base64").toString("binary")};function bh(r){for(var e=p_(r),t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class m_ extends Nl{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(`
21
+ `);t>-1;t=this.buffer.indexOf(`
22
+ `))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const g_=" ",Eo=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},v_=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},Qt=function(r){const e={};if(!r)return e;const t=r.split(v_());let n=t.length,s;for(;n--;)t[n]!==""&&(s=/([^=]*)=(.*)/.exec(t[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),e[s[0]]=s[1]);return e},Bc=r=>{const e=r.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class y_ extends Nl{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,n;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((a,o)=>{const l=o(e);return l===e?a:a.concat([l])},[e]).forEach(a=>{for(let o=0;o<this.customParsers.length;o++)if(this.customParsers[o].call(this,a))return;if(a.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:a.slice(1)});return}if(a=a.replace("\r",""),t=/^#EXTM3U/.exec(a),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),t){n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),this.trigger("data",n);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),t){n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),t){n=xt(Eo(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),t){n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(a),t){if(n={type:"tag",tagType:"map"},t[1]){const o=Qt(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=Eo(o.BYTERANGE))}this.trigger("data",n);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"stream-inf"},t[1]&&(n.attributes=Qt(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Bc(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Qt(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-ENDLIST/.exec(a),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),t){n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(a),t){n={type:"tag",tagType:"key"},t[1]&&(n.attributes=Qt(t[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),this.trigger("data",n);return}if(t=/^#EXT-X-START:(.*)$/.exec(a),t){n={type:"tag",tagType:"start"},t[1]&&(n.attributes=Qt(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"skip"},n.attributes=Qt(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(g_)),this.trigger("data",n);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part"},n.attributes=Qt(t[1]),["DURATION"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["INDEPENDENT","GAP"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=Eo(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"server-control"},n.attributes=Qt(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),this.trigger("data",n);return}if(t=/^#EXT-X-PART-INF:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Qt(t[1]),["PART-TARGET"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),this.trigger("data",n);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Qt(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(o){if(n.attributes.hasOwnProperty(o)){n.attributes[o]=parseInt(n.attributes[o],10);const l=o==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[l]=n.attributes[o],delete n.attributes[o]}}),this.trigger("data",n);return}if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Qt(t[1]),["LAST-MSN","LAST-PART"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseInt(n.attributes[o],10))}),this.trigger("data",n);return}if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"daterange"},n.attributes=Qt(t[1]),["ID","CLASS"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=String(n.attributes[l]))}),["START-DATE","END-DATE"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=new Date(n.attributes[l]))}),["DURATION","PLANNED-DURATION"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=parseFloat(n.attributes[l]))}),["END-ON-NEXT"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=/YES/i.test(n.attributes[l]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=n.attributes[l].toString(16))});const o=/^X-([A-Z]+-)+[A-Z]+$/;for(const l in n.attributes){if(!o.test(l))continue;const c=/[0-9A-Fa-f]{6}/g.test(n.attributes[l]),d=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):d?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),t){n={type:"tag",tagType:"content-steering"},n.attributes=Qt(t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Qt(t[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Bc(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){n={type:"tag",tagType:"define"},n.attributes=Qt(t[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:t,dataParser:n,segment:s}){typeof n!="function"&&(n=a=>a),this.customParsers.push(a=>{if(e.exec(a))return this.trigger("data",{type:"custom",data:n(a),customType:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){const n=s=>e.test(s)?t(s):s;this.tagMappers.push(n)}}const __=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),ln=function(r){const e={};return Object.keys(r).forEach(function(t){e[__(t)]=r[t]}),e},ko=function(r){const{serverControl:e,targetDuration:t,partTargetDuration:n}=r;if(!e)return;const s="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=t&&t*3,c=n&&n*2;t&&!e.hasOwnProperty(a)&&(e[a]=l,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${l}).`})),l&&e[a]<l&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${l})`}),e[a]=l),n&&!e.hasOwnProperty(o)&&(e[o]=n*3,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),n&&e[o]<c&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${c}).`}),e[o]=c)};class T_ extends Nl{constructor(e={}){super(),this.lineStream=new m_,this.parseStream=new y_,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,n=[];let s={},a,o,l=!1;const c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},g="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let m=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let S=0,T=0;const C={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&a&&(s.map=a),!s.key&&o&&(s.key=o),!s.timeline&&typeof m=="number"&&(s.timeline=m),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(y){let k,O;if(t.manifest.definitions){for(const I in t.manifest.definitions)if(y.uri&&(y.uri=y.uri.replace(`{$${I}}`,t.manifest.definitions[I])),y.attributes)for(const D in y.attributes)typeof y.attributes[D]=="string"&&(y.attributes[D]=y.attributes[D].replace(`{$${I}}`,t.manifest.definitions[I]))}({tag(){({version(){y.version&&(this.manifest.version=y.version)},"allow-cache"(){this.manifest.allowCache=y.allowed,"allowed"in y||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const I={};"length"in y&&(s.byterange=I,I.length=y.length,"offset"in y||(y.offset=S)),"offset"in y&&(s.byterange=I,I.offset=y.offset),S=I.offset+I.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),y.title&&(s.title=y.title),y.duration>0&&(s.duration=y.duration),y.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!y.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(y.attributes.METHOD==="NONE"){o=null;return}if(!y.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(y.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:y.attributes};return}if(y.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:y.attributes.URI};return}if(y.attributes.KEYFORMAT===g){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(y.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(y.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),y.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(y.attributes.KEYID&&y.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:y.attributes.KEYFORMAT,keyId:y.attributes.KEYID.substring(2)},pssh:bh(y.attributes.URI.split(",")[1])};return}y.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:y.attributes.METHOD||"AES-128",uri:y.attributes.URI},typeof y.attributes.IV<"u"&&(o.iv=y.attributes.IV)},"media-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+y.number});return}this.manifest.mediaSequence=y.number},"discontinuity-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+y.number});return}this.manifest.discontinuitySequence=y.number,m=y.number},"playlist-type"(){if(!/VOD|EVENT/.test(y.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+y.playlist});return}this.manifest.playlistType=y.playlistType},map(){a={},y.uri&&(a.uri=y.uri),y.byterange&&(a.byterange=y.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!y.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),xt(s.attributes,y.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(y.attributes&&y.attributes.TYPE&&y.attributes["GROUP-ID"]&&y.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const I=this.manifest.mediaGroups[y.attributes.TYPE];I[y.attributes["GROUP-ID"]]=I[y.attributes["GROUP-ID"]]||{},k=I[y.attributes["GROUP-ID"]],O={default:/yes/i.test(y.attributes.DEFAULT)},O.default?O.autoselect=!0:O.autoselect=/yes/i.test(y.attributes.AUTOSELECT),y.attributes.LANGUAGE&&(O.language=y.attributes.LANGUAGE),y.attributes.URI&&(O.uri=y.attributes.URI),y.attributes["INSTREAM-ID"]&&(O.instreamId=y.attributes["INSTREAM-ID"]),y.attributes.CHARACTERISTICS&&(O.characteristics=y.attributes.CHARACTERISTICS),y.attributes.FORCED&&(O.forced=/yes/i.test(y.attributes.FORCED)),k[y.attributes.NAME]=O},discontinuity(){m+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=y.dateTimeString,this.manifest.dateTimeObject=y.dateTimeObject),s.dateTimeString=y.dateTimeString,s.dateTimeObject=y.dateTimeObject;const{lastProgramDateTime:I}=this;this.lastProgramDateTime=new Date(y.dateTimeString).getTime(),I===null&&this.manifest.segments.reduceRight((D,q)=>(q.programDateTime=D-q.duration*1e3,q.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(y.duration)||y.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+y.duration});return}this.manifest.targetDuration=y.duration,ko.call(this,this.manifest)},start(){if(!y.attributes||isNaN(y.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:y.attributes["TIME-OFFSET"],precise:y.attributes.PRECISE}},"cue-out"(){s.cueOut=y.data},"cue-out-cont"(){s.cueOutCont=y.data},"cue-in"(){s.cueIn=y.data},skip(){this.manifest.skip=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",y.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const I=this.manifest.segments.length,D=ln(y.attributes);s.parts=s.parts||[],s.parts.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=T),T=D.byterange.offset+D.byterange.length);const q=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${q} for segment #${I}`,y.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(($,U)=>{$.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${U} lacks required attribute(s): LAST-PART`})})},"server-control"(){const I=this.manifest.serverControl=ln(y.attributes);I.hasOwnProperty("canBlockReload")||(I.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ko.call(this,this.manifest),I.canSkipDateranges&&!I.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const I=this.manifest.segments.length,D=ln(y.attributes),q=D.type&&D.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=q?T:0,q&&(T=D.byterange.offset+D.byterange.length)));const $=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${$} for segment #${I}`,y.attributes,["TYPE","URI"]),!!D.type)for(let U=0;U<s.preloadHints.length-1;U++){const N=s.preloadHints[U];N.type&&N.type===D.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${$} for segment #${I} has the same TYPE ${D.type} as preload hint #${U}`})}},"rendition-report"(){const I=ln(y.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(I);const D=this.manifest.renditionReports.length-1,q=["LAST-MSN","URI"];l&&q.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${D}`,y.attributes,q)},"part-inf"(){this.manifest.partInf=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",y.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),ko.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ln(y.attributes));const I=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${I}`,y.attributes,["ID","START-DATE"]);const D=this.manifest.dateRanges[I];D.endDate&&D.startDate&&new Date(D.endDate)<new Date(D.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),D.duration&&D.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),D.plannedDuration&&D.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const q=!!D.endOnNext;if(q&&!D.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),q&&(D.duration||D.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),D.duration&&D.endDate){const U=D.startDate.getTime()+D.duration*1e3;this.manifest.dateRanges[I].endDate=new Date(U)}if(!C[D.id])C[D.id]=D;else{for(const U in C[D.id])if(D[U]&&JSON.stringify(C[D.id][U])!==JSON.stringify(D[U])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const $=this.manifest.dateRanges.findIndex(U=>U.id===D.id);this.manifest.dateRanges[$]=xt(this.manifest.dateRanges[$],D),C[D.id]=xt(C[D.id],D),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",y.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const I=(D,q)=>{if(D in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${D}`});return}this.manifest.definitions[D]=q};if("QUERYPARAM"in y.attributes){if("NAME"in y.attributes||"IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const D=this.params.get(y.attributes.QUERYPARAM);if(!D){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${y.attributes.QUERYPARAM}`});return}I(y.attributes.QUERYPARAM,decodeURIComponent(D));return}if("NAME"in y.attributes){if("IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in y.attributes)||typeof y.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${y.attributes.NAME}`});return}I(y.attributes.NAME,y.attributes.VALUE);return}if("IMPORT"in y.attributes){if(!this.mainDefinitions[y.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${y.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}I(y.attributes.IMPORT,this.mainDefinitions[y.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:y.attributes,uri:y.uri,timeline:m}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",y.attributes,["BANDWIDTH","URI"])}}[y.tagType]||c).call(t)},uri(){s.uri=y.uri,n.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),o&&(s.key=o),s.timeline=m,a&&(s.map=a),T=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){y.segment?(s.custom=s.custom||{},s.custom[y.customType]=y.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[y.customType]=y.data)}})[y.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,n){const s=[];n.forEach(function(a){t.hasOwnProperty(a)||s.push(a)}),s.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${s.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
23
+ `),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var On={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},b_=["video","audio","text"],Lc=["Video","Audio","Text"],xh=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,n,s){var a=("00"+Number(n).toString(16)).slice(-2),o=("00"+Number(s).toString(16)).slice(-2);return"avc1."+a+"00"+o})},Pi=function(e){e===void 0&&(e="");var t=e.split(","),n=[];return t.forEach(function(s){s=s.trim();var a;b_.forEach(function(o){var l=On[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},x_=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var s in n){var a=n[s];if(a.default&&a.playlists)return Pi(a.playlists[0].attributes.CODECS)}return null},Ch=function(e){return e===void 0&&(e=""),On.audio.test(e.trim().toLowerCase())},C_=function(e){return e===void 0&&(e=""),On.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return xh(a.trim())}),n="video";t.length===1&&Ch(t[0])?n="audio":t.length===1&&C_(t[0])&&(n="application");var s="mp4";return t.every(function(a){return On.mp4.test(a)})?s="mp4":t.every(function(a){return On.webm.test(a)})?s="webm":t.every(function(a){return On.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Xr=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),G.MediaSource&&G.MediaSource.isTypeSupported&&G.MediaSource.isTypeSupported(rr(e))||t&&G.ManagedMediaSource&&G.ManagedMediaSource.isTypeSupported&&G.ManagedMediaSource.isTypeSupported(rr(e))||!1},wo=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var n=0;n<Lc.length;n++){var s=Lc[n];if(On["muxer"+s].test(t))return!0}return!1})},Mc="mp4a.40.2",S_="avc1.4d400d",E_=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,k_=/^application\/dash\+xml/i,Sh=function(e){return E_.test(e)?"hls":k_.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},w_=function(e){return e.toString(2).length},D_=function(e){return Math.ceil(w_(e)/8)},Eh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},A_=function(e){return Eh(e)},Be=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!A_(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Vt=G.BigInt||Number,Zo=[Vt("0x1"),Vt("0x100"),Vt("0x10000"),Vt("0x1000000"),Vt("0x100000000"),Vt("0x10000000000"),Vt("0x1000000000000"),Vt("0x100000000000000"),Vt("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var N_=function(e,t){var n=t===void 0?{}:t,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Be(e);var c=l?"reduce":"reduceRight",d=e[c]?e[c]:Array.prototype[c],g=d.call(e,function(S,T,C){var y=l?C:Math.abs(C+1-e.length);return S+Vt(T)*Zo[y]},Vt(0));if(a){var m=Zo[e.length]/Vt(2)-Vt(1);g=Vt(g),g>m&&(g-=m,g-=m,g-=Vt(2))}return Number(g)},I_=function(e,t){var n={},s=n.le,a=s===void 0?!1:s;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Vt(e);for(var o=D_(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/Zo[c]&Vt(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},kh=function(e,t){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},O_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),t.length<=1)return Be(t[0]);var s=t.reduce(function(l,c,d){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return t.forEach(function(l){l=Be(l),a.set(l,o),o+=l.byteLength}),a},ft=function(e,t,n){var s=n===void 0?{}:n,a=s.offset,o=a===void 0?0:a,l=s.mask,c=l===void 0?[]:l;e=Be(e),t=Be(t);var d=t.every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&d.call(t,function(g,m){var S=c[m]?c[m]&e[o+m]:e[o+m];return g===S})},B_=function(e,t,n){t.forEach(function(s){for(var a in e.mediaGroups[s])for(var o in e.mediaGroups[s][a]){var l=e.mediaGroups[s][a][o];n(l,s,a,o)}})},$r={},Ki={},Sn={},Pc;function Sa(){if(Pc)return Sn;Pc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function t(a,o){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l]);return a}var n=e({HTML:"text/html",isHTML:function(a){return a===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Sn.assign=t,Sn.find=r,Sn.freeze=e,Sn.MIME_TYPE=n,Sn.NAMESPACE=s,Sn}var Rc;function wh(){if(Rc)return Ki;Rc=1;var r=Sa(),e=r.find,t=r.NAMESPACE;function n(x){return x!==""}function s(x){return x?x.split(/[\t\n\f\r ]+/).filter(n):[]}function a(x,w){return x.hasOwnProperty(w)||(x[w]=!0),x}function o(x){if(!x)return[];var w=s(x);return Object.keys(w.reduce(a,{}))}function l(x){return function(w){return x&&x.indexOf(w)!==-1}}function c(x,w){for(var X in x)Object.prototype.hasOwnProperty.call(x,X)&&(w[X]=x[X])}function d(x,w){var X=x.prototype;if(!(X instanceof w)){let se=function(){};se.prototype=w.prototype,se=new se,c(X,se),x.prototype=X=se}X.constructor!=x&&(typeof x!="function"&&console.error("unknown Class:"+x),X.constructor=x)}var g={},m=g.ELEMENT_NODE=1,S=g.ATTRIBUTE_NODE=2,T=g.TEXT_NODE=3,C=g.CDATA_SECTION_NODE=4,y=g.ENTITY_REFERENCE_NODE=5,k=g.ENTITY_NODE=6,O=g.PROCESSING_INSTRUCTION_NODE=7,I=g.COMMENT_NODE=8,D=g.DOCUMENT_NODE=9,q=g.DOCUMENT_TYPE_NODE=10,$=g.DOCUMENT_FRAGMENT_NODE=11,U=g.NOTATION_NODE=12,N={},z={};N.INDEX_SIZE_ERR=(z[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(z[2]="DOMString size error",2);var b=N.HIERARCHY_REQUEST_ERR=(z[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(z[4]="Wrong document",4);var E=N.INVALID_CHARACTER_ERR=(z[5]="Invalid character",5);N.NO_DATA_ALLOWED_ERR=(z[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(z[7]="No modification allowed",7);var P=N.NOT_FOUND_ERR=(z[8]="Not found",8);N.NOT_SUPPORTED_ERR=(z[9]="Not supported",9);var Q=N.INUSE_ATTRIBUTE_ERR=(z[10]="Attribute in use",10);N.INVALID_STATE_ERR=(z[11]="Invalid state",11),N.SYNTAX_ERR=(z[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(z[13]="Invalid modification",13),N.NAMESPACE_ERR=(z[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(z[15]="Invalid access",15);function L(x,w){if(w instanceof Error)var X=w;else X=this,Error.call(this,z[x]),this.message=z[x],Error.captureStackTrace&&Error.captureStackTrace(this,L);return X.code=x,w&&(this.message=this.message+": "+w),X}L.prototype=Error.prototype,c(N,L);function V(){}V.prototype={length:0,item:function(x){return x>=0&&x<this.length?this[x]:null},toString:function(x,w){for(var X=[],se=0;se<this.length;se++)Ft(this[se],X,x,w);return X.join("")},filter:function(x){return Array.prototype.filter.call(this,x)},indexOf:function(x){return Array.prototype.indexOf.call(this,x)}};function M(x,w){this._node=x,this._refresh=w,j(this)}function j(x){var w=x._node._inc||x._node.ownerDocument._inc;if(x._inc!==w){var X=x._refresh(x._node);if(Wi(x,"length",X.length),!x.$$length||X.length<x.$$length)for(var se=X.length;se in x;se++)Object.prototype.hasOwnProperty.call(x,se)&&delete x[se];c(X,x),x._inc=w}}M.prototype.item=function(x){return j(this),this[x]||null},d(M,V);function F(){}function Y(x,w){for(var X=x.length;X--;)if(x[X]===w)return X}function K(x,w,X,se){if(se?w[Y(w,se)]=X:w[w.length++]=X,x){X.ownerElement=x;var ve=x.ownerDocument;ve&&(se&&we(ve,x,se),Ae(ve,x,X))}}function J(x,w,X){var se=Y(w,X);if(se>=0){for(var ve=w.length-1;se<ve;)w[se]=w[++se];if(w.length=ve,x){var Ie=x.ownerDocument;Ie&&(we(Ie,x,X),X.ownerElement=null)}}else throw new L(P,new Error(x.tagName+"@"+X))}F.prototype={length:0,item:V.prototype.item,getNamedItem:function(x){for(var w=this.length;w--;){var X=this[w];if(X.nodeName==x)return X}},setNamedItem:function(x){var w=x.ownerElement;if(w&&w!=this._ownerElement)throw new L(Q);var X=this.getNamedItem(x.nodeName);return K(this._ownerElement,this,x,X),X},setNamedItemNS:function(x){var w=x.ownerElement,X;if(w&&w!=this._ownerElement)throw new L(Q);return X=this.getNamedItemNS(x.namespaceURI,x.localName),K(this._ownerElement,this,x,X),X},removeNamedItem:function(x){var w=this.getNamedItem(x);return J(this._ownerElement,this,w),w},removeNamedItemNS:function(x,w){var X=this.getNamedItemNS(x,w);return J(this._ownerElement,this,X),X},getNamedItemNS:function(x,w){for(var X=this.length;X--;){var se=this[X];if(se.localName==w&&se.namespaceURI==x)return se}return null}};function Z(){}Z.prototype={hasFeature:function(x,w){return!0},createDocument:function(x,w,X){var se=new ce;if(se.implementation=this,se.childNodes=new V,se.doctype=X||null,X&&se.appendChild(X),w){var ve=se.createElementNS(x,w);se.appendChild(ve)}return se},createDocumentType:function(x,w,X){var se=new De;return se.name=x,se.nodeName=x,se.publicId=w||"",se.systemId=X||"",se}};function ie(){}ie.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(x,w){return Ce(this,x,w)},replaceChild:function(x,w){Ce(this,x,w,Ee),w&&this.removeChild(w)},removeChild:function(x){return Pe(this,x)},appendChild:function(x){return this.insertBefore(x,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(x){return $t(this.ownerDocument||this,this,x)},normalize:function(){for(var x=this.firstChild;x;){var w=x.nextSibling;w&&w.nodeType==T&&x.nodeType==T?(this.removeChild(w),x.appendData(w.data)):(x.normalize(),x=w)}},isSupported:function(x,w){return this.ownerDocument.implementation.hasFeature(x,w)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(x){for(var w=this;w;){var X=w._nsMap;if(X){for(var se in X)if(Object.prototype.hasOwnProperty.call(X,se)&&X[se]===x)return se}w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},lookupNamespaceURI:function(x){for(var w=this;w;){var X=w._nsMap;if(X&&Object.prototype.hasOwnProperty.call(X,x))return X[x];w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},isDefaultNamespace:function(x){var w=this.lookupPrefix(x);return w==null}};function ae(x){return x=="<"&&"&lt;"||x==">"&&"&gt;"||x=="&"&&"&amp;"||x=='"'&&"&quot;"||"&#"+x.charCodeAt()+";"}c(g,ie),c(g,ie.prototype);function fe(x,w){if(w(x))return!0;if(x=x.firstChild)do if(fe(x,w))return!0;while(x=x.nextSibling)}function ce(){this.ownerDocument=this}function Ae(x,w,X){x&&x._inc++;var se=X.namespaceURI;se===t.XMLNS&&(w._nsMap[X.prefix?X.localName:""]=X.value)}function we(x,w,X,se){x&&x._inc++;var ve=X.namespaceURI;ve===t.XMLNS&&delete w._nsMap[X.prefix?X.localName:""]}function Ne(x,w,X){if(x&&x._inc){x._inc++;var se=w.childNodes;if(X)se[se.length++]=X;else{for(var ve=w.firstChild,Ie=0;ve;)se[Ie++]=ve,ve=ve.nextSibling;se.length=Ie,delete se[se.length]}}}function Pe(x,w){var X=w.previousSibling,se=w.nextSibling;return X?X.nextSibling=se:x.firstChild=se,se?se.previousSibling=X:x.lastChild=X,w.parentNode=null,w.previousSibling=null,w.nextSibling=null,Ne(x.ownerDocument,x),w}function $e(x){return x&&(x.nodeType===ie.DOCUMENT_NODE||x.nodeType===ie.DOCUMENT_FRAGMENT_NODE||x.nodeType===ie.ELEMENT_NODE)}function We(x){return x&&(Ye(x)||He(x)||Ze(x)||x.nodeType===ie.DOCUMENT_FRAGMENT_NODE||x.nodeType===ie.COMMENT_NODE||x.nodeType===ie.PROCESSING_INSTRUCTION_NODE)}function Ze(x){return x&&x.nodeType===ie.DOCUMENT_TYPE_NODE}function Ye(x){return x&&x.nodeType===ie.ELEMENT_NODE}function He(x){return x&&x.nodeType===ie.TEXT_NODE}function ze(x,w){var X=x.childNodes||[];if(e(X,Ye)||Ze(w))return!1;var se=e(X,Ze);return!(w&&se&&X.indexOf(se)>X.indexOf(w))}function Xe(x,w){var X=x.childNodes||[];function se(Ie){return Ye(Ie)&&Ie!==w}if(e(X,se))return!1;var ve=e(X,Ze);return!(w&&ve&&X.indexOf(ve)>X.indexOf(w))}function Ct(x,w,X){if(!$e(x))throw new L(b,"Unexpected parent node type "+x.nodeType);if(X&&X.parentNode!==x)throw new L(P,"child not in parent");if(!We(w)||Ze(w)&&x.nodeType!==ie.DOCUMENT_NODE)throw new L(b,"Unexpected node type "+w.nodeType+" for parent node type "+x.nodeType)}function ot(x,w,X){var se=x.childNodes||[],ve=w.childNodes||[];if(w.nodeType===ie.DOCUMENT_FRAGMENT_NODE){var Ie=ve.filter(Ye);if(Ie.length>1||e(ve,He))throw new L(b,"More than one element or text in fragment");if(Ie.length===1&&!ze(x,X))throw new L(b,"Element in fragment can not be inserted before doctype")}if(Ye(w)&&!ze(x,X))throw new L(b,"Only one element can be added and only after doctype");if(Ze(w)){if(e(se,Ze))throw new L(b,"Only one doctype is allowed");var it=e(se,Ye);if(X&&se.indexOf(it)<se.indexOf(X))throw new L(b,"Doctype can only be inserted before an element");if(!X&&it)throw new L(b,"Doctype can not be appended since element is present")}}function Ee(x,w,X){var se=x.childNodes||[],ve=w.childNodes||[];if(w.nodeType===ie.DOCUMENT_FRAGMENT_NODE){var Ie=ve.filter(Ye);if(Ie.length>1||e(ve,He))throw new L(b,"More than one element or text in fragment");if(Ie.length===1&&!Xe(x,X))throw new L(b,"Element in fragment can not be inserted before doctype")}if(Ye(w)&&!Xe(x,X))throw new L(b,"Only one element can be added and only after doctype");if(Ze(w)){if(e(se,function(Wt){return Ze(Wt)&&Wt!==X}))throw new L(b,"Only one doctype is allowed");var it=e(se,Ye);if(X&&se.indexOf(it)<se.indexOf(X))throw new L(b,"Doctype can only be inserted before an element")}}function Ce(x,w,X,se){Ct(x,w,X),x.nodeType===ie.DOCUMENT_NODE&&(se||ot)(x,w,X);var ve=w.parentNode;if(ve&&ve.removeChild(w),w.nodeType===$){var Ie=w.firstChild;if(Ie==null)return w;var it=w.lastChild}else Ie=it=w;var wt=X?X.previousSibling:x.lastChild;Ie.previousSibling=wt,it.nextSibling=X,wt?wt.nextSibling=Ie:x.firstChild=Ie,X==null?x.lastChild=it:X.previousSibling=it;do{Ie.parentNode=x;var Wt=x.ownerDocument||x;pe(Ie,Wt)}while(Ie!==it&&(Ie=Ie.nextSibling));return Ne(x.ownerDocument||x,x),w.nodeType==$&&(w.firstChild=w.lastChild=null),w}function pe(x,w){if(x.ownerDocument!==w){if(x.ownerDocument=w,x.nodeType===m&&x.attributes)for(var X=0;X<x.attributes.length;X++){var se=x.attributes.item(X);se&&(se.ownerDocument=w)}for(var ve=x.firstChild;ve;)pe(ve,w),ve=ve.nextSibling}}function Re(x,w){w.parentNode&&w.parentNode.removeChild(w),w.parentNode=x,w.previousSibling=x.lastChild,w.nextSibling=null,w.previousSibling?w.previousSibling.nextSibling=w:x.firstChild=w,x.lastChild=w,Ne(x.ownerDocument,x,w);var X=x.ownerDocument||x;return pe(w,X),w}ce.prototype={nodeName:"#document",nodeType:D,doctype:null,documentElement:null,_inc:1,insertBefore:function(x,w){if(x.nodeType==$){for(var X=x.firstChild;X;){var se=X.nextSibling;this.insertBefore(X,w),X=se}return x}return Ce(this,x,w),pe(x,this),this.documentElement===null&&x.nodeType===m&&(this.documentElement=x),x},removeChild:function(x){return this.documentElement==x&&(this.documentElement=null),Pe(this,x)},replaceChild:function(x,w){Ce(this,x,w,Ee),pe(x,this),w&&this.removeChild(w),Ye(x)&&(this.documentElement=x)},importNode:function(x,w){return Gi(this,x,w)},getElementById:function(x){var w=null;return fe(this.documentElement,function(X){if(X.nodeType==m&&X.getAttribute("id")==x)return w=X,!0}),w},getElementsByClassName:function(x){var w=o(x);return new M(this,function(X){var se=[];return w.length>0&&fe(X.documentElement,function(ve){if(ve!==X&&ve.nodeType===m){var Ie=ve.getAttribute("class");if(Ie){var it=x===Ie;if(!it){var wt=o(Ie);it=w.every(l(wt))}it&&se.push(ve)}}}),se})},createElement:function(x){var w=new tt;w.ownerDocument=this,w.nodeName=x,w.tagName=x,w.localName=x,w.childNodes=new V;var X=w.attributes=new F;return X._ownerElement=w,w},createDocumentFragment:function(){var x=new Gt;return x.ownerDocument=this,x.childNodes=new V,x},createTextNode:function(x){var w=new oe;return w.ownerDocument=this,w.appendData(x),w},createComment:function(x){var w=new de;return w.ownerDocument=this,w.appendData(x),w},createCDATASection:function(x){if(x.indexOf("]]>")!==-1)throw new L(E,'data contains "]]>"');var w=new me;return w.ownerDocument=this,w.appendData(x),w},createProcessingInstruction:function(x,w){var X=new St;return X.ownerDocument=this,X.tagName=X.nodeName=X.target=x,X.nodeValue=X.data=w,X},createAttribute:function(x){var w=new ge;return w.ownerDocument=this,w.name=x,w.nodeName=x,w.localName=x,w.specified=!0,w},createEntityReference:function(x){var w=new Ve;return w.ownerDocument=this,w.nodeName=x,w},createElementNS:function(x,w){var X=new tt,se=w.split(":"),ve=X.attributes=new F;return X.childNodes=new V,X.ownerDocument=this,X.nodeName=w,X.tagName=w,X.namespaceURI=x,se.length==2?(X.prefix=se[0],X.localName=se[1]):X.localName=w,ve._ownerElement=X,X},createAttributeNS:function(x,w){var X=new ge,se=w.split(":");return X.ownerDocument=this,X.nodeName=w,X.name=w,X.namespaceURI=x,X.specified=!0,se.length==2?(X.prefix=se[0],X.localName=se[1]):X.localName=w,X}},d(ce,ie);function tt(){this._nsMap={}}tt.prototype={nodeType:m,hasAttribute:function(x){return this.getAttributeNode(x)!=null},getAttribute:function(x){var w=this.getAttributeNode(x);return w&&w.value||""},getAttributeNode:function(x){return this.attributes.getNamedItem(x)},setAttribute:function(x,w){var X=this.ownerDocument.createAttribute(x);X.value=X.nodeValue=""+w,this.setAttributeNode(X)},removeAttribute:function(x){var w=this.getAttributeNode(x);w&&this.removeAttributeNode(w)},appendChild:function(x){return x.nodeType===$?this.insertBefore(x,null):Re(this,x)},setAttributeNode:function(x){return this.attributes.setNamedItem(x)},setAttributeNodeNS:function(x){return this.attributes.setNamedItemNS(x)},removeAttributeNode:function(x){return this.attributes.removeNamedItem(x.nodeName)},removeAttributeNS:function(x,w){var X=this.getAttributeNodeNS(x,w);X&&this.removeAttributeNode(X)},hasAttributeNS:function(x,w){return this.getAttributeNodeNS(x,w)!=null},getAttributeNS:function(x,w){var X=this.getAttributeNodeNS(x,w);return X&&X.value||""},setAttributeNS:function(x,w,X){var se=this.ownerDocument.createAttributeNS(x,w);se.value=se.nodeValue=""+X,this.setAttributeNode(se)},getAttributeNodeNS:function(x,w){return this.attributes.getNamedItemNS(x,w)},getElementsByTagName:function(x){return new M(this,function(w){var X=[];return fe(w,function(se){se!==w&&se.nodeType==m&&(x==="*"||se.tagName==x)&&X.push(se)}),X})},getElementsByTagNameNS:function(x,w){return new M(this,function(X){var se=[];return fe(X,function(ve){ve!==X&&ve.nodeType===m&&(x==="*"||ve.namespaceURI===x)&&(w==="*"||ve.localName==w)&&se.push(ve)}),se})}},ce.prototype.getElementsByTagName=tt.prototype.getElementsByTagName,ce.prototype.getElementsByTagNameNS=tt.prototype.getElementsByTagNameNS,d(tt,ie);function ge(){}ge.prototype.nodeType=S,d(ge,ie);function ne(){}ne.prototype={data:"",substringData:function(x,w){return this.data.substring(x,x+w)},appendData:function(x){x=this.data+x,this.nodeValue=this.data=x,this.length=x.length},insertData:function(x,w){this.replaceData(x,0,w)},appendChild:function(x){throw new Error(z[b])},deleteData:function(x,w){this.replaceData(x,w,"")},replaceData:function(x,w,X){var se=this.data.substring(0,x),ve=this.data.substring(x+w);X=se+X+ve,this.nodeValue=this.data=X,this.length=X.length}},d(ne,ie);function oe(){}oe.prototype={nodeName:"#text",nodeType:T,splitText:function(x){var w=this.data,X=w.substring(x);w=w.substring(0,x),this.data=this.nodeValue=w,this.length=w.length;var se=this.ownerDocument.createTextNode(X);return this.parentNode&&this.parentNode.insertBefore(se,this.nextSibling),se}},d(oe,ne);function de(){}de.prototype={nodeName:"#comment",nodeType:I},d(de,ne);function me(){}me.prototype={nodeName:"#cdata-section",nodeType:C},d(me,ne);function De(){}De.prototype.nodeType=q,d(De,ie);function Ke(){}Ke.prototype.nodeType=U,d(Ke,ie);function ht(){}ht.prototype.nodeType=k,d(ht,ie);function Ve(){}Ve.prototype.nodeType=y,d(Ve,ie);function Gt(){}Gt.prototype.nodeName="#document-fragment",Gt.prototype.nodeType=$,d(Gt,ie);function St(){}St.prototype.nodeType=O,d(St,ie);function li(){}li.prototype.serializeToString=function(x,w,X){return It.call(x,w,X)},ie.prototype.toString=It;function It(x,w){var X=[],se=this.nodeType==9&&this.documentElement||this,ve=se.prefix,Ie=se.namespaceURI;if(Ie&&ve==null){var ve=se.lookupPrefix(Ie);if(ve==null)var it=[{namespace:Ie,prefix:null}]}return Ft(this,X,x,w,it),X.join("")}function Et(x,w,X){var se=x.prefix||"",ve=x.namespaceURI;if(!ve||se==="xml"&&ve===t.XML||ve===t.XMLNS)return!1;for(var Ie=X.length;Ie--;){var it=X[Ie];if(it.prefix===se)return it.namespace!==ve}return!0}function pi(x,w,X){x.push(" ",w,'="',X.replace(/[<>&"\t\n\r]/g,ae),'"')}function Ft(x,w,X,se,ve){if(ve||(ve=[]),se)if(x=se(x),x){if(typeof x=="string"){w.push(x);return}}else return;switch(x.nodeType){case m:var Ie=x.attributes,it=Ie.length,ut=x.firstChild,wt=x.tagName;X=t.isHTML(x.namespaceURI)||X;var Wt=wt;if(!X&&!x.prefix&&x.namespaceURI){for(var Ut,Pt=0;Pt<Ie.length;Pt++)if(Ie.item(Pt).name==="xmlns"){Ut=Ie.item(Pt).value;break}if(!Ut)for(var ii=ve.length-1;ii>=0;ii--){var Je=ve[ii];if(Je.prefix===""&&Je.namespace===x.namespaceURI){Ut=Je.namespace;break}}if(Ut!==x.namespaceURI)for(var ii=ve.length-1;ii>=0;ii--){var Je=ve[ii];if(Je.namespace===x.namespaceURI){Je.prefix&&(Wt=Je.prefix+":"+wt);break}}}w.push("<",Wt);for(var ni=0;ni<it;ni++){var Yt=Ie.item(ni);Yt.prefix=="xmlns"?ve.push({prefix:Yt.localName,namespace:Yt.value}):Yt.nodeName=="xmlns"&&ve.push({prefix:"",namespace:Yt.value})}for(var ni=0;ni<it;ni++){var Yt=Ie.item(ni);if(Et(Yt,X,ve)){var Xt=Yt.prefix||"",Dt=Yt.namespaceURI;pi(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ve.push({prefix:Xt,namespace:Dt})}Ft(Yt,w,X,se,ve)}if(wt===Wt&&Et(x,X,ve)){var Xt=x.prefix||"",Dt=x.namespaceURI;pi(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ve.push({prefix:Xt,namespace:Dt})}if(ut||X&&!/^(?:meta|link|img|br|hr|input)$/i.test(wt)){if(w.push(">"),X&&/^script$/i.test(wt))for(;ut;)ut.data?w.push(ut.data):Ft(ut,w,X,se,ve.slice()),ut=ut.nextSibling;else for(;ut;)Ft(ut,w,X,se,ve.slice()),ut=ut.nextSibling;w.push("</",Wt,">")}else w.push("/>");return;case D:case $:for(var ut=x.firstChild;ut;)Ft(ut,w,X,se,ve.slice()),ut=ut.nextSibling;return;case S:return pi(w,x.name,x.value);case T:return w.push(x.data.replace(/[<&>]/g,ae));case C:return w.push("<![CDATA[",x.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case I:return w.push("<!--",x.data,"-->");case q:var qe=x.publicId,Ci=x.systemId;if(w.push("<!DOCTYPE ",x.name),qe)w.push(" PUBLIC ",qe),Ci&&Ci!="."&&w.push(" ",Ci),w.push(">");else if(Ci&&Ci!=".")w.push(" SYSTEM ",Ci,">");else{var Bi=x.internalSubset;Bi&&w.push(" [",Bi,"]"),w.push(">")}return;case O:return w.push("<?",x.target," ",x.data,"?>");case y:return w.push("&",x.nodeName,";");default:w.push("??",x.nodeName)}}function Gi(x,w,X){var se;switch(w.nodeType){case m:se=w.cloneNode(!1),se.ownerDocument=x;case $:break;case S:X=!0;break}if(se||(se=w.cloneNode(!1)),se.ownerDocument=x,se.parentNode=null,X)for(var ve=w.firstChild;ve;)se.appendChild(Gi(x,ve,X)),ve=ve.nextSibling;return se}function $t(x,w,X){var se=new w.constructor;for(var ve in w)if(Object.prototype.hasOwnProperty.call(w,ve)){var Ie=w[ve];typeof Ie!="object"&&Ie!=se[ve]&&(se[ve]=Ie)}switch(w.childNodes&&(se.childNodes=new V),se.ownerDocument=x,se.nodeType){case m:var it=w.attributes,wt=se.attributes=new F,Wt=it.length;wt._ownerElement=se;for(var Ut=0;Ut<Wt;Ut++)se.setAttributeNode($t(x,it.item(Ut),!0));break;case S:X=!0}if(X)for(var Pt=w.firstChild;Pt;)se.appendChild($t(x,Pt,X)),Pt=Pt.nextSibling;return se}function Wi(x,w,X){x[w]=X}try{if(Object.defineProperty){let x=function(w){switch(w.nodeType){case m:case $:var X=[];for(w=w.firstChild;w;)w.nodeType!==7&&w.nodeType!==8&&X.push(x(w)),w=w.nextSibling;return X.join("");default:return w.nodeValue}};Object.defineProperty(M.prototype,"length",{get:function(){return j(this),this.$$length}}),Object.defineProperty(ie.prototype,"textContent",{get:function(){return x(this)},set:function(w){switch(this.nodeType){case m:case $:for(;this.firstChild;)this.removeChild(this.firstChild);(w||String(w))&&this.appendChild(this.ownerDocument.createTextNode(w));break;default:this.data=w,this.value=w,this.nodeValue=w}}}),Wi=function(w,X,se){w["$$"+X]=se}}}catch{}return Ki.DocumentType=De,Ki.DOMException=L,Ki.DOMImplementation=Z,Ki.Element=tt,Ki.Node=ie,Ki.NodeList=V,Ki.XMLSerializer=li,Ki}var Ur={},Do={},Vc;function L_(){return Vc||(Vc=1,(function(r){var e=Sa().freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
24
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(Do)),Do}var Vs={},Fc;function M_(){if(Fc)return Vs;Fc=1;var r=Sa().NAMESPACE,e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,t=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+t.source+"*(?::"+e.source+t.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,d=5,g=6,m=7;function S(b,E){this.message=b,this.locator=E,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function T(){}T.prototype={parse:function(b,E,P){var Q=this.domBuilder;Q.startDocument(),q(E,E={}),C(b,E,P,Q,this.errorHandler),Q.endDocument()}};function C(b,E,P,Q,L){function V(pe){if(pe>65535){pe-=65536;var Re=55296+(pe>>10),tt=56320+(pe&1023);return String.fromCharCode(Re,tt)}else return String.fromCharCode(pe)}function M(pe){var Re=pe.slice(1,-1);return Object.hasOwnProperty.call(P,Re)?P[Re]:Re.charAt(0)==="#"?V(parseInt(Re.substr(1).replace("x","0x"))):(L.error("entity not found:"+pe),pe)}function j(pe){if(pe>fe){var Re=b.substring(fe,pe).replace(/&#?\w+;/g,M);Z&&F(fe),Q.characters(Re,0,pe-fe),fe=pe}}function F(pe,Re){for(;pe>=K&&(Re=J.exec(b));)Y=Re.index,K=Y+Re[0].length,Z.lineNumber++;Z.columnNumber=pe-Y+1}for(var Y=0,K=0,J=/.*(?:\r\n?|\n)|.*$/g,Z=Q.locator,ie=[{currentNSMap:E}],ae={},fe=0;;){try{var ce=b.indexOf("<",fe);if(ce<0){if(!b.substr(fe).match(/^\s*$/)){var Ae=Q.doc,we=Ae.createTextNode(b.substr(fe));Ae.appendChild(we),Q.currentElement=we}return}switch(ce>fe&&j(ce),b.charAt(ce+1)){case"/":var Xe=b.indexOf(">",ce+3),Ne=b.substring(ce+2,Xe).replace(/[ \t\n\r]+$/g,""),Pe=ie.pop();Xe<0?(Ne=b.substring(ce+2).replace(/[\s<].*/,""),L.error("end tag name: "+Ne+" is not complete:"+Pe.tagName),Xe=ce+1+Ne.length):Ne.match(/\s</)&&(Ne=Ne.replace(/[\s<].*/,""),L.error("end tag name: "+Ne+" maybe not complete"),Xe=ce+1+Ne.length);var $e=Pe.localNSMap,We=Pe.tagName==Ne,Ze=We||Pe.tagName&&Pe.tagName.toLowerCase()==Ne.toLowerCase();if(Ze){if(Q.endElement(Pe.uri,Pe.localName,Ne),$e)for(var Ye in $e)Object.prototype.hasOwnProperty.call($e,Ye)&&Q.endPrefixMapping(Ye);We||L.fatalError("end tag name: "+Ne+" is not match the current start tagName:"+Pe.tagName)}else ie.push(Pe);Xe++;break;case"?":Z&&F(ce),Xe=U(b,ce,Q);break;case"!":Z&&F(ce),Xe=$(b,ce,Q,L);break;default:Z&&F(ce);var He=new N,ze=ie[ie.length-1].currentNSMap,Xe=k(b,ce,He,ze,M,L),Ct=He.length;if(!He.closed&&D(b,Xe,He.tagName,ae)&&(He.closed=!0,P.nbsp||L.warning("unclosed xml attribute")),Z&&Ct){for(var ot=y(Z,{}),Ee=0;Ee<Ct;Ee++){var Ce=He[Ee];F(Ce.offset),Ce.locator=y(Z,{})}Q.locator=ot,O(He,Q,ze)&&ie.push(He),Q.locator=Z}else O(He,Q,ze)&&ie.push(He);r.isHTML(He.uri)&&!He.closed?Xe=I(b,Xe,He.tagName,M,Q):Xe++}}catch(pe){if(pe instanceof S)throw pe;L.error("element parse error: "+pe),Xe=-1}Xe>fe?fe=Xe:j(Math.max(ce,fe)+1)}}function y(b,E){return E.lineNumber=b.lineNumber,E.columnNumber=b.columnNumber,E}function k(b,E,P,Q,L,V){function M(Z,ie,ae){P.attributeNames.hasOwnProperty(Z)&&V.fatalError("Attribute "+Z+" redefined"),P.addValue(Z,ie.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),ae)}for(var j,F,Y=++E,K=s;;){var J=b.charAt(Y);switch(J){case"=":if(K===a)j=b.slice(E,Y),K=l;else if(K===o)K=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(K===l||K===a)if(K===a&&(V.warning('attribute value must after "="'),j=b.slice(E,Y)),E=Y+1,Y=b.indexOf(J,E),Y>0)F=b.slice(E,Y),M(j,F,E-1),K=d;else throw new Error("attribute value no end '"+J+"' match");else if(K==c)F=b.slice(E,Y),M(j,F,E),V.warning('attribute "'+j+'" missed start quot('+J+")!!"),E=Y+1,K=d;else throw new Error('attribute value must after "="');break;case"/":switch(K){case s:P.setTagName(b.slice(E,Y));case d:case g:case m:K=m,P.closed=!0;case c:case a:break;case o:P.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return V.error("unexpected end of input"),K==s&&P.setTagName(b.slice(E,Y)),Y;case">":switch(K){case s:P.setTagName(b.slice(E,Y));case d:case g:case m:break;case c:case a:F=b.slice(E,Y),F.slice(-1)==="/"&&(P.closed=!0,F=F.slice(0,-1));case o:K===o&&(F=j),K==c?(V.warning('attribute "'+F+'" missed quot(")!'),M(j,F,E)):((!r.isHTML(Q[""])||!F.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+F+'" missed value!! "'+F+'" instead!!'),M(F,F,E));break;case l:throw new Error("attribute value missed!!")}return Y;case"€":J=" ";default:if(J<=" ")switch(K){case s:P.setTagName(b.slice(E,Y)),K=g;break;case a:j=b.slice(E,Y),K=o;break;case c:var F=b.slice(E,Y);V.warning('attribute "'+F+'" missed quot(")!!'),M(j,F,E);case d:K=g;break}else switch(K){case o:P.tagName,(!r.isHTML(Q[""])||!j.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+j+'" missed value!! "'+j+'" instead2!!'),M(j,j,E),E=Y,K=a;break;case d:V.warning('attribute space is required"'+j+'"!!');case g:K=a,E=Y;break;case l:K=c,E=Y;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}Y++}}function O(b,E,P){for(var Q=b.tagName,L=null,J=b.length;J--;){var V=b[J],M=V.qName,j=V.value,Z=M.indexOf(":");if(Z>0)var F=V.prefix=M.slice(0,Z),Y=M.slice(Z+1),K=F==="xmlns"&&Y;else Y=M,F=null,K=M==="xmlns"&&"";V.localName=Y,K!==!1&&(L==null&&(L={},q(P,P={})),P[K]=L[K]=j,V.uri=r.XMLNS,E.startPrefixMapping(K,j))}for(var J=b.length;J--;){V=b[J];var F=V.prefix;F&&(F==="xml"&&(V.uri=r.XML),F!=="xmlns"&&(V.uri=P[F||""]))}var Z=Q.indexOf(":");Z>0?(F=b.prefix=Q.slice(0,Z),Y=b.localName=Q.slice(Z+1)):(F=null,Y=b.localName=Q);var ie=b.uri=P[F||""];if(E.startElement(ie,Y,Q,b),b.closed){if(E.endElement(ie,Y,Q),L)for(F in L)Object.prototype.hasOwnProperty.call(L,F)&&E.endPrefixMapping(F)}else return b.currentNSMap=P,b.localNSMap=L,!0}function I(b,E,P,Q,L){if(/^(?:script|textarea)$/i.test(P)){var V=b.indexOf("</"+P+">",E),M=b.substring(E+1,V);if(/[&<]/.test(M))return/^script$/i.test(P)?(L.characters(M,0,M.length),V):(M=M.replace(/&#?\w+;/g,Q),L.characters(M,0,M.length),V)}return E+1}function D(b,E,P,Q){var L=Q[P];return L==null&&(L=b.lastIndexOf("</"+P+">"),L<E&&(L=b.lastIndexOf("</"+P)),Q[P]=L),L<E}function q(b,E){for(var P in b)Object.prototype.hasOwnProperty.call(b,P)&&(E[P]=b[P])}function $(b,E,P,Q){var L=b.charAt(E+2);switch(L){case"-":if(b.charAt(E+3)==="-"){var V=b.indexOf("-->",E+4);return V>E?(P.comment(b,E+4,V-E-4),V+3):(Q.error("Unclosed comment"),-1)}else return-1;default:if(b.substr(E+3,6)=="CDATA["){var V=b.indexOf("]]>",E+9);return P.startCDATA(),P.characters(b,E+9,V-E-9),P.endCDATA(),V+3}var M=z(b,E),j=M.length;if(j>1&&/!doctype/i.test(M[0][0])){var F=M[1][0],Y=!1,K=!1;j>3&&(/^public$/i.test(M[2][0])?(Y=M[3][0],K=j>4&&M[4][0]):/^system$/i.test(M[2][0])&&(K=M[3][0]));var J=M[j-1];return P.startDTD(F,Y,K),P.endDTD(),J.index+J[0].length}}return-1}function U(b,E,P){var Q=b.indexOf("?>",E);if(Q){var L=b.substring(E,Q).match(/^<\?(\S*)\s*([\s\S]*?)$/);return L?(L[0].length,P.processingInstruction(L[1],L[2]),Q+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(b){if(!n.test(b))throw new Error("invalid tagName:"+b);this.tagName=b},addValue:function(b,E,P){if(!n.test(b))throw new Error("invalid attribute:"+b);this.attributeNames[b]=this.length,this[this.length++]={qName:b,value:E,offset:P}},length:0,getLocalName:function(b){return this[b].localName},getLocator:function(b){return this[b].locator},getQName:function(b){return this[b].qName},getURI:function(b){return this[b].uri},getValue:function(b){return this[b].value}};function z(b,E){var P,Q=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=E,L.exec(b);P=L.exec(b);)if(Q.push(P),P[1])return Q}return Vs.XMLReader=T,Vs.ParseError=S,Vs}var $c;function P_(){if($c)return Ur;$c=1;var r=Sa(),e=wh(),t=L_(),n=M_(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(k){return k.replace(/\r[\n\u0085]/g,`
25
+ `).replace(/[\r\u0085\u2028]/g,`
26
+ `)}function d(k){this.options=k||{locator:{}}}d.prototype.parseFromString=function(k,O){var I=this.options,D=new l,q=I.domBuilder||new m,$=I.errorHandler,U=I.locator,N=I.xmlns||{},z=/\/x?html?$/.test(O),b=z?t.HTML_ENTITIES:t.XML_ENTITIES;U&&q.setDocumentLocator(U),D.errorHandler=g($,q,U),D.domBuilder=I.domBuilder||q,z&&(N[""]=a.HTML),N.xml=N.xml||a.XML;var E=I.normalizeLineEndings||c;return k&&typeof k=="string"?D.parse(E(k),N,b):D.errorHandler.error("invalid doc source"),q.doc};function g(k,O,I){if(!k){if(O instanceof m)return O;k=O}var D={},q=k instanceof Function;I=I||{};function $(U){var N=k[U];!N&&q&&(N=k.length==2?function(z){k(U,z)}:k),D[U]=N&&function(z){N("[xmldom "+U+"] "+z+T(I))}||function(){}}return $("warning"),$("error"),$("fatalError"),D}function m(){this.cdata=!1}function S(k,O){O.lineNumber=k.lineNumber,O.columnNumber=k.columnNumber}m.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(k,O,I,D){var q=this.doc,$=q.createElementNS(k,I||O),U=D.length;y(this,$),this.currentElement=$,this.locator&&S(this.locator,$);for(var N=0;N<U;N++){var k=D.getURI(N),z=D.getValue(N),I=D.getQName(N),b=q.createAttributeNS(k,I);this.locator&&S(D.getLocator(N),b),b.value=b.nodeValue=z,$.setAttributeNode(b)}},endElement:function(k,O,I){var D=this.currentElement;D.tagName,this.currentElement=D.parentNode},startPrefixMapping:function(k,O){},endPrefixMapping:function(k){},processingInstruction:function(k,O){var I=this.doc.createProcessingInstruction(k,O);this.locator&&S(this.locator,I),y(this,I)},ignorableWhitespace:function(k,O,I){},characters:function(k,O,I){if(k=C.apply(this,arguments),k){if(this.cdata)var D=this.doc.createCDATASection(k);else var D=this.doc.createTextNode(k);this.currentElement?this.currentElement.appendChild(D):/^\s*$/.test(k)&&this.doc.appendChild(D),this.locator&&S(this.locator,D)}},skippedEntity:function(k){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(k){(this.locator=k)&&(k.lineNumber=0)},comment:function(k,O,I){k=C.apply(this,arguments);var D=this.doc.createComment(k);this.locator&&S(this.locator,D),y(this,D)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(k,O,I){var D=this.doc.implementation;if(D&&D.createDocumentType){var q=D.createDocumentType(k,O,I);this.locator&&S(this.locator,q),y(this,q),this.doc.doctype=q}},warning:function(k){console.warn("[xmldom warning] "+k,T(this.locator))},error:function(k){console.error("[xmldom error] "+k,T(this.locator))},fatalError:function(k){throw new o(k,this.locator)}};function T(k){if(k)return`
27
+ @`+(k.systemId||"")+"#[line:"+k.lineNumber+",col:"+k.columnNumber+"]"}function C(k,O,I){return typeof k=="string"?k.substr(O,I):k.length>=O+I||O?new java.lang.String(k,O,I)+"":k}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(k){m.prototype[k]=function(){return null}});function y(k,O){k.currentElement?k.currentElement.appendChild(O):k.doc.appendChild(O)}return Ur.__DOMHandler=m,Ur.normalizeLineEndings=c,Ur.DOMParser=d,Ur}var Uc;function R_(){if(Uc)return $r;Uc=1;var r=wh();return $r.DOMImplementation=r.DOMImplementation,$r.XMLSerializer=r.XMLSerializer,$r.DOMParser=P_().DOMParser,$r}var V_=R_();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const qc=r=>!!r&&typeof r=="object",Lt=(...r)=>r.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(n=>{Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):qc(e[n])&&qc(t[n])?e[n]=Lt(e[n],t[n]):e[n]=t[n]}),e),{}),Dh=r=>Object.keys(r).map(e=>r[e]),F_=(r,e)=>{const t=[];for(let n=r;n<e;n++)t.push(n);return t},sr=r=>r.reduce((e,t)=>e.concat(t),[]),Ah=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},$_=(r,e)=>r.reduce((t,n,s)=>(n[e]&&t.push(s),t),[]),U_=(r,e)=>Dh(r.reduce((t,n)=>(n.forEach(s=>{t[e(s)]=s}),t),{}));var ar={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const is=({baseUrl:r="",source:e="",range:t="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Ca(r||"",e)};if(t||n){const o=(t||n).split("-");let l=G.BigInt?G.BigInt(o[0]):parseInt(o[0],10),c=G.BigInt?G.BigInt(o[1]):parseInt(o[1],10);l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l)),c<Number.MAX_SAFE_INTEGER&&typeof c=="bigint"&&(c=Number(c));let d;typeof c=="bigint"||typeof l=="bigint"?d=G.BigInt(c)-G.BigInt(l)+G.BigInt(1):d=c-l+1,typeof d=="bigint"&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),s.byterange={length:d,offset:l}}return s},q_=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},jc=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),j_={static(r){const{duration:e,timescale:t=1,sourceDuration:n,periodDuration:s}=r,a=jc(r.endNumber),o=e/t;return typeof a=="number"?{start:0,end:a}:typeof s=="number"?{start:0,end:s/o}:{start:0,end:n/o}},dynamic(r){const{NOW:e,clientOffset:t,availabilityStartTime:n,timescale:s=1,duration:a,periodStart:o=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:c=1/0}=r,d=jc(r.endNumber),g=(e+t)/1e3,m=n+o,T=g+l-m,C=Math.ceil(T*s/a),y=Math.floor((g-m-c)*s/a),k=Math.floor((g-m)*s/a);return{start:Math.max(0,y),end:typeof d=="number"?d:Math.min(C,k)}}},H_=r=>e=>{const{duration:t,timescale:n=1,periodStart:s,startNumber:a=1}=r;return{number:a+e,duration:t/n,timeline:s,time:e*t}},Il=r=>{const{type:e,duration:t,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=j_[e](r),c=F_(o,l).map(H_(r));if(e==="static"){const d=c.length-1,g=typeof s=="number"?s:a;c[d].duration=g-t/n*d}return c},Nh=r=>{const{baseUrl:e,initialization:t={},sourceDuration:n,indexRange:s="",periodStart:a,presentationTime:o,number:l=0,duration:c}=r;if(!e)throw new Error(ar.NO_BASE_URL);const d=is({baseUrl:e,source:t.sourceURL,range:t.range}),g=is({baseUrl:e,source:e,indexRange:s});if(g.map=d,c){const m=Il(r);m.length&&(g.duration=m[0].duration,g.timeline=m[0].timeline)}else n&&(g.duration=n,g.timeline=a);return g.presentationTime=o||a,g.number=l,[g]},Ol=(r,e,t)=>{const n=r.sidx.map?r.sidx.map:null,s=r.sidx.duration,a=r.timeline||0,o=r.sidx.byterange,l=o.offset+o.length,c=e.timescale,d=e.references.filter(k=>k.referenceType!==1),g=[],m=r.endList?"static":"dynamic",S=r.sidx.timeline;let T=S,C=r.mediaSequence||0,y;typeof e.firstOffset=="bigint"?y=G.BigInt(l)+e.firstOffset:y=l+e.firstOffset;for(let k=0;k<d.length;k++){const O=e.references[k],I=O.referencedSize,D=O.subsegmentDuration;let q;typeof y=="bigint"?q=y+G.BigInt(I)-G.BigInt(1):q=y+I-1;const $=`${y}-${q}`,N=Nh({baseUrl:t,timescale:c,timeline:a,periodStart:S,presentationTime:T,number:C,duration:D,sourceDuration:s,indexRange:$,type:m})[0];n&&(N.map=n),g.push(N),typeof y=="bigint"?y+=G.BigInt(I):y+=I,T+=D/c,C++}return r.segments=g,r},z_=["AUDIO","SUBTITLES"],G_=1/60,Ih=r=>U_(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),W_=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},Hc=r=>{let e=[];return B_(r,z_,(t,n,s,a)=>{e=e.concat(t.playlists||[])}),e},zc=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,n)=>{t.number=r.mediaSequence+n})},Y_=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(n=>{n.discontinuitySequence=t.findIndex(function({timeline:c}){return c===n.timeline});const s=W_(r,n.attributes.NAME);if(!s||n.sidx)return;const a=n.segments[0],o=s.segments.findIndex(function(c){return Math.abs(c.presentationTime-a.presentationTime)<G_});if(o===-1){zc({playlist:n,mediaSequence:s.mediaSequence+s.segments.length}),n.segments[0].discontinuity=!0,n.discontinuityStarts.unshift(0),(!s.segments.length&&n.timeline>s.timeline||s.segments.length&&n.timeline>s.segments[s.segments.length-1].timeline)&&n.discontinuitySequence--;return}s.segments[o].discontinuity&&!a.discontinuity&&(a.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--),zc({playlist:n,mediaSequence:s.segments[o].number})})},X_=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(Hc(r)),n=e.playlists.concat(Hc(e));return e.timelineStarts=Ih([r.timelineStarts,e.timelineStarts]),Y_({oldPlaylists:t,newPlaylists:n,timelineStarts:e.timelineStarts}),e},Ea=r=>r&&r.uri+"-"+q_(r.byterange),Ao=r=>{const e=r.reduce(function(n,s){return n[s.attributes.baseUrl]||(n[s.attributes.baseUrl]=[]),n[s.attributes.baseUrl].push(s),n},{});let t=[];return Object.values(e).forEach(n=>{const s=Dh(n.reduce((a,o)=>{const l=o.attributes.id+(o.attributes.lang||"");return a[l]?(o.segments&&(o.segments[0]&&(o.segments[0].discontinuity=!0),a[l].segments.push(...o.segments)),o.attributes.contentProtection&&(a[l].attributes.contentProtection=o.attributes.contentProtection)):(a[l]=o,a[l].attributes.timelineStarts=[]),a[l].attributes.timelineStarts.push({start:o.attributes.periodStart,timeline:o.attributes.periodStart}),a},{}));t=t.concat(s)}),t.map(n=>(n.discontinuityStarts=$_(n.segments||[],"discontinuity"),n))},Bl=(r,e)=>{const t=Ea(r.sidx),n=t&&e[t]&&e[t].sidx;return n&&Ol(r,n,r.sidx.resolvedUri),r},K_=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=Bl(r[t],e);return r},Q_=({attributes:r,segments:e,sidx:t,mediaSequence:n,discontinuitySequence:s,discontinuityStarts:a},o)=>{const l={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:a,timelineStarts:r.timelineStarts,mediaSequence:n,segments:e};return r.contentProtection&&(l.contentProtection=r.contentProtection),r.serviceLocation&&(l.attributes.serviceLocation=r.serviceLocation),t&&(l.sidx=t),o&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},Z_=({attributes:r,segments:e,mediaSequence:t,discontinuityStarts:n,discontinuitySequence:s})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const a={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(a.CODECS=r.codecs);const o={attributes:a,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:n,discontinuitySequence:s,mediaSequence:t,segments:e};return r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),o},J_=(r,e={},t=!1)=>{let n;const s=r.reduce((a,o)=>{const l=o.attributes.role&&o.attributes.role.value||"",c=o.attributes.lang||"";let d=o.attributes.label||"main";if(c&&!o.attributes.label){const m=l?` (${l})`:"";d=`${o.attributes.lang}${m}`}a[d]||(a[d]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const g=Bl(Q_(o,t),e);return a[d].playlists.push(g),typeof n>"u"&&l==="main"&&(n=o,n.default=!0),a},{});if(!n){const a=Object.keys(s)[0];s[a].default=!0}return s},e3=(r,e={})=>r.reduce((t,n)=>{const s=n.attributes.label||n.attributes.lang||"text",a=n.attributes.lang||"und";return t[s]||(t[s]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),t[s].playlists.push(Bl(Z_(n),e)),t},{}),t3=r=>r.reduce((e,t)=>(t&&t.forEach(n=>{const{channel:s,language:a}=n;e[a]={autoselect:!1,default:!1,instreamId:s,language:a},n.hasOwnProperty("aspectRatio")&&(e[a].aspectRatio=n.aspectRatio),n.hasOwnProperty("easyReader")&&(e[a].easyReader=n.easyReader),n.hasOwnProperty("3D")&&(e[a]["3D"]=n["3D"])}),e),{}),i3=({attributes:r,segments:e,sidx:t,discontinuityStarts:n})=>{const s={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:n,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(s.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(s.contentProtection=r.contentProtection),r.serviceLocation&&(s.attributes.serviceLocation=r.serviceLocation),t&&(s.sidx=t),s},n3=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",r3=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",s3=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",a3=(r,e)=>{r.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:n}){return n===t.timeline}),t.segments&&t.segments.forEach((n,s)=>{n.number=s})})},Gc=r=>r?Object.keys(r).reduce((e,t)=>{const n=r[t];return e.concat(n.playlists)},[]):[],o3=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=r[0].attributes,g=Ao(r.filter(n3)).map(i3),m=Ao(r.filter(r3)),S=Ao(r.filter(s3)),T=r.map(q=>q.attributes.captionServices).filter(Boolean),C={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:K_(g,n)};d>=0&&(C.minimumUpdatePeriod=d*1e3),e&&(C.locations=e),t&&(C.contentSteering=t),l==="dynamic"&&(C.suggestedPresentationDelay=c),a&&a.length>0&&(C.eventStream=a);const y=C.playlists.length===0,k=m.length?J_(m,n,y):null,O=S.length?e3(S,n):null,I=g.concat(Gc(k),Gc(O)),D=I.map(({timelineStarts:q})=>q);return C.timelineStarts=Ih(D),a3(I,C.timelineStarts),k&&(C.mediaGroups.AUDIO.audio=k),O&&(C.mediaGroups.SUBTITLES.subs=O),T.length&&(C.mediaGroups["CLOSED-CAPTIONS"].cc=t3(T)),s?X_({oldManifest:s,newManifest:C}):C},l3=(r,e,t)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,d=(n+s)/1e3,g=a+l,S=d+c-g;return Math.ceil((S*o-e)/t)},Oh=(r,e)=>{const{type:t,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,d=[];let g=-1;for(let m=0;m<e.length;m++){const S=e[m],T=S.d,C=S.r||0,y=S.t||0;g<0&&(g=y),y&&y>g&&(g=y);let k;if(C<0){const D=m+1;D===e.length?t==="dynamic"&&n>0&&s.indexOf("$Number$")>0?k=l3(r,g,T):k=(a*o-g)/T:k=(e[D].t-g)/T}else k=C+1;const O=l+d.length+k;let I=l+d.length;for(;I<O;)d.push({number:I,duration:T/o,time:g,timeline:c}),g+=T,I++}return d},u3=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,c3=r=>(e,t,n,s)=>{if(e==="$$")return"$";if(typeof r[t]>"u")return e;const a=""+r[t];return t==="RepresentationID"||(n?s=parseInt(s,10):s=1,a.length>=s)?a:`${new Array(s-a.length+1).join("0")}${a}`},Wc=(r,e)=>r.replace(u3,c3(e)),d3=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Il(r):Oh(r,e),h3=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=is({baseUrl:r.baseUrl,source:Wc(n.sourceURL,t),range:n.range});return d3(r,e).map(o=>{t.Number=o.number,t.Time=o.time;const l=Wc(r.media||"",t),c=r.timescale||1,d=r.presentationTimeOffset||0,g=r.periodStart+(o.time-d)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Ca(r.baseUrl||"",l),map:s,number:o.number,presentationTime:g}})},f3=(r,e)=>{const{baseUrl:t,initialization:n={}}=r,s=is({baseUrl:t,source:n.sourceURL,range:n.range}),a=is({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=s,a},p3=(r,e)=>{const{duration:t,segmentUrls:n=[],periodStart:s}=r;if(!t&&!e||t&&e)throw new Error(ar.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>f3(r,c));let o;return t&&(o=Il(r)),e&&(o=Oh(r,e)),o.map((c,d)=>{if(a[d]){const g=a[d],m=r.timescale||1,S=r.presentationTimeOffset||0;return g.timeline=c.timeline,g.duration=c.duration,g.number=c.number,g.presentationTime=s+(c.time-S)/m,g}}).filter(c=>c)},m3=({attributes:r,segmentInfo:e})=>{let t,n;e.template?(n=h3,t=Lt(r,e.template)):e.base?(n=Nh,t=Lt(r,e.base)):e.list&&(n=p3,t=Lt(r,e.list));const s={attributes:r};if(!n)return s;const a=n(t,e.segmentTimeline);if(t.duration){const{duration:o,timescale:l=1}=t;t.duration=o/l}else a.length?t.duration=a.reduce((o,l)=>Math.max(o,Math.ceil(l.duration)),0):t.duration=0;return s.attributes=t,s.segments=a,e.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},g3=r=>r.map(m3),pt=(r,e)=>Ah(r.childNodes).filter(({tagName:t})=>t===e),os=r=>r.textContent.trim(),v3=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),jn=r=>{const l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!l)return 0;const[c,d,g,m,S,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(g||0)*86400+parseFloat(m||0)*3600+parseFloat(S||0)*60+parseFloat(T||0)},y3=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),Yc={mediaPresentationDuration(r){return jn(r)},availabilityStartTime(r){return y3(r)/1e3},minimumUpdatePeriod(r){return jn(r)},suggestedPresentationDelay(r){return jn(r)},type(r){return r},timeShiftBufferDepth(r){return jn(r)},start(r){return jn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return v3(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?jn(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},kt=r=>r&&r.attributes?Ah(r.attributes).reduce((e,t)=>{const n=Yc[t.name]||Yc.DEFAULT;return e[t.name]=n(t.value),e},{}):{},_3={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},ka=(r,e)=>e.length?sr(r.map(function(t){return e.map(function(n){const s=os(n),a=Ca(t.baseUrl,s),o=Lt(kt(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&t.serviceLocation&&(o.serviceLocation=t.serviceLocation),o})})):r,Ll=r=>{const e=pt(r,"SegmentTemplate")[0],t=pt(r,"SegmentList")[0],n=t&&pt(t,"SegmentURL").map(m=>Lt({tag:"SegmentURL"},kt(m))),s=pt(r,"SegmentBase")[0],a=t||e,o=a&&pt(a,"SegmentTimeline")[0],l=t||s||e,c=l&&pt(l,"Initialization")[0],d=e&&kt(e);d&&c?d.initialization=c&&kt(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const g={template:d,segmentTimeline:o&&pt(o,"S").map(m=>kt(m)),list:t&&Lt(kt(t),{segmentUrls:n,initialization:kt(c)}),base:s&&Lt(kt(s),{initialization:kt(c)})};return Object.keys(g).forEach(m=>{g[m]||delete g[m]}),g},T3=(r,e,t)=>n=>{const s=pt(n,"BaseURL"),a=ka(e,s),o=Lt(r,kt(n)),l=Ll(n);return a.map(c=>({segmentInfo:Lt(t,l),attributes:Lt(o,c)}))},b3=r=>r.reduce((e,t)=>{const n=kt(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=_3[n.schemeIdUri];if(s){e[s]={attributes:n};const a=pt(t,"cenc:pssh")[0];if(a){const o=os(a);e[s].pssh=o&&bh(o)}}return e},{}),x3=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{let n,s;return s=t,/^CC\d=/.test(t)?[n,s]=t.split("="):/^CC\d$/.test(t)&&(n=t),{channel:n,language:s}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{const n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[s,a=""]=t.split("=");n.channel=s,n.language=t,a.split(",").forEach(o=>{const[l,c]=o.split(":");l==="lang"?n.language=c:l==="er"?n.easyReader=Number(c):l==="war"?n.aspectRatio=Number(c):l==="3D"&&(n["3D"]=Number(c))})}else n.language=t;return n.channel&&(n.channel="SERVICE"+n.channel),n})},C3=r=>sr(pt(r.node,"EventStream").map(e=>{const t=kt(e),n=t.schemeIdUri;return pt(e,"Event").map(s=>{const a=kt(s),o=a.presentationTime||0,l=t.timescale||1,c=a.duration||0,d=o/l+r.attributes.start;return{schemeIdUri:n,value:t.value,id:a.id,start:d,end:d+c/l,messageData:os(s)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),S3=(r,e,t)=>n=>{const s=kt(n),a=ka(e,pt(n,"BaseURL")),o=pt(n,"Role")[0],l={role:kt(o)};let c=Lt(r,s,l);const d=pt(n,"Accessibility")[0],g=x3(kt(d));g&&(c=Lt(c,{captionServices:g}));const m=pt(n,"Label")[0];if(m&&m.childNodes.length){const k=m.childNodes[0].nodeValue.trim();c=Lt(c,{label:k})}const S=b3(pt(n,"ContentProtection"));Object.keys(S).length&&(c=Lt(c,{contentProtection:S}));const T=Ll(n),C=pt(n,"Representation"),y=Lt(t,T);return sr(C.map(T3(c,a,y)))},E3=(r,e)=>(t,n)=>{const s=ka(e,pt(t.node,"BaseURL")),a=Lt(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const o=pt(t.node,"AdaptationSet"),l=Ll(t.node);return sr(o.map(S3(a,s,l)))},k3=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const t=Lt({serverURL:os(r[0])},kt(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},w3=({attributes:r,priorPeriodAttributes:e,mpdType:t})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,D3=(r,e={})=>{const{manifestUri:t="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:a=function(){}}=e,o=pt(r,"Period");if(!o.length)throw new Error(ar.INVALID_NUMBER_OF_PERIOD);const l=pt(r,"Location"),c=kt(r),d=ka([{baseUrl:t}],pt(r,"BaseURL")),g=pt(r,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,l.length&&(c.locations=l.map(os));const m=[];return o.forEach((S,T)=>{const C=kt(S),y=m[T-1];C.start=w3({attributes:C,priorPeriodAttributes:y?y.attributes:null,mpdType:c.type}),m.push({node:S,attributes:C})}),{locations:c.locations,contentSteeringInfo:k3(g,a),representationInfo:sr(m.map(E3(c,d))),eventStream:sr(m.map(C3))}},Bh=r=>{if(r==="")throw new Error(ar.DASH_EMPTY_MANIFEST);const e=new V_.DOMParser;let t,n;try{t=e.parseFromString(r,"application/xml"),n=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(ar.DASH_INVALID_XML);return n},A3=r=>{const e=pt(r,"UTCTiming")[0];if(!e)return null;const t=kt(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ar.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},N3=(r,e={})=>{const t=D3(Bh(r),e),n=g3(t.representationInfo);return o3({dashPlaylists:n,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},I3=r=>A3(Bh(r));var No,Xc;function O3(){if(Xc)return No;Xc=1;var r=Math.pow(2,32),e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),s;return n.getBigUint64?(s=n.getBigUint64(0),s<Number.MAX_SAFE_INTEGER?Number(s):s):n.getUint32(0)*r+n.getUint32(4)};return No={getUint64:e,MAX_UINT32:r},No}var Io,Kc;function B3(){if(Kc)return Io;Kc=1;var r=O3().getUint64,e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),s={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},a=12;s.version===0?(s.earliestPresentationTime=n.getUint32(a),s.firstOffset=n.getUint32(a+4),a+=8):(s.earliestPresentationTime=r(t.subarray(a)),s.firstOffset=r(t.subarray(a+8)),a+=16),a+=2;var o=n.getUint16(a);for(a+=2;o>0;a+=12,o--)s.references.push({referenceType:(t[a]&128)>>>7,referencedSize:n.getUint32(a)&2147483647,subsegmentDuration:n.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:n.getUint32(a+8)&268435455});return s};return Io=e,Io}var L3=B3();const M3=fr(L3);var P3=Be([73,68,51]),R3=function(e,t){t===void 0&&(t=0),e=Be(e);var n=e[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(n&16)>>4;return a?s+20:s+10},Gr=function r(e,t){return t===void 0&&(t=0),e=Be(e),e.length-t<10||!ft(e,P3,{offset:t})?t:(t+=R3(e,t),r(e,t))},Qc=function(e){return typeof e=="string"?kh(e):e},V3=function(e){return Array.isArray(e)?e.map(function(t){return Qc(t)}):[Qc(e)]},F3=function r(e,t,n){n===void 0&&(n=!1),t=V3(t),e=Be(e);var s=[];if(!t.length)return s;for(var a=0;a<e.length;){var o=(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0,l=e.subarray(a+4,a+8);if(o===0)break;var c=a+o;if(c>e.length){if(n)break;c=e.length}var d=e.subarray(a+8,c);ft(l,t[0])&&(t.length===1?s.push(d):s.push.apply(s,r(d,t.slice(1),n))),a=c}return s},Fs={EBML:Be([26,69,223,163]),DocType:Be([66,130]),Segment:Be([24,83,128,103]),SegmentInfo:Be([21,73,169,102]),Tracks:Be([22,84,174,107]),Track:Be([174]),TrackNumber:Be([215]),DefaultDuration:Be([35,227,131]),TrackEntry:Be([174]),TrackType:Be([131]),FlagDefault:Be([136]),CodecID:Be([134]),CodecPrivate:Be([99,162]),VideoTrack:Be([224]),AudioTrack:Be([225]),Cluster:Be([31,67,182,117]),Timestamp:Be([231]),TimestampScale:Be([42,215,177]),BlockGroup:Be([160]),BlockDuration:Be([155]),Block:Be([161]),SimpleBlock:Be([163])},Jo=[128,64,32,16,8,4,2,1],$3=function(e){for(var t=1,n=0;n<Jo.length&&!(e&Jo[n]);n++)t++;return t},ea=function(e,t,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=$3(e[t]),o=e.subarray(t,t+a);return n&&(o=Array.prototype.slice.call(e,t,t+a),o[0]^=Jo[a-1]),{length:a,value:N_(o,{signed:s}),bytes:o}},Zc=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?I_(e):e},U3=function(e){return Array.isArray(e)?e.map(function(t){return Zc(t)}):[Zc(e)]},q3=function r(e,t,n){if(n>=t.length)return t.length;var s=ea(t,n,!1);if(ft(e.bytes,s.bytes))return n;var a=ea(t,n+s.length);return r(e,t,n+a.length+a.value+s.length)},Jc=function r(e,t){t=U3(t),e=Be(e);var n=[];if(!t.length)return n;for(var s=0;s<e.length;){var a=ea(e,s,!1),o=ea(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=q3(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,d=e.subarray(l,c);ft(t[0],a.bytes)&&(t.length===1?n.push(d):n=n.concat(r(d,t.slice(1))));var g=a.length+o.length+d.length;s+=g}return n},j3=Be([0,0,0,1]),H3=Be([0,0,1]),z3=Be([0,0,3]),G3=function(e){for(var t=[],n=1;n<e.length-2;)ft(e.subarray(n,n+3),z3)&&(t.push(n+2),n++),n++;if(t.length===0)return e;var s=e.length-t.length,a=new Uint8Array(s),o=0;for(n=0;n<s;o++,n++)o===t[0]&&(o++,t.shift()),a[n]=e[o];return a},Lh=function(e,t,n,s){e=Be(e),n=[].concat(n);for(var a=0,o,l=0;a<e.length&&(l<s||o);){var c=void 0;if(ft(e.subarray(a),j3)?c=4:ft(e.subarray(a),H3)&&(c=3),!c){a++;continue}if(l++,o)return G3(e.subarray(o,a));var d=void 0;t==="h264"?d=e[a+c]&31:t==="h265"&&(d=e[a+c]>>1&63),n.indexOf(d)!==-1&&(o=a+c),a+=c+(t==="h264"?1:2)}return e.subarray(0,0)},W3=function(e,t,n){return Lh(e,"h264",t,n)},Y3=function(e,t,n){return Lh(e,"h265",t,n)},Zt={webm:Be([119,101,98,109]),matroska:Be([109,97,116,114,111,115,107,97]),flac:Be([102,76,97,67]),ogg:Be([79,103,103,83]),ac3:Be([11,119]),riff:Be([82,73,70,70]),avi:Be([65,86,73]),wav:Be([87,65,86,69]),"3gp":Be([102,116,121,112,51,103]),mp4:Be([102,116,121,112]),fmp4:Be([115,116,121,112]),mov:Be([102,116,121,112,113,116]),moov:Be([109,111,111,118]),moof:Be([109,111,111,102])},or={aac:function(e){var t=Gr(e);return ft(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Gr(e);return ft(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Jc(e,[Fs.EBML,Fs.DocType])[0];return ft(t,Zt.webm)},mkv:function(e){var t=Jc(e,[Fs.EBML,Fs.DocType])[0];return ft(t,Zt.matroska)},mp4:function(e){if(or["3gp"](e)||or.mov(e))return!1;if(ft(e,Zt.mp4,{offset:4})||ft(e,Zt.fmp4,{offset:4})||ft(e,Zt.moof,{offset:4})||ft(e,Zt.moov,{offset:4}))return!0},mov:function(e){return ft(e,Zt.mov,{offset:4})},"3gp":function(e){return ft(e,Zt["3gp"],{offset:4})},ac3:function(e){var t=Gr(e);return ft(e,Zt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+188<e.length&&t<188;){if(e[t]===71&&e[t+188]===71)return!0;t+=1}return!1},flac:function(e){var t=Gr(e);return ft(e,Zt.flac,{offset:t})},ogg:function(e){return ft(e,Zt.ogg)},avi:function(e){return ft(e,Zt.riff)&&ft(e,Zt.avi,{offset:8})},wav:function(e){return ft(e,Zt.riff)&&ft(e,Zt.wav,{offset:8})},h264:function(e){return W3(e,7,3).length},h265:function(e){return Y3(e,[32,33],3).length}},el=Object.keys(or).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);el.forEach(function(r){var e=or[r];or[r]=function(t){return e(Be(t))}});var X3=or,Ml=function(e){e=Be(e);for(var t=0;t<el.length;t++){var n=el[t];if(X3[n](e))return n}return""},K3=function(e){return F3(e,["moof"]).length>0},Oo,ed;function Q3(){if(ed)return Oo;ed=1;var r=9e4,e,t,n,s,a,o,l;return e=function(c){return c*r},t=function(c,d){return c*d},n=function(c){return c/r},s=function(c,d){return c/d},a=function(c,d){return e(s(c,d))},o=function(c,d){return t(n(c),d)},l=function(c,d,g){return n(g?c:c-d)},Oo={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Oo}var An=Q3();/**
28
+ * @license
29
+ * Video.js 8.23.7 <http://videojs.com/>
30
+ * Copyright 2010-present Video.js contributors
31
+ * Available under Apache License Version 2.0
32
+ * <https://github.com/videojs/video.js/blob/main/LICENSE>
33
+ *
34
+ * Includes vtt.js <https://github.com/mozilla/vtt.js>
35
+ * Available under Apache License Version 2.0
36
+ * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
37
+ */var tl="8.23.7";const Ji={},vn=function(r,e){return Ji[r]=Ji[r]||[],e&&(Ji[r]=Ji[r].concat(e)),Ji[r]},Z3=function(r,e){vn(r,e)},Mh=function(r,e){const t=vn(r).indexOf(e);return t<=-1?!1:(Ji[r]=Ji[r].slice(),Ji[r].splice(t,1),!0)},J3=function(r,e){vn(r,[].concat(e).map(t=>{const n=(...s)=>(Mh(r,n),t(...s));return n}))},ta={prefixed:!0},Xs=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],td=Xs[0];let Wr;for(let r=0;r<Xs.length;r++)if(Xs[r][1]in _e){Wr=Xs[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ta[td[r]]=Wr[r];ta.prefixed=Wr[0]!==td[0]}let ri=[];const eT=(r,e,t)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),t&&(c=`%c${r}`,a.unshift(t)),a.unshift(c+":"),ri){ri.push([].concat(a));const g=ri.length-1e3;ri.splice(0,g>0?g:0)}if(!G.console)return;let d=G.console[n];!d&&n==="debug"&&(d=G.console.info||G.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](G.console,a)};function il(r,e=":",t=""){let n="info",s;function a(...o){s("log",n,o)}return s=eT(r,a,t),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,g=c!==void 0?c:t,m=`${r} ${d} ${o}`;return il(m,d,g)},a.createNewLogger=(o,l,c)=>il(o,l,c),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},a.level=o=>{if(typeof o=="string"){if(!a.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);n=o}return n},a.history=()=>ri?[].concat(ri):[],a.history.filter=o=>(ri||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{ri&&(ri.length=0)},a.history.disable=()=>{ri!==null&&(ri.length=0,ri=null)},a.history.enable=()=>{ri===null&&(ri=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const Ge=il("VIDEOJS"),Ph=Ge.createLogger,tT=Object.prototype.toString,Rh=function(r){return ji(r)?Object.keys(r):[]};function Xn(r,e){Rh(r).forEach(t=>e(r[t],t))}function Vh(r,e,t=0){return Rh(r).reduce((n,s)=>e(n,r[s],s),t)}function ji(r){return!!r&&typeof r=="object"}function lr(r){return ji(r)&&tT.call(r)==="[object Object]"&&r.constructor===Object}function lt(...r){const e={};return r.forEach(t=>{t&&Xn(t,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=lt(e[s],n)})}),e}function Fh(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const n=r[t];e.push(n)}return e}function wa(r,e,t,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=t();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var iT=Object.freeze({__proto__:null,each:Xn,reduce:Vh,isObject:ji,isPlain:lr,merge:lt,values:Fh,defineLazyProperty:wa});let Pl=!1,$h=null,Ii=!1,Uh,qh=!1,Kn=!1,Qn=!1,Hi=!1,Rl=null,Da=null;const nT=!!(G.cast&&G.cast.framework&&G.cast.framework.CastReceiverContext);let jh=null,ia=!1,Aa=!1,na=!1,Na=!1,ra=!1,sa=!1,aa=!1;const ns=!!(pr()&&("ontouchstart"in G||G.navigator.maxTouchPoints||G.DocumentTouch&&G.document instanceof G.DocumentTouch)),un=G.navigator&&G.navigator.userAgentData;un&&un.platform&&un.brands&&(Ii=un.platform==="Android",Kn=!!un.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!un.brands.find(r=>r.brand==="Chromium"),Hi=!Kn&&Qn,Rl=Da=(un.brands.find(r=>r.brand==="Chromium")||{}).version||null,Aa=un.platform==="Windows");if(!Qn){const r=G.navigator&&G.navigator.userAgent||"";Pl=/iPod/i.test(r),$h=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Ii=/Android/i.test(r),Uh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null})(),qh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),Hi=!Kn&&Qn,Rl=Da=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),jh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11),t})(),ra=/Tizen/i.test(r),sa=/Web0S/i.test(r),aa=ra||sa,ia=/Safari/i.test(r)&&!Hi&&!Ii&&!Kn&&!aa,Aa=/Windows/i.test(r),na=/iPad/i.test(r)||ia&&ns&&!/iPhone/i.test(r),Na=/iPhone/i.test(r)&&!na}const jt=Na||na||Pl,Ia=(ia||jt)&&!Hi;var Hh=Object.freeze({__proto__:null,get IS_IPOD(){return Pl},get IOS_VERSION(){return $h},get IS_ANDROID(){return Ii},get ANDROID_VERSION(){return Uh},get IS_FIREFOX(){return qh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return Hi},get CHROMIUM_VERSION(){return Rl},get CHROME_VERSION(){return Da},IS_CHROMECAST_RECEIVER:nT,get IE_VERSION(){return jh},get IS_SAFARI(){return ia},get IS_WINDOWS(){return Aa},get IS_IPAD(){return na},get IS_IPHONE(){return Na},get IS_TIZEN(){return ra},get IS_WEBOS(){return sa},get IS_SMART_TV(){return aa},TOUCH_ENABLED:ns,IS_IOS:jt,IS_ANY_SAFARI:Ia});function id(r){return typeof r=="string"&&!!r.trim()}function rT(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return _e===G.document}function mr(r){return ji(r)&&r.nodeType===1}function zh(){try{return G.parent!==G.self}catch{return!0}}function Gh(r){return function(e,t){if(!id(e))return _e[r](null);id(t)&&(t=_e.querySelector(t));const n=mr(t)?t:_e;return n[r]&&n[r](e)}}function Le(r="div",e={},t={},n){const s=_e.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const o=e[a];a==="textContent"?_n(s,o):(s[a]!==o||a==="tabIndex")&&(s[a]=o)}),Object.getOwnPropertyNames(t).forEach(function(a){s.setAttribute(a,t[a])}),n&&Vl(s,n),s}function _n(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function nl(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return rT(e),r.classList.contains(e)}function Bn(r,...e){return r.classList.add(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r}function Oa(r,...e){return r?(r.classList.remove(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r):(Ge.warn("removeClass was called with an element that doesn't exist"),null)}function Wh(r,e,t){return typeof t=="function"&&(t=t(r,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,t)),r}function Yh(r,e){Object.getOwnPropertyNames(e).forEach(function(t){const n=e[t];n===null||typeof n>"u"||n===!1?r.removeAttribute(t):r.setAttribute(t,n===!0?"":n)})}function dn(r){const e={},t=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const n=r.attributes;for(let s=n.length-1;s>=0;s--){const a=n[s].name;let o=n[s].value;t.includes(a)&&(o=o!==null),e[a]=o}}return e}function Xh(r,e){return r.getAttribute(e)}function ur(r,e,t){r.setAttribute(e,t)}function Ba(r,e){r.removeAttribute(e)}function Kh(){_e.body.focus(),_e.onselectstart=function(){return!1}}function Qh(){_e.onselectstart=function(){return!0}}function cr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t.height||(t.height=parseFloat(dr(r,"height"))),t.width||(t.width=parseFloat(dr(r,"width"))),t}}function rs(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,t=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==_e[ta.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:t}}function La(r,e){const t={x:0,y:0};if(jt){let g=r;for(;g&&g.nodeName.toLowerCase()!=="html";){const m=dr(g,"transform");if(/^matrix/.test(m)){const S=m.slice(7,-1).split(/,\s/).map(Number);t.x+=S[4],t.y+=S[5]}else if(/^matrix3d/.test(m)){const S=m.slice(9,-1).split(/,\s/).map(Number);t.x+=S[12],t.y+=S[13]}if(g.assignedSlot&&g.assignedSlot.parentElement&&G.WebKitCSSMatrix){const S=G.getComputedStyle(g.assignedSlot.parentElement).transform,T=new G.WebKitCSSMatrix(S);t.x+=T.m41,t.y+=T.m42}g=g.parentNode||g.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,jt&&(d-=t.x,c-=t.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function Zh(r){return ji(r)&&r.nodeType===3}function Ma(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function Jh(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||Zh(e))return e;if(typeof e=="string"&&/\S/.test(e))return _e.createTextNode(e)}).filter(e=>e)}function Vl(r,e){return Jh(e).forEach(t=>r.appendChild(t)),r}function e0(r,e){return Vl(Ma(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const yn=Gh("querySelector"),t0=Gh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof G.getComputedStyle=="function"){let t;try{t=G.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function i0(r){[..._e.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(s=>s.cssText).join(""),n=_e.createElement("style");n.textContent=t,r.document.head.appendChild(n)}catch{const n=_e.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var n0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:zh,createEl:Le,textContent:_n,prependTo:nl,hasClass:Kr,addClass:Bn,removeClass:Oa,toggleClass:Wh,setAttributes:Yh,getAttributes:dn,getAttribute:Xh,setAttribute:ur,removeAttribute:Ba,blockTextSelection:Kh,unblockTextSelection:Qh,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:La,isTextNode:Zh,emptyEl:Ma,normalizeContent:Jh,appendContent:Vl,insertContent:e0,isSingleLeftClick:ss,$:yn,$$:t0,computedStyle:dr,copyStyleSheetsToWindow:i0});let r0=!1,rl;const sT=function(){if(rl.options.autoSetup===!1)return;const r=Array.prototype.slice.call(_e.getElementsByTagName("video")),e=Array.prototype.slice.call(_e.getElementsByTagName("audio")),t=Array.prototype.slice.call(_e.getElementsByTagName("video-js")),n=r.concat(e,t);if(n&&n.length>0)for(let s=0,a=n.length;s<a;s++){const o=n[s];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&rl(o);else{sl(1);break}}else r0||sl(1)};function sl(r,e){pr()&&(e&&(rl=e),G.setTimeout(sT,r))}function al(){r0=!0,G.removeEventListener("load",al)}pr()&&(_e.readyState==="complete"?al():G.addEventListener("load",al));const s0=function(r){const e=_e.createElement("style");return e.className=r,e},a0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ei=new WeakMap;const aT=3;let oT=aT;function Ti(){return oT++}function nd(r,e){if(!ei.has(r))return;const t=ei.get(r);t.handlers[e].length===0&&(delete t.handlers[e],r.removeEventListener?r.removeEventListener(e,t.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,t.dispatcher)),Object.getOwnPropertyNames(t.handlers).length<=0&&(delete t.handlers,delete t.dispatcher,delete t.disabled),Object.getOwnPropertyNames(t).length===0&&ei.delete(r)}function Fl(r,e,t,n){t.forEach(function(s){r(e,s,n)})}function Pa(r){if(r.fixed_)return r;function e(){return!0}function t(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||G.event;r={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in n)s.includes(a)||a==="returnValue"&&n.preventDefault||(r[a]=n[a]);if(r.target||(r.target=r.srcElement||_e),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){n.preventDefault&&n.preventDefault(),r.returnValue=!1,n.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),r.cancelBubble=!0,n.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=t,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=t,r.clientX!==null&&r.clientX!==void 0){const a=_e.documentElement,o=_e.body;r.pageX=r.clientX+(a&&a.scrollLeft||o&&o.scrollLeft||0)-(a&&a.clientLeft||o&&o.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||o&&o.scrollTop||0)-(a&&a.clientTop||o&&o.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let $s;const lT=function(){if(typeof $s!="boolean"){$s=!1;try{const r=Object.defineProperty({},"passive",{get(){$s=!0}});G.addEventListener("test",null,r),G.removeEventListener("test",null,r)}catch{}}return $s},uT=["touchstart","touchmove"];function hi(r,e,t){if(Array.isArray(e))return Fl(hi,r,e,t);ei.has(r)||ei.set(r,{});const n=ei.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),t.guid||(t.guid=Ti()),n.handlers[e].push(t),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Pa(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(g){Ge.error(g)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;lT()&&uT.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Ht(r,e,t){if(!ei.has(r))return;const n=ei.get(r);if(!n.handlers)return;if(Array.isArray(e))return Fl(Ht,r,e,t);const s=function(o,l){n.handlers[l]=[],nd(o,l)};if(e===void 0){for(const o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&s(r,o);return}const a=n.handlers[e];if(a){if(!t){s(r,e);return}if(t.guid)for(let o=0;o<a.length;o++)a[o].guid===t.guid&&a.splice(o--,1);nd(r,e)}}function gr(r,e,t){const n=ei.has(r)?ei.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Pa(e),n.dispatcher&&n.dispatcher.call(r,e,t),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,t);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ei.has(e.target)||ei.set(e.target,{});const a=ei.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Ra(r,e,t){if(Array.isArray(e))return Fl(Ra,r,e,t);const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||Ti(),hi(r,e,n)}function $l(r,e,t){const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||Ti(),hi(r,e,n)}var cT=Object.freeze({__proto__:null,fixEvent:Pa,on:hi,off:Ht,trigger:gr,one:Ra,any:$l});const bi=30,ct=function(r,e,t){e.guid||(e.guid=Ti());const n=e.bind(r);return n.guid=t?t+"_"+e.guid:e.guid,n},zi=function(r,e){let t=G.performance.now();return function(...s){const a=G.performance.now();a-t>=e&&(r(...s),t=a)}},o0=function(r,e,t,n=G){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,t||r.apply(l,c)};!s&&t&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var dT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:bi,bind_:ct,throttle:zi,debounce:o0});let qr;class fi{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},hi(this,e,t),this.addEventListener=n}off(e,t){Ht(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},Ra(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},$l(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Pa(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gr(this,e)}queueTrigger(e){qr||(qr=new Map);const t=e.type||e;let n=qr.get(this);n||(n=new Map,qr.set(this,n));const s=n.get(t);n.delete(t),G.clearTimeout(s);const a=G.setTimeout(()=>{n.delete(t),n.size===0&&(n=null,qr.delete(this)),this.trigger(e)},0);n.set(t,a)}}fi.prototype.allowedEvents_={};fi.prototype.addEventListener=fi.prototype.on;fi.prototype.removeEventListener=fi.prototype.off;fi.prototype.dispatchEvent=fi.prototype.trigger;const Va=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,nn=r=>r instanceof fi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),hT=(r,e)=>{nn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},ol=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,oa=(r,e,t)=>{if(!r||!r.nodeName&&!nn(r))throw new Error(`Invalid target for ${Va(e)}#${t}; must be a DOM node or evented object.`)},l0=(r,e,t)=>{if(!ol(r))throw new Error(`Invalid event type for ${Va(e)}#${t}; must be a non-empty string or array.`)},u0=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Va(e)}#${t}; must be a function.`)},Bo=(r,e,t)=>{const n=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let s,a,o;return n?(s=r.eventBusEl_,e.length>=3&&e.shift(),[a,o]=e):(s=e[0],a=e[1],o=e[2]),oa(s,r,t),l0(a,r,t),u0(o,r,t),o=ct(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},En=(r,e,t,n)=>{oa(r,r,e),r.nodeName?cT[e](r,t,n):r[e](t,n)},fT={on(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Bo(this,r,"on");if(En(t,"on",n,s),!e){const a=()=>this.off(t,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,En(this,"on","dispose",a),En(t,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Bo(this,r,"one");if(e)En(t,"one",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,En(t,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Bo(this,r,"any");if(e)En(t,"any",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,En(t,"any",n,a)}},off(r,e,t){if(!r||ol(r))Ht(this.eventBusEl_,r,e);else{const n=r,s=e;oa(n,this,"off"),l0(s,this,"off"),u0(t,this,"off"),t=ct(this,t),this.off("dispose",t),n.nodeName?(Ht(n,s,t),Ht(n,"dispose",t)):nn(n)&&(n.off(s,t),n.off("dispose",t))}},trigger(r,e){oa(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!ol(t))throw new Error(`Invalid event type for ${Va(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gr(this.eventBusEl_,r,e)}};function Ul(r,e={}){const{eventBusKey:t}=e;if(t){if(!r[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);r.eventBusEl_=r[t]}else r.eventBusEl_=Le("span",{className:"vjs-event-bus"});return Object.assign(r,fT),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ei.has(n)&&ei.delete(n)}),G.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const pT={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(t,n)=>{this.state[n]!==t&&(e=e||{},e[n]={from:this.state[n],to:t}),this.state[n]=t}),e&&nn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function c0(r,e){return Object.assign(r,pT),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&nn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},_t=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},d0=function(r,e){return _t(r)===_t(e)};var mT=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:_t,titleCaseEquals:d0});class ue{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=lt({},this.options_),t=this.options_=lt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${Ti()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),t.evented!==!1&&(Ul(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),c0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,t.initChildren!==!1&&this.initChildren(),this.ready(n),t.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=lt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,n){return Le(e,t,n)}localize(e,t,n=e){const s=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),o=a&&a[s],l=s&&s.split("-")[0],c=a&&a[l];let d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),t&&(d=d.replace(/\{(\d+)\}/g,function(g,m){const S=t[m-1];let T=S;return typeof S>"u"&&(T=g),T})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((n,s)=>n.concat(s),[]);let t=this;for(let n=0;n<e.length;n++)if(t=t.getChild(e[n]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=Le("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=_e.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=_e.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?t.replaceChild(s,t.querySelector(".vjs-icon-placeholder")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},n=this.children_.length){let s,a;if(typeof e=="string"){a=_t(e);const o=t.componentClass||a;t.name=a;const l=ue.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,t)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(n,0,s),s.parentComponent_=this,typeof s.id=="function"&&(this.childIndex_[s.id()]=s),a=a||s.name&&_t(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){t=!0,this.children_.splice(s,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,n=o=>{const l=o.name;let c=o.opts;if(t[l]!==void 0&&(c=t[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=ue.getComponent("Tech");Array.isArray(e)?s=e:s=Object.keys(e),s.concat(Object.keys(this.options_).filter(function(o){return!s.some(function(l){return typeof l=="string"?o===l:o===l.name})})).map(o=>{let l,c;return typeof o=="string"?(l=o,c=e[l]||this.options_[l]||{}):(l=o.name,c=o),{name:l,opts:c}}).filter(o=>{const l=ue.getComponent(o.opts.componentClass||_t(o.name));return l&&!a.isTech(l)}).forEach(n)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return yn(e,t||this.contentEl())}$$(e,t){return t0(e,t||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Bn(this.el_,...e)}removeClass(...e){Oa(this.el_,...e)}toggleClass(e,t){Wh(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Xh(this.el_,e)}setAttribute(e,t){ur(this.el_,e,t)}removeAttribute(e){Ba(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,n){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"px",n||this.trigger("componentresize");return}if(!this.el_)return 0;const s=this.el_.style[e],a=s.indexOf("px");return parseInt(a!==-1?s.slice(0,a):this.el_["offset"+_t(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=dr(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const n=`offset${_t(e)}`;t=this.el_[n]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),t={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},n={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:t,center:n}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(t={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},e=G.performance.now(),a=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)a=!1;else if(t){const c=l.touches[0].pageX-t.pageX,d=l.touches[0].pageY-t.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){t=null,a===!0&&G.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ct(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,t){var n;return e=ct(this,e),this.clearTimersOnDispose_(),n=G.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},t),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),G.clearTimeout(e)),e}setInterval(e,t){e=ct(this,e),this.clearTimersOnDispose_();const n=G.setInterval(e,t);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),G.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=ct(this,e),t=G.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=ct(this,t);const n=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),G.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((n,s)=>this[t](s))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(a){const o=G.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!t(a.parentElement)||!t(a)||a.style.opacity==="0"||G.getComputedStyle(a).height==="0px"||G.getComputedStyle(a).width==="0px")}function s(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const o={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(o.x<0||o.x>(_e.documentElement.clientWidth||G.innerWidth)||o.y<0||o.y>(_e.documentElement.clientHeight||G.innerHeight))return!1;let l=_e.elementFromPoint(o.x,o.y);for(;l;){if(l===a)return!0;if(l.parentNode)l=l.parentNode;else return!1}}return e||(e=this.el()),!!(s(e)&&n(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const n=ue.getComponent("Tech"),s=n&&n.isTech(t),a=ue===t||ue.prototype.isPrototypeOf(t.prototype);if(s||!a){let l;throw s?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error(`Illegal component, "${e}"; ${l}.`)}e=_t(e),ue.components_||(ue.components_={});const o=ue.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return ue.components_[e]=t,ue.components_[Qr(e)]=t,t}static getComponent(e){if(!(!e||!ue.components_))return ue.components_[e]}}ue.registerComponent("Component",ue);function gT(r,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function rd(r,e,t,n){return gT(r,n,t.length-1),t[n][e]}function Lo(r){let e;return r===void 0||r.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:rd.bind(null,"start",0,r),end:rd.bind(null,"end",1,r)},G.Symbol&&G.Symbol.iterator&&(e[G.Symbol.iterator]=()=>(r||[]).values()),e}function Ni(r,e){return Array.isArray(r)?Lo(r):r===void 0||e===void 0?Lo():Lo([[r,e]])}const h0=function(r,e){r=r<0?0:r;let t=Math.floor(r%60),n=Math.floor(r/60%60),s=Math.floor(r/3600);const a=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(s=n=t="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",t=t<10?"0"+t:t,s+n+t};let ql=h0;function f0(r){ql=r}function p0(){ql=h0}function Rn(r,e=r){return ql(r,e)}var vT=Object.freeze({__proto__:null,createTimeRanges:Ni,createTimeRange:Ni,setFormatTime:f0,resetFormatTime:p0,formatTime:Rn});function m0(r,e){let t=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Ni(0,0));for(let a=0;a<r.length;a++)n=r.start(a),s=r.end(a),s>e&&(s=e),t+=s-n;return t/e}function vt(r){if(r instanceof vt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:ji(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=vt.defaultMessages[this.code]||"")}vt.prototype.code=0;vt.prototype.message="";vt.prototype.status=null;vt.prototype.metadata=null;vt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];vt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};vt.MEDIA_ERR_CUSTOM=0;vt.prototype.MEDIA_ERR_CUSTOM=0;vt.MEDIA_ERR_ABORTED=1;vt.prototype.MEDIA_ERR_ABORTED=1;vt.MEDIA_ERR_NETWORK=2;vt.prototype.MEDIA_ERR_NETWORK=2;vt.MEDIA_ERR_DECODE=3;vt.prototype.MEDIA_ERR_DECODE=3;vt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;vt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;vt.MEDIA_ERR_ENCRYPTED=5;vt.prototype.MEDIA_ERR_ENCRYPTED=5;function Zr(r){return r!=null&&typeof r.then=="function"}function Vi(r){Zr(r)&&r.then(null,e=>{})}const ll=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,n,s)=>(r[n]&&(t[n]=r[n]),t),{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},yT=function(r){const e=r.$$("track"),t=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=ll(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return t.indexOf(s)===-1}).map(ll))},_T=function(r,e){return r.forEach(function(t){const n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var ul={textTracksToJson:yT,jsonToTextTracks:_T,trackToJson:ll};const Mo="vjs-modal-dialog";class vr extends ue{constructor(e,t){super(e,t),this.handleKeyDown_=n=>this.handleKeyDown(n),this.close_=n=>this.close(n),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Le("div",{className:`${Mo}-content`},{role:"document"}),this.descEl_=Le("p",{className:`${Mo}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),_n(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Mo} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const t=this.closeable_=!!e;let n=this.getChild("closeButton");if(t&&!n){const s=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),n=t.parentNode,s=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),e0(t,e),this.trigger("modalfill"),s?n.insertBefore(t,s):n.appendChild(t);const a=this.getChild("closeButton");a&&n.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Ma(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=_e.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const t=this.focusableEls_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<t.length;a++)if(n===t[a]){s=a;break}_e.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===t.length-1&&(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,t=>(t instanceof G.HTMLAnchorElement||t instanceof G.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof G.HTMLInputElement||t instanceof G.HTMLSelectElement||t instanceof G.HTMLTextAreaElement||t instanceof G.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof G.HTMLIFrameElement||t instanceof G.HTMLObjectElement||t instanceof G.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};ue.registerComponent("ModalDialog",vr);class Vn extends fi{constructor(e=[]){super(),this.tracks_=[];for(let t=0;t<e.length;t++)this.addTrack(e[t])}get length(){return this.tracks_.length}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},nn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}Vn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Vn.prototype.allowedEvents_)Vn.prototype["on"+r]=null;const Po=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].enabled=!1)};class g0 extends Vn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Po(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Po(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Po(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Ro=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].selected=!1)};class v0 extends Vn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Ro(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){e.selected&&Ro(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Ro(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class jl extends Vn{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class TT{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t}removeTrackElement_(e){for(let t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off(),typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class la{constructor(e){la.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let n=0;const s=e.length;this.cues_=e,this.length_=e.length;const a=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(t<s)for(n=t;n<s;n++)a.call(this,n)}getCueById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}const bT={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},xT={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},CT={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},sd={disabled:"disabled",hidden:"hidden",showing:"showing"};class Hl extends fi{constructor(e={}){super();const t={id:e.id||"vjs_track_"+Ti(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in t)Object.defineProperty(this,s,{get(){return t[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const zl=function(r){return new URL(r,_e.baseURI)},y0=function(r){return new URL(r,_e.baseURI).href},Gl=function(r){if(typeof r=="string"){const t=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},Fa=function(r,e=G.location){return zl(r).origin!==e.origin};var ST=Object.freeze({__proto__:null,parseUrl:zl,getAbsoluteURL:y0,getFileExtension:Gl,isCrossOrigin:Fa});const ad=function(r,e){const t=new G.WebVTT.Parser(G,G.vttjs,G.WebVTT.StringDecoder()),n=[];t.oncue=function(s){e.addCue(s)},t.onparsingerror=function(s){n.push(s)},t.onflush=function(){e.trigger({type:"loadeddata",target:e})},t.parse(r),n.length>0&&(G.console&&G.console.groupCollapsed&&G.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>Ge.error(s)),G.console&&G.console.groupEnd&&G.console.groupEnd()),t.flush()},od=function(r,e){const t={uri:r},n=Fa(r);n&&(t.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(t.withCredentials=s),Th(t,ct(this,function(a,o,l){if(a)return Ge.error(a,o);e.loaded_=!0,typeof G.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){Ge.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return ad(l,e)}):ad(l,e)}))};class ls extends Hl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=lt(e,{kind:CT[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=sd[t.mode]||"disabled";const s=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(n="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new la(this.cues_),o=new la(this.activeCues_);let l=!1;this.timeupdateHandler=ct(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){sd[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&od(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),g=[];for(let m=0,S=this.cues.length;m<S;m++){const T=this.cues[m];T.startTime<=d&&T.endTime>=d&&g.push(T)}if(l=!1,g.length!==this.activeCues_.length)l=!0;else for(let m=0;m<g.length;m++)this.activeCues_.indexOf(g[m])===-1&&(l=!0);return this.activeCues_=g,o.setCues_(this.activeCues_),o},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&od(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new G.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const s in e)s in t||(t[s]=e[s]);t.id=e.id,t.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return ul.trackToJson(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class _0 extends Hl{constructor(e={}){const t=lt(e,{kind:xT[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class T0 extends Hl{constructor(e={}){const t=lt(e,{kind:bT[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class rn extends fi{constructor(e={}){super();let t;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return n}}}),t=rn.NONE,n.addEventListener("loadeddata",()=>{t=rn.LOADED,this.trigger({type:"load",target:this})})}}rn.prototype.allowedEvents_={load:"load"};rn.NONE=0;rn.LOADING=1;rn.LOADED=2;rn.ERROR=3;const vi={audio:{ListClass:g0,TrackClass:_0,capitalName:"Audio"},video:{ListClass:v0,TrackClass:T0,capitalName:"Video"},text:{ListClass:jl,TrackClass:ls,capitalName:"Text"}};Object.keys(vi).forEach(function(r){vi[r].getterName=`${r}Tracks`,vi[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:jl,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:TT,TrackClass:rn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Jt=Object.assign({},vi,hr);hr.names=Object.keys(hr);vi.names=Object.keys(vi);Jt.names=[].concat(hr.names).concat(vi.names);function ET(r,e,t,n,s={}){const a=r.textTracks();s.kind=e,t&&(s.label=t),n&&(s.language=n),s.tech=r;const o=new Jt.text.TrackClass(s);return a.addTrack(o),o}class Fe extends ue{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=n=>this.onDurationChange(n),this.trackProgress_=n=>this.trackProgress(n),this.trackCurrentTime_=n=>this.trackCurrentTime(n),this.stopTrackingCurrentTime_=n=>this.stopTrackingCurrentTime(n),this.disposeSourceHandler_=n=>this.disposeSourceHandler(n),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Jt.names.forEach(n=>{const s=Jt[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Jt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ct(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Ni(0,0)}bufferedPercent(){return m0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(vi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const n=this[`${t}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];t==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const n=e[t];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new vt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Ni(0,0):Ni()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){vi.names.forEach(e=>{const t=vi[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[t.getterName]();s.addEventListener("removetrack",n),s.addEventListener("addtrack",n),this.on("dispose",()=>{s.removeEventListener("removetrack",n),s.removeEventListener("addtrack",n)})})}addWebVttScript_(){if(!G.WebVTT)if(_e.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Ic)&&Object.keys(Ic).length>0){this.trigger("vttjsloaded");return}const e=_e.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),G.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);t.on("addtrack",n),t.on("removetrack",s),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),o=()=>{a();for(let l=0;l<e.length;l++){const c=e[l];c.removeEventListener("cuechange",a),c.mode==="showing"&&c.addEventListener("cuechange",a)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){t.off("addtrack",n),t.off("removetrack",s),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let l=0;l<e.length;l++)e[l].removeEventListener("cuechange",a)})}addTextTrack(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return ET(this,e,t,n)}createRemoteTextTrack(e){const t=lt(e,{tech:this});return new hr.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const n=this.createRemoteTextTrack(e);return typeof t!="boolean"&&(t=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),t===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=Ti();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Fe.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Fe||e instanceof Fe||e===Fe}static registerTech(e,t){if(Fe.techs_||(Fe.techs_={}),!Fe.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Fe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Fe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),Fe.techs_[e]=t,Fe.techs_[Qr(e)]=t,e!=="Tech"&&Fe.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(Fe.techs_&&Fe.techs_[e])return Fe.techs_[e];if(e=_t(e),G&&G.videojs&&G.videojs[e])return Ge.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),G.videojs[e]}}}Jt.names.forEach(function(r){const e=Jt[r];Fe.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Fe.prototype.featuresVolumeControl=!0;Fe.prototype.featuresMuteControl=!0;Fe.prototype.featuresFullscreenResize=!1;Fe.prototype.featuresPlaybackRate=!1;Fe.prototype.featuresProgressEvents=!1;Fe.prototype.featuresSourceset=!1;Fe.prototype.featuresTimeupdateEvents=!1;Fe.prototype.featuresNativeTextTracks=!1;Fe.prototype.featuresVideoFrameCallback=!1;Fe.withSourceHandlers=function(r){r.registerSourceHandler=function(t,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,t)},r.canPlayType=function(t){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(t),s)return s;return""},r.selectSourceHandler=function(t,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(t,n),a)return s[o];return null},r.canPlaySource=function(t,n){const s=r.selectSourceHandler(t,n);return s?s.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach(function(t){const n=this[t];typeof n=="function"&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){let n=r.selectSourceHandler(t,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:Ge.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};ue.registerComponent("Tech",Fe);Fe.registerTech("Tech",Fe);Fe.defaultTechOrder_=[];const Ln={},ua={},ca={};function kT(r,e){Ln[r]=Ln[r]||[],Ln[r].push(e)}function wT(r,e,t){r.setTimeout(()=>kn(e,Ln[e.type],t,r),1)}function DT(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function AT(r,e,t){return r.reduceRight(Wl(t),e[t]())}function NT(r,e,t,n){return e[t](r.reduce(Wl(t),n))}function ld(r,e,t,n=null){const s="call"+_t(t),a=r.reduce(Wl(s),n),o=a===ca,l=o?null:e[t](a);return BT(r,t,l,o),l}const IT={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},OT={setCurrentTime:1,setMuted:1,setVolume:1},ud={play:1,pause:1};function Wl(r){return(e,t)=>e===ca?ca:t[r]?t[r](e):e}function BT(r,e,t,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,t)}}function LT(r){ua.hasOwnProperty(r.id())&&delete ua[r.id()]}function MT(r,e){const t=ua[r.id()];let n=null;if(t==null)return n=e(r),ua[r.id()]=[[e,n]],n;for(let s=0;s<t.length;s++){const[a,o]=t[s];a===e&&(n=o)}return n===null&&(n=e(r),t.push([e,n])),n}function kn(r={},e=[],t,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")kn(r,Ln[o],t,n,s,a);else if(o){const c=MT(n,o);if(!c.setSource)return s.push(c),kn(r,l,t,n,s,a);c.setSource(Object.assign({},r),function(d,g){if(d)return kn(r,l,t,n,s,a);s.push(c),kn(g,r.type===g.type?l:Ln[g.type],t,n,s,a)})}else l.length?kn(r,l,t,n,s,a):a?t(r,s):kn(r,Ln["*"],t,n,s,!0)}const PT={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},da=function(r=""){const e=Gl(r);return PT[e.toLowerCase()]||""},RT=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const t=r.cache_.sources.filter(s=>s.src===e);if(t.length)return t[0].type;const n=r.$$("source");for(let s=0;s<n.length;s++){const a=n[s];if(a.type&&a.src&&a.src===e)return a.type}return da(e)},b0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=b0(t),Array.isArray(t)?e=e.concat(t):ji(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[cd({src:r})]:ji(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[cd(r)]:r=[];return r};function cd(r){if(!r.type){const e=da(r.src);e&&(r.type=e)}return r}var VT=`<svg xmlns="http://www.w3.org/2000/svg">
38
+ <defs>
39
+ <symbol viewBox="0 0 48 48" id="vjs-icon-play">
40
+ <path d="M16 10v28l22-14z"></path>
41
+ </symbol>
42
+ <symbol viewBox="0 0 48 48" id="vjs-icon-pause">
43
+ <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
44
+ </symbol>
45
+ <symbol viewBox="0 0 48 48" id="vjs-icon-audio">
46
+ <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
47
+ </symbol>
48
+ <symbol viewBox="0 0 48 48" id="vjs-icon-captions">
49
+ <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
50
+ </symbol>
51
+ <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
52
+ <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
53
+ </symbol>
54
+ <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
55
+ <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
56
+ </symbol>
57
+ <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
58
+ <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
59
+ </symbol>
60
+ <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
61
+ <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
62
+ </symbol>
63
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
64
+ <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
65
+ </symbol>
66
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
67
+ <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
68
+ </symbol>
69
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
70
+ <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
71
+ </symbol>
72
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
73
+ <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
74
+ </symbol>
75
+ <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
76
+ <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
77
+ </symbol>
78
+ <symbol viewBox="0 0 24 24" id="vjs-icon-hd">
79
+ <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
80
+ </symbol>
81
+ <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
82
+ <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
83
+ </symbol>
84
+ <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
85
+ <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
86
+ </symbol>
87
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
88
+ <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
89
+ </symbol>
90
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
91
+ <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
92
+ </symbol>
93
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
94
+ <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
95
+ </symbol>
96
+ <symbol viewBox="0 0 48 48" id="vjs-icon-share">
97
+ <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
98
+ </symbol>
99
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cog">
100
+ <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
101
+ </symbol>
102
+ <symbol viewBox="0 0 48 48" id="vjs-icon-square">
103
+ <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
104
+ </symbol>
105
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle">
106
+ <circle cx="24" cy="24" r="20"></circle>
107
+ </symbol>
108
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
109
+ <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
110
+ </symbol>
111
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
112
+ <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
113
+ </symbol>
114
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
115
+ <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
116
+ </symbol>
117
+ <symbol viewBox="0 0 48 48" id="vjs-icon-replay">
118
+ <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
119
+ </symbol>
120
+ <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
121
+ <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
122
+ </symbol>
123
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
124
+ <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
125
+ </symbol>
126
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
127
+ <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
128
+ </symbol>
129
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
130
+ <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
131
+ </symbol>
132
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
133
+ <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
134
+ </symbol>
135
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
136
+ <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
137
+ </symbol>
138
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
139
+ <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
140
+ </symbol>
141
+ <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
142
+ <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
143
+ </symbol>
144
+ <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
145
+ <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
146
+ </symbol>
147
+ <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
148
+ <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
149
+ </symbol>
150
+ <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
151
+ <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
152
+ </symbol>
153
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cast">
154
+ <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
155
+ </symbol>
156
+ <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
157
+ <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
158
+ </symbol>
159
+ <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
160
+ <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
161
+ <path fill="none" d="M-1-3h24v24H-1z"></path>
162
+ </symbol>
163
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
164
+ <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
165
+ </symbol>
166
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
167
+ <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
168
+ </symbol>
169
+ <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
170
+ <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
171
+ </symbol>
172
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
173
+ <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
174
+ </symbol>
175
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
176
+ <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
177
+ </symbol>
178
+ </defs>
179
+ </svg>`;const dd=ra?10009:sa?461:8,Hn={codes:{play:415,pause:19,ff:417,rw:412,back:dd},names:{415:"play",19:"pause",417:"ff",412:"rw",[dd]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},hd=5;class FT extends fi{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const n=t.key.substring(5).toLowerCase();this.move(n)}else if(Hn.isEventKey(t,"play")||Hn.isEventKey(t,"pause")||Hn.isEventKey(t,"ff")||Hn.isEventKey(t,"rw")){t.preventDefault();const n=Hn.getEventName(t);this.performMediaAction_(n)}else Hn.isEventKey(t,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+hd);break;case"rw":this.userSeek_(this.player_.currentTime()-hd);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let n=null;const s=this.getCurrentComponent(e.target);t&&(n=!!t.closest(".video-js"),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!n||!t)&&(s&&s.name()==="CloseButton"?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function n(s){for(const a of s)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&t.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&n(a.children_)}return e.children_.forEach(s=>{if(s.hasOwnProperty("el_"))if(s.getIsFocusable&&s.getIsAvailableToBeFocused&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())){t.push(s);return}else s.hasOwnProperty("children_")&&s.children_.length>0?n(s.children_):s.hasOwnProperty("items")&&s.items.length>0?n(s.items):this.findSuitableDOMChild(s)&&t.push(s);if(s.name_==="ErrorDisplay"&&s.opened_){const a=s.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((l,c)=>{t.push({name:()=>"ModalButton"+(c+1),el:()=>l,getPositions:()=>{const d=l.getBoundingClientRect(),g={x:d.x,y:d.y,width:d.width,height:d.height,top:d.top,right:d.right,bottom:d.bottom,left:d.left},m={x:d.left+d.width/2,y:d.top+d.height/2,width:0,height:0,top:d.top+d.height/2,right:d.left+d.width/2,bottom:d.top+d.height/2,left:d.left+d.width/2};return{boundingClientRect:g,center:m}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:d=>!0,focus:()=>l.focus()})})}}),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){function t(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let s=0;s<n.children.length;s++){const a=n.children[s],o=t(a);if(o)return o}return null}return e.el()?t(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length){for(const n of this.focusableComponents)if(n.el()===t)return n}}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name()){this.focusableComponents.splice(t,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const n=t.getPositions(),s=this.focusableComponents.filter(o=>o!==t&&this.isInDirection_(n.boundingClientRect,o.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(n.center,s,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}findBestCandidate_(e,t,n){let s=1/0,a=null;for(const o of t){const l=o.getPositions().center,c=this.calculateDistance_(e,l,n);c<s&&(s=c,a=o)}return a}isInDirection_(e,t,n){switch(n){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,n){const s=Math.abs(e.x-t.x),a=Math.abs(e.y-t.y);let o;switch(n){case"right":case"left":o=s+a*100;break;case"up":o=a*2+s*.5;break;case"down":o=a*5+s;break;default:o=s+a}return o}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if(t.constructor.name==="TextTrackSelect"){e.focus(t);break}}}class $T extends ue{constructor(e,t,n){const s=lt({createEl:!1},t);if(super(e,s,n),!t.playerOptions.sources||t.playerOptions.sources.length===0)for(let a=0,o=t.playerOptions.techOrder;a<o.length;a++){const l=_t(o[a]);let c=Fe.getTech(l);if(l||(c=ue.getComponent(l)),c&&c.isSupported()){e.loadTech_(l);break}}else e.src(t.playerOptions.sources)}}ue.registerComponent("MediaLoader",$T);class $a extends ue{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=n=>this.handleMouseOver(n),this.handleMouseOut_=n=>this.handleMouseOut(n),this.handleClick_=n=>this.handleClick(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.emitTapEvents(),this.enable()}createEl(e="div",t={},n={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),e==="button"&&Ge.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),n=Object.assign({role:"button"},n),this.tabIndex_=t.tabIndex;const s=Le(e,t,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Le("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(e===void 0)return this.controlText_||"Need Text";const n=this.localize(e);this.controlText_=e,_n(this.controlTextEl_,n),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&t.setAttribute("title",n)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ue.registerComponent("ClickableComponent",$a);class cl extends $a{constructor(e,t){super(e,t),this.update(),this.update_=n=>this.update(n),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Le("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Le("picture",{className:"vjs-poster",tabIndex:-1},{},Le("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Vi(this.player_.play()):this.player_.pause())}}cl.prototype.crossorigin=cl.prototype.crossOrigin;ue.registerComponent("PosterImage",cl);const mi="#222",fd="#ccc",UT={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Vo(r,e){let t;if(r.length===4)t=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)t=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+e+")"}function Mi(r,e,t){try{r.style[e]=t}catch{return}}function pd(r){return r?`${r}px`:""}class qT extends ue{constructor(e,t,n){super(e,t,n);const s=o=>this.updateDisplay(o),a=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("useractive",s),e.on("userinactive",s),e.on("texttrackchange",s),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(ct(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const o=G.screen.orientation||G,l=G.screen.orientation?"change":"orientationchange";o.addEventListener(l,a),e.on("dispose",()=>o.removeEventListener(l,a));const c=this.options_.playerOptions.tracks||[];for(let d=0;d<c.length;d++)this.player_.addRemoteTextTrack(c[d],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let s,a,o;for(let l=0;l<t.length;l++){const c=t[l];n&&n.enabled&&n.language&&n.language===c.language&&c.kind in e?c.kind===n.kind?o=c:o||(o=c):n&&!n.enabled?(o=null,s=null,a=null):c.default&&(c.kind==="descriptions"&&!s?s=c:c.kind in e&&!a&&(a=c))}o?o.mode="showing":a?a.mode="showing":s&&(s.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof G.WebVTT=="function"&&G.WebVTT.processCues(G,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const o=[];for(let l=0;l<e.length;++l){const c=e[l];c.mode==="showing"&&o.push(c)}this.updateForTrack(o);return}let n=null,s=null,a=e.length;for(;a--;){const o=e[a];o.mode==="showing"&&(o.kind==="descriptions"?n=o:s=o)}if(s?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):n&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!(G.CSS!==void 0&&G.CSS.supports("inset","10px"))){const o=this.el_,l=o.querySelectorAll(".vjs-text-track-cue"),c=this.player_.controlBar.el_.getBoundingClientRect().height,d=this.player_.el_.getBoundingClientRect().height;o.style="",Mi(o,"position","relative"),Mi(o,"height",d-c+"px"),Mi(o,"top","unset"),aa?Mi(o,"bottom",d+"px"):Mi(o,"bottom","0px"),l.length>0&&l.forEach(g=>{if(g.style.inset){const m=g.style.inset.split(" ");m.length===3&&Object.assign(g.style,{top:m[0],right:m[1],bottom:m[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!(G.CSS!==void 0&&G.CSS.supports("inset-inline: 10px")))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),n=e/t,s=this.player_.videoWidth()/this.player_.videoHeight();let a=0,o=0;Math.abs(n-s)>.1&&(n>s?a=Math.round((e-t*s)/2):o=Math.round((t-e/s)/2)),Mi(this.el_,"insetInline",pd(a)),Mi(this.el_,"insetBlock",pd(o))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),n=e.activeCues;let s=n.length;for(;s--;){const a=n[s];if(!a)continue;const o=a.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Mi(o.firstChild,"color",Vo(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Mi(o.firstChild,"backgroundColor",Vo(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Mi(o,"backgroundColor",Vo(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&(t.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${mi}, 2px 2px 4px ${mi}, 2px 2px 5px ${mi}`:t.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${mi}, 2px 2px ${mi}, 3px 3px ${mi}`:t.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${fd}, 0 1px ${fd}, -1px -1px ${mi}, 0 -1px ${mi}`:t.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}`)),t.fontPercent&&t.fontPercent!==1){const l=G.parseFloat(o.style.fontSize);o.style.fontSize=l*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&t.fontFamily!=="default"&&(t.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=UT[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof G.WebVTT!="function"||e.every(n=>!n.activeCues))return;const t=[];for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a)t.push(s.activeCues[a])}G.WebVTT.processCues(G,t,this.el_);for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a){const o=s.activeCues[a].displayState;Bn(o,"vjs-text-track-cue","vjs-text-track-cue-"+(s.language?s.language:n)),s.language&&ur(o,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}}ue.registerComponent("TextTrackDisplay",qT);class jT extends ue{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),n=Le("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),s=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return s.appendChild(n),s}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}ue.registerComponent("LoadingSpinner",jT);class zt extends $a{createEl(e,t={},n={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),n=Object.assign({type:"button"},n);const s=Le(e,t,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}addChild(e,t={}){const n=this.constructor.name;return Ge.warn(`Adding an actionable (user controllable) child to a Button (${n}) is not supported; use a ClickableComponent instead.`),ue.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}ue.registerComponent("Button",zt);class x0 extends zt{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",n=>this.handleMouseDown(n))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Vi(t),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const n=this.player_.getChild("controlBar"),s=n&&n.getChild("playToggle");if(!s){this.player_.tech(!0).focus();return}const a=()=>s.focus();Zr(t)?t.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}x0.prototype.controlText_="Play Video";ue.registerComponent("BigPlayButton",x0);class HT extends zt{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ue.registerComponent("CloseButton",HT);class C0 extends zt{constructor(e,t={}){super(e,t),t.replay=t.replay===void 0||t.replay,this.setIcon("play"),this.on(e,"play",n=>this.handlePlay(n)),this.on(e,"pause",n=>this.handlePause(n)),t.replay&&this.on(e,"ended",n=>this.handleEnded(n))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Vi(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",t=>this.handleSeeked(t))}}C0.prototype.controlText_="Play";ue.registerComponent("PlayToggle",C0);class yr extends ue{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],n=>this.update(n)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),n=Le("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(n),this.contentEl_=Le("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Rn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let t=this.textNode_;t&&this.contentEl_.firstChild!==t&&(t=null,Ge.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=_e.createTextNode(this.formattedTime_),this.textNode_&&(t?this.contentEl_.replaceChild(this.textNode_,t):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}yr.prototype.labelText_="Time";yr.prototype.controlText_="Time";ue.registerComponent("TimeDisplay",yr);class Yl extends yr{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;this.player_.ended()?t=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"&&e.target.pendingSeekTime()!==null?t=e.target.pendingSeekTime():t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}Yl.prototype.labelText_="Current Time";Yl.prototype.controlText_="Current Time";ue.registerComponent("CurrentTimeDisplay",Yl);class Xl extends yr{constructor(e,t){super(e,t);const n=s=>this.updateContent(s);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Xl.prototype.labelText_="Duration";Xl.prototype.controlText_="Duration";ue.registerComponent("DurationDisplay",Xl);class zT extends ue{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return t.appendChild(n),e.appendChild(t),e}}ue.registerComponent("TimeDivider",zT);class Kl extends yr{constructor(e,t){super(e,t),this.on(e,"durationchange",n=>this.updateContent(n))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Le("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let t;this.player_.ended()?t=0:this.player_.remainingTimeDisplay?t=this.player_.remainingTimeDisplay():t=this.player_.remainingTime(),this.updateTextNode_(t)}}Kl.prototype.labelText_="Remaining Time";Kl.prototype.controlText_="Remaining Time";ue.registerComponent("RemainingTimeDisplay",Kl);class GT extends ue{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",n=>this.updateShowing(n))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Le("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Le("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(_e.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}ue.registerComponent("LiveDisplay",GT);class S0 extends zt{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=n=>this.updateLiveEdgeStatus(n),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Le("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}S0.prototype.controlText_="Seek to live, currently playing live";ue.registerComponent("SeekToLive",S0);function us(r,e,t){return r=Number(r),Math.min(t,Math.max(e,isNaN(r)?e:r))}var WT=Object.freeze({__proto__:null,clamp:us});class Ql extends ue{constructor(e,t){super(e,t),this.handleMouseDown_=n=>this.handleMouseDown(n),this.handleMouseUp_=n=>this.handleMouseUp(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.handleClick_=n=>this.handleClick(n),this.handleMouseMove_=n=>this.handleMouseMove(n),this.update_=n=>this.update(n),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},n={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,t,n)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Hi&&e.preventDefault(),Kh(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Qh(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(us(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=La(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,n=t&&t.enabled,s=t&&t.horizontalSeek;n?s&&e.key==="ArrowLeft"||!s&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&e.key==="ArrowRight"||!s&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ue.registerComponent("Slider",Ql);const Fo=(r,e)=>us(r/e*100,0,100).toFixed(2)+"%";class YT extends ue{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",n=>this.update(n))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Le("span",{className:"vjs-control-text"}),n=Le("span",{textContent:this.localize("Loaded")}),s=_e.createTextNode(": ");return this.percentageEl_=Le("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(n),t.appendChild(s),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const t=this.player_.liveTracker,n=this.player_.buffered(),s=t&&t.isLive()?t.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),o=this.partEls_,l=Fo(a,s);this.percent_!==l&&(this.el_.style.width=l,_n(this.percentageEl_,l),this.percent_=l);for(let c=0;c<n.length;c++){const d=n.start(c),g=n.end(c);let m=o[c];m||(m=this.el_.appendChild(Le()),o[c]=m),!(m.dataset.start===d&&m.dataset.end===g)&&(m.dataset.start=d,m.dataset.end=g,m.style.left=Fo(d,a),m.style.width=Fo(g-d,a))}for(let c=o.length;c>n.length;c--)this.el_.removeChild(o[c-1]);o.length=n.length})}}ue.registerComponent("LoadProgressBar",YT);class XT extends ue{constructor(e,t){super(e,t),this.update=zi(ct(this,this.update),bi)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,n){const s=rs(this.el_),a=cr(this.player_.el()),o=e.width*t;if(!a||!s)return;let l=e.left-a.left+o,c=e.width-o+(a.right-e.right);c||(c=e.width-o,l=o);let d=s.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>s.width&&(d=s.width),d=Math.round(d),this.el_.style.right=`-${d}px`,this.write(n)}write(e){_n(this.el_,e)}updateTime(e,t,n,s){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const l=this.player_.liveTracker.liveWindow(),c=l-t*l;a=(c<1?"":"-")+Rn(c,l)}else a=Rn(n,o);this.update(e,t,a),s&&s()})}}ue.registerComponent("TimeTooltip",XT);class Zl extends ue{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=zi(ct(this,this.update),bi)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t,n){const s=this.getChild("timeTooltip");if(!s)return;const a=n&&n.target&&typeof n.target.pendingSeekTime=="function"?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,t,a)}}Zl.prototype.options_={children:[]};!jt&&!Ii&&Zl.prototype.options_.children.push("timeTooltip");ue.registerComponent("PlayProgressBar",Zl);class E0 extends ue{constructor(e,t){super(e,t),this.update=zi(ct(this,this.update),bi)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,()=>{this.el_.style.left=`${e.width*t}px`})}}E0.prototype.options_={children:["timeTooltip"]};ue.registerComponent("MouseTimeDisplay",E0);class Ua extends Ql{constructor(e,t){t=lt(Ua.prototype.options_,t),t.children=[...t.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(jt||Ii)||e.options_.disableSeekWhileScrubbingOnSTV;(!jt&&!Ii||n)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=ct(this,this.update),this.update=zi(this.update_,bi),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _e&&"visibilityState"in _e&&this.on(_e,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){_e.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,bi))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(_e.visibilityState==="hidden")return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let a=this.player_.duration();s&&s.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(t*100).toFixed(2)),this.percent_=t),(this.currentTime_!==n||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Rn(n,a),Rn(a,a)],"{1} of {2}")),this.currentTime_=n,this.duration_=a),this.bar&&this.bar.update(cr(this.el()),this.getProgress(),e)}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const n=this.player_.liveTracker;return n&&n.isLive()?(t=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){ss(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!ss(e)||isNaN(this.player_.duration()))return;!t&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let n;const s=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())n=s*this.player_.duration(),n===this.player_.duration()&&(n=n-.1);else{if(s>=.99){a.seekToLiveEdge();return}const o=a.seekableStart(),l=a.liveCurrentTime();if(n=o+s*a.liveWindow(),n>=l&&(n=l),n<=o&&(n=o+.1),n===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(n):this.userSeek_(n),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Vi(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const n=parseInt(e.key,10)*.1;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _e&&"visibilityState"in _e&&this.off(_e,"visibilitychange",this.toggleVisibility_),super.dispose()}}Ua.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};ue.registerComponent("SeekBar",Ua);class k0 extends ue{constructor(e,t){super(e,t),this.handleMouseMove=zi(ct(this,this.handleMouseMove),bi),this.throttledHandleMouseSeek=zi(ct(this,this.handleMouseSeek),bi),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.handleMouseDownHandler_=n=>this.handleMouseDown(n),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const n=t.getChild("playProgressBar"),s=t.getChild("mouseTimeDisplay");if(!n&&!s)return;const a=t.el(),o=rs(a);let l=La(a,e).x;l=us(l,0,1),s&&s.update(o,l),n&&n.update(o,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Vi(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}k0.prototype.options_={children:["seekBar"]};ue.registerComponent("ProgressControl",k0);class w0 extends zt{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],n=>this.handlePictureInPictureChange(n)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],n=>this.handlePictureInPictureEnabledChange(n)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){_e.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in G?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof _e.exitPictureInPicture=="function"&&super.show()}}w0.prototype.controlText_="Picture-in-Picture";ue.registerComponent("PictureInPictureToggle",w0);class D0 extends zt{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",n=>this.handleFullscreenChange(n)),_e[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}D0.prototype.controlText_="Fullscreen";ue.registerComponent("FullscreenToggle",D0);const KT=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class QT extends ue{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}ue.registerComponent("VolumeLevel",QT);class ZT extends ue{constructor(e,t){super(e,t),this.update=zi(ct(this,this.update),bi)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,n,s){if(!n){const a=cr(this.el_),o=cr(this.player_.el()),l=e.width*t;if(!o||!a)return;const c=e.left-o.left+l,d=e.width-l+(o.right-e.right);let g=a.width/2;c<g?g+=g-c:d<g&&(g=d),g<0?g=0:g>a.width&&(g=a.width),this.el_.style.right=`-${g}px`}this.write(`${s}%`)}write(e){_n(this.el_,e)}updateVolume(e,t,n,s,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,n,s.toFixed(0)),a&&a()})}}ue.registerComponent("VolumeLevelTooltip",ZT);class A0 extends ue{constructor(e,t){super(e,t),this.update=zi(ct(this,this.update),bi)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,n){const s=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,s,()=>{n?this.el_.style.bottom=`${e.height*t}px`:this.el_.style.left=`${e.width*t}px`})}}A0.prototype.options_={children:["volumeLevelTooltip"]};ue.registerComponent("MouseVolumeLevelDisplay",A0);class qa extends Ql{constructor(e,t){super(e,t),this.on("slideractive",n=>this.updateLastVolume_(n)),this.on(e,"volumechange",n=>this.updateARIAAttributes(n)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){ss(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const n=this.el(),s=cr(n),a=this.vertical();let o=La(n,e);o=a?o.y:o.x,o=us(o,0,1),t.update(s,o,a)}ss(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}qa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!jt&&!Ii&&qa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");qa.prototype.playerEvent="volumechange";ue.registerComponent("VolumeBar",qa);class N0 extends ue{constructor(e,t={}){t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||lr(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),KT(this,e),this.throttledHandleMouseMove=zi(ct(this,this.handleMouseMove),bi),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.on("mousedown",n=>this.handleMouseDown(n)),this.on("touchstart",n=>this.handleMouseDown(n)),this.on("mousemove",n=>this.handleMouseMove(n)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}N0.prototype.options_={children:["volumeBar"]};ue.registerComponent("VolumeControl",N0);const JT=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class I0 extends zt{constructor(e,t){super(e,t),JT(this,e),this.on(e,["loadstart","volumechange"],n=>this.update(n))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),n=this.player_.lastVolume_();if(t===0){const s=n<.1?.1:n;this.player_.volume(s),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),jt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Oa(this.el_,[0,1,2,3].reduce((n,s)=>n+`${s?" ":""}vjs-vol-${s}`,"")),Bn(this.el_,`vjs-vol-${t}`)}updateControlText_(){const t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}I0.prototype.controlText_="Mute";ue.registerComponent("MuteToggle",I0);class O0 extends ue{constructor(e,t={}){typeof t.inline<"u"?t.inline=t.inline:t.inline=!0,(typeof t.volumeControl>"u"||lr(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=n=>this.handleKeyPress(n),this.on(e,["loadstart"],n=>this.volumePanelState_(n)),this.on(this.muteToggle,"keyup",n=>this.handleKeyPress(n)),this.on(this.volumeControl,"keyup",n=>this.handleVolumeControlKeyUp(n)),this.on("keydown",n=>this.handleKeyPress(n)),this.on("mouseover",n=>this.handleMouseOver(n)),this.on("mouseout",n=>this.handleMouseOut(n)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),hi(_e,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ht(_e,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}O0.prototype.options_={children:["muteToggle","volumeControl"]};ue.registerComponent("VolumePanel",O0);class B0 extends zt{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()?n.seekableEnd():this.player_.duration();let a;t+this.skipTime<=s?a=t+this.skipTime:a=s,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}B0.prototype.controlText_="Skip Forward";ue.registerComponent("SkipForward",B0);class L0 extends zt{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()&&n.seekableStart();let a;s&&t-this.skipTime<=s?a=s:t>=this.skipTime?a=t-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}L0.prototype.controlText_="Skip Backward";ue.registerComponent("SkipBackward",L0);class M0 extends ue{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",n=>this.handleKeyDown(n)),this.boundHandleBlur_=n=>this.handleBlur(n),this.boundHandleTapClick_=n=>this.handleTapClick(n)}addEventListenerForItem(e){e instanceof ue&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ue&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Le(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),hi(t,"click",function(n){n.preventDefault(),n.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||_e.activeElement;if(!this.children().some(n=>n.el()===t)){const n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const n=t.filter(s=>s.el()===e.target)[0];if(!n)return;n.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}ue.registerComponent("Menu",M0);class Jl extends ue{constructor(e,t={}){super(e,t),this.menuButton_=new zt(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=zt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",s),this.on(this.menuButton_,"click",s),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),hi(_e,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new M0(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Le("li",{className:"vjs-menu-title",textContent:_t(this.options_.title),tabIndex:-1}),n=new ue(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){return super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const t=zt.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),Ht(_e,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),jt&&zh())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}ue.registerComponent("MenuButton",Jl);class eu extends Jl{constructor(e,t){const n=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!n)return;const s=ct(this,this.update);n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),n.addEventListener("labelchange",s),this.player_.on("ready",s),this.player_.on("dispose",function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s),n.removeEventListener("labelchange",s)})}}ue.registerComponent("TrackButton",eu);class cs extends $a{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,n){this.nonIconControl=!0;const s=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),n),a=Le("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(a):s.replaceChild(a,s.querySelector(".vjs-icon-placeholder")),s}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ue.registerComponent("MenuItem",cs);class ds extends cs{constructor(e,t){const n=t.track,s=e.textTracks();t.label=n.label||n.language||"Unknown",t.selected=n.mode==="showing",super(e,t),this.track=n,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const a=(...l)=>{this.handleTracksChange.apply(this,l)},o=(...l)=>{this.handleSelectedLanguageChange.apply(this,l)};if(e.on(["loadstart","texttrackchange"],a),s.addEventListener("change",a),s.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),s.removeEventListener("change",a),s.removeEventListener("selectedlanguagechange",o)}),s.onchange===void 0){let l;this.on(["tap","click"],function(){if(typeof G.Event!="object")try{l=new G.Event("change")}catch{}l||(l=_e.createEvent("Event"),l.initEvent("change",!0,!0)),s.dispatchEvent(l)})}this.handleTracksChange()}handleClick(e){const t=this.track,n=this.player_.textTracks();if(super.handleClick(e),!!n)for(let s=0;s<n.length;s++){const a=n[s];this.kinds.indexOf(a.kind)!==-1&&(a===t?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.mode="disabled"))}}handleTracksChange(e){const t=this.track.mode==="showing";t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}ue.registerComponent("TextTrackMenuItem",ds);class P0 extends ds{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let n=!0;for(let s=0,a=t.length;s<a;s++){const o=t[s];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let n=!0;for(let s=0,a=t.length;s<a;s++){const o=t[s];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ue.registerComponent("OffTextTrackMenuItem",P0);class _r extends eu{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=ds){let n;this.label_&&(n=`${this.label_} off`),e.push(new P0(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<s.length;a++){const o=s[a];if(this.kinds_.indexOf(o.kind)>-1){const l=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});l.addClass(`vjs-${o.kind}-menu-item`),e.push(l)}}return e}}ue.registerComponent("TextTrackButton",_r);class R0 extends cs{constructor(e,t){const n=t.track,s=t.cue,a=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=a&&a<s.endTime,super(e,t),this.track=n,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}ue.registerComponent("ChaptersTrackMenuItem",R0);class tu extends _r{constructor(e,t,n){super(e,t,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(s=>{s.selected(this.track_.activeCues[0]===s.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(_t(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let n=0,s=t.length;n<s;n++){const a=t[n],o=new R0(this.player_,{track:this.track_,cue:a});e.push(o)}return e}}tu.prototype.kind_="chapters";tu.prototype.controlText_="Chapters";ue.registerComponent("ChaptersButton",tu);class iu extends _r{constructor(e,t,n){super(e,t,n),this.setIcon("audio-description");const s=e.textTracks(),a=ct(this,this.handleTracksChange);s.addEventListener("change",a),this.on("dispose",function(){s.removeEventListener("change",a)})}handleTracksChange(e){const t=this.player().textTracks();let n=!1;for(let s=0,a=t.length;s<a;s++){const o=t[s];if(o.kind!==this.kind_&&o.mode==="showing"){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}iu.prototype.kind_="descriptions";iu.prototype.controlText_="Descriptions";ue.registerComponent("DescriptionsButton",iu);class nu extends _r{constructor(e,t,n){super(e,t,n),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}nu.prototype.kind_="subtitles";nu.prototype.controlText_="Subtitles";ue.registerComponent("SubtitlesButton",nu);class ru extends ds{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}ue.registerComponent("CaptionSettingsMenuItem",ru);class su extends _r{constructor(e,t,n){super(e,t,n),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ru(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}su.prototype.kind_="captions";su.prototype.controlText_="Captions";ue.registerComponent("CaptionsButton",su);class V0 extends ds{createEl(e,t,n){const s=super.createEl(e,t,n),a=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",s):a.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Le("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),s}}ue.registerComponent("SubsCapsMenuItem",V0);class au extends _r{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(_t(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ru(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,V0),e}}au.prototype.kinds_=["captions","subtitles"];au.prototype.controlText_="Subtitles";ue.registerComponent("SubsCapsButton",au);class F0 extends cs{constructor(e,t){const n=t.track,s=e.audioTracks();t.label=n.label||n.language||"Unknown",t.selected=n.enabled,super(e,t),this.track=n,this.addClass(`vjs-${n.kind}-menu-item`);const a=(...o)=>{this.handleTracksChange.apply(this,o)};s.addEventListener("change",a),this.on("dispose",()=>{s.removeEventListener("change",a)})}createEl(e,t,n){const s=super.createEl(e,t,n),a=s.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Le("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const t=this.player_.audioTracks();for(let n=0;n<t.length;n++){const s=t[n];s!==this.track&&(s.enabled=s===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}ue.registerComponent("AudioTrackMenuItem",F0);class $0 extends eu{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let n=0;n<t.length;n++){const s=t[n];e.push(new F0(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}$0.prototype.controlText_="Audio Track";ue.registerComponent("AudioTrackButton",$0);class ou extends cs{constructor(e,t){const n=t.rate,s=parseFloat(n,10);t.label=n,t.selected=s===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=n,this.rate=s,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}ou.prototype.contentElType="button";ue.registerComponent("PlaybackRateMenuItem",ou);class U0 extends Jl{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",n=>this.updateVisibility(n)),this.on(e,"ratechange",n=>this.updateLabel(n)),this.on(e,"playbackrateschange",n=>this.handlePlaybackRateschange(n))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Le("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let n=e.length-1;n>=0;n--)t.push(new ou(this.player(),{rate:e[n]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}U0.prototype.controlText_="Playback Rate";ue.registerComponent("PlaybackRateMenuButton",U0);class q0 extends ue{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},n={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,n)}}ue.registerComponent("Spacer",q0);class eb extends q0{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}ue.registerComponent("CustomControlSpacer",eb);class j0 extends ue{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}j0.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};ue.registerComponent("ControlBar",j0);class H0 extends vr{constructor(e,t){super(e,t),this.on(e,"error",n=>{this.open(n)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}H0.prototype.options_=Object.assign({},vr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});ue.registerComponent("ErrorDisplay",H0);class z0 extends ue{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Le("select",{id:this.options_.id},{},this.options_.SelectOptions.map(t=>{const n=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Ti()}`)+"-"+t[1].replace(/\W+/g,""),s=Le("option",{id:n,value:this.localize(t[0]),textContent:this.localize(t[1])});return s.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${n}`),s}))}}ue.registerComponent("TextTrackSelect",z0);class Mn extends ue{constructor(e,t={}){super(e,t);const n=Le("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(n);const s=this.options_.selects;for(const a of s){const o=this.options_.selectConfigs[a],l=o.className,c=o.id.replace("%s",this.options_.id_);let d=null;const g=`vjs_select_${Ti()}`;if(this.options_.type==="colors"){d=Le("span",{className:l});const S=Le("label",{id:c,className:"vjs-label",textContent:this.localize(o.label)});S.setAttribute("for",g),d.appendChild(S)}const m=new z0(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:g,labelId:c});this.addChild(m),this.options_.type==="colors"&&(d.appendChild(m.el()),this.el().appendChild(d))}}createEl(){return Le("fieldset",{className:this.options_.className})}}ue.registerComponent("TextTrackFieldset",Mn);class G0 extends ue{constructor(e,t={}){super(e,t);const n=this.options_.textTrackComponentid,s=new Mn(e,{id_:n,legendId:`captions-text-legend-${n}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const a=new Mn(e,{id_:n,legendId:`captions-background-${n}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const o=new Mn(e,{id_:n,legendId:`captions-window-${n}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o)}createEl(){return Le("div",{className:"vjs-track-settings-colors"})}}ue.registerComponent("TextTrackSettingsColors",G0);class W0 extends ue{constructor(e,t={}){super(e,t);const n=this.options_.textTrackComponentid,s=new Mn(e,{id_:n,legendId:`captions-font-size-${n}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const a=new Mn(e,{id_:n,legendId:`captions-edge-style-${n}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const o=new Mn(e,{id_:n,legendId:`captions-font-family-${n}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o)}createEl(){return Le("div",{className:"vjs-track-settings-font"})}}ue.registerComponent("TextTrackSettingsFont",W0);class Y0 extends ue{constructor(e,t={}){super(e,t);const n=new zt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const s=this.localize("Done"),a=new zt(e,{controlText:s,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=s,this.addChild(a)}createEl(){return Le("div",{className:"vjs-track-settings-controls"})}}ue.registerComponent("TrackSettingsControls",Y0);const $o="vjs-text-track-settings",md=["#000","Black"],gd=["#00F","Blue"],vd=["#0FF","Cyan"],yd=["#0F0","Green"],_d=["#F0F","Magenta"],Td=["#F00","Red"],bd=["#FFF","White"],xd=["#FF0","Yellow"],Uo=["1","Opaque"],qo=["0.5","Semi-Transparent"],Cd=["0","Transparent"],hn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[md,bd,Td,yd,gd,xd,_d,vd],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Uo,qo,Cd],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[bd,md,Td,yd,gd,xd,_d,vd],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Uo,qo],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[Cd,qo,Uo],className:"vjs-window-opacity vjs-opacity"}};hn.windowColor.options=hn.backgroundColor.options;function X0(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function tb(r,e){const t=r.options[r.options.selectedIndex].value;return X0(t,e)}function ib(r,e,t){if(e){for(let n=0;n<r.options.length;n++)if(X0(r.options[n].value,t)===e){r.selectedIndex=n;break}}}class nb extends vr{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Le("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),t.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new G0(e,{textTrackComponentid:this.id_,selectConfigs:hn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const n=new W0(e,{textTrackComponentid:this.id_,selectConfigs:hn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const s=new Y0(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Xn(hn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return Vh(hn,(e,t,n)=>{const s=tb(this.$(t.selector),t.parser);return s!==void 0&&(e[n]=s),e},{})}setValues(e){Xn(hn,(t,n)=>{ib(this.$(t.selector),e[n],t.parser)})}setDefaults(){Xn(hn,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(G.localStorage.getItem($o))}catch(t){Ge.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?G.localStorage.setItem($o,JSON.stringify(e)):G.localStorage.removeItem($o)}catch(t){Ge.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}ue.registerComponent("TextTrackSettings",nb);class rb extends ue{constructor(e,t){let n=t.ResizeObserver||G.ResizeObserver;t.ResizeObserver===null&&(n=!1);const s=lt({createEl:!n,reportTouchActivity:!1},t);super(e,s),this.ResizeObserver=t.ResizeObserver||G.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=o0(()=>{this.resizeHandler()},100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let o=this.unloadListener_=function(){Ht(this,"resize",a),Ht(this,"unload",o),o=null};hi(this.el_.contentWindow,"unload",o),hi(this.el_.contentWindow,"resize",a)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}ue.registerComponent("ResizeManager",rb);const sb={trackingThreshold:20,liveTolerance:15};class ab extends ue{constructor(e,t){const n=lt(sb,t,{createEl:!1});super(e,n),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=s=>this.handlePlay(s),this.handleFirstTimeupdate_=s=>this.handleFirstTimeupdate(s),this.handleSeeked_=s=>this.handleSeeked(s),this.seekToLiveEdge_=s=>this.seekToLiveEdge(s),this.reset_(),this.on(this.player_,"durationchange",s=>this.handleDurationchange(s)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(G.performance.now().toFixed(4)),n=this.lastTime_===-1?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;const s=this.liveCurrentTime(),a=this.player_.currentTime();let o=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||s===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,bi),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let n=e?e.length:0;for(;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}ue.registerComponent("LiveTracker",ab);class ob extends ue{constructor(e,t){super(e,t),this.on("statechanged",n=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Le("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Ti()}`}),description:Le("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Ti()}`})},Le("div",{className:"vjs-title-bar"},{},Fh(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(s=>{const a=this.state[s],o=this.els[s],l=n[s];Ma(o),a&&_n(o,a),t&&(t.removeAttribute(l),a&&t.setAttribute(l,o.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}ue.registerComponent("TitleBar",ob);const lb={initialDisplay:4e3,position:[],takeFocus:!1};class ub extends zt{constructor(e,t){t=lt(lb,t),super(e,t),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],n=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Le("button",{},{type:"button",class:this.buildCSSClass()},Le("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}ue.registerComponent("TransientButton",ub);const dl=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const t=r.$$("source"),n=[];let s="";if(!t.length)return!1;for(let a=0;a<t.length;a++){const o=t[a].src;o&&n.indexOf(o)===-1&&n.push(o)}return n.length?(n.length===1&&(s=n[0]),r.triggerSourceset(s),!0):!1},cb=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=_e.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const t=_e.createDocumentFragment();for(;e.childNodes.length;)t.appendChild(e.childNodes[0]);return this.innerText="",G.Element.prototype.appendChild.call(this,t),this.innerHTML}}),K0=(r,e)=>{let t={};for(let n=0;n<r.length&&(t=Object.getOwnPropertyDescriptor(r[n],e),!(t&&t.set&&t.get));n++);return t.enumerable=!0,t.configurable=!0,t},db=r=>K0([r.el(),G.HTMLMediaElement.prototype,G.Element.prototype,cb],"innerHTML"),Sd=function(r){const e=r.el();if(e.resetSourceWatch_)return;const t={},n=db(r),s=a=>(...o)=>{const l=a.apply(e,o);return dl(r),l};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(t[a]=e[a],e[a]=s(t[a]))}),Object.defineProperty(e,"innerHTML",lt(n,{set:s(n.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(t).forEach(a=>{e[a]=t[a]}),Object.defineProperty(e,"innerHTML",n)},r.one("sourceset",e.resetSourceWatch_)},hb=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?y0(G.Element.prototype.getAttribute.call(this,"src")):""},set(r){return G.Element.prototype.setAttribute.call(this,"src",r),r}}),fb=r=>K0([r.el(),G.HTMLMediaElement.prototype,hb],"src"),pb=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const t=fb(r),n=e.setAttribute,s=e.load;Object.defineProperty(e,"src",lt(t,{set:a=>{const o=t.set.call(e,a);return r.triggerSourceset(e.src),o}})),e.setAttribute=(a,o)=>{const l=n.call(e,a,o);return/src/i.test(a)&&r.triggerSourceset(e.src),l},e.load=()=>{const a=s.call(e);return dl(r)||(r.triggerSourceset(""),Sd(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):dl(r)||Sd(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=s,e.setAttribute=n,Object.defineProperty(e,"src",t),e.resetSourceWatch_&&e.resetSourceWatch_()}};class ke extends Fe{constructor(e,t){super(e,t);const n=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",n&&(this.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let o=a.length;const l=[];for(;o--;){const c=a[o];c.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack(c.track),this.textTracks().addTrack(c.track),!s&&!this.el_.hasAttribute("crossorigin")&&Fa(c.src)&&(s=!0)):l.push(c))}for(let c=0;c<l.length;c++)this.el_.removeChild(l[c])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&Ge.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
180
+ This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(ns||Na)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),ke.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){pb(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const n=()=>{t=[];for(let a=0;a<e.length;a++){const o=e[a];o.kind==="metadata"&&t.push({track:o,storedMode:o.mode})}};n(),e.addEventListener("change",n),this.on("dispose",()=>e.removeEventListener("change",n));const s=()=>{for(let a=0;a<t.length;a++){const o=t[a];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",s)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",n),e.removeEventListener("change",s),e.addEventListener("change",s)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",s)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const n=e.toLowerCase();this[`${n}TracksListeners_`]&&Object.keys(this[`${n}TracksListeners_`]).forEach(s=>{this.el()[`${n}Tracks`].removeEventListener(s,this[`${n}TracksListeners_`][s])}),this[`featuresNative${e}Tracks`]=!t,this[`${n}TracksListeners_`]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=vi[e],n=this.el()[t.getterName],s=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!n||!n.addEventListener)return;const a={change:l=>{const c={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(c),e==="text"&&this[hr.remoteText.getterName]().trigger(c)},addtrack(l){s.addTrack(l.track)},removetrack(l){s.removeTrack(l.track)}},o=function(){const l=[];for(let c=0;c<s.length;c++){let d=!1;for(let g=0;g<n.length;g++)if(n[g]===s[c]){d=!0;break}d||l.push(s[c])}for(;l.length;)s.removeTrack(l.shift())};this[t.getterName+"Listeners_"]=a,Object.keys(a).forEach(l=>{const c=a[l];n.addEventListener(l,c),this.on("dispose",d=>n.removeEventListener(l,c))}),this.on("loadstart",o),this.on("dispose",l=>this.off("loadstart",o))}proxyNativeTracks_(){vi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),ke.disposeMediaElement(e),e=n}else{e=_e.createElement("video");const n=this.options_.tag&&dn(this.options_.tag),s=lt({},n);(!ns||this.options_.nativeControlsForTouch!==!0)&&delete s.controls,Yh(e,Object.assign(s,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ur(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let n=0;n<t.length;n++){const s=t[n],a=this.options_[s];typeof a<"u"&&(a?ur(e,s,s):Ba(e,s),e[s]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let n=!1;const s=function(){n=!0};this.on("loadstart",s);const a=function(){n||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",a),n||this.trigger("loadstart")});return}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready(function(){t.forEach(function(n){this.trigger(n)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ia?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){Ge(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Ii&&Hi&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Vi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return Ge.error("Invalid source URL."),!1;const n={src:e};t&&(n.type=t);const s=Le("source",{},n);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return Ge.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const n of t)if(n.src===e)return this.el_.removeChild(n),!0;return Ge.warn(`No matching source element found with src: ${e}`),!1}reset(){ke.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,n):super.addTextTrack(e,t,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=_e.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const n=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let n=t.length;for(;n--;)(e===t[n]||e===t[n].track)&&this.el().removeChild(t[n])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),G.performance&&(e.creationTime=G.performance.now()),e}}wa(ke,"TEST_VID",function(){if(!pr())return;const r=_e.createElement("video"),e=_e.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});ke.isSupported=function(){try{ke.TEST_VID.volume=.5}catch{return!1}return!!(ke.TEST_VID&&ke.TEST_VID.canPlayType)};ke.canPlayType=function(r){return ke.TEST_VID.canPlayType(r)};ke.canPlaySource=function(r,e){return ke.canPlayType(r.type)};ke.canControlVolume=function(){try{const r=ke.TEST_VID.volume;ke.TEST_VID.volume=r/2+.1;const e=r!==ke.TEST_VID.volume;return e&&jt?(G.setTimeout(()=>{ke&&ke.prototype&&(ke.prototype.featuresVolumeControl=r!==ke.TEST_VID.volume)}),!1):e}catch{return!1}};ke.canMuteVolume=function(){try{const r=ke.TEST_VID.muted;return ke.TEST_VID.muted=!r,ke.TEST_VID.muted?ur(ke.TEST_VID,"muted","muted"):Ba(ke.TEST_VID,"muted","muted"),r!==ke.TEST_VID.muted}catch{return!1}};ke.canControlPlaybackRate=function(){if(Ii&&Hi&&Da<58)return!1;try{const r=ke.TEST_VID.playbackRate;return ke.TEST_VID.playbackRate=r/2+.1,r!==ke.TEST_VID.playbackRate}catch{return!1}};ke.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(_e.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(_e.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(_e.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(_e.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};ke.supportsNativeTextTracks=function(){return Ia||jt&&Hi};ke.supportsNativeVideoTracks=function(){return!!(ke.TEST_VID&&ke.TEST_VID.videoTracks)};ke.supportsNativeAudioTracks=function(){return!!(ke.TEST_VID&&ke.TEST_VID.audioTracks)};ke.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([r,e]){wa(ke.prototype,r,()=>ke[e](),!0)});ke.prototype.featuresVolumeControl=ke.canControlVolume();ke.prototype.movingMediaElementInDOM=!jt;ke.prototype.featuresFullscreenResize=!0;ke.prototype.featuresProgressEvents=!0;ke.prototype.featuresTimeupdateEvents=!0;ke.prototype.featuresVideoFrameCallback=!!(ke.TEST_VID&&ke.TEST_VID.requestVideoFrameCallback);ke.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()}};ke.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let t=e.length;for(;t--;)r.removeChild(e[t]);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){ke.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){ke.prototype["set"+_t(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){ke.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){ke.prototype["set"+_t(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){ke.prototype[r]=function(){return this.el_[r]()}});Fe.withSourceHandlers(ke);ke.nativeSourceHandler={};ke.nativeSourceHandler.canPlayType=function(r){try{return ke.TEST_VID.canPlayType(r)}catch{return""}};ke.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return ke.nativeSourceHandler.canPlayType(r.type);if(r.src){const t=Gl(r.src);return ke.nativeSourceHandler.canPlayType(`video/${t}`)}return""};ke.nativeSourceHandler.handleSource=function(r,e,t){e.setSrc(r.src)};ke.nativeSourceHandler.dispose=function(){};ke.registerSourceHandler(ke.nativeSourceHandler);Fe.registerTech("Html5",ke);const Q0=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],jo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},hl=["tiny","xsmall","small","medium","large","xlarge","huge"],Ks={};hl.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;Ks[r]=`vjs-layout-${e}`});const mb={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class rt extends ue{constructor(e,t,n){if(e.id=e.id||t.id||`vjs_video_${Ti()}`,t=Object.assign(rt.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const o=e.closest("[lang]");o&&(t.language=o.getAttribute("lang"))}if(super(null,t,n),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=Ph(this.id_),this.fsApi_=ta,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&dn(e),this.language(this.options_.language),t.languages){const o={};Object.getOwnPropertyNames(t.languages).forEach(function(l){o[l.toLowerCase()]=t.languages[l]}),this.languages_=o}else this.languages_=rt.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ul(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(hi(_e,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const s=lt(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(o=>{this[o](t.plugins[o])}),t.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const l=new G.DOMParser().parseFromString(VT,"image/svg+xml");if(l.querySelector("parsererror"))Ge.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const d=l.documentElement;d.style.display="none",this.el_.appendChild(d),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new FT(this),this.addClass("vjs-spatial-navigation-enabled")),ns&&this.addClass("vjs-touch-enabled"),jt||this.addClass("vjs-workinghover"),rt.players[this.id_]=this;const a=tl.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Ht(_e,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ht(_e,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),rt.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),LT(this),Jt.names.forEach(e=>{const t=Jt[e],n=this[t.getterName]();n&&n.off&&n.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,t,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const s=this.tag.tagName.toLowerCase()==="video-js";n?t=this.el_=e.parentNode:s||(t=this.el_=super.createEl("div"));const a=dn(e);if(s){for(t=this.el_=e,e=this.tag=_e.createElement("video");t.children.length;)e.appendChild(t.firstChild);Kr(t,"video-js")||Bn(t,"video-js"),t.appendChild(e),n=this.playerElIngest_=t,Object.keys(t).forEach(c=>{try{e[c]=t[c]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",Hi&&Aa&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(c){s&&c==="class"||t.setAttribute(c,a[c]),s&&e.setAttribute(c,a[c])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(c=>Hh[c]).map(c=>"vjs-device-"+c.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),G.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=s0("vjs-styles-dimensions");const c=yn(".vjs-styles-defaults"),d=yn("head");d.insertBefore(this.styleEl_,c?c.nextSibling:d.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const l=e.getElementsByTagName("a");for(let c=0;c<l.length;c++){const d=l.item(c);Bn(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(t,e),nl(e,t),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){Ge.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const n=e+"_";if(t===void 0)return this[n]||0;if(t===""||t==="auto"){this[n]=void 0,this.updateStyleEl_();return}const s=parseFloat(t);if(isNaN(s)){Ge.error(`Improper value "${t}" supplied for for ${e}`);return}this[n]=s,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,nn(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),hT(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(G.VIDEOJS_NO_DYNAMIC_STYLE===!0){const l=typeof this.width_=="number"?this.width_:this.options_.width,c=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(l>=0&&(d.width=l),c>=0&&(d.height=c));return}let e,t,n,s;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?n=this.aspectRatio_:this.videoWidth()>0?n=this.videoWidth()+":"+this.videoHeight():n="16:9";const a=n.split(":"),o=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?t=this.height_:t=e*o,/^[^a-zA-Z]/.test(this.id())?s="dimensions-"+this.id():s=this.id()+"-dimensions",this.addClass(s),a0(this.styleEl_,`
181
+ .${s} {
182
+ width: ${e}px;
183
+ height: ${t}px;
184
+ }
185
+
186
+ .${s}.vjs-fluid:not(.vjs-audio-only-mode) {
187
+ padding-top: ${o*100}%;
188
+ }
189
+ `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const n=_t(e),s=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(Fe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const o={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Jt.names.forEach(c=>{const d=Jt[c];o[d.getterName]=this[d.privateName]}),Object.assign(o,this.options_[n]),Object.assign(o,this.options_[s]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const l=Fe.getTech(e);if(!l)throw new Error(`No Tech named '${n}' exists! '${n}' should be registered using videojs.registerTech()'`);this.tech_=new l(o),this.tech_.ready(ct(this,this.handleTechReady_),!0),ul.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Q0.forEach(c=>{this.on(this.tech_,c,d=>this[`handleTech${_t(c)}_`](d))}),Object.keys(jo).forEach(c=>{this.on(this.tech_,c,d=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${jo[c]}_`].bind(this),event:d});return}this[`handleTech${jo[c]}_`](d)})}),this.on(this.tech_,"loadstart",c=>this.handleTechLoadStart_(c)),this.on(this.tech_,"sourceset",c=>this.handleTechSourceset_(c)),this.on(this.tech_,"waiting",c=>this.handleTechWaiting_(c)),this.on(this.tech_,"ended",c=>this.handleTechEnded_(c)),this.on(this.tech_,"seeking",c=>this.handleTechSeeking_(c)),this.on(this.tech_,"play",c=>this.handleTechPlay_(c)),this.on(this.tech_,"pause",c=>this.handleTechPause_(c)),this.on(this.tech_,"durationchange",c=>this.handleTechDurationChange_(c)),this.on(this.tech_,"fullscreenchange",(c,d)=>this.handleTechFullscreenChange_(c,d)),this.on(this.tech_,"fullscreenerror",(c,d)=>this.handleTechFullscreenError_(c,d)),this.on(this.tech_,"enterpictureinpicture",c=>this.handleTechEnterPictureInPicture_(c)),this.on(this.tech_,"leavepictureinpicture",c=>this.handleTechLeavePictureInPicture_(c)),this.on(this.tech_,"error",c=>this.handleTechError_(c)),this.on(this.tech_,"posterchange",c=>this.handleTechPosterChange_(c)),this.on(this.tech_,"textdata",c=>this.handleTechTextData_(c)),this.on(this.tech_,"ratechange",c=>this.handleTechRateChange_(c)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)&&nl(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Jt.names.forEach(e=>{const t=Jt[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=ul.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&Ge.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
190
+ See https://github.com/videojs/video.js/issues/2617 for more info.
191
+ `),this.tech_}version(){return{"video.js":tl}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const t=()=>{const s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(Zr(o))return o.catch(l=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${l||""}`)})};let n;if(e==="any"&&!this.muted()?(n=this.play(),Zr(n)&&(n=n.catch(t))):e==="muted"&&!this.muted()?n=t():n=this.play(),!!Zr(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,n="";typeof t!="string"&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=RT(this,t)),this.cache_.source=lt({},e,{src:t,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===t),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const d=dn(o[c]);a.push(d),d.src&&d.src===t&&l.push(d.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=a=>this.updateSourceCaches_(a);const n=this.currentSource().src,s=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==n)&&(t=()=>{}),t(s),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Vi(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),n=>n.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!_e.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const n=this.el();let s=_e[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in OT)return NT(this.middleware_,this.tech_,e,t);if(e in ud)return ld(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw Ge(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in IT)return AT(this.middleware_,this.tech_,e);if(e in ud)return ld(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(Ge(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(Ge(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(Ge(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Vi){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(Ia||jt);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&n&&this.load();return}const s=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),s===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(n){n(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Ni(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=Ni(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Ni(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return m0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let n=e.end(e.length-1);return n>t&&(n=t),n}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((n,s)=>{function a(){t.off("fullscreenerror",l),t.off("fullscreenchange",o)}function o(){a(),n()}function l(d,g){a(),s(g)}t.one("fullscreenchange",o),t.one("fullscreenerror",l);const c=t.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const n=this.el_[this.fsApi_.requestFullscreen](t);return n&&n.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),n}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),t()}function o(c,d){s(),n(d)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(t,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=_e[this.fsApi_.exitFullscreen]();return e&&Vi(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=_e.documentElement.style.overflow,hi(_e,"keydown",this.boundFullWindowOnEscKey_),_e.documentElement.style.overflow="hidden",Bn(_e.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Ht(_e,"keydown",this.boundFullWindowOnEscKey_),_e.documentElement.style.overflow=this.docOrigOverflow,Oa(_e.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&G.documentPictureInPicture){const e=_e.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Le("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),G.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(i0(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in _e&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(G.documentPictureInPicture&&G.documentPictureInPicture.window)return G.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in _e)return _e.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.hotkeys||(s=>{const a=s.tagName.toLowerCase();if(s.isContentEditable)return!0;const o=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?o.indexOf(s.type)===-1:["textarea"].indexOf(a)!==-1})(this.el_.ownerDocument.activeElement)||(typeof t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=o=>e.key.toLowerCase()==="f",muteKey:s=o=>e.key.toLowerCase()==="m",playPauseKey:a=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=t;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=ue.getComponent("FullscreenToggle");_e[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),ue.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ue.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=Fe.getTech(a);if(o||(o=ue.getComponent(a)),!o){Ge.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(t=o.canPlayType(e),t))return t}return""}selectSource(e){const t=this.options_.techOrder.map(l=>[l,Fe.getTech(l)]).filter(([l,c])=>c?c.isSupported():(Ge.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,d){let g;return l.some(m=>c.some(S=>{if(g=d(m,S),g)return!0})),g};let s;const a=l=>(c,d)=>l(d,c),o=([l,c],d)=>{if(c.canPlaySource(d,this.options_[l.toLowerCase()]))return{source:d,tech:l}};return this.options_.sourceOrder?s=n(e,t,a(o)):s=n(t,e,o),s||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=b0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),wT(this,n[0],(s,a)=>{if(this.middleware_=a,t||(this.cache_.sources=n),this.updateSourceCaches_(s),this.src_(s)){if(n.length>1)return this.handleSrc_(n.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}DT(a,this.tech_)}),n.length>1){const s=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},a=()=>{this.off("error",s)};this.one("error",s),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",s),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return t?d0(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,t){return this.tech_?this.tech_.addSourceElement(e,t):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Vi(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),nn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),t&&t.updateContent(),s&&s.updateContent(),a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(vn("beforeerror").forEach(t=>{const n=t(this,e);if(!(ji(n)&&!Array.isArray(n)||typeof n=="string"||typeof n=="number"||n===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=n}),this.options_.suppressNotSupportedError&&e&&e.code===4){const t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new vt(e),this.addClass("vjs-error"),Ge.error(`(CODE:${this.error_.code} ${vt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),vn("error").forEach(t=>t(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,n;const s=ct(this,this.reportUserActivity),a=function(m){(m.screenX!==t||m.screenY!==n)&&(t=m.screenX,n=m.screenY,s())},o=function(){s(),this.clearInterval(e),e=this.setInterval(s,250)},l=function(m){s(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",a),this.on("mouseup",l),this.on("mouseleave",l);const c=this.getChild("controlBar");c&&!jt&&!Ii&&(c.on("mouseenter",function(m){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),c.on("mouseleave",function(m){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",s),this.on("keyup",s);let d;const g=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(d);const m=this.options_.inactivityTimeout;m<=0||(d=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},m))};this.setInterval(g,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),n=t&&t.currentHeight();e.forEach(s=>{s!==t&&s.el_&&!s.hasClass("vjs-hidden")&&(s.hide(),this.audioOnlyCache_.hiddenChildren.push(s))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),nn(this)&&this.trigger("languagechange"))}languages(){return lt(rt.prototype.options_.languages,this.languages_)}toJSON(){const e=lt(this.options_),t=e.tracks;e.tracks=[];for(let n=0;n<t.length;n++){let s=t[n];s=lt(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,t){t=t||{},t.content=e||"";const n=new vr(this,t);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let n=0;n<hl.length;n++){const s=hl[n],a=this.breakpoints_[s];if(t<=a){if(e===s)return;e&&this.removeClass(Ks[e]),this.addClass(Ks[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},mb,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const t=this.responsive_;if(e!==t)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Ks[this.breakpoint_]||""}loadMedia(e,t){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=lt(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:d,title:g}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:da(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(d)&&d.forEach(m=>this.addRemoteTextTrack(m,!1)),this.titleBar&&this.titleBar.update({title:g,description:o||s||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:t,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:da(s.poster)}]),s}return lt(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},n=dn(e),s=n["data-setup"];if(Kr(e,"vjs-fill")&&(n.fill=!0),Kr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){Ge.error("data-setup",a)}if(Object.assign(t,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],d=c.nodeName.toLowerCase();d==="source"?t.sources.push(dn(c)):d==="track"&&t.tracks.push(dn(c))}}return t}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(t=>typeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}rt.prototype.videoTracks=()=>{};rt.prototype.audioTracks=()=>{};rt.prototype.textTracks=()=>{};rt.prototype.remoteTextTracks=()=>{};rt.prototype.remoteTextTrackEls=()=>{};Jt.names.forEach(function(r){const e=Jt[r];rt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});rt.prototype.crossorigin=rt.prototype.crossOrigin;rt.players={};const jr=G.navigator;rt.prototype.options_={techOrder:Fe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:jr&&(jr.languages&&jr.languages[0]||jr.userLanguage||jr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};Q0.forEach(function(r){rt.prototype[`handleTech${_t(r)}_`]=function(){return this.trigger(r)}});ue.registerComponent("Player",rt);const ha="plugin",Zn="activePlugins_",Gn={},fa=r=>Gn.hasOwnProperty(r),Qs=r=>fa(r)?Gn[r]:void 0,Z0=(r,e)=>{r[Zn]=r[Zn]||{},r[Zn][e]=!0},pa=(r,e,t)=>{const n=(t?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},gb=function(r,e){const t=function(){pa(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return Z0(this,r),pa(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t},Ed=(r,e)=>(e.prototype.name=r,function(...t){pa(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...t);return this[r]=()=>n,pa(this,n.getEventHash()),n});class oi{constructor(e){if(this.constructor===oi)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ul(this),delete this.trigger,c0(this,this.constructor.defaultState),Z0(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return gr(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Zn][e]=!1,this.player=this.state=null,t[e]=Ed(e,Gn[e])}static isBasic(e){const t=typeof e=="string"?Qs(e):e;return typeof t=="function"&&!oi.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(fa(e))Ge.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(rt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return Gn[e]=t,e!==ha&&(oi.isBasic(t)?rt.prototype[e]=gb(e,t):rt.prototype[e]=Ed(e,t)),t}static deregisterPlugin(e){if(e===ha)throw new Error("Cannot de-register base plugin.");fa(e)&&(delete Gn[e],delete rt.prototype[e])}static getPlugins(e=Object.keys(Gn)){let t;return e.forEach(n=>{const s=Qs(n);s&&(t=t||{},t[n]=s)}),t}static getPluginVersion(e){const t=Qs(e);return t&&t.VERSION||""}}oi.getPlugin=Qs;oi.BASE_PLUGIN_NAME=ha;oi.registerPlugin(ha,oi);rt.prototype.usingPlugin=function(r){return!!this[Zn]&&this[Zn][r]===!0};rt.prototype.hasPlugin=function(r){return!!fa(r)};function vb(r,e){let t=!1;return function(...n){return t||Ge.warn(r),t=!0,e.apply(this,n)}}function Oi(r,e,t,n){return vb(`${e} is deprecated and will be removed in ${r}.0; please use ${t} instead.`,n)}var yb={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const J0=r=>r.indexOf("#")===0?r.slice(1):r;function re(r,e,t){let n=re.getPlayer(r);if(n)return e&&Ge.warn(`Player "${r}" is already initialised. Options will not be applied.`),t&&n.ready(t),n;const s=typeof r=="string"?yn("#"+J0(r)):r;if(!mr(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");const o=("getRootNode"in s?s.getRootNode()instanceof G.ShadowRoot:!1)?s.getRootNode():s.ownerDocument.body;(!s.ownerDocument.defaultView||!o.contains(s))&&Ge.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),vn("beforesetup").forEach(c=>{const d=c(s,lt(e));if(!ji(d)||Array.isArray(d)){Ge.error("please return an object in beforesetup hooks");return}e=lt(e,d)});const l=ue.getComponent("Player");return n=new l(s,e,t),vn("setup").forEach(c=>c(n)),n}re.hooks_=Ji;re.hooks=vn;re.hook=Z3;re.hookOnce=J3;re.removeHook=Mh;if(G.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&pr()){let r=yn(".vjs-styles-defaults");if(!r){r=s0("vjs-styles-defaults");const e=yn("head");e&&e.insertBefore(r,e.firstChild),a0(r,`
192
+ .video-js {
193
+ width: 300px;
194
+ height: 150px;
195
+ }
196
+
197
+ .vjs-fluid:not(.vjs-audio-only-mode) {
198
+ padding-top: 56.25%
199
+ }
200
+ `)}}sl(1,re);re.VERSION=tl;re.options=rt.prototype.options_;re.getPlayers=()=>rt.players;re.getPlayer=r=>{const e=rt.players;let t;if(typeof r=="string"){const n=J0(r),s=e[n];if(s)return s;t=yn("#"+n)}else t=r;if(mr(t)){const{player:n,playerId:s}=t;if(n||e[s])return n||e[s]}};re.getAllPlayers=()=>Object.keys(rt.players).map(r=>rt.players[r]).filter(Boolean);re.players=rt.players;re.getComponent=ue.getComponent;re.registerComponent=(r,e)=>(Fe.isTech(e)&&Ge.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ue.registerComponent.call(ue,r,e));re.getTech=Fe.getTech;re.registerTech=Fe.registerTech;re.use=kT;Object.defineProperty(re,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(re.middleware,"TERMINATOR",{value:ca,writeable:!1,enumerable:!0});re.browser=Hh;re.obj=iT;re.mergeOptions=Oi(9,"videojs.mergeOptions","videojs.obj.merge",lt);re.defineLazyProperty=Oi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",wa);re.bind=Oi(9,"videojs.bind","native Function.prototype.bind",ct);re.registerPlugin=oi.registerPlugin;re.deregisterPlugin=oi.deregisterPlugin;re.plugin=(r,e)=>(Ge.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),oi.registerPlugin(r,e));re.getPlugins=oi.getPlugins;re.getPlugin=oi.getPlugin;re.getPluginVersion=oi.getPluginVersion;re.addLanguage=function(r,e){return r=(""+r).toLowerCase(),re.options.languages=lt(re.options.languages,{[r]:e}),re.options.languages[r]};re.log=Ge;re.createLogger=Ph;re.time=vT;re.createTimeRange=Oi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Ni);re.createTimeRanges=Oi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Ni);re.formatTime=Oi(9,"videojs.formatTime","videojs.time.formatTime",Rn);re.setFormatTime=Oi(9,"videojs.setFormatTime","videojs.time.setFormatTime",f0);re.resetFormatTime=Oi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",p0);re.parseUrl=Oi(9,"videojs.parseUrl","videojs.url.parseUrl",zl);re.isCrossOrigin=Oi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Fa);re.EventTarget=fi;re.any=$l;re.on=hi;re.one=Ra;re.off=Ht;re.trigger=gr;re.xhr=Th;re.TrackList=Vn;re.TextTrack=ls;re.TextTrackList=jl;re.AudioTrack=_0;re.AudioTrackList=g0;re.VideoTrack=T0;re.VideoTrackList=v0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{re[r]=function(){return Ge.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),n0[r].apply(null,arguments)}});re.computedStyle=Oi(9,"videojs.computedStyle","videojs.dom.computedStyle",dr);re.dom=n0;re.fn=dT;re.num=WT;re.str=mT;re.url=ST;re.Error=yb;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class _b{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(n){t.enabled_(n)}}),t}}class ma extends re.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new _b(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,n=this.length;t<n;t++){const s=this[t];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ma.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ma.prototype.allowedEvents_)ma.prototype["on"+r]=null;var ef="4.1.0";const Tb=function(r,e){const t=r.qualityLevels,n=new ma,s=function(){n.dispose(),r.qualityLevels=t,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=ef,n},tf=function(r){return Tb(this,re.obj.merge({},r))};re.registerPlugin("qualityLevels",tf);tf.VERSION=ef;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const si=Ca,ga=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,xi=r=>re.log.debug?re.log.debug.bind(re,"VHS:",`${r} >`):function(){};function st(...r){const e=re.obj||re;return(e.merge||e.mergeOptions).apply(e,r)}function Mt(...r){const e=re.time||re;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function bb(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
201
+ `;for(let t=0;t<r.length;t++){const n=r.start(t),s=r.end(t);e+=`${n} --> ${s}. Duration (${s-n})
202
+ `}return e}const Fi=1/30,$i=Fi*3,nf=function(r,e){const t=[];let n;if(r&&r.length)for(n=0;n<r.length;n++)e(r.start(n),r.end(n))&&t.push([r.start(n),r.end(n)]);return Mt(t)},Wn=function(r,e){return nf(r,function(t,n){return t-$i<=e&&n+$i>=e})},Us=function(r,e){return nf(r,function(t){return t-Fi>=e})},xb=function(r){if(r.length<2)return Mt();const e=[];for(let t=1;t<r.length;t++){const n=r.end(t-1),s=r.start(t);e.push([n,s])}return Mt(e)},Cb=function(r,e){let t=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Mt();let l=r.length;for(;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(a.sort(function(c,d){return c.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(t=a[l].time)):a[l].type==="end"&&(s--,s===1&&(n=a[l].time)),t!==null&&n!==null&&(o.push([t,n]),t=null,n=null);return Mt(o)},rf=r=>{const e=[];if(!r||!r.length)return"";for(let t=0;t<r.length;t++)e.push(r.start(t)+" => "+r.end(t));return e.join(", ")},Sb=function(r,e,t=1){return((r.length?r.end(r.length-1):0)-e)/t},Nn=r=>{const e=[];for(let t=0;t<r.length;t++)e.push({start:r.start(t),end:r.end(t)});return e},Eb=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let t=0;t<r.length;t++)if(r.start(t)!==e.start(t)||r.end(t)!==e.end(t))return!0;return!1},Ho=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},lu=function(r,e){let t=0;if(!r||!r.length)return t;for(let n=0;n<r.length;n++){const s=r.start(n),a=r.end(n);if(!(e>a)){if(e>s&&e<=a){t+=a-e;continue}t+=a-s}}return t},uu=(r,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(n){t+=n.duration}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(t+=r.partTargetDuration)}),t},fl=r=>(r.segments||[]).reduce((e,t,n)=>(t.parts?t.parts.forEach(function(s,a){e.push({duration:s.duration,segmentIndex:n,partIndex:a,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e),[]),sf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},af=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:t}=r;let n=(t||[]).reduce((s,a)=>s+(a.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n},of=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=sf(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},kb=function(r,e){let t=0,n=e-r.mediaSequence,s=r.segments[n];if(s){if(typeof s.start<"u")return{result:s.start,precise:!0};if(typeof s.end<"u")return{result:s.end-s.duration,precise:!0}}for(;n--;){if(s=r.segments[n],typeof s.end<"u")return{result:t+s.end,precise:!0};if(t+=uu(r,s),typeof s.start<"u")return{result:t+s.start,precise:!0}}return{result:t,precise:!1}},wb=function(r,e){let t=0,n,s=e-r.mediaSequence;for(;s<r.segments.length;s++){if(n=r.segments[s],typeof n.start<"u")return{result:n.start-t,precise:!0};if(t+=uu(r,n),typeof n.end<"u")return{result:n.end-t,precise:!0}}return{result:-1,precise:!1}},lf=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=kb(r,e);if(n.precise)return n.result;const s=wb(r,e);return s.precise?s.result:n.result+t},uf=function(r,e,t){if(!r)return 0;if(typeof t!="number"&&(t=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return G.Infinity}return lf(r,e,t)},Jr=function({defaultDuration:r,durationList:e,startIndex:t,endIndex:n}){let s=0;if(t>n&&([t,n]=[n,t]),t<0){for(let a=t;a<Math.min(0,n);a++)s+=r;t=0}for(let a=t;a<n;a++)s+=e[a].duration;return s},cf=function(r,e,t,n){if(!r||!r.segments)return null;if(r.endList)return uf(r);if(e===null)return null;e=e||0;let s=lf(r,r.mediaSequence+r.segments.length,e);return t&&(n=typeof n=="number"?n:of(null,r),s-=n),Math.max(0,s)},Db=function(r,e,t){const s=e||0;let a=cf(r,e,!0,t);return a===null?Mt():(a<s&&(a=s),Mt(s,a))},Ab=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=fl(r);let c=0;for(let d=0;d<l.length;d++){const g=l[d];if(t===g.segmentIndex&&!(typeof n=="number"&&typeof g.partIndex=="number"&&n!==g.partIndex)){c=d;break}}if(o<0){if(c>0)for(let d=c-1;d>=0;d--){const g=l[d];if(o+=g.duration,a){if(o<0)continue}else if(o+Fi<=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s-Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let d=c;d<0;d++)if(o-=r.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e};c=0}for(let d=c;d<l.length;d++){const g=l[d];o-=g.duration;const m=g.duration>Fi,S=o===0,T=m&&o+Fi>=0;if(!((S||T)&&d!==l.length-1)){if(a){if(o>0)continue}else if(o-Fi>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},df=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},cu=function(r){return r.excludeUntil&&r.excludeUntil===1/0},ja=function(r){const e=df(r);return!r.disabled&&!e},Nb=function(r){return r.disabled},Ib=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},hf=function(r,e){return e.attributes&&e.attributes[r]},Ob=function(r,e,t,n=0){return hf("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-n*8)/e:NaN},pl=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>ja(n)?(n.attributes.BANDWIDTH||0)<t:!1).length===0},du=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),kd=function(r,e){const t=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let n=!1;for(const s in t){for(const a in t[s])if(n=e(t[s][a]),n)break;if(n)break}return!!n},hs=r=>{if(!r||!r.playlists||!r.playlists.length)return kd(r,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;e<r.playlists.length;e++){const t=r.playlists[e],n=t.attributes&&t.attributes.CODECS;if(!(n&&n.split(",").every(a=>Ch(a))||kd(r,a=>du(t,a))))return!1}return!0};var ai={liveEdgeDelay:of,duration:uf,seekable:Db,getMediaInfoForTime:Ab,isEnabled:ja,isDisabled:Nb,isExcluded:df,isIncompatible:cu,playlistEnd:cf,isAes:Ib,hasAttribute:hf,estimateSegmentRequestTime:Ob,isLowestEnabledRendition:pl,isAudioOnly:hs,playlistMatch:du,segmentDurationWithParts:uu};const{log:ff}=re,Jn=(r,e)=>`${r}-${e}`,pf=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,Bb=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new T_;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(d=>o.addParser(d)),s.forEach(d=>o.addTagMapper(d)),o.push(t),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){l.hasOwnProperty(d)&&delete l[d]}),l.segments&&l.segments.forEach(function(d){["parts","preloadHints"].forEach(function(g){d.hasOwnProperty(g)&&delete d[g]})})),!l.targetDuration){let d=10;l.segments&&l.segments.length&&(d=l.segments.reduce((g,m)=>Math.max(g,m.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${d}`}),l.targetDuration=d}const c=sf(l);if(c.length&&!l.partTargetDuration){const d=c.reduce((g,m)=>Math.max(g,m.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${d}`}),ff.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=d}return l},Tr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(r.mediaGroups[t])for(const n in r.mediaGroups[t])for(const s in r.mediaGroups[t][n]){const a=r.mediaGroups[t][n][s];e(a,t,n,s)}})},mf=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},Lb=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];mf({playlist:t,id:Jn(e,t.uri)}),t.resolvedUri=si(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||ff.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Mb=r=>{Tr(r,e=>{e.uri&&(e.resolvedUri=si(r.uri,e.uri))})},Pb=(r,e)=>{const t=Jn(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:G.location.href,resolvedUri:G.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return n.playlists[t]=n.playlists[0],n.playlists[e]=n.playlists[0],n},gf=(r,e,t=pf)=>{r.uri=e;for(let s=0;s<r.playlists.length;s++)if(!r.playlists[s].uri){const a=`placeholder-uri-${s}`;r.playlists[s].uri=a}const n=hs(r);Tr(r,(s,a,o,l)=>{if(!s.playlists||!s.playlists.length){if(n&&a==="AUDIO"&&!s.uri)for(let c=0;c<r.playlists.length;c++){const d=r.playlists[c];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===o)return}s.playlists=[xt({},s)]}s.playlists.forEach(function(c,d){const g=t(a,o,l,c),m=Jn(d,g);c.uri?c.resolvedUri=c.resolvedUri||si(r.uri,c.uri):(c.uri=d===0?g:m,c.resolvedUri=c.uri),c.id=c.id||m,c.attributes=c.attributes||{},r.playlists[c.id]=c,r.playlists[c.uri]=c})}),Lb(r),Mb(r)};class wd{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[t]=e;t.programDateTime!==void 0&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,n=t.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce((s,a)=>(s.set(a.id,a),s),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},t=[];this.pendingDateRanges_.forEach((n,s)=>{if(!this.processedDateRanges_.has(s)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),t.push(n),!!n.class))if(e[n.class]){const a=e[n.class].push(n);n.classListIndex=a-1}else e[n.class]=[n],n.classListIndex=0});for(const n of t){const s=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&s[n.classListIndex+1]?n.endTime=s[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,s)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(s)})}}const vf=22,Pn=({requestType:r,request:e,error:t,parseFailure:n})=>{const s=e.status<200||e.status>299,a=e.status>=400&&e.status<=499,o={uri:e.uri,requestType:r},l=s&&!a||n;if(t&&a)o.error=xt({},t),o.errorType=re.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=re.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=re.Error.NetworkRequestTimeout;else if(l){const c=n?re.Error.NetworkBodyParserFailed:re.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},Rb=xi("CodecUtils"),yf=function(r){const e=r.attributes||{};if(e.CODECS)return Pi(e.CODECS)},_f=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},Vb=(r,e)=>{if(!_f(r,e))return!0;const t=e.attributes||{},n=r.mediaGroups.AUDIO[t.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1},as=function(r){const e={};return r.forEach(({mediaType:t,type:n,details:s})=>{e[t]=e[t]||[],e[t].push(xh(`${n}${s}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){Rb(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},Dd=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},es=function(r,e){const t=e.attributes||{},n=as(yf(e)||[]);if(_f(r,e)&&!n.audio&&!Vb(r,e)){const s=as(x_(r,t.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:Fb}=re,$b=(r,e)=>{if(e.endList||!e.serverControl)return r;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:n}=e;let s=e.mediaSequence+e.segments.length;if(n){const a=n.parts||[],o=af(e)-1;o>-1&&o!==a.length-1&&(t._HLS_part=o),(o>-1||a.length)&&s--}t._HLS_msn=s}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const n=new G.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(s){t.hasOwnProperty(s)&&n.searchParams.set(s,t[s])}),r=n.toString()}return r},Ub=(r,e)=>{if(!r)return e;const t=st(r,e);if(r.preloadHints&&!e.preloadHints&&delete t.preloadHints,r.parts&&!e.parts)delete t.parts;else if(r.parts&&e.parts)for(let n=0;n<e.parts.length;n++)r.parts&&r.parts[n]&&(t.parts[n]=st(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},qb=(r,e,t)=>{const n=r.slice(),s=e.slice();t=t||0;const a=[];let o;for(let l=0;l<s.length;l++){const c=n[l+t],d=s[l];c?(o=c.map||o,a.push(Ub(c,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},Tf=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=si(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=si(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=si(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=si(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))})},bf=function(r){const e=r.segments||[],t=r.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let n=0;n<t.preloadHints.length;n++)if(t.preloadHints[n].type==="MAP")return e}t.duration=r.targetDuration,t.preload=!0,e.push(t)}return e},xf=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,ml=(r,e,t=xf)=>{const n=st(r,{}),s=n.playlists[e.id];if(!s||t(s,e))return null;e.segments=bf(e);const a=st(s,e);if(a.preloadSegment&&!e.preloadSegment&&delete a.preloadSegment,s.segments){if(e.skip){e.segments=e.segments||[];for(let o=0;o<e.skip.skippedSegments;o++)e.segments.unshift({skipped:!0})}a.segments=qb(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{Tf(o,a.resolvedUri)});for(let o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=a);return n.playlists[e.id]=a,n.playlists[e.uri]=a,Tr(r,(o,l,c,d)=>{if(o.playlists)for(let g=0;g<o.playlists.length;g++)e.id===o.playlists[g].id&&(o.playlists[g]=a)}),n},gl=(r,e)=>{const t=r.segments||[],n=t[t.length-1],s=n&&n.parts&&n.parts[n.parts.length-1],a=s&&s.duration||n&&n.duration;return e&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},Ad=(r,e,t)=>{if(!r)return;const n=[];return r.forEach(s=>{if(!s.attributes)return;const{BANDWIDTH:a,RESOLUTION:o,CODECS:l}=s.attributes;n.push({id:s.id,bandwidth:a,resolution:o,codecs:l})}),{type:e,isLive:t,renditions:n}};class Yn extends Fb{constructor(e,t,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=xi("PlaylistLoader");const{withCredentials:s=!1}=n;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const a=t.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new wd,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=si(this.main.uri,e.uri);this.llhls&&(t=$b(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},(n,s)=>{if(this.request){if(n)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,t,n){const{uri:s,id:a}=t;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[a],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Pn({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{const n=Bb({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${e}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${e}: ${s}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!n.playlists||!n.playlists.length||this.excludeAudioOnlyVariants(n.playlists),n}catch(n){this.error=n,this.error.metadata={errorType:re.Error.StreamingHlsPlaylistParserError,error:n}}}excludeAudioOnlyVariants(e){const t=n=>{const s=n.attributes||{},{width:a,height:o}=s.RESOLUTION||{};if(a&&o)return!0;const l=yf(n)||[];return!!as(l).video};e.some(t)&&e.forEach(n=>{t(n)||(n.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,url:n,id:s}){this.request=null,this.state="HAVE_METADATA";const a={playlistInfo:{type:"media",uri:n}};this.trigger({type:"playlistparsestart",metadata:a});const o=t||this.parseManifest_({url:n,manifestString:e});o.lastRequest=Date.now(),mf({playlist:o,uri:n,id:s});const l=ml(this.main,o);this.targetDuration=o.partTargetDuration||o.targetDuration,this.pendingMedia_=null,l?(this.main=l,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(gl(this.media(),!!l)),a.parsedPlaylist=Ad(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),G.clearTimeout(this.mediaUpdateTimeout),G.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new wd,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(G.clearTimeout(this.finalRenditionTimeout),t){const l=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=G.setTimeout(this.media.bind(this,e,!1),l);return}const n=this.state,s=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,s&&(this.trigger("mediachanging"),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(gl(e,!0)),!s)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(l,c)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=ga(e.resolvedUri,c),l)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:c.responseText,url:e.uri,id:e.id}),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const n=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=G.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},n);return}if(!this.started){this.start();return}t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=G.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=G.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(t,n)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:n.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:n.responseText,code:2,metadata:Pn({requestType:n.requestType,request:n,error:t})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=ga(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Ad(s.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,gf(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=bf(n),n.segments.forEach(s=>{Tf(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||G.location.href;this.main=Pb(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const n=this.main,s=e.ID;let a=n.playlists.length;for(;a--;){const o=n.playlists[a];if(o.attributes["PATHWAY-ID"]===s){const l=o.resolvedUri,c=o.id;if(t){const d=this.createCloneURI_(o.resolvedUri,e),g=Jn(s,d),m=this.createCloneAttributes_(s,o.attributes),S=this.createClonePlaylist_(o,g,e,m);n.playlists[a]=S,n.playlists[g]=S,n.playlists[d]=S}else n.playlists.splice(a,1);delete n.playlists[c],delete n.playlists[l]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const n=this.main,s=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!n.mediaGroups[a]||!n.mediaGroups[a][s])){for(const o in n.mediaGroups[a])if(o===s){for(const l in n.mediaGroups[a][o])n.mediaGroups[a][o][l].playlists.forEach((d,g)=>{const m=n.playlists[d.id],S=m.id,T=m.resolvedUri;delete n.playlists[S],delete n.playlists[T]});delete n.mediaGroups[a][o]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const n=this.main,s=n.playlists.length,a=this.createCloneURI_(t.resolvedUri,e),o=Jn(e.ID,a),l=this.createCloneAttributes_(e.ID,t.attributes),c=this.createClonePlaylist_(t,o,e,l);n.playlists[s]=c,n.playlists[o]=c,n.playlists[a]=c,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,n=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!s.mediaGroups[a]||s.mediaGroups[a][t]))for(const o in s.mediaGroups[a]){if(o===n)s.mediaGroups[a][t]={};else continue;for(const l in s.mediaGroups[a][o]){const c=s.mediaGroups[a][o][l];s.mediaGroups[a][t][l]=xt({},c);const d=s.mediaGroups[a][t][l],g=this.createCloneURI_(c.resolvedUri,e);d.resolvedUri=g,d.uri=g,d.playlists=[],c.playlists.forEach((m,S)=>{const T=s.playlists[m.id],C=pf(a,t,l),y=Jn(t,C);if(T&&!s.playlists[y]){const k=this.createClonePlaylist_(T,y,e),O=k.resolvedUri;s.playlists[y]=k,s.playlists[O]=k}d.playlists[S]=this.createClonePlaylist_(m,y,e)})}}})}createClonePlaylist_(e,t,n,s){const a=this.createCloneURI_(e.resolvedUri,n),o={resolvedUri:a,uri:a,id:t};return e.segments&&(o.segments=[]),s&&(o.attributes=s),st(e,o)}createCloneURI_(e,t){const n=new URL(e);n.hostname=t["URI-REPLACEMENT"].HOST;const s=t["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(s))n.searchParams.set(a,s[a]);return n.href}createCloneAttributes_(e,t){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{t[s]&&(n[s]=e)}),n}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;for(const n in e.contentProtection)if(e.contentProtection[n]&&e.contentProtection[n].attributes&&e.contentProtection[n].attributes.keyId){const s=e.contentProtection[n].attributes.keyId;t.add(s.toLowerCase())}return t}}const vl=function(r,e,t,n){const s=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&s&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=s.byteLength||s.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),t.headers&&(r.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(s||r.responseText)))),n(e,r)},jb=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(n=>{t=n(t)}),t},Hb=(r,e,t,n)=>{!r||!r.size||r.forEach(s=>{s(e,t,n)})},Cf=function(){const r=function e(t,n){t=st({timeout:45e3},t);const s=e.beforeRequest||re.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||re.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||re.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(re.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=re.Vhs.xhr.original===!0?re.xhr:re.Vhs.xhr,c=jb(a,t);a.delete(s);const d=l(c||t,function(m,S){return Hb(o,d,m,S),vl(d,m,S,n)}),g=d.abort;return d.abort=function(){return d.aborted=!0,g.apply(d,arguments)},d.uri=t.uri,d.requestType=t.requestType,d.requestTime=Date.now(),d};return r.original=!0,r},zb=function(r){let e;const t=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,"bytes="+t+"-"+e},yl=function(r){const e={};return r.byterange&&(e.Range=zb(r.byterange)),e},Gb=function(r,e){return r.start(e)+"-"+r.end(e)},Wb=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},Yb=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},Sf=function(r){const e={};return Object.keys(r).forEach(t=>{const n=r[t];Eh(n)?e[t]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[t]=n}),e},va=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},Ef=function(r){return r.resolvedUri},kf=r=>{const e=Array.prototype.slice.call(r),t=16;let n="",s,a;for(let o=0;o<e.length/t;o++)s=e.slice(o*t,o*t+t).map(Wb).join(""),a=e.slice(o*t,o*t+t).map(Yb).join(""),n+=s+" "+a+`
203
+ `;return n},Xb=({bytes:r})=>kf(r),Kb=r=>{let e="",t;for(t=0;t<r.length;t++)e+=Gb(r,t)+" ";return e};var Qb=Object.freeze({__proto__:null,createTransferableMessage:Sf,initSegmentId:va,segmentKeyId:Ef,hexDump:kf,tagDump:Xb,textRanges:Kb});const wf=.25,Zb=(r,e)=>{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,s=e.videoTimingInfo.transmuxedPresentationStart+t,a=r-s;return new Date(e.dateTimeObject.getTime()+a*1e3)},Jb=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,e4=(r,e)=>{let t;try{t=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(t<new Date(n.dateTimeObject))return null;for(let c=0;c<e.segments.length-1;c++){n=e.segments[c];const d=new Date(e.segments[c+1].dateTimeObject);if(t<d)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?Jb(s.videoTimingInfo):s.duration+s.duration*wf,l=new Date(a.getTime()+o*1e3);return t>l?null:(t>new Date(a)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:ai.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},t4=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,n;for(let a=0;a<e.segments.length&&(n=e.segments[a],t=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:t+n.duration,!(r<=t));a++);const s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>t){if(r>t+s.duration*wf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:t-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},i4=(r,e)=>{let t,n;try{t=new Date(r),n=new Date(e)}catch{}const s=t.getTime();return(n.getTime()-s)/1e3},n4=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},r4=({playlist:r,time:e=void 0,callback:t})=>{if(!t)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const n=t4(e,r);if(!n)return t({message:"valid programTime was not found"});if(n.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:e},a=Zb(e,n.segment);return a&&(s.programDateTime=a.toISOString()),t(null,s)},Df=({programTime:r,playlist:e,retryCount:t=2,seekTo:n,pauseAfterSeek:s=!0,tech:a,callback:o})=>{if(!o)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!n)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!a.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!n4(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=e4(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,d=i4(c.dateTimeObject,r);if(l.type==="estimate"){if(t===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+d),a.one("seeked",()=>{Df({programTime:r,playlist:e,retryCount:t-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const g=c.start+d,m=()=>o(null,a.currentTime());a.one("seeked",m),s&&a.pause(),n(g)},zo=(r,e)=>{if(r.readyState===4)return e()},s4=(r,e,t,n)=>{let s=[],a,o=!1;const l=function(m,S,T,C){return S.abort(),o=!0,t(m,S,T,C)},c=function(m,S){if(o)return;if(m)return m.metadata=Pn({requestType:n,request:S,error:m}),l(m,S,"",s);const T=S.responseText.substring(s&&s.byteLength||0,S.responseText.length);if(s=O_(s,kh(T,!0)),a=a||Gr(s),s.length<10||a&&s.length<a+2)return zo(S,()=>l(m,S,"",s));const C=Ml(s);return C==="ts"&&s.length<188?zo(S,()=>l(m,S,"",s)):!C&&s.length<376?zo(S,()=>l(m,S,"",s)):l(null,S,C,s)},g=e({uri:r,beforeSend(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function({total:S,loaded:T}){return vl(m,null,{statusCode:m.status},c)})}},function(m,S){return vl(g,m,S,c)});return g},{EventTarget:a4}=re,Nd=function(r,e){if(!xf(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let t=0;t<r.segments.length;t++){const n=r.segments[t],s=e.segments[t];if(n.uri!==s.uri)return!1;if(!n.byterange&&!s.byterange)continue;const a=n.byterange,o=s.byterange;if(a&&!o||!a&&o||a.offset!==o.offset||a.length!==o.length)return!1}return!0},o4=(r,e,t,n)=>{const s=n.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${s}`},l4=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:n,previousManifest:s})=>{const a=N3(r,{manifestUri:e,clientOffset:t,sidxMapping:n,previousManifest:s});return gf(a,e,o4),a},u4=(r,e)=>{Tr(r,(t,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},c4=(r,e,t)=>{let n=!0,s=st(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let a=0;a<e.playlists.length;a++){const o=e.playlists[a];if(o.sidx){const c=Ea(o.sidx);t&&t[c]&&t[c].sidx&&Ol(o,t[c].sidx,o.sidx.resolvedUri)}const l=ml(s,o,Nd);l&&(s=l,n=!1)}return Tr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const d=a.playlists[0].id,g=ml(s,a.playlists[0],Nd);g&&(s=g,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[d],n=!1)}}),u4(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},d4=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,Id=(r,e)=>{const t={};for(const n in r){const a=r[n].sidx;if(a){const o=Ea(a);if(!e[o])break;const l=e[o].sidxInfo;d4(l,a)&&(t[o]=e[o])}}return t},h4=(r,e)=>{let n=Id(r.playlists,e);return Tr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=st(n,Id(c,e))}}),n};class _l extends a4{constructor(e,t,n={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:a=!1}=n;if(this.vhs_=t,this.withCredentials=a,this.addMetadataToTextTrack=n.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=xi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,n){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},n&&(this.state=n),this.trigger("error"),!0}addSidxSegments_(e,t,n){const s=e.sidx&&Ea(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.setTimeout(()=>n(!1),0);return}const a=ga(e.sidx.resolvedUri),o=(c,d)=>{if(this.requestErrored_(c,d,t))return;const g=this.mainPlaylistLoader_.sidxMapping_,{requestType:m}=d;let S;try{S=M3(Be(d.response).subarray(8))}catch(T){T.metadata=Pn({requestType:m,request:d,parseFailure:!0}),this.requestErrored_(T,d,t);return}return g[s]={sidxInfo:e.sidx,sidx:S},Ol(e,S,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=s4(a,this.vhs_.xhr,(c,d,g,m)=>{if(c)return o(c,d);if(!g||g!=="mp4"){const C=g||"unknown";return o({status:d.status,message:`Unsupported ${C} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},d)}const{offset:S,length:T}=e.sidx.byterange;if(m.length>=T+S)return o(c,{response:m.subarray(S,S+T),status:d.status,uri:d.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:yl({byterange:e.sidx.byterange})},o)},l)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},G.clearTimeout(this.minimumUpdatePeriodTimeout_),G.clearTimeout(this.mediaRequest_),G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,s=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,G.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(G.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const n=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=G.setTimeout(()=>this.load(),n);return}if(!this.started){this.start();return}t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(n,s)=>{if(n){const{requestType:o}=s;n.metadata=Pn({requestType:o,request:s,error:n})}if(this.requestErrored_(n,s)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:t});const a=s.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=ga(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const t=I3(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:si(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(n,s)=>{if(!this.request)return;if(n){const{requestType:o}=s;return this.error.metadata=Pn({requestType:o,request:s,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let a;t.method==="HEAD"?!s.responseHeaders||!s.responseHeaders.date?a=this.mainLoaded_:a=Date.parse(s.responseHeaders.date):a=Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=a-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:t});let n;try{n=l4({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:re.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=c4(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:a,endList:o}=n,l=[];n.playlists.forEach(d=>{l.push({id:d.id,bandwidth:d.attributes.BANDWIDTH,resolution:d.attributes.RESOLUTION,codecs:d.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};t.parsedManifest=c,this.trigger({type:"manifestparsecomplete",metadata:t})}return!!n}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(G.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=G.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=h4(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,n=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==t[e];if(n?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const s=()=>{this.media().endList||(this.mediaUpdateTimeout=G.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},gl(this.media(),!!n)))};s()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const n in e.contentProtection){const s=e.contentProtection[n].attributes["cenc:default_KID"];s&&t.add(s.replace(/-/g,"").toLowerCase())}return t}}}var Bt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const f4=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer},Af=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},p4=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const t=new BlobBuilder;return t.append(r),URL.createObjectURL(t.getBlob())}},Nf=function(r){return function(){const e=p4(r),t=Af(new Worker(e));t.objURL=e;const n=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},t}},If=function(r){return`var browserWorkerPolyFill = ${Af.toString()};
204
+ browserWorkerPolyFill(self);
205
+ `+r},Of=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},m4=If(Of(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,v,_;if(p=u[h],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var t=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,g,m,S,T,C,y,k,O,I,D,q,$,U,N,z,b,E,P,Q,L,V,M,j,F,Y,K,J,Z,ie,ae,fe,ce,Ae;(function(){var u;if(L={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(u in L)L.hasOwnProperty(u)&&(L[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);V=new Uint8Array([105,115,111,109]),j=new Uint8Array([97,118,99,49]),M=new Uint8Array([0,0,0,1]),F=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Y=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),K={video:F,audio:Y},ie=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Z=new Uint8Array([0,0,0,0,0,0,0,0]),ae=new Uint8Array([0,0,0,0,0,0,0,0]),fe=ae,ce=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ae=ae,J=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,v,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(v=new Uint8Array(p+8),_=new DataView(v.buffer,v.byteOffset,v.byteLength),_.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<h.length;f++)v.set(h[f],p),p+=h[f].byteLength;return v},c=function(){return l(L.dinf,l(L.dref,ie))},d=function(u){return l(L.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,u.audioobjecttype<<3|u.samplingfrequencyindex>>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},g=function(){return l(L.ftyp,V,M,V,j)},U=function(u){return l(L.hdlr,K[u])},m=function(u){return l(L.mdat,u)},$=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(L.mdhd,h)},q=function(u){return l(L.mdia,$(u),U(u.type),T(u))},S=function(u){return l(L.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(L.minf,u.type==="video"?l(L.vmhd,J):l(L.smhd,Z),c(),z(u))},C=function(u,h){for(var p=[],f=h.length;f--;)p[f]=E(h[f]);return l.apply(null,[L.moof,S(u)].concat(p))},y=function(u){for(var h=u.length,p=[];h--;)p[h]=I(u[h]);return l.apply(null,[L.moov,O(4294967295)].concat(p).concat(k(u)))},k=function(u){for(var h=u.length,p=[];h--;)p[h]=P(u[h]);return l.apply(null,[L.mvex].concat(p))},O=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(L.mvhd,h)},N=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,v;for(v=0;v<h.length;v++)f=h[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(L.sdtp,p)},z=function(u){return l(L.stbl,b(u),l(L.stts,Ae),l(L.stsc,fe),l(L.stsz,ce),l(L.stco,ae))},(function(){var u,h;b=function(p){return l(L.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],v=p.pps||[],_=[],B=[],R,H;for(R=0;R<f.length;R++)_.push((f[R].byteLength&65280)>>>8),_.push(f[R].byteLength&255),_=_.concat(Array.prototype.slice.call(f[R]));for(R=0;R<v.length;R++)B.push((v[R].byteLength&65280)>>>8),B.push(v[R].byteLength&255),B=B.concat(Array.prototype.slice.call(v[R]));if(H=[L.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(p.width&65280)>>8,p.width&255,(p.height&65280)>>8,p.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(L.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[v.length],B))),l(L.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var W=p.sarRatio[0],te=p.sarRatio[1];H.push(l(L.pasp,new Uint8Array([(W&4278190080)>>24,(W&16711680)>>16,(W&65280)>>8,W&255,(te&4278190080)>>24,(te&16711680)>>16,(te&65280)>>8,te&255])))}return l.apply(null,H)},h=function(p){return l(L.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),D=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(L.tkhd,h)},E=function(u){var h,p,f,v,_,B,R;return h=l(L.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),B=Math.floor(u.baseMediaDecodeTime/o),R=Math.floor(u.baseMediaDecodeTime%o),p=l(L.tfdt,new Uint8Array([1,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,R>>>24&255,R>>>16&255,R>>>8&255,R&255])),_=92,u.type==="audio"?(f=Q(u,_),l(L.traf,h,p,f)):(v=N(u),f=Q(u,v.length+_),l(L.traf,h,p,f,v))},I=function(u){return u.duration=u.duration||4294967295,l(L.trak,D(u),q(u))},P=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(L.trex,h)},(function(){var u,h,p;p=function(f,v){var _=0,B=0,R=0,H=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(B=2),f[0].flags!==void 0&&(R=4),f[0].compositionTimeOffset!==void 0&&(H=8)),[0,0,_|B|R|H,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},h=function(f,v){var _,B,R,H,W,te;for(H=f.samples||[],v+=20+16*H.length,R=p(H,v),B=new Uint8Array(R.length+H.length*16),B.set(R),_=R.length,te=0;te<H.length;te++)W=H[te],B[_++]=(W.duration&4278190080)>>>24,B[_++]=(W.duration&16711680)>>>16,B[_++]=(W.duration&65280)>>>8,B[_++]=W.duration&255,B[_++]=(W.size&4278190080)>>>24,B[_++]=(W.size&16711680)>>>16,B[_++]=(W.size&65280)>>>8,B[_++]=W.size&255,B[_++]=W.flags.isLeading<<2|W.flags.dependsOn,B[_++]=W.flags.isDependedOn<<6|W.flags.hasRedundancy<<4|W.flags.paddingValue<<1|W.flags.isNonSyncSample,B[_++]=W.flags.degradationPriority&61440,B[_++]=W.flags.degradationPriority&15,B[_++]=(W.compositionTimeOffset&4278190080)>>>24,B[_++]=(W.compositionTimeOffset&16711680)>>>16,B[_++]=(W.compositionTimeOffset&65280)>>>8,B[_++]=W.compositionTimeOffset&255;return l(L.trun,B)},u=function(f,v){var _,B,R,H,W,te;for(H=f.samples||[],v+=20+8*H.length,R=p(H,v),_=new Uint8Array(R.length+H.length*8),_.set(R),B=R.length,te=0;te<H.length;te++)W=H[te],_[B++]=(W.duration&4278190080)>>>24,_[B++]=(W.duration&16711680)>>>16,_[B++]=(W.duration&65280)>>>8,_[B++]=W.duration&255,_[B++]=(W.size&4278190080)>>>24,_[B++]=(W.size&16711680)>>>16,_[B++]=(W.size&65280)>>>8,_[B++]=W.size&255;return l(L.trun,_)},Q=function(f,v){return f.type==="audio"?u(f,v):h(f,v)}})();var we={ftyp:g,mdat:m,moof:C,moov:y,initSegment:function(u){var h=g(),p=y(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},Ne=function(u){var h,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f)),f=[p],f.byteLength=p.data.byteLength,f.pts=p.pts,f.dts=p.dts):(p.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(f.keyFrame=!0),f.duration=p.dts-f.dts,f.byteLength+=p.data.byteLength,f.push(p));return v.length&&(!f.duration||f.duration<=0)&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f),v},Pe=function(u){var h,p,f=[],v=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=u[0].pts,v.dts=u[0].dts,h=0;h<u.length;h++)p=u[h],p.keyFrame?(f.length&&(v.push(f),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration),f=[p],f.nalCount=p.length,f.byteLength=p.byteLength,f.pts=p.pts,f.dts=p.dts,f.duration=p.duration):(f.duration+=p.duration,f.nalCount+=p.length,f.byteLength+=p.byteLength,f.push(p));return v.length&&f.duration<=0&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration,v.push(f),v},$e=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},We=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ze=function(u,h){var p=We();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},Ye=function(u,h){var p,f,v,_,B,R=h||0,H=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)B=_[f],v=Ze(B,R),R+=v.size,H.push(v);return H},He=function(u){var h,p,f,v,_,B,R=0,H=u.byteLength,W=u.nalCount,te=H+4*W,le=new Uint8Array(te),xe=new DataView(le.buffer);for(h=0;h<u.length;h++)for(v=u[h],p=0;p<v.length;p++)for(_=v[p],f=0;f<_.length;f++)B=_[f],xe.setUint32(R,B.data.byteLength),R+=4,le.set(B.data,R),R+=B.data.byteLength;return le},ze=function(u,h){var p,f=h||0,v=[];return p=Ze(u,f),v.push(p),v},Xe=function(u){var h,p,f=0,v=u.byteLength,_=u.length,B=v+4*_,R=new Uint8Array(B),H=new DataView(R.buffer);for(h=0;h<u.length;h++)p=u[h],H.setUint32(f,p.data.byteLength),f+=4,R.set(p.data,f),f+=p.data.byteLength;return R},Ct={groupNalsIntoFrames:Ne,groupFramesIntoGops:Pe,extendFirstKeyFrame:$e,generateSampleTable:Ye,concatenateNalData:He,generateSampleTableForFrame:ze,concatenateNalDataForFrame:Xe},ot=[33,16,5,32,164,27],Ee=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ce=function(u){for(var h=[];u--;)h.push(0);return h},pe=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),h},{})},Re,tt=function(){if(!Re){var u={96e3:[ot,[227,64],Ce(154),[56]],88200:[ot,[231],Ce(170),[56]],64e3:[ot,[248,192],Ce(240),[56]],48e3:[ot,[255,192],Ce(268),[55,148,128],Ce(54),[112]],44100:[ot,[255,192],Ce(268),[55,163,128],Ce(84),[112]],32e3:[ot,[255,192],Ce(268),[55,234],Ce(226),[112]],24e3:[ot,[255,192],Ce(268),[55,255,128],Ce(268),[111,112],Ce(126),[224]],16e3:[ot,[255,192],Ce(268),[55,255,128],Ce(268),[111,255],Ce(269),[223,108],Ce(195),[1,192]],12e3:[Ee,Ce(268),[3,127,248],Ce(268),[6,255,240],Ce(268),[13,255,224],Ce(268),[27,253,128],Ce(259),[56]],11025:[Ee,Ce(268),[3,127,248],Ce(268),[6,255,240],Ce(268),[13,255,224],Ce(268),[27,255,192],Ce(268),[55,175,128],Ce(108),[112]],8e3:[Ee,Ce(268),[3,121,16],Ce(47),[7]]};Re=pe(u)}return Re},ge=9e4,ne,oe,de,me,De,Ke,ht;ne=function(u){return u*ge},oe=function(u,h){return u*h},de=function(u){return u/ge},me=function(u,h){return u/h},De=function(u,h){return ne(me(u,h))},Ke=function(u,h){return oe(de(u),h)},ht=function(u,h,p){return de(p?u:u-h)};var Ve={ONE_SECOND_IN_TS:ge,secondsToVideoTs:ne,secondsToAudioTs:oe,videoTsToSeconds:de,audioTsToSeconds:me,audioTsToVideoTs:De,videoTsToAudioTs:Ke,metadataTsToSeconds:ht},Gt=tt,St=Ve,li=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},It=function(u,h,p,f){var v,_=0,B=0,R=0,H=0,W,te,le;if(h.length&&(v=St.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(St.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(B=v-Math.max(p,f),R=Math.floor(B/_),H=R*_),!(R<1||H>St.ONE_SECOND_IN_TS/2))){for(W=Gt()[u.samplerate],W||(W=h[0].data),te=0;te<R;te++)le=h[0],h.splice(0,0,{data:W,dts:le.dts-_,pts:le.pts-_});return u.baseMediaDecodeTime-=Math.floor(St.videoTsToAudioTs(H,u.samplerate)),H}},Et=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},pi=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},Ft=function(u){var h,p,f=0,v=new Uint8Array(li(u));for(h=0;h<u.length;h++)p=u[h],v.set(p.data,f),f+=p.data.byteLength;return v},Gi={prefixWithSilence:It,trimAdtsFramesByEarliestDts:Et,generateSampleTable:pi,concatenateFrameData:Ft},$t=Ve.ONE_SECOND_IN_TS,Wi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},x=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},w=function(u,h){var p,f,v=u.minSegmentDts;return h||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/$t,p*=f,p=Math.floor(p)),p},X={clearDtsInfo:x,calculateTrackBaseMediaDecodeTime:w,collectDtsInfo:Wi},se=4,ve=128,Ie=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,v=0;h<u.byteLength&&u[h]!==ve;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)v+=255,h++;if(v+=u[h++],!p.payload&&f===se){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(h,h+v);break}else p.payload=void 0}h+=v,f=0,v=0}return p},it=function(u){return u.payload[0]!==181||(u.payload[1]<<8|u.payload[2])!==49||String.fromCharCode(u.payload[3],u.payload[4],u.payload[5],u.payload[6])!=="GA94"||u.payload[7]!==3?null:u.payload.subarray(8,u.payload.length-1)},wt=function(u,h){var p=[],f,v,_,B;if(!(h[0]&64))return p;for(v=h[0]&31,f=0;f<v;f++)_=f*3,B={type:h[_+2]&3,pts:u},h[_+2]&4&&(B.ccData=h[_+3]<<8|h[_+4],p.push(B));return p},Wt=function(u){for(var h=u.byteLength,p=[],f=1,v,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;v=h-p.length,_=new Uint8Array(v);var B=0;for(f=0;f<v;B++,f++)B===p[0]&&(B++,p.shift()),_[f]=u[B];return _},Ut={parseSei:Ie,parseUserData:it,parseCaptionPackets:wt,discardEmulationPreventionBytes:Wt,USER_DATA_REGISTERED_ITU_T_T35:se},Pt=t,ii=Ut,Je=function(u){u=u||{},Je.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new be(0,0),new be(0,1),new be(1,0),new be(1,1)],this.parse708captions_&&(this.cc708Stream_=new qe({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Je.prototype=new Pt,Je.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ii.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ii.USER_DATA_REGISTERED_ITU_T_T35&&(p=ii.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ii.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Je.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Je.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Je.prototype.flush=function(){return this.flushStream("flush")},Je.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Je.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Je.prototype.dispatchCea608Packet=function(u){this.setsTextOrXDSActive(u)?this.activeCea608Channel_[u.type]=null:this.setsChannel1Active(u)?this.activeCea608Channel_[u.type]=0:this.setsChannel2Active(u)&&(this.activeCea608Channel_[u.type]=1),this.activeCea608Channel_[u.type]!==null&&this.ccStreams_[(u.type<<1)+this.activeCea608Channel_[u.type]].push(u)},Je.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Je.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Je.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Je.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ni={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Yt=function(u){var h=ni[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Xt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},Dt=function(u){this.windowNum=u,this.reset()};Dt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dt.prototype.getText=function(){return this.rows.join(`
206
+ `)},Dt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dt.prototype.newLine=function(u){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(u),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},Dt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var ut=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new Dt(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};ut.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new Dt(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},ut.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},ut.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var qe=function(u){u=u||{},qe.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(_=>{v=p[_],/^SERVICE/.test(_)&&(f[_]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};qe.prototype=new Pt,qe.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},qe.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},qe.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,v=0,_=h[v++];for(u.seq=_>>6,u.sizeCode=_&63;v<h.length;v++)_=h[v++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[v++],p=_),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},qe.prototype.pushServiceBlock=function(u,h,p){var f,v=h,_=this.current708Packet.data,B=this.services[u];for(B||(B=this.initService(u,v));v<h+p&&v<_.length;v++)f=_[v],Xt(f)?v=this.handleText(v,B):f===24?v=this.multiByteCharacter(v,B):f===16?v=this.extendedCommands(v,B):128<=f&&f<=135?v=this.setCurrentWindow(v,B):152<=f&&f<=159?v=this.defineWindow(v,B):f===136?v=this.clearWindows(v,B):f===140?v=this.deleteWindows(v,B):f===137?v=this.displayWindows(v,B):f===138?v=this.hideWindows(v,B):f===139?v=this.toggleWindows(v,B):f===151?v=this.setWindowAttributes(v,B):f===144?v=this.setPenAttributes(v,B):f===145?v=this.setPenColor(v,B):f===146?v=this.setPenLocation(v,B):f===143?B=this.reset(v,B):f===8?B.currentWindow.backspace():f===12?B.currentWindow.clearText():f===13?B.currentWindow.pendingNewLine=!0:f===14?B.currentWindow.clearText():f===141&&v++},qe.prototype.extendedCommands=function(u,h){var p=this.current708Packet.data,f=p[++u];return Xt(f)&&(u=this.handleText(u,h,{isExtended:!0})),u},qe.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},qe.prototype.initService=function(u,h){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new ut(u,v,p),this.services[u].init(this.getPts(h),function(_){p.flushDisplayed(_,p.services[u])}),this.services[u]},qe.prototype.handleText=function(u,h,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,_=this.current708Packet.data,B=f?4096:0,R=_[u],H=_[u+1],W=h.currentWindow,te,le;function xe(he){return he.map(Oe=>("0"+(Oe&255).toString(16)).slice(-2)).join("")}if(v?(le=[R,H],u++):le=[R],h.textDecoder_&&!f)te=h.textDecoder_.decode(new Uint8Array(le));else if(v){const he=xe(le);te=String.fromCharCode(parseInt(he,16))}else te=Yt(B|R);return W.pendingNewLine&&!W.isEmpty()&&W.newLine(this.getPts(u)),W.pendingNewLine=!1,W.addText(te),u},qe.prototype.multiByteCharacter=function(u,h){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Xt(f)&&Xt(v)&&(u=this.handleText(++u,h,{isMultiByte:!0})),u},qe.prototype.setCurrentWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;return h.setCurrentWindow(v),u},qe.prototype.defineWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;h.setCurrentWindow(v);var _=h.currentWindow;return f=p[++u],_.visible=(f&32)>>5,_.rowLock=(f&16)>>4,_.columnLock=(f&8)>>3,_.priority=f&7,f=p[++u],_.relativePositioning=(f&128)>>7,_.anchorVertical=f&127,f=p[++u],_.anchorHorizontal=f,f=p[++u],_.anchorPoint=(f&240)>>4,_.rowCount=f&15,f=p[++u],_.columnCount=f&63,f=p[++u],_.windowStyle=(f&56)>>3,_.penStyle=f&7,_.virtualRowCount=_.rowCount+1,u},qe.prototype.setWindowAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.winAttr;return f=p[++u],v.fillOpacity=(f&192)>>6,v.fillRed=(f&48)>>4,v.fillGreen=(f&12)>>2,v.fillBlue=f&3,f=p[++u],v.borderType=(f&192)>>6,v.borderRed=(f&48)>>4,v.borderGreen=(f&12)>>2,v.borderBlue=f&3,f=p[++u],v.borderType+=(f&128)>>5,v.wordWrap=(f&64)>>6,v.printDirection=(f&48)>>4,v.scrollDirection=(f&12)>>2,v.justify=f&3,f=p[++u],v.effectSpeed=(f&240)>>4,v.effectDirection=(f&12)>>2,v.displayEffect=f&3,u},qe.prototype.flushDisplayed=function(u,h){for(var p=[],f=0;f<8;f++)h.windows[f].visible&&!h.windows[f].isEmpty()&&p.push(h.windows[f].getText());h.endPts=u,h.text=p.join(`
207
+
208
+ `),this.pushCaption(h),h.startPts=u},qe.prototype.pushCaption=function(u){u.text!==""&&(this.trigger("data",{startPts:u.startPts,endPts:u.endPts,text:u.text,stream:"cc708_"+u.serviceNum}),u.text="",u.startPts=u.endPts)},qe.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},qe.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},qe.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},qe.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},qe.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},qe.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penAttr;return f=p[++u],v.textTag=(f&240)>>4,v.offset=(f&12)>>2,v.penSize=f&3,f=p[++u],v.italics=(f&128)>>7,v.underline=(f&64)>>6,v.edgeType=(f&56)>>3,v.fontStyle=f&7,u},qe.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penColor;return f=p[++u],v.fgOpacity=(f&192)>>6,v.fgRed=(f&48)>>4,v.fgGreen=(f&12)>>2,v.fgBlue=f&3,f=p[++u],v.bgOpacity=(f&192)>>6,v.bgRed=(f&48)>>4,v.bgGreen=(f&12)>>2,v.bgBlue=f&3,f=p[++u],v.edgeRed=(f&48)>>4,v.edgeGreen=(f&12)>>2,v.edgeBlue=f&3,u},qe.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},qe.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.serviceNum,u)};var Ci={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Bi=function(u){return u===null?"":(u=Ci[u]||u,String.fromCharCode(u))},Tn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=Tn+1;h--;)u.push({text:"",indent:0,offset:0});return u},be=function(u,h){be.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,_,B,R;if(f=p.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),_=f>>>8,B=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(p.pts),this.flushDisplayed(p.pts),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,this.startPts_=p.pts;else if(f===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(p.pts);else if(f===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(p.pts);else if(f===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(p.pts);else if(f===this.CARRIAGE_RETURN_)this.clearFormatting(p.pts),this.flushDisplayed(p.pts),this.shiftRowsUp_(),this.startPts_=p.pts;else if(f===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(f===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(p.pts),this.displayed_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,B))_=(_&3)<<8,R=Bi(_|B),this[this.mode_](p.pts,R),this.column_++;else if(this.isExtCharacter(_,B))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),_=(_&3)<<8,R=Bi(_|B),this[this.mode_](p.pts,R),this.column_++;else if(this.isMidRowCode(_,B))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(B&14)===14&&this.addFormatting(p.pts,["i"]),(B&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,B)){const W=B&3;this.nonDisplayed_[this.row_].offset=W,this.column_+=W}else if(this.isPAC(_,B)){var H=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(H-this.rollUpRows_+1<0&&(H=this.rollUpRows_-1),this.setRollUp(p.pts,H)),H!==this.row_&&H>=0&&H<=14&&(this.clearFormatting(p.pts),this.row_=H),B&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const W=(f&14)>>1;this.column_=W*4,this.nonDisplayed_[this.row_].indent+=W}this.isColorPAC(B)&&(B&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(B===0&&(B=null),R=Bi(_),R+=Bi(B),this[this.mode_](p.pts,R),this.column_+=R.length)}};be.prototype=new Pt,be.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(v)}f.text.length&&p.push({text:f.text,line:v+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&h(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},be.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=Tn,this.rollUpRows_=2,this.formatting_=[]},be.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},be.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},be.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},be.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},be.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},be.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},be.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},be.prototype.isNormalChar=function(u){return u>=32&&u<=127},be.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=Tn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},be.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},be.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},be.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},be.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},be.prototype.shiftRowsUp_=function(){var u;for(u=0;u<this.topRow_;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.row_+1;u<Tn+1;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.topRow_;u<this.row_;u++)this.displayed_[u]=this.displayed_[u+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},be.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var ee={CaptionStream:Je,Cea608Stream:be,Cea708Stream:qe},ye={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Se=t,et=8589934592,qt=4294967296,At="shared",Tt=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>qt;)u+=p*et;return u},Si=function(u){var h,p;Si.prototype.init.call(this),this.type_=u||At,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==At&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Tt(f.dts,p),f.pts=Tt(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Si.prototype=new Se;var yt={TimestampRolloverStream:Si,handleRollover:Tt},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},xr=ps.typedArrayIndexOf,ms={Utf8:3},pu=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Cr=function(u,h,p){return decodeURIComponent(pu(u,h,p))},Sr=function(u,h,p){return unescape(pu(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,v="-->";u.data[0]===ms.Utf8&&(p=xr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=xr(u.data,0,h),!(f<0)&&(u.description=Cr(u.data,h,f),h=f+1,u.mimeType===v?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=Cr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.value=Cr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},sp=function(u){var h,p,f=10,v=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Er(u.subarray(6,10)),v+=10;var B=u[5]&64;B&&(f+=4,f+=Er(u.subarray(10,14)),v-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var R={id:p,data:u.subarray(f+10,f+h+10)};R.key=R.id,kr[R.id]?kr[R.id](R):R.id[0]==="T"?kr["T*"](R):R.id[0]==="W"&&kr["W*"](R),_.push(R),f+=10,f+=h}while(f<v);return _}},mu={parseId3Frames:sp,parseSyncSafeInteger:Er,frameParsers:kr},ap=t,op=ye,sn=mu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],v=0,_;if(gs.prototype.init.call(this),this.dispatchType=op.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(B){var R,H,W,te,le,xe;if(B.type==="timed-metadata"){if(B.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(B.data.length<10||B.data[0]!==73||B.data[1]!==68||B.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(B),v+=B.data.byteLength,f.length===1&&(p=sn.parseSyncSafeInteger(B.data.subarray(6,10)),p+=10),!(v<p)){for(R={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},le=0;le<p;)R.data.set(f[0].data.subarray(0,p-le),le),le+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();H=10,R.data[5]&64&&(H+=4,H+=sn.parseSyncSafeInteger(R.data.subarray(10,14)),p-=sn.parseSyncSafeInteger(R.data.subarray(16,20)));do{if(W=sn.parseSyncSafeInteger(R.data.subarray(H+4,H+8)),W<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(xe=String.fromCharCode(R.data[H],R.data[H+1],R.data[H+2],R.data[H+3]),te={id:xe,data:R.data.subarray(H+10,H+W+10)},te.key=te.id,sn.frameParsers[te.id]?sn.frameParsers[te.id](te):te.id[0]==="T"?sn.frameParsers["T*"](te):te.id[0]==="W"&&sn.frameParsers["W*"](te),te.owner==="com.apple.streaming.transportStreamTimestamp"){var he=te.data,Oe=(he[3]&1)<<30|he[4]<<22|he[5]<<14|he[6]<<6|he[7]>>>2;Oe*=4,Oe+=he[7]&3,te.timeStamp=Oe,R.pts===void 0&&R.dts===void 0&&(R.pts=te.timeStamp,R.dts=te.timeStamp),this.trigger("timestamp",te)}R.frames.push(te),H+=10,H+=W}while(H<p);this.trigger("data",R)}}}},gs.prototype=new ap;var lp=gs,Ha=t,za=ee,Ei=ye,up=yt.TimestampRolloverStream,vs,wr,ys,$n=188,Ga=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,v=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;v<_.byteLength;){if(_[f]===Ga&&_[v]===Ga){this.trigger("data",_.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Ga&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new Ha,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,_){var B=0;_.payloadUnitStartIndicator&&(B+=v[B]+1),_.type==="pat"?h(v.subarray(B),_):p(v.subarray(B),_)},h=function(v,_){_.section_number=v[7],_.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],_.pmtPid=f.pmtPid},p=function(v,_){var B,R,H,W;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},B=(v[1]&15)<<8|v[2],R=3+B-4,H=(v[10]&15)<<8|v[11],W=12+H;W<R;){var te=v[W],le=(v[W+1]&31)<<8|v[W+2];te===Ei.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=le:te===Ei.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=le:te===Ei.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][le]=te),W+=((v[W+3]&15)<<8|v[W+4])+5}_.programMapTable=f.programMapTable}},this.push=function(v){var _={},B=4;if(_.payloadUnitStartIndicator=!!(v[1]&64),_.pid=v[1]&31,_.pid<<=8,_.pid|=v[2],(v[3]&48)>>>4>1&&(B+=v[B]+1),_.pid===0)_.type="pat",u(v.subarray(B),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(v.subarray(B),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,B,_]):this.processPes_(v,B,_)},this.processPes_=function(v,_,B){B.pid===this.programMapTable.video?B.streamType=Ei.H264_STREAM_TYPE:B.pid===this.programMapTable.audio?B.streamType=Ei.ADTS_STREAM_TYPE:B.streamType=this.programMapTable["timed-metadata"][B.pid],B.type="pes",B.data=v.subarray(_),this.trigger("data",B)}},wr.prototype=new Ha,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},_,B=function(H,W){var te;const le=H[0]<<16|H[1]<<8|H[2];W.data=new Uint8Array,le===1&&(W.packetLength=6+(H[4]<<8|H[5]),W.dataAlignmentIndicator=(H[6]&4)!==0,te=H[7],te&192&&(W.pts=(H[9]&14)<<27|(H[10]&255)<<20|(H[11]&254)<<12|(H[12]&255)<<5|(H[13]&254)>>>3,W.pts*=4,W.pts+=(H[13]&6)>>>1,W.dts=W.pts,te&64&&(W.dts=(H[14]&14)<<27|(H[15]&255)<<20|(H[16]&254)<<12|(H[17]&255)<<5|(H[18]&254)>>>3,W.dts*=4,W.dts+=(H[18]&6)>>>1)),W.data=H.subarray(9+H[8]))},R=function(H,W,te){var le=new Uint8Array(H.size),xe={type:W},he=0,Oe=0,Ue=!1,Ot;if(!(!H.data.length||H.size<9)){for(xe.trackId=H.data[0].pid,he=0;he<H.data.length;he++)Ot=H.data[he],le.set(Ot.data,Oe),Oe+=Ot.data.byteLength;B(le,xe),Ue=W==="video"||xe.packetLength<=H.size,(te||Ue)&&(H.size=0,H.data.length=0),Ue&&u.trigger("data",xe)}};ys.prototype.init.call(this),this.push=function(H){({pat:function(){},pes:function(){var W,te;switch(H.streamType){case Ei.H264_STREAM_TYPE:W=p,te="video";break;case Ei.ADTS_STREAM_TYPE:W=f,te="audio";break;case Ei.METADATA_STREAM_TYPE:W=v,te="timed-metadata";break;default:return}H.payloadUnitStartIndicator&&R(W,te,!0),W.data.push(H),W.size+=H.data.byteLength},pmt:function(){var W={type:"metadata",tracks:[]};_=H.programMapTable,_.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",W)}})[H.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){R(p,"video"),R(f,"audio"),R(v,"timed-metadata")},this.flush=function(){if(!h&&_){var H={type:"metadata",tracks:[]};_.video!==null&&H.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&H.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",H)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new Ha;var gu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:up,CaptionStream:za.CaptionStream,Cea608Stream:za.Cea608Stream,Cea708Stream:za.Cea708Stream,MetadataStream:lp};for(var Wa in Ei)Ei.hasOwnProperty(Wa)&&(gu[Wa]=Ei[Wa]);var cp=gu,dp=t,hp=Ve.ONE_SECOND_IN_TS,_s,vu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,v){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${v} in frame ${p} outside syncword`})},this.push=function(f){var v=0,_,B,R,H,W;if(u||(p=0),f.type==="audio"){h&&h.length?(R=h,h=new Uint8Array(R.byteLength+f.data.byteLength),h.set(R),h.set(f.data,R.byteLength)):h=f.data;for(var te;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof te!="number"&&(te=v),v++;continue}if(typeof te=="number"&&(this.skipWarn_(te,v),te=null),B=(~h[v+1]&1)*2,_=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,H=((h[v+6]&3)+1)*1024,W=H*hp/vu[(h[v+2]&60)>>>2],h.byteLength-v<_)break;this.trigger("data",{pts:f.pts+p*W,dts:f.dts+p*W,sampleCount:H,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:vu[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+B,v+_)}),p++,v+=_}typeof te=="number"&&(this.skipWarn_(te,v),te=null),h=h.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new dp;var fp=_s,yu;yu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var v=u.byteLength-h,_=new Uint8Array(4),B=Math.min(4,h);if(B===0)throw new Error("no bytes available");_.set(u.subarray(v,v+B)),p=new DataView(_.buffer).getUint32(0),f=B*8,h-=B},this.skipBits=function(v){var _;f>v?(p<<=v,f-=v):(v-=f,_=Math.floor(v/8),v-=_*8,h-=_,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var _=Math.min(f,v),B=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=v-_,_>0?B<<_|this.readBits(_):B},this.skipLeadingZeros=function(){var v;for(v=0;v<f;++v)if((p&2147483648>>>v)!==0)return p<<=v,f-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var pp=yu,_u=t,mp=pp,Ts,bs,Tu;bs=function(){var u=0,h,p;bs.prototype.init.call(this),this.push=function(f){var v;p?(v=new Uint8Array(p.byteLength+f.data.byteLength),v.set(p),v.set(f.data,p.byteLength),p=v):p=f.data;for(var _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new _u,Tu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,v,_,B,R;Ts.prototype.init.call(this),h=this,this.push=function(H){H.type==="video"&&(p=H.trackId,f=H.pts,v=H.dts,u.push(H))},u.on("data",function(H){var W={trackId:p,pts:f,dts:v,data:H,nalUnitTypeCode:H[0]&31};switch(W.nalUnitTypeCode){case 5:W.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:W.nalUnitType="sei_rbsp",W.escapedRBSP=_(H.subarray(1));break;case 7:W.nalUnitType="seq_parameter_set_rbsp",W.escapedRBSP=_(H.subarray(1)),W.config=B(W.escapedRBSP);break;case 8:W.nalUnitType="pic_parameter_set_rbsp";break;case 9:W.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",W)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},R=function(H,W){var te=8,le=8,xe,he;for(xe=0;xe<H;xe++)le!==0&&(he=W.readExpGolomb(),le=(te+he+256)%256),te=le===0?te:le},_=function(H){for(var W=H.byteLength,te=[],le=1,xe,he;le<W-2;)H[le]===0&&H[le+1]===0&&H[le+2]===3?(te.push(le+2),le+=2):le++;if(te.length===0)return H;xe=W-te.length,he=new Uint8Array(xe);var Oe=0;for(le=0;le<xe;Oe++,le++)Oe===te[0]&&(Oe++,te.shift()),he[le]=H[Oe];return he},B=function(H){var W=0,te=0,le=0,xe=0,he,Oe,Ue,Ot,ui,on,Lr,Mr,Pr,Rr,Bs,dt=[1,1],Vr,wi;if(he=new mp(H),Oe=he.readUnsignedByte(),Ot=he.readUnsignedByte(),Ue=he.readUnsignedByte(),he.skipUnsignedExpGolomb(),Tu[Oe]&&(ui=he.readUnsignedExpGolomb(),ui===3&&he.skipBits(1),he.skipUnsignedExpGolomb(),he.skipUnsignedExpGolomb(),he.skipBits(1),he.readBoolean()))for(Bs=ui!==3?8:12,wi=0;wi<Bs;wi++)he.readBoolean()&&(wi<6?R(16,he):R(64,he));if(he.skipUnsignedExpGolomb(),on=he.readUnsignedExpGolomb(),on===0)he.readUnsignedExpGolomb();else if(on===1)for(he.skipBits(1),he.skipExpGolomb(),he.skipExpGolomb(),Lr=he.readUnsignedExpGolomb(),wi=0;wi<Lr;wi++)he.skipExpGolomb();if(he.skipUnsignedExpGolomb(),he.skipBits(1),Mr=he.readUnsignedExpGolomb(),Pr=he.readUnsignedExpGolomb(),Rr=he.readBits(1),Rr===0&&he.skipBits(1),he.skipBits(1),he.readBoolean()&&(W=he.readUnsignedExpGolomb(),te=he.readUnsignedExpGolomb(),le=he.readUnsignedExpGolomb(),xe=he.readUnsignedExpGolomb()),he.readBoolean()&&he.readBoolean()){switch(Vr=he.readUnsignedByte(),Vr){case 1:dt=[1,1];break;case 2:dt=[12,11];break;case 3:dt=[10,11];break;case 4:dt=[16,11];break;case 5:dt=[40,33];break;case 6:dt=[24,11];break;case 7:dt=[20,11];break;case 8:dt=[32,11];break;case 9:dt=[80,33];break;case 10:dt=[18,11];break;case 11:dt=[15,11];break;case 12:dt=[64,33];break;case 13:dt=[160,99];break;case 14:dt=[4,3];break;case 15:dt=[3,2];break;case 16:dt=[2,1];break;case 255:{dt=[he.readUnsignedByte()<<8|he.readUnsignedByte(),he.readUnsignedByte()<<8|he.readUnsignedByte()];break}}dt&&dt[0]/dt[1]}return{profileIdc:Oe,levelIdc:Ue,profileCompatibility:Ot,width:(Mr+1)*16-W*2-te*2,height:(2-Rr)*(Pr+1)*16-le*2-xe*2,sarRatio:dt}}},Ts.prototype=new _u;var gp={H264Stream:Ts},vp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],bu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},xu=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=bu(u,h),xu(u,h))},yp=function(u){var h=xu(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Cu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},_p=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Tp=function(u,h,p){return unescape(_p(u,h,p))},bp=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,v=u[h+3]&6144;return v|f|p},xp=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},Cp=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return vp[(u[h+2]&60)>>>2]}return null},Sp=function(u){var h,p,f,v;h=10,u[5]&64&&(h+=4,h+=Cu(u.subarray(10,14)));do{if(p=Cu(u.subarray(h+4,h+8)),p<1)return null;if(v=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),v==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var B=Tp(f,0,_);if(B==="com.apple.streaming.transportStreamTimestamp"){var R=f.subarray(_+1),H=(R[3]&1)<<30|R[4]<<22|R[5]<<14|R[6]<<6|R[7]>>>2;return H*=4,H+=R[7]&3,H}break}}h+=10,h+=p}while(h<u.byteLength);return null},Ya={isLikelyAacData:yp,parseId3TagSize:bu,parseAdtsSize:bp,parseType:xp,parseSampleRate:Cp,parseAacTimestamp:Sp},Ep=t,Su=Ya,xs;xs=function(){var u=new Uint8Array,h=0;xs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,v=0,_,B,R,H;for(u.length?(H=u.length,u=new Uint8Array(p.byteLength+H),u.set(u.subarray(0,H)),u.set(p,H)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=Su.parseId3TagSize(u,v),v+f>u.length))break;B={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",B),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=Su.parseAdtsSize(u,v),v+f>u.length))break;R={type:"audio",data:u.subarray(v,v+f),pts:h,dts:h},this.trigger("data",R),v+=f;continue}v++}_=u.length-v,_>0?u=u.subarray(v):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},xs.prototype=new Ep;var kp=xs,wp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Dp=wp,Ap=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Np=Ap,Cs=t,Dr=we,Ar=Ct,Ss=Gi,ki=X,Xi=cp,Es=Ve,Eu=fp,Ip=gp.H264Stream,Op=kp,Bp=Ya.isLikelyAacData,Lp=Ve.ONE_SECOND_IN_TS,ku=Dp,wu=Np,ks,Nr,ws,bn,Mp=function(u,h){h.stream=u,this.trigger("log",h)},Du=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!h[v].on||h[v].on("log",Mp.bind(u,v))}},Au=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},Nu=function(u,h,p,f,v,_){var B=p-h,R=f-h,H=v-p;return{start:{dts:u,pts:u+B},end:{dts:u+R,pts:u+H},prependedContentDuration:_,baseMediaDecodeTime:u}};Nr=function(u,h){var p=[],f,v=0,_=0,B=1/0;h=h||{},f=h.firstSequenceNumber||0,Nr.prototype.init.call(this),this.push=function(R){ki.collectDtsInfo(u,R),u&&ku.forEach(function(H){u[H]=R[H]}),p.push(R)},this.setEarliestDts=function(R){v=R},this.setVideoBaseMediaDecodeTime=function(R){B=R},this.setAudioAppendStart=function(R){_=R},this.flush=function(){var R,H,W,te,le,xe,he;if(p.length===0){this.trigger("done","AudioSegmentStream");return}R=Ss.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=ki.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),he=Ss.prefixWithSilence(u,R,_,B),u.samples=Ss.generateSampleTable(R),W=Dr.mdat(Ss.concatenateFrameData(R)),p=[],H=Dr.moof(f,[u]),te=new Uint8Array(H.byteLength+W.byteLength),f++,te.set(H),te.set(W,H.byteLength),ki.clearDtsInfo(u),le=Math.ceil(Lp*1024/u.samplerate),R.length&&(xe=R.length*le,this.trigger("segmentTimingInfo",Nu(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),R[0].dts,R[0].pts,R[0].dts+xe,R[0].pts+xe,he||0)),this.trigger("timingInfo",{start:R[0].pts,end:R[0].pts+xe})),this.trigger("data",{track:u,boxes:te}),this.trigger("done","AudioSegmentStream")},this.reset=function(){ki.clearDtsInfo(u),p=[],this.trigger("reset")}},Nr.prototype=new Cs,ks=function(u,h){var p,f=[],v=[],_,B;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(R){ki.collectDtsInfo(u,R),R.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=R.config,u.sps=[R.data],wu.forEach(function(H){u[H]=_[H]},this)),R.nalUnitType==="pic_parameter_set_rbsp"&&!B&&(B=R.data,u.pps=[R.data]),f.push(R)},this.flush=function(){for(var R,H,W,te,le,xe,he=0,Oe,Ue;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(R=Ar.groupNalsIntoFrames(f),W=Ar.groupFramesIntoGops(R),W[0][0].keyFrame||(H=this.getGopForFusion_(f[0],u),H?(he=H.duration,W.unshift(H),W.byteLength+=H.byteLength,W.nalCount+=H.nalCount,W.pts=H.pts,W.dts=H.dts,W.duration+=H.duration):W=Ar.extendFirstKeyFrame(W)),v.length){var Ot;if(h.alignGopsAtEnd?Ot=this.alignGopsAtEnd_(W):Ot=this.alignGopsAtStart_(W),!Ot){this.gopCache_.unshift({gop:W.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}ki.clearDtsInfo(u),W=Ot}ki.collectDtsInfo(u,W),u.samples=Ar.generateSampleTable(W),le=Dr.mdat(Ar.concatenateNalData(W)),u.baseMediaDecodeTime=ki.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",W.map(function(ui){return{pts:ui.pts,dts:ui.dts,byteLength:ui.byteLength}})),Oe=W[0],Ue=W[W.length-1],this.trigger("segmentTimingInfo",Nu(u.baseMediaDecodeTime,Oe.dts,Oe.pts,Ue.dts+Ue.duration,Ue.pts+Ue.duration,he)),this.trigger("timingInfo",{start:W[0].pts,end:W[W.length-1].pts+W[W.length-1].duration}),this.gopCache_.unshift({gop:W.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.trigger("baseMediaDecodeTime",u.baseMediaDecodeTime),this.trigger("timelineStartInfo",u.timelineStartInfo),te=Dr.moof(p,[u]),xe=new Uint8Array(te.byteLength+le.byteLength),p++,xe.set(te),xe.set(le,te.byteLength),this.trigger("data",{track:u,boxes:xe}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){ki.clearDtsInfo(u),_=void 0,B=void 0},this.getGopForFusion_=function(R){var H=45e3,W=1/0,te,le,xe,he,Oe;for(Oe=0;Oe<this.gopCache_.length;Oe++)he=this.gopCache_[Oe],xe=he.gop,!(!(u.pps&&Au(u.pps[0],he.pps[0]))||!(u.sps&&Au(u.sps[0],he.sps[0])))&&(xe.dts<u.timelineStartInfo.dts||(te=R.dts-xe.dts-xe.duration,te>=-1e4&&te<=H&&(!le||W>te)&&(le=he,W=te)));return le?le.gop:null},this.alignGopsAtStart_=function(R){var H,W,te,le,xe,he,Oe,Ue;for(xe=R.byteLength,he=R.nalCount,Oe=R.duration,H=W=0;H<v.length&&W<R.length&&(te=v[H],le=R[W],te.pts!==le.pts);){if(le.pts>te.pts){H++;continue}W++,xe-=le.byteLength,he-=le.nalCount,Oe-=le.duration}return W===0?R:W===R.length?null:(Ue=R.slice(W),Ue.byteLength=xe,Ue.duration=Oe,Ue.nalCount=he,Ue.pts=Ue[0].pts,Ue.dts=Ue[0].dts,Ue)},this.alignGopsAtEnd_=function(R){var H,W,te,le,xe,he;for(H=v.length-1,W=R.length-1,xe=null,he=!1;H>=0&&W>=0;){if(te=v[H],le=R[W],te.pts===le.pts){he=!0;break}if(te.pts>le.pts){H--;continue}H===v.length-1&&(xe=W),W--}if(!he&&xe===null)return null;var Oe;if(he?Oe=W:Oe=xe,Oe===0)return R;var Ue=R.slice(Oe),Ot=Ue.reduce(function(ui,on){return ui.byteLength+=on.byteLength,ui.duration+=on.duration,ui.nalCount+=on.nalCount,ui},{byteLength:0,duration:0,nalCount:0});return Ue.byteLength=Ot.byteLength,Ue.duration=Ot.duration,Ue.nalCount=Ot.nalCount,Ue.pts=Ue[0].pts,Ue.dts=Ue[0].dts,Ue},this.alignGopsWith=function(R){v=R}},ks.prototype=new Cs,bn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,bn.prototype.init.call(this),this.push=function(p){if(p.content||p.text)return this.pendingCaptions.push(p);if(p.frames)return this.pendingMetadata.push(p);this.pendingTracks.push(p.track),this.pendingBytes+=p.boxes.byteLength,p.track.type==="video"&&(this.videoTrack=p.track,this.pendingBoxes.push(p.boxes)),p.track.type==="audio"&&(this.audioTrack=p.track,this.pendingBoxes.unshift(p.boxes))}},bn.prototype=new Cs,bn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,_,B=0,R;if(this.pendingTracks.length<this.numberOfTracks){if(u!=="VideoSegmentStream"&&u!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(B=this.videoTrack.timelineStartInfo.pts,wu.forEach(function(H){p.info[H]=this.videoTrack[H]},this)):this.audioTrack&&(B=this.audioTrack.timelineStartInfo.pts,ku.forEach(function(H){p.info[H]=this.audioTrack[H]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),R=0;R<this.pendingBoxes.length;R++)p.data.set(this.pendingBoxes[R],h),h+=this.pendingBoxes[R].byteLength;for(R=0;R<this.pendingCaptions.length;R++)f=this.pendingCaptions[R],f.startTime=Es.metadataTsToSeconds(f.startPts,B,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,B,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(R=0;R<this.pendingMetadata.length;R++)v=this.pendingMetadata[R],v.cueTime=Es.metadataTsToSeconds(v.pts,B,this.keepOriginalTimestamps),p.metadata.push(v);for(p.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",p),R=0;R<p.captions.length;R++)f=p.captions[R],this.trigger("caption",f);for(R=0;R<p.metadata.length;R++)v=p.metadata[R],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},bn.prototype.setRemux=function(u){this.remuxTracks=u},ws=function(u){var h=this,p=!0,f,v;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new Op,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new Eu,_.coalesceStream=new bn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(B){_.aacStream.setTimestamp(B.timeStamp)}),_.aacStream.on("data",function(B){B.type!=="timed-metadata"&&B.type!=="audio"||_.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Du(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new Eu,_.h264Stream=new Ip,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new bn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(B){var R;if(B.type==="metadata"){for(R=B.tracks.length;R--;)!f&&B.tracks[R].type==="video"?(f=B.tracks[R],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&B.tracks[R].type==="audio"&&(v=B.tracks[R],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(H){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=H,_.audioSegmentStream.setEarliestDts(H.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(H){v&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(H)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),v&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(B){B.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",B)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Du(this,_)},this.setBaseMediaDecodeTime=function(_){var B=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,ki.clearDtsInfo(v),B.audioTimestampRolloverStream&&B.audioTimestampRolloverStream.discontinuity()),f&&(B.videoSegmentStream&&(B.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,ki.clearDtsInfo(f),B.captionStream.reset()),B.timestampRolloverStream&&B.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var B=this.transmuxPipeline_;u.remux=_,B&&B.coalesceStream&&B.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var B=this;return function(R){R.stream=_,B.trigger("log",R)}},this.push=function(_){if(p){var B=Bp(_);B&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!B&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ws.prototype=new Cs;var Pp={Transmuxer:ws},Rp=function(u){return u>>>0},Vp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:Rp,toHexString:Vp},Fp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Iu=Fp,$p=Ds.toUnsigned,Up=Iu,Ou=function(u,h){var p=[],f,v,_,B,R;if(!h.length)return null;for(f=0;f<u.byteLength;)v=$p(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Up(u.subarray(f+4,f+8)),B=v>1?f+v:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,B)):(R=Ou(u.subarray(f+8,B),h.slice(1)),R.length&&(p=p.concat(R)))),f=B;return p},Xa=Ou,qp=Ds.toUnsigned,jp=a.getUint64,Hp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=jp(u.subarray(4)):h.baseMediaDecodeTime=qp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Ka=Hp,zp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,_=p.flags[2]&8,B=p.flags[2]&16,R=p.flags[2]&32,H=p.flags[0]&65536,W=p.flags[0]&131072,te;return te=8,f&&(te+=4,p.baseDataOffset=h.getUint32(12),te+=4),v&&(p.sampleDescriptionIndex=h.getUint32(te),te+=4),_&&(p.defaultSampleDuration=h.getUint32(te),te+=4),B&&(p.defaultSampleSize=h.getUint32(te),te+=4),R&&(p.defaultSampleFlags=h.getUint32(te)),H&&(p.durationIsEmpty=!0),!f&&W&&(p.baseDataOffsetIsMoof=!0),p},Bu=zp,Gp=function(u){return{isLeading:(u[0]&12)>>>2,dependsOn:u[0]&3,isDependedOn:(u[1]&192)>>>6,hasRedundancy:(u[1]&48)>>>4,paddingValue:(u[1]&14)>>>1,isNonSyncSample:u[1]&1,degradationPriority:u[2]<<8|u[3]}},Wp=Gp,Lu=Wp,Yp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,v=h.flags[2]&4,_=h.flags[1]&1,B=h.flags[1]&2,R=h.flags[1]&4,H=h.flags[1]&8,W=p.getUint32(4),te=8,le;for(f&&(h.dataOffset=p.getInt32(te),te+=4),v&&W&&(le={flags:Lu(u.subarray(te,te+4))},te+=4,_&&(le.duration=p.getUint32(te),te+=4),B&&(le.size=p.getUint32(te),te+=4),H&&(h.version===1?le.compositionTimeOffset=p.getInt32(te):le.compositionTimeOffset=p.getUint32(te),te+=4),h.samples.push(le),W--);W--;)le={},_&&(le.duration=p.getUint32(te),te+=4),B&&(le.size=p.getUint32(te),te+=4),R&&(le.flags=Lu(u.subarray(te,te+4)),te+=4),H&&(h.version===1?le.compositionTimeOffset=p.getInt32(te):le.compositionTimeOffset=p.getUint32(te),te+=4),h.samples.push(le);return h},Mu=Yp,Pu={tfdt:Ka,trun:Mu},Ru={parseTfdt:Pu.tfdt,parseTrun:Pu.trun},Xp=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},Kp={uint8ToCString:Xp},As=Kp.uint8ToCString,Qp=a.getUint64,Zp=function(u){var h=4,p=u[0],f,v,_,B,R,H,W,te;if(p===0){f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length;var le=new DataView(u.buffer);_=le.getUint32(h),h+=4,R=le.getUint32(h),h+=4,H=le.getUint32(h),h+=4,W=le.getUint32(h),h+=4}else if(p===1){var le=new DataView(u.buffer);_=le.getUint32(h),h+=4,B=Qp(u.subarray(h)),h+=8,H=le.getUint32(h),h+=4,W=le.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length}te=new Uint8Array(u.subarray(h,u.byteLength));var xe={scheme_id_uri:f,value:v,timescale:_||1,presentation_time:B,presentation_time_delta:R,event_duration:H,id:W,message_data:te};return em(p,xe)?xe:void 0},Jp=function(u,h,p,f){return u||u===0?u/h:f+p/h},em=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&Vu(h.presentation_time_delta)&&p,v=u===1&&Vu(h.presentation_time)&&p;return!(u>1)&&f||v},Vu=function(u){return u!==void 0||u!==null},tm={parseEmsgBox:Zp,scaleTime:Jp},Ir;typeof window<"u"?Ir=window:typeof r<"u"?Ir=r:typeof self<"u"?Ir=self:Ir={};var Fu=Ir,Ns=Ds.toUnsigned,Or=Ds.toHexString,bt=Xa,Un=Iu,Qa=tm,im=Bu,nm=Mu,rm=Ka,sm=a.getUint64,$u,Uu,qu,ju,Hu,Za,zu,Ja=Fu,am=mu.parseId3Frames;$u=function(u){var h={},p=bt(u,["moov","trak"]);return p.reduce(function(f,v){var _,B,R,H,W;return _=bt(v,["tkhd"])[0],!_||(B=_[0],R=B===0?12:20,H=Ns(_[R]<<24|_[R+1]<<16|_[R+2]<<8|_[R+3]),W=bt(v,["mdia","mdhd"])[0],!W)?null:(B=W[0],R=B===0?12:20,f[H]=Ns(W[R]<<24|W[R+1]<<16|W[R+2]<<8|W[R+3]),f)},h)},Uu=function(u,h){var p;p=bt(h,["moof","traf"]);var f=p.reduce(function(v,_){var B=bt(_,["tfhd"])[0],R=Ns(B[4]<<24|B[5]<<16|B[6]<<8|B[7]),H=u[R]||9e4,W=bt(_,["tfdt"])[0],te=new DataView(W.buffer,W.byteOffset,W.byteLength),le;W[0]===1?le=sm(W.subarray(4,12)):le=te.getUint32(4);let xe;return typeof le=="bigint"?xe=le/Ja.BigInt(H):typeof le=="number"&&!isNaN(le)&&(xe=le/H),xe<Number.MAX_SAFE_INTEGER&&(xe=Number(xe)),xe<v&&(v=xe),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},qu=function(u,h){var p=bt(h,["moof","traf"]),f=0,v=0,_;if(p&&p.length){var B=bt(p[0],["tfhd"])[0],R=bt(p[0],["trun"])[0],H=bt(p[0],["tfdt"])[0];if(B){var W=im(B);_=W.trackId}if(H){var te=rm(H);f=te.baseMediaDecodeTime}if(R){var le=nm(R);le.samples&&le.samples.length&&(v=le.samples[0].compositionTimeOffset||0)}}var xe=u[_]||9e4;typeof f=="bigint"&&(v=Ja.BigInt(v),xe=Ja.BigInt(xe));var he=(f+v)/xe;return typeof he=="bigint"&&he<Number.MAX_SAFE_INTEGER&&(he=Number(he)),he},ju=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v=bt(f,["mdia","hdlr"]),_=bt(f,["tkhd"]);v.forEach(function(B,R){var H=Un(B.subarray(8,12)),W=_[R],te,le,xe;H==="vide"&&(te=new DataView(W.buffer,W.byteOffset,W.byteLength),le=te.getUint8(0),xe=le===0?te.getUint32(12):te.getUint32(20),p.push(xe))})}),p},Za=function(u){var h=u[0],p=h===0?12:20;return Ns(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Hu=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v={},_=bt(f,["tkhd"])[0],B,R;_&&(B=new DataView(_.buffer,_.byteOffset,_.byteLength),R=B.getUint8(0),v.id=R===0?B.getUint32(12):B.getUint32(20));var H=bt(f,["mdia","hdlr"])[0];if(H){var W=Un(H.subarray(8,12));W==="vide"?v.type="video":W==="soun"?v.type="audio":v.type=W}var te=bt(f,["mdia","minf","stbl","stsd"])[0];if(te){var le=te.subarray(8);v.codec=Un(le.subarray(4,8));var xe=bt(le,[v.codec])[0],he,Oe;xe&&(/^[asm]vc[1-9]$/i.test(v.codec)?(he=xe.subarray(78),Oe=Un(he.subarray(4,8)),Oe==="avcC"&&he.length>11?(v.codec+=".",v.codec+=Or(he[9]),v.codec+=Or(he[10]),v.codec+=Or(he[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(he=xe.subarray(28),Oe=Un(he.subarray(4,8)),Oe==="esds"&&he.length>20&&he[19]!==0?(v.codec+="."+Or(he[19]),v.codec+="."+Or(he[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var Ue=bt(f,["mdia","mdhd"])[0];Ue&&(v.timescale=Za(Ue)),p.push(v)}),p},zu=function(u,h=0){var p=bt(u,["emsg"]);return p.map(f=>{var v=Qa.parseEmsgBox(new Uint8Array(f)),_=am(v.message_data);return{cueTime:Qa.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,h),duration:Qa.scaleTime(v.event_duration,v.timescale),frames:_}})};var Br={findBox:bt,parseType:Un,timescale:$u,startTime:Uu,compositionStartTime:qu,videoTrackIds:ju,tracks:Hu,getTimescaleFromMediaHeader:Za,getEmsgID3:zu};const{parseTrun:om}=Ru,{findBox:Gu}=Br;var Wu=Fu,lm=function(u){var h=Gu(u,["moof","traf"]),p=Gu(u,["mdat"]),f=[];return p.forEach(function(v,_){var B=h[_];f.push({mdat:v,traf:B})}),f},um=function(u,h,p){var f=h,v=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,B=p.trackId,R=[];return u.forEach(function(H){var W=om(H),te=W.samples;te.forEach(function(le){le.duration===void 0&&(le.duration=v),le.size===void 0&&(le.size=_),le.trackId=B,le.dts=f,le.compositionTimeOffset===void 0&&(le.compositionTimeOffset=0),typeof f=="bigint"?(le.pts=f+Wu.BigInt(le.compositionTimeOffset),f+=Wu.BigInt(le.duration)):(le.pts=f+le.compositionTimeOffset,f+=le.duration)}),R=R.concat(te)}),R},Yu={getMdatTrafPairs:lm,parseSamples:um},cm=Ut.discardEmulationPreventionBytes,dm=ee.CaptionStream,eo=Xa,hm=Ka,fm=Bu,{getMdatTrafPairs:pm,parseSamples:mm}=Yu,gm=function(u,h){for(var p=u,f=0;f<h.length;f++){var v=h[f];if(p<v.size)return v;p-=v.size}return null},vm=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},_,B,R,H;for(B=0;B+4<u.length;B+=R)if(R=f.getUint32(B),B+=4,!(R<=0))switch(u[B]&31){case 6:var W=u.subarray(B+1,B+1+R),te=gm(B,h);if(_={nalUnitType:"sei_rbsp",size:R,data:W,escapedRBSP:cm(W),trackId:p},te)_.pts=te.pts,_.dts=te.dts,H=te;else if(H)_.pts=H.pts,_.dts=H.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+B+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(_);break}return v},ym=function(u,h){var p={},f=pm(u);return f.forEach(function(v){var _=v.mdat,B=v.traf,R=eo(B,["tfhd"]),H=fm(R[0]),W=H.trackId,te=eo(B,["tfdt"]),le=te.length>0?hm(te[0]).baseMediaDecodeTime:0,xe=eo(B,["trun"]),he,Oe;h===W&&xe.length>0&&(he=mm(xe,le,H),Oe=vm(_,he,W),p[W]||(p[W]={seiNals:[],logs:[]}),p[W].seiNals=p[W].seiNals.concat(Oe.seiNals),p[W].logs=p[W].logs.concat(Oe.logs))}),p},_m=function(u,h,p){var f;if(h===null)return null;f=ym(u,h);var v=f[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},Tm=function(){var u=!1,h,p,f,v,_,B;this.isInitialized=function(){return u},this.init=function(R){h=new dm,u=!0,B=R?R.isPartial:!1,h.on("data",function(H){H.startTime=H.startPts/v,H.endTime=H.endPts/v,_.captions.push(H),_.captionStreams[H.stream]=!0}),h.on("log",function(H){_.logs.push(H)})},this.isNewInit=function(R,H){return R&&R.length===0||H&&typeof H=="object"&&Object.keys(H).length===0?!1:f!==R[0]||v!==H[f]},this.parse=function(R,H,W){var te;if(this.isInitialized()){if(!H||!W)return null;if(this.isNewInit(H,W))f=H[0],v=W[f];else if(f===null||!v)return p.push(R),null}else return null;for(;p.length>0;){var le=p.shift();this.parse(le,H,W)}return te=_m(R,f,v),te&&te.logs&&(_.logs=_.logs.concat(te.logs)),te===null||!te.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(te.seiNals),this.flushStream(),_)},this.pushNals=function(R){if(!this.isInitialized()||!R||R.length===0)return null;R.forEach(function(H){h.push(H)})},this.flushStream=function(){if(!this.isInitialized())return null;B?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},bm=Tm;const{parseTfdt:xm}=Ru,an=Xa,{getTimescaleFromMediaHeader:Cm}=Br,{parseSamples:Sm,getMdatTrafPairs:Em}=Yu;var Xu=function(){let u=9e4;this.init=function(h){const p=an(h,["moov","trak","mdia","mdhd"])[0];p&&(u=Cm(p))},this.parseSegment=function(h){const p=[],f=Em(h);let v=0;return f.forEach(function(_){const B=_.mdat,R=_.traf,H=an(R,["tfdt"])[0],W=an(R,["tfhd"])[0],te=an(R,["trun"]);if(H&&(v=xm(H).baseMediaDecodeTime),te.length&&W){const le=Sm(te,v,W);let xe=0;le.forEach(function(he){const Oe="utf-8",Ue=new TextDecoder(Oe),Ot=B.slice(xe,xe+he.size);if(an(Ot,["vtte"])[0]){xe+=he.size;return}an(Ot,["vttc"]).forEach(function(Lr){const Mr=an(Lr,["payl"])[0],Pr=an(Lr,["sttg"])[0],Rr=he.pts/u,Bs=(he.pts+he.duration)/u;let dt,Vr;if(Mr)try{dt=Ue.decode(Mr)}catch(wi){console.error(wi)}if(Pr)try{Vr=Ue.decode(Pr)}catch(wi){console.error(wi)}he.duration&&dt&&p.push({cueText:dt,start:Rr,end:Bs,settings:Vr})}),xe+=he.size})}}),p}},to=ye,Ku=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Is=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},km=function(u,h){var p=Ku(u);return p===0?"pat":p===h?"pmt":h?"pes":null},wm=function(u){var h=Is(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Dm=function(u){var h={},p=Is(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,_,B;v=(u[f+1]&15)<<8|u[f+2],_=3+v-4,B=(u[f+10]&15)<<8|u[f+11];for(var R=12+B;R<_;){var H=f+R;h[(u[H+1]&31)<<8|u[H+2]]=u[H],R+=((u[H+3]&15)<<8|u[H+4])+5}return h}},Am=function(u,h){var p=Ku(u),f=h[p];switch(f){case to.H264_STREAM_TYPE:return"video";case to.ADTS_STREAM_TYPE:return"audio";case to.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Nm=function(u){var h=Is(u);if(!h)return null;var p=4+Os(u);if(p>=u.byteLength)return null;var f=null,v;return v=u[p+7],v&192&&(f={},f.pts=(u[p+9]&14)<<27|(u[p+10]&255)<<20|(u[p+11]&254)<<12|(u[p+12]&255)<<5|(u[p+13]&254)>>>3,f.pts*=4,f.pts+=(u[p+13]&6)>>>1,f.dts=f.pts,v&64&&(f.dts=(u[p+14]&14)<<27|(u[p+15]&255)<<20|(u[p+16]&254)<<12|(u[p+17]&255)<<5|(u[p+18]&254)>>>3,f.dts*=4,f.dts+=(u[p+18]&6)>>>1)),f},io=function(u){switch(u){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Im=function(u){for(var h=4+Os(u),p=u.subarray(h),f=0,v=0,_=!1,B;v<p.byteLength-3;v++)if(p[v+2]===1){f=v+5;break}for(;f<p.byteLength;)switch(p[f]){case 0:if(p[f-1]!==0){f+=2;break}else if(p[f-2]!==0){f++;break}v+3!==f-2&&(B=io(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0));do f++;while(p[f]!==1&&f<p.length);v=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}B=io(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(B=io(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},Om={parseType:km,parsePat:wm,parsePmt:Dm,parsePayloadUnitStartIndicator:Is,parsePesType:Am,parsePesTime:Nm,videoPacketContainsKeyFrame:Im},Qu=ye,qn=yt.handleRollover,at={};at.ts=Om,at.aac=Ya;var xn=Ve.ONE_SECOND_IN_TS,Kt=188,Li=71,Bm=function(u,h){for(var p=0,f=Kt,v,_;f<u.byteLength;){if(u[p]===Li&&u[f]===Li){switch(v=u.subarray(p,f),_=at.ts.parseType(v,h.pid),_){case"pat":h.pid=at.ts.parsePat(v);break;case"pmt":var B=at.ts.parsePmt(v);h.table=h.table||{},Object.keys(B).forEach(function(R){h.table[R]=B[R]});break}p+=Kt,f+=Kt;continue}p++,f++}},Zu=function(u,h,p){for(var f=0,v=Kt,_,B,R,H,W,te=!1;v<=u.byteLength;){if(u[f]===Li&&(u[v]===Li||v===u.byteLength)){switch(_=u.subarray(f,v),B=at.ts.parseType(_,h.pid),B){case"pes":R=at.ts.parsePesType(_,h.table),H=at.ts.parsePayloadUnitStartIndicator(_),R==="audio"&&H&&(W=at.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),te=!0));break}if(te)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,te=!1;f>=0;){if(u[f]===Li&&(u[v]===Li||v===u.byteLength)){switch(_=u.subarray(f,v),B=at.ts.parseType(_,h.pid),B){case"pes":R=at.ts.parsePesType(_,h.table),H=at.ts.parsePayloadUnitStartIndicator(_),R==="audio"&&H&&(W=at.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),te=!0));break}if(te)break;f-=Kt,v-=Kt;continue}f--,v--}},Lm=function(u,h,p){for(var f=0,v=Kt,_,B,R,H,W,te,le,xe,he=!1,Oe={data:[],size:0};v<u.byteLength;){if(u[f]===Li&&u[v]===Li){switch(_=u.subarray(f,v),B=at.ts.parseType(_,h.pid),B){case"pes":if(R=at.ts.parsePesType(_,h.table),H=at.ts.parsePayloadUnitStartIndicator(_),R==="video"&&(H&&!he&&(W=at.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),he=!0)),!p.firstKeyFrame)){if(H&&Oe.size!==0){for(te=new Uint8Array(Oe.size),le=0;Oe.data.length;)xe=Oe.data.shift(),te.set(xe,le),le+=xe.byteLength;if(at.ts.videoPacketContainsKeyFrame(te)){var Ue=at.ts.parsePesTime(te);Ue?(p.firstKeyFrame=Ue,p.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Oe.size=0}Oe.data.push(_),Oe.size+=_.byteLength}break}if(he&&p.firstKeyFrame)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,he=!1;f>=0;){if(u[f]===Li&&u[v]===Li){switch(_=u.subarray(f,v),B=at.ts.parseType(_,h.pid),B){case"pes":R=at.ts.parsePesType(_,h.table),H=at.ts.parsePayloadUnitStartIndicator(_),R==="video"&&H&&(W=at.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),he=!0));break}if(he)break;f-=Kt,v-=Kt;continue}f--,v--}},Mm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=qn(_.dts,p),_.pts=qn(_.pts,p),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=qn(_.dts,f),_.pts=qn(_.pts,f),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=qn(v.dts,f),v.pts=qn(v.pts,f),v.dtsTime=v.dts/xn,v.ptsTime=v.pts/xn}}},Pm=function(u){for(var h=!1,p=0,f=null,v=null,_=0,B=0,R;u.length-B>=3;){var H=at.aac.parseType(u,B);switch(H){case"timed-metadata":if(u.length-B<10){h=!0;break}if(_=at.aac.parseId3TagSize(u,B),_>u.length){h=!0;break}v===null&&(R=u.subarray(B,B+_),v=at.aac.parseAacTimestamp(R)),B+=_;break;case"audio":if(u.length-B<7){h=!0;break}if(_=at.aac.parseAdtsSize(u,B),_>u.length){h=!0;break}f===null&&(R=u.subarray(B,B+_),f=at.aac.parseSampleRate(R)),p++,B+=_;break;default:B++;break}if(h)return null}if(f===null||v===null)return null;var W=xn/f,te={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*W,pts:v+p*1024*W}]};return te},Rm=function(u){var h={pid:null,table:null},p={};Bm(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var v=h.table[f];switch(v){case Qu.H264_STREAM_TYPE:p.video=[],Lm(u,h,p),p.video.length===0&&delete p.video;break;case Qu.ADTS_STREAM_TYPE:p.audio=[],Zu(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},Vm=function(u,h){var p=at.aac.isLikelyAacData(u),f;return p?f=Pm(u):f=Rm(u),!f||!f.audio&&!f.video?null:(Mm(f,h),f)},Fm={inspect:Vm,parseAudioPes_:Zu};const $m=function(u,h){h.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const v=p.data;p.data=v.buffer,u.postMessage({action:"data",segment:p,byteOffset:v.byteOffset,byteLength:v.byteLength},[p.data])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Ve.videoTsToSeconds(p.start.dts),presentation:Ve.videoTsToSeconds(p.start.pts)},end:{decode:Ve.videoTsToSeconds(p.end.dts),presentation:Ve.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Ve.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Ve.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Ve.videoTsToSeconds(p.start.dts),presentation:Ve.videoTsToSeconds(p.start.pts)},end:{decode:Ve.videoTsToSeconds(p.end.dts),presentation:Ve.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Ve.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Ve.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ve.videoTsToSeconds(p.start),end:Ve.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ve.videoTsToSeconds(p.start),end:Ve.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class Ju{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Pp.Transmuxer(this.options),$m(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new bm,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Xu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Xu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Ve.ONE_SECOND_IN_TS:void 0,v=Fm.inspect(h,f);let _=null;v&&(_={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},_.hasVideo&&(_.videoStart=v.video[0].ptsTime),_.hasAudio&&(_.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ve.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Ve.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new Ju(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new Ju(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var g4=Nf(m4);const v4=(r,e,t)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const g=r.data.segment.boxes||{data:r.data.segment.data},m={type:n,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(m.videoFrameDtsTime=c),typeof d<"u"&&(m.videoFramePtsTime=d),t(m)},y4=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},_4=(r,e)=>{e.gopInfo=r.data.gopInfo},Bf=r=>{const{transmuxer:e,bytes:t,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:g,onAudioSegmentTimingInfo:m,onId3:S,onCaptions:T,onDone:C,onEndedTimeline:y,onTransmuxerLog:k,isEndOfTimeline:O,segment:I,triggerSegmentEventFn:D}=r,q={buffer:[]};let $=O;const U=z=>{e.currentTransmux===r&&(z.data.action==="data"&&v4(z,q,o),z.data.action==="trackinfo"&&l(z.data.trackInfo),z.data.action==="gopInfo"&&_4(z,q),z.data.action==="audioTimingInfo"&&c(z.data.audioTimingInfo),z.data.action==="videoTimingInfo"&&d(z.data.videoTimingInfo),z.data.action==="videoSegmentTimingInfo"&&g(z.data.videoSegmentTimingInfo),z.data.action==="audioSegmentTimingInfo"&&m(z.data.audioSegmentTimingInfo),z.data.action==="id3Frame"&&S([z.data.id3Frame],z.data.id3Frame.dispatchType),z.data.action==="caption"&&T(z.data.caption),z.data.action==="endedtimeline"&&($=!1,y()),z.data.action==="log"&&k(z.data.log),z.data.type==="transmuxed"&&($||(e.onmessage=null,y4({transmuxedData:q,callback:C}),Lf(e))))},N=()=>{const z={message:"Received an error message from the transmuxer worker",metadata:{errorType:re.Error.StreamingFailedToTransmuxSegment,segmentInfo:Dn({segment:I})}};C(null,z)};if(e.onmessage=U,e.onerror=N,n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),t.byteLength){const z=t instanceof ArrayBuffer?t:t.buffer,b=t instanceof ArrayBuffer?0:t.byteOffset;D({type:"segmenttransmuxingstart",segment:I}),e.postMessage({action:"push",data:z,byteOffset:b,byteLength:t.byteLength},[z])}O&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Lf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():Bf(r.currentTransmux))},Od=(r,e)=>{r.postMessage({action:e}),Lf(r)},Mf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Od(e,r);return}e.transmuxQueue.push(Od.bind(null,e,r))},T4=r=>{Mf("reset",r)},b4=r=>{Mf("endTimeline",r)},Pf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,Bf(r);return}r.transmuxer.transmuxQueue.push(r)},x4=r=>{const e=new g4;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:r}),e};var Go={reset:T4,endTimeline:b4,transmux:Pf,createTransmuxer:x4};const er=function(r){const e=r.transmuxer,t=r.endAction||r.action,n=r.callback,s=xt({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===t&&(e.removeEventListener("message",a),o.data.data&&(o.data.data=new Uint8Array(o.data.data,r.byteOffset||0,r.byteLength||o.data.data.byteLength),r.data&&(r.data=o.data.data)),n(o.data))};if(e.addEventListener("message",a),r.data){const o=r.data instanceof ArrayBuffer;s.byteOffset=o?0:r.data.byteOffset,s.byteLength=r.data.byteLength;const l=[o?r.data:r.data.buffer];e.postMessage(s,l)}else e.postMessage(s)},Ui={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Rf="wvtt",Tl=r=>{r.forEach(e=>{e.abort()})},C4=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),S4=r=>{const e=r.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=r.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},hu=(r,e)=>{const{requestType:t}=e,n=Pn({requestType:t,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Ui.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Ui.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Ui.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Ui.FAILURE,xhr:e,metadata:n}:null},Bd=(r,e,t,n)=>(s,a)=>{const o=a.response,l=hu(s,a);if(l)return t(l,r);if(o.byteLength!==16)return t({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:Ui.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let m=0;m<e.length;m++)e[m].bytes=d;const g={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:g}),t(null,r)},E4=(r,e)=>{e===Rf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},k4=(r,e,t)=>{e===Rf&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,t(null,r,{mp4VttCues:s})}})},Vf=(r,e)=>{const t=Ml(r.map.bytes);if(t!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=t||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:Ui.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&E4(r,a.codec))}),e(null))})},w4=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(n,s)=>{const a=hu(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(t({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,Vf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},D4=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:n})=>(s,a)=>{const o=hu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=t==="arraybuffer"||!a.responseText?a.response:f4(a.responseText.substring(r.lastReachedChar||0));return r.stats=C4(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},A4=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{const C=r.map&&r.map.tracks||{},y=!!(C.audio&&C.video);let k=n.bind(null,r,"audio","start");const O=n.bind(null,r,"audio","end");let I=n.bind(null,r,"video","start");const D=n.bind(null,r,"video","end"),q=()=>Pf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:y,onData:$=>{$.type=$.type==="combined"?"video":$.type,g(r,$)},onTrackInfo:$=>{t&&(y&&($.isMuxed=!0),t(r,$))},onAudioTimingInfo:$=>{k&&typeof $.start<"u"&&(k($.start),k=null),O&&typeof $.end<"u"&&O($.end)},onVideoTimingInfo:$=>{I&&typeof $.start<"u"&&(I($.start),I=null),D&&typeof $.end<"u"&&D($.end)},onVideoSegmentTimingInfo:$=>{const U={pts:{start:$.start.presentation,end:$.end.presentation},dts:{start:$.start.decode,end:$.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),s($)},onAudioSegmentTimingInfo:$=>{const U={pts:{start:$.start.pts,end:$.end.pts},dts:{start:$.start.dts,end:$.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),a($)},onId3:($,U)=>{o(r,$,U)},onCaptions:$=>{l(r,[$])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:S,onDone:($,U)=>{m&&($.type=$.type==="combined"?"video":$.type,T({type:"segmenttransmuxingcomplete",segment:r}),m(U,r,$))},segment:r,triggerSegmentEventFn:T});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:$=>{r.bytes=e=$.data;const U=$.result;U&&(t(r,{hasAudio:U.hasAudio,hasVideo:U.hasVideo,isMuxed:y}),t=null),q()}})},Ff=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let C=new Uint8Array(e);if(K3(C)){r.isFmp4=!0;const{tracks:y}=r.map;if(y.text&&(!y.audio||!y.video)){g(r,{data:C,type:"text"}),k4(r,y.text.codec,m);return}const O={isFmp4:!0,hasVideo:!!y.video,hasAudio:!!y.audio};y.audio&&y.audio.codec&&y.audio.codec!=="enca"&&(O.audioCodec=y.audio.codec),y.video&&y.video.codec&&y.video.codec!=="encv"&&(O.videoCodec=y.video.codec),y.video&&y.audio&&(O.isMuxed=!0),t(r,O);const I=(D,q)=>{g(r,{data:C,type:O.hasAudio&&!O.isMuxed?"audio":"video"}),q&&q.length&&o(r,q),D&&D.length&&l(r,D),m(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:C,transmuxer:r.transmuxer,callback:({data:D,startTime:q})=>{e=D.buffer,r.bytes=C=D,O.hasAudio&&!O.isMuxed&&n(r,"audio","start",q),O.hasVideo&&n(r,"video","start",q),er({action:"probeEmsgID3",data:C,transmuxer:r.transmuxer,offset:q,callback:({emsgData:$,id3Frames:U})=>{if(e=$.buffer,r.bytes=C=$,!y.video||!$.byteLength||!r.transmuxer){I(void 0,U);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:C,timescales:r.map.timescales,trackIds:[y.video.id],callback:N=>{e=N.data.buffer,r.bytes=C=N.data,N.logs.forEach(function(z){S(st(z,{stream:"mp4CaptionParser"}))}),I(N.captions,U)}})}})}});return}if(!r.transmuxer){m(null,r,{});return}if(typeof r.container>"u"&&(r.container=Ml(C)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),m(null,r,{});return}A4({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})},$f=function({id:r,key:e,encryptedBytes:t,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const g=d.data.decrypted;o(new Uint8Array(g.bytes,g.byteOffset,g.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",g=Dn({segment:s}),m={message:d,metadata:{error:new Error(d),errorType:re.Error.StreamingFailedToDecryptSegment,segmentInfo:g,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(m,s)},n.addEventListener("message",l);let c;e.bytes.slice?c=e.bytes.slice():c=new Uint32Array(Array.prototype.slice.call(e.bytes)),n.postMessage(Sf({source:r,encrypted:t,key:c,iv:e.iv}),[t.buffer,c.buffer])},N4=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),$f({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:m},C=>{e.bytes=C,T({type:"segmentdecryptioncomplete",segment:e}),Ff({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})})},I4=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let C=0,y=!1;return(k,O)=>{if(!y){if(k)return y=!0,Tl(r),m(k,O);if(C+=1,C===r.length){const I=function(){if(O.encryptedBytes)return N4({decryptionWorker:e,segment:O,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T});Ff({segment:O,bytes:O.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})};if(O.endOfAllRequests=Date.now(),O.map&&O.map.encryptedBytes&&!O.map.bytes)return T({type:"segmentdecryptionstart",segment:O}),$f({decryptionWorker:e,id:O.requestId+"-init",encryptedBytes:O.map.encryptedBytes,key:O.map.key,segment:O,doneFn:m},D=>{O.map.bytes=D,T({type:"segmentdecryptioncomplete",segment:O}),Vf(O,q=>{if(q)return Tl(r),m(q,O);I()})});I()}}}},O4=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},B4=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g})=>m=>{if(!m.target.aborted)return r.stats=st(r.stats,S4(m)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(m,r)},L4=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:C,doneFn:y,onTransmuxerLog:k,triggerSegmentEventFn:O})=>{const I=[],D=I4({activeXhrs:I,decryptionWorker:t,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:C,doneFn:y,onTransmuxerLog:k,triggerSegmentEventFn:O});if(n.key&&!n.key.bytes){const z=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&z.push(n.map.key);const b=st(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),E=Bd(n,z,D,O),P={uri:n.key.resolvedUri};O({type:"segmentkeyloadstart",segment:n,keyInfo:P});const Q=r(b,E);I.push(Q)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const Q=st(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),L=Bd(n,[n.map.key],D,O),V={uri:n.map.key.resolvedUri};O({type:"segmentkeyloadstart",segment:n,keyInfo:V});const M=r(Q,L);I.push(M)}const b=st(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:yl(n.map),requestType:"segment-media-initialization"}),E=w4({segment:n,finishProcessingFn:D,triggerSegmentEventFn:O});O({type:"segmentloadstart",segment:n});const P=r(b,E);I.push(P)}const q=st(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:yl(n),requestType:"segment"}),$=D4({segment:n,finishProcessingFn:D,responseType:q.responseType,triggerSegmentEventFn:O});O({type:"segmentloadstart",segment:n});const U=r(q,$);U.addEventListener("progress",B4({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:C})),I.push(U);const N={};return I.forEach(z=>{z.addEventListener("loadend",O4({loadendState:N,abortFn:s}))}),()=>Tl(I)},qs=xi("PlaylistSelector"),Ld=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const t=G.getComputedStyle(r);return t?t[e]:""},ir=function(r,e){const t=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?t.indexOf(n)-t.indexOf(s):a})},fu=function(r,e){let t,n;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||G.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||G.Number.MAX_VALUE,t-n},M4=function(r,e){let t,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||G.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||G.Number.MAX_VALUE,t===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-n};let Uf=function(r){const{main:e,bandwidth:t,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:t,width:n,height:s,limitRenditionByPlayerDimensions:o};let d=e.playlists;ai.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let g=d.map(N=>{let z;const b=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,E=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return z=N.attributes&&N.attributes.BANDWIDTH,z=z||G.Number.MAX_VALUE,{bandwidth:z,width:b,height:E,playlist:N}});ir(g,(N,z)=>N.bandwidth-z.bandwidth),g=g.filter(N=>!ai.isIncompatible(N.playlist));let m=g.filter(N=>ai.isEnabled(N.playlist));m.length||(m=g.filter(N=>!ai.isDisabled(N.playlist)));const S=m.filter(N=>N.bandwidth*Bt.BANDWIDTH_VARIANCE<t);let T=S[S.length-1];const C=S.filter(N=>N.bandwidth===T.bandwidth)[0];if(o===!1){const N=C||m[0]||g[0];if(N&&N.playlist){let z="sortedPlaylistReps";return C&&(z="bandwidthBestRep"),m[0]&&(z="enabledPlaylistReps"),qs(`choosing ${Ld(N)} using ${z} with options`,c),N.playlist}return qs("could not choose a playlist with options",c),null}const y=S.filter(N=>N.width&&N.height);ir(y,(N,z)=>N.width-z.width);const k=y.filter(N=>N.width===n&&N.height===s);T=k[k.length-1];const O=k.filter(N=>N.bandwidth===T.bandwidth)[0];let I,D,q;O||(I=y.filter(N=>a==="cover"?N.width>n&&N.height>s:N.width>n||N.height>s),D=I.filter(N=>N.width===I[0].width&&N.height===I[0].height),T=D[D.length-1],q=D.filter(N=>N.bandwidth===T.bandwidth)[0]);let $;if(l.leastPixelDiffSelector){const N=y.map(z=>(z.pixelDiff=Math.abs(z.width-n)+Math.abs(z.height-s),z));ir(N,(z,b)=>z.pixelDiff===b.pixelDiff?b.bandwidth-z.bandwidth:z.pixelDiff-b.pixelDiff),$=N[0]}const U=$||q||O||C||m[0]||g[0];if(U&&U.playlist){let N="sortedPlaylistReps";return $?N="leastPixelDiffRep":q?N="resolutionPlusOneRep":O?N="resolutionBestRep":C?N="bandwidthBestRep":m[0]&&(N="enabledPlaylistReps"),qs(`choosing ${Ld(U)} using ${N} with options`,c),U.playlist}return qs("could not choose a playlist with options",c),null};const Md=function(){let r=this.useDevicePixelRatio&&G.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Uf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},P4=function(r){let e=-1,t=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&G.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),e<0&&(e=this.systemBandwidth,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=r*this.systemBandwidth+(1-r)*e,t=this.systemBandwidth),Uf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},R4=function(r){const{main:e,currentTime:t,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(C=>!ai.isIncompatible(C));let g=d.filter(ai.isEnabled);g.length||(g=d.filter(C=>!ai.isDisabled(C)));const S=g.filter(ai.hasAttribute.bind(null,"BANDWIDTH")).map(C=>{const k=c.getSyncPoint(C,s,l,t)?1:2,I=ai.estimateSegmentRequestTime(a,n,C)*k-o;return{playlist:C,rebufferingImpact:I}}),T=S.filter(C=>C.rebufferingImpact<=0);return ir(T,(C,y)=>fu(y.playlist,C.playlist)),T.length?T[0]:(ir(S,(C,y)=>C.rebufferingImpact-y.rebufferingImpact),S[0]||null)},V4=function(){const r=this.playlists.main.playlists.filter(ai.isEnabled);return ir(r,(t,n)=>fu(t,n)),r.filter(t=>!!es(this.playlists.main,t).video)[0]||null},F4=r=>{let e=0,t;return r.bytes&&(t=new Uint8Array(r.bytes),r.segments.forEach(n=>{t.set(n,e),e+=n.byteLength})),t};function qf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const $4=function(r,e,t){if(!r[t]){e.trigger({type:"usage",name:"vhs-608"});let n=t;/^cc708_/.test(t)&&(n="SERVICE"+t.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[t]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=t,l=t,c=!1;const d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},U4=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){if(!e)return;const n=G.WebKitDataCue||G.VTTCue;e.forEach(s=>{const a=s.stream;s.content?s.content.forEach(o=>{const l=new n(s.startTime+t,s.endTime+t,o.text);l.line=o.line,l.align="left",l.position=o.position,l.positionAlign="line-left",r[a].addCue(l)}):r[a].addCue(new n(s.startTime+t,s.endTime+t,s.text))})},q4=function(r){Object.defineProperties(r.frame,{id:{get(){return re.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return re.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return re.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},j4=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:n})=>{if(!e)return;const s=G.WebKitDataCue||G.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(g=>{const m=g.cueTime+t;typeof m!="number"||G.isNaN(m)||m<0||!(m<1/0)||!g.frames||!g.frames.length||g.frames.forEach(S=>{const T=new s(m,m,S.value||S.url||S.data||"");T.frame=S,T.value=S,q4(T),a.addCue(T)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let g=0;g<o.length;g++)o[g]&&l.push(o[g]);const c=l.reduce((g,m)=>{const S=g[m.startTime]||[];return S.push(m),g[m.startTime]=S,g},{}),d=Object.keys(c).sort((g,m)=>Number(g)-Number(m));d.forEach((g,m)=>{const S=c[g],T=isFinite(n)?n:g,C=Number(d[m+1])||T;S.forEach(y=>{y.endTime=C})})},H4={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},z4=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),G4=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const n=G.WebKitDataCue||G.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(z4.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:H4[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(o)}s.processDateRange()})},Pd=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,re.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=function(r,e,t){let n,s;if(t&&t.cues)for(n=t.cues.length;n--;)s=t.cues[n],s.startTime>=r&&s.endTime<=e&&t.removeCue(s)},W4=function(r){const e=r.cues;if(!e)return;const t={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;t[a]?r.removeCue(s):t[a]=s}},Y4=(r,e,t)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-t+3)*An.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},X4=(r,e,t)=>{if(!e.length)return r;if(t)return e.slice();const n=e[0].pts;let s=0;for(s;s<r.length&&!(r[s].pts>=n);s++);return r.slice(0,s).concat(e)},K4=(r,e,t,n)=>{const s=Math.ceil((e-n)*An.ONE_SECOND_IN_TS),a=Math.ceil((t-n)*An.ONE_SECOND_IN_TS),o=r.slice();let l=r.length;for(;l--&&!(r[l].pts<=a););if(l===-1)return o;let c=l+1;for(;c--&&!(r[c].pts<=s););return c=Math.max(c,0),o.splice(c,l-c+1),o},Q4=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const t=Object.keys(r).sort(),n=Object.keys(e).sort();if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++){const a=t[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},Z4=function(r,e,t){e=e||[];const n=[];let s=0;for(let a=0;a<e.length;a++){const o=e[a];if(r===o.timeline&&(n.push(a),s+=o.duration,s>t))return a}return n.length===0?0:n[n.length-1]},Hr=1,J4=500,Rd=r=>typeof r=="number"&&isFinite(r),js=1/60,e8=(r,e,t)=>r!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,t8=(r,e,t)=>{let n=e-Bt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-t;return Math.min(s,n)},zn=r=>{const{startOfSegment:e,duration:t,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:g}=r,m=l.length-1;let S="mediaIndex/partIndex increment";r.getMediaInfoForTime?S=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(S+=` with independent ${r.independent}`);const T=typeof d=="number",C=r.segment.uri?"segment":"pre-segment",y=T?af({preloadSegment:n})-1:0;return`${C} [${a+c}/${a+m}]`+(T?` part [${d}/${y}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${g}] selected by [${S}] playlist [${o}]`},Vd=r=>`${r}TimingInfo`,i8=({segmentTimeline:r,currentTimeline:e,startOfSegment:t,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?t:n.length?n.end(n.length-1):t,bl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:t,loaderType:n,audioDisabled:s})=>{if(e===t)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==t}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===t)}return!1},n8=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),t=r.pendingTimelineChange({type:"main"}),n=e&&t,s=n&&e.to!==t.to;return!!(n&&e.from!==-1&&t.from!==-1&&s)},r8=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},cn=r=>{const e=r.pendingSegment_;if(!e)return;if(bl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&n8(r.timelineChangeController_)){if(r8(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},s8=r=>{let e=0;return["video","audio"].forEach(function(t){const n=r[`${t}TimingInfo`];if(!n)return;const{start:s,end:a}=n;let o;typeof s=="bigint"||typeof a=="bigint"?o=G.BigInt(a)-G.BigInt(s):typeof s=="number"&&typeof a=="number"&&(o=a-s),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},Fd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+Fi:!1,a8=(r,e)=>{if(e!=="hls")return null;const t=s8({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const n=r.playlist.targetDuration,s=Fd({segmentDuration:t,maxDuration:n*2}),a=Fd({segmentDuration:t,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${t} when the reported duration is ${r.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||a?{severity:s?"warn":"info",message:o}:null},Dn=({type:r,segment:e})=>{if(!e)return;const t=!!(e.key||e.map&&e.map.ke),n=!!(e.map&&!e.map.bytes),s=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:s,duration:e.duration,isEncrypted:t,isMediaInitialization:n}};class xl extends re.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=xi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(n){n!==this.state_&&(this.logger_(`${this.state_} -> ${n}`),this.state_=n,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(xt({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(xt({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():cn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Go.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,G.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Go.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Mt();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:n,isMuxed:s}=e;if(n&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const n=va(e);let s=this.initSegments_[n];return t&&!s&&e.bytes&&(this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const n=Ef(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[n]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(s||e).resolvedUri};return s&&(a.bytes=s.bytes),a}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const n=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let a=null;if(n&&(n.id?a=n.id:n.uri&&(a=n.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
209
+ currentTime: ${this.currentTime_()}
210
+ bufferedEnd: ${Ho(this.buffered_())}
211
+ `,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const o=e.mediaSequence-n.mediaSequence;if(this.logger_(`live window shift [${o}]`),this.mediaIndex!==null)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const l=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!l.parts||!l.parts.length||!l.parts[this.partIndex])){const c=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=c}}s&&(s.mediaIndex-=o,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}pause(){this.checkBufferTimeout_&&(G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Go.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,n=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let a=1;const o=()=>{a--,a===0&&n()};(s||!this.audioDisabled_)&&(a++,this.sourceUpdater_.removeAudio(e,t,o)),(s||this.loaderType_==="main")&&(this.gopBuffer_=K4(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,o));for(const l in this.inbandTextTracks_)Yr(e,t,this.inbandTextTracks_[l]);Yr(e,t,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),J4)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Dn({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,n=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=typeof e=="number"&&t.segments[e],a=e+1===t.segments.length,o=!s||!s.parts||n+1===s.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&a&&o}chooseNextRequest_(){const e=this.buffered_(),t=Ho(e)||0,n=lu(e,this.currentTime_()),s=!this.hasPlayed_()&&n>=1,a=n>=this.goalBufferLength_(),o=this.playlist_.segments;if(!o.length||s||a)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const l={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(l.isSyncRequest)l.mediaIndex=Z4(this.currentTimeline_,o,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const S=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=S.end?S.end:t,S.parts&&S.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let S,T,C;const y=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
212
+ For TargetTime: ${y}.
213
+ CurrentTime: ${this.currentTime_()}
214
+ BufferedEnd: ${t}
215
+ Fetch At Buffer: ${this.fetchAtBuffer_}
216
+ `,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const k=this.getSyncInfoFromMediaSequenceSync_(y);if(!k){const O="No sync info found while using media sequence sync";return this.error({message:O,metadata:{errorType:re.Error.StreamingFailedToSelectNextSegment,error:new Error(O)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${k.start} --> ${k.end})`),S=k.segmentIndex,T=k.partIndex,C=k.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const k=ai.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:y,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});S=k.segmentIndex,T=k.partIndex,C=k.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${y}`:`currentTime ${y}`,l.mediaIndex=S,l.startOfSegment=C,l.partIndex=T,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${l.mediaIndex} `)}const c=o[l.mediaIndex];let d=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!d)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,d=c.parts[0]);const g=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&d&&!g&&!d.independent)if(l.partIndex===0){const S=o[l.mediaIndex-1],T=S.parts&&S.parts.length&&S.parts[S.parts.length-1];T&&T.independent&&(l.mediaIndex-=1,l.partIndex=S.parts.length-1,l.independent="previous segment")}else c.parts[l.partIndex-1].independent&&(l.partIndex-=1,l.independent="previous part");const m=this.mediaSource_&&this.mediaSource_.readyState==="ended";return l.mediaIndex>=o.length-1&&m&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,l.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(l))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const n=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!n)return null;if(!n.isAppended)return n;const s=this.mediaSequenceSync_.getSyncInfoForTime(n.end);return s?(s.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),s):null}generateSegmentInfo_(e){const{independent:t,playlist:n,mediaIndex:s,startOfSegment:a,isSyncRequest:o,partIndex:l,forceTimestampOffset:c,getMediaInfoForTime:d}=e,g=n.segments[s],m=typeof l=="number"&&g.parts[l],S={requestId:"segment-loader-"+Math.random(),uri:m&&m.resolvedUri||g.resolvedUri,mediaIndex:s,partIndex:m?l:null,isSyncRequest:o,startOfSegment:a,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:g.timeline,duration:m&&m.duration||g.duration,segment:g,part:m,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:d,independent:t},T=typeof c<"u"?c:this.isPendingTimestampOffset_;S.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:g.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:T});const C=Ho(this.sourceUpdater_.audioBuffered());return typeof C=="number"&&(S.audioAppendStart=C-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(S.gopsToAlignWith=Y4(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),S}timestampOffsetForSegment_(e){return i8(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),n=e.bandwidth,s=this.pendingSegment_.duration,a=ai.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=Sb(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=R4({main:this.vhs_.playlists.main,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!l)return;const d=a-o-l.rebufferingImpact;let g=.5;o<=Fi&&(g=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||d<g)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Bt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${zn(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:n,hasVideo:s}=t,a={segmentInfo:Dn({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:n,hasVideo:s}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:a}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(t)||(t=t||{},Q4(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this))))}handleTimingInfo_(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Vd(t);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${t} - ${n} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(t.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));return}const s=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach(o=>{a[o.stream]=a[o.stream]||{startTime:1/0,captions:[],endTime:0};const l=a[o.stream];l.startTime=Math.min(l.startTime,o.startTime+s),l.endTime=Math.max(l.endTime,o.endTime+s),l.captions.push(o)}),Object.keys(a).forEach(o=>{const{startTime:l,endTime:c,captions:d}=a[o],g=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),$4(g,this.vhs_.tech_,o),Yr(l,c,g[o]),U4({captionArray:d,inbandTextTracks:g,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n));return}this.addMetadataToTextTrack(n,t,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!bl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:n,hasVideo:s,isMuxed:a}=t;return!(s&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||bl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){cn(this),this.callQueue_.push(this.handleData_.bind(this,e,t));return}const n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Vd(t.type)].start;else{const s=this.getCurrentMediaInfo_(),a=this.loaderType_==="main"&&s&&s.hasVideo;let o;a&&(o=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:o,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:this.loaderType_==="main"});const s=this.chooseNextRequest_();if(s.mediaIndex!==n.mediaIndex||s.partIndex!==n.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:n,playlist:s}){if(n){const a=va(n);if(this.activeInitSegmentId_===a)return null;t=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=a}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:n},s){const a=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Nn(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Nn(o).join(", "));const l=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0,d=o.length?o.start(0):0,g=o.length?o.end(o.length-1):0;if(c-l<=Hr&&g-d<=Hr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${n.byteLength}, audio buffer: ${Nn(a).join(", ")}, video buffer: ${Nn(o).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:n}));const S=this.currentTime_()-Hr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${S}`),this.remove(0,S,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Hr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=G.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Hr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:n},s){if(s){if(s.code===vf){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:n});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${t} append of ${n.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:re.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:n,data:s,bytes:a}){if(!a){const l=[s];let c=s.byteLength;n&&(l.unshift(n),c+=n.byteLength),a=F4({bytes:c,segments:l})}const o={segmentInfo:Dn({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:o}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:a}))}handleSegmentTimingInfo_(e,t,n){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,a=`${e}TimingInfo`;s[a]||(s[a]={}),s[a].transmuxerPrependedSeconds=n.prependedContentDuration||0,s[a].transmuxedPresentationStart=n.start.presentation,s[a].transmuxedDecodeStart=n.start.decode,s[a].transmuxedPresentationEnd=n.end.presentation,s[a].transmuxedDecodeEnd=n.end.decode,s[a].baseMediaDecodeTime=n.baseMediaDecodeTime}appendData_(e,t){const{type:n,data:s}=t;if(!s||!s.byteLength||n==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:a,data:s})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){cn(this),this.loadQueue_.push(()=>{const t=xt({},e,{forceTimestampOffset:!0});xt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=this.mediaIndex!==null,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=n||s&&a;this.logger_(`Requesting
217
+ ${qf(e.uri)}
218
+ ${zn(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=L4({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:l,level:c,stream:d})=>{this.logger_(`${zn(e)} logged from transmuxer stream ${d} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:d,trackInfo:g,timingInfo:m})=>{const T={segmentInfo:Dn({segment:c})};d&&(T.keyInfo=d),g&&(T.trackInfo=g),m&&(T.timingInfo=m),this.trigger({type:l,metadata:T})}})}trimBackBuffer_(e){const t=t8(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,n=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,a=e.segment.map&&!e.segment.map.bytes,o={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:s,isMediaInitialization:a},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===t.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),t.key){const c=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(t.key),o.key.iv=c}return t.map&&(o.map=this.initSegmentForMap(t.map)),o}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<js){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${js}`);return}const n={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,n){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_||t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ui.ABORTED)return;if(this.pause(),e.code===Ui.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=X4(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:n,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:a,useVideoTimingInfo:o,videoTimingInfo:l,audioTimingInfo:c}){if(typeof e<"u")return e;if(!o)return c.start;const d=t.segments[n-1];return n===0||!d||typeof d.start>"u"||d.end!==s+a?s:l.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:n,hasVideo:s,isMuxed:a}=t,o=this.loaderType_==="main"&&s,l=!this.audioDisabled_&&n&&!a;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}o&&e.waitingOnAppends++,l&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),l&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=e8(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:n}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:n.start:n.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),s=this.loaderType_==="main"&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;s&&(e.timingInfo.end=typeof s.end=="number"?s.end:s.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const c={segmentInfo:Dn({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:c})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const t=a8(e,this.sourceType_);if(t&&(t.severity==="warn"?re.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${zn(e)}`);return}this.logger_(`Appended ${zn(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const n=e.segment,s=e.part,a=n.end&&this.currentTime_()-n.end>e.playlist.targetDuration*3,o=s&&s.end&&this.currentTime_()-s.end>e.playlist.partTargetDuration*3;if(a||o){this.logger_(`bad ${a?"segment":"part"} ${zn(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<js){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${js}`);return}const t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,n=t.start,s=t.end;if(!Rd(n)||!Rd(s))return;Yr(n,s,this.segmentMetadataTrack_);const a=G.WebKitDataCue||G.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:s},l=JSON.stringify(o),c=new a(n,s,l);c.value=o,this.segmentMetadataTrack_.addCue(c)}}function en(){}const jf=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},o8=["video","audio"],Cl=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},l8=(r,e)=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="mediaSource")return null;if(n.type===r)return t}return null},nr=(r,e)=>{if(e.queue.length===0)return;let t=0,n=e.queue[t];if(n.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),n.action(e),n.doneFn&&n.doneFn(),nr("audio",e),nr("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Cl(r,e))){if(n.type!==r){if(t=l8(r,e.queue),t===null)return;n=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[r]=n,n.action(r,e),!n.doneFn){e.queuePending[r]=null,nr(r,e);return}}},Hf=(r,e)=>{const t=e[`${r}Buffer`],n=jf(r);t&&(t.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),t.removeEventListener("error",e[`on${n}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},Ri=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,ci={appendBuffer:(r,e,t)=>(n,s)=>{const a=s[`${n}Buffer`];if(Ri(s.mediaSource,a)){s.logger_(`Appending segment ${e.mediaIndex}'s ${r.length} bytes to ${n}Buffer`);try{a.appendBuffer(r)}catch(o){s.logger_(`Error with code ${o.code} `+(o.code===vf?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,t(o)}}},remove:(r,e)=>(t,n)=>{const s=n[`${t}Buffer`];if(Ri(n.mediaSource,s)){n.logger_(`Removing ${r} to ${e} from ${t}Buffer`);try{s.remove(r,e)}catch{n.logger_(`Remove ${r} to ${e} from ${t}Buffer failed`)}}},timestampOffset:r=>(e,t)=>{const n=t[`${e}Buffer`];Ri(t.mediaSource,n)&&(t.logger_(`Setting ${e}timestampOffset to ${r}`),n.timestampOffset=r)},callback:r=>(e,t)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(t){re.log.warn("Failed to call media source endOfStream",t)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(t){re.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if(Ri(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(n){re.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>t=>{const n=jf(r),s=rr(e);t.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=t.mediaSource.addSourceBuffer(s);a.addEventListener("updateend",t[`on${n}UpdateEnd_`]),a.addEventListener("error",t[`on${n}Error_`]),t.codecs[r]=e,t[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const t=e[`${r}Buffer`];if(Hf(r,e),!!Ri(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(n){re.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,t)=>{const n=t[`${e}Buffer`],s=rr(r);if(!Ri(t.mediaSource,n))return;const a=r.substring(0,r.indexOf(".")),o=t.codecs[e];if(o.substring(0,o.indexOf("."))===a)return;const c={codecsChangeInfo:{from:o,to:r}};t.trigger({type:"codecschange",metadata:c}),t.logger_(`changing ${e}Buffer codec from ${o} to ${r}`);try{n.changeType(s),t.codecs[e]=r}catch(d){c.errorType=re.Error.StreamingCodecsChangeError,c.error=d,d.metadata=c,t.error_=d,t.trigger("error"),re.log.warn(`Failed to changeType on ${e}Buffer`,d)}}},di=({type:r,sourceUpdater:e,action:t,doneFn:n,name:s})=>{e.queue.push({type:r,action:t,doneFn:n,name:s}),nr(r,e)},$d=(r,e)=>t=>{const n=e[`${r}Buffered`](),s=bb(n);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,s),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}nr(r,e)};class zf extends re.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>nr("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=xi("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=$d("video",this),this.onAudioUpdateEnd_=$d("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){di({type:"mediaSource",sourceUpdater:this,action:ci.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){di({type:e,sourceUpdater:this,action:ci.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){re.log.error("removeSourceBuffer is not supported!");return}di({type:"mediaSource",sourceUpdater:this,action:ci.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!re.browser.IS_FIREFOX&&G.MediaSource&&G.MediaSource.prototype&&typeof G.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return G.SourceBuffer&&G.SourceBuffer.prototype&&typeof G.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){re.log.error("changeType is not supported!");return}di({type:e,sourceUpdater:this,action:ci.changeType(t),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const n=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,n);this.canChangeType()&&this.changeType(t,n)})}appendBuffer(e,t){const{segmentInfo:n,type:s,bytes:a}=e;if(this.processedAppend_=!0,s==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const o=t;if(di({type:s,sourceUpdater:this,action:ci.appendBuffer(a,n||{mediaIndex:-1},o),doneFn:t,name:"appendBuffer"}),s==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const l=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${l.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,l.forEach(c=>{this.appendBuffer.apply(this,c)})}}audioBuffered(){return Ri(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Mt()}videoBuffered(){return Ri(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Mt()}buffered(){const e=Ri(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Ri(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():Cb(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=en){di({type:"mediaSource",sourceUpdater:this,action:ci.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=en){typeof e!="string"&&(e=void 0),di({type:"mediaSource",sourceUpdater:this,action:ci.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,n=en){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}di({type:"audio",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}removeVideo(e,t,n=en){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}di({type:"video",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}updating(){return!!(Cl("audio",this)||Cl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(di({type:"audio",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(di({type:"video",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&di({type:"audio",sourceUpdater:this,action:ci.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&di({type:"video",sourceUpdater:this,action:ci.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),o8.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Hf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Ud=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),u8=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},qd=new Uint8Array(`
219
+
220
+ `.split("").map(r=>r.charCodeAt(0)));class c8 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class d8 extends xl{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Mt();const e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Mt([[t,n]])}initSegmentForMap(e,t=!1){if(!e)return null;const n=va(e);let s=this.initSegments_[n];if(t&&!s&&e.bytes){const a=qd.byteLength+e.bytes.byteLength,o=new Uint8Array(a);o.set(e.bytes),o.set(qd,e.bytes.byteLength),this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,t){Yr(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,n){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Ui.TIMEOUT&&this.handleTimeout_(),e.code===Ui.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const s=this.pendingSegment_,a=n.mp4VttCues&&n.mp4VttCues.length;a&&(s.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const o=s.segment;if(o.map&&(o.map.bytes=t.map.bytes),s.bytes=t.bytes,typeof G.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,n),()=>this.stopForError({message:"Error loading vtt.js"}));return}o.requested=!0;try{this.parseVTTCues_(s)}catch(l){this.stopForError({message:l.message,metadata:{errorType:re.Error.StreamingVttParserError,error:l}});return}if(a||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,s.cues.forEach(l=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new G.VTTCue(l.startTime,l.endTime,l.text):l)}),W4(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const n=e&&e.type==="vtt",s=t&&t.type==="text";n&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(n=>{const s=n.start+t,a=n.end+t,o=new G.VTTCue(s,a,n.cueText);n.settings&&n.settings.split(" ").forEach(l=>{const c=l.split(":"),d=c[0],g=c[1];o[d]=isNaN(g)?g:Number(g)}),e.cues.push(o)})}parseVTTCues_(e){let t,n=!1;if(typeof G.WebVTT!="function")throw new c8;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof G.TextDecoder=="function"?t=new G.TextDecoder("utf8"):(t=G.WebVTT.StringDecoder(),n=!0);const s=new G.WebVTT.Parser(G,G.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=o=>{e.timestampmap=o},s.onparsingerror=o=>{re.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;n&&(o=Ud(o)),s.parse(o)}let a=e.bytes;n&&(a=Ud(a)),s.parse(a),s.flush()}updateTimeMapping_(e,t,n){const s=e.segment;if(!t)return;if(!e.cues.length){s.empty=!0;return}const{MPEGTS:a,LOCAL:o}=e.timestampmap,c=a/An.ONE_SECOND_IN_TS-o+t.mapping;if(e.cues.forEach(d=>{const g=d.endTime-d.startTime,m=this.handleRollover_(d.startTime+c,t.time);d.startTime=Math.max(m,0),d.endTime=Math.max(m+g,0)}),!n.syncInfo){const d=e.cues[0].startTime,g=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(d,g-s.duration)}}}handleRollover_(e,t){if(t===null)return e;let n=e*An.ONE_SECOND_IN_TS;const s=t*An.ONE_SECOND_IN_TS;let a;for(s<n?a=-8589934592:a=8589934592;Math.abs(n-s)>4294967296;)n+=a;return n/An.ONE_SECOND_IN_TS}}const h8=function(r,e){const t=r.cues;for(let n=0;n<t.length;n++){const s=t[n];if(e>=s.adStartTime&&e<=s.adEndTime)return s}return null},f8=function(r,e,t=0){if(!r.segments)return;let n=t,s;for(let a=0;a<r.segments.length;a++){const o=r.segments[a];if(s||(s=h8(e,n+o.duration/2)),s){if("cueIn"in o){s.endTime=n,s.adEndTime=n,n+=o.duration,s=null;continue}if(n<s.endTime){n+=o.duration;continue}s.endTime+=o.duration}else if("cueOut"in o&&(s=new G.VTTCue(n,n+o.duration,o.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(o.cueOut),e.addCue(s)),"cueOutCont"in o){const[l,c]=o.cueOutCont.split("/").map(parseFloat);s=new G.VTTCue(n,n+o.duration,""),s.adStartTime=n-l,s.adEndTime=s.adStartTime+c,e.addCue(s)}n+=o.duration}};class jd{constructor({start:e,end:t,segmentIndex:n,partIndex:s=null,appended:a=!1}){this.start_=e,this.end_=t,this.segmentIndex_=n,this.partIndex_=s,this.appended_=a}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class p8{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class Gf{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,t){const{mediaSequence:n,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(n,s),!!this.isReliable_)return this.updateStorage_(s,n,this.calculateBaseTime_(n,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const s of n)if(s.isInRange(e))return s}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,n){const s=new Map;let a=`
221
+ `,o=n,l=t;this.start_=o,e.forEach((c,d)=>{const g=this.storage_.get(l),m=o,S=m+c.duration,T=!!(g&&g.segmentSyncInfo&&g.segmentSyncInfo.isAppended),C=new jd({start:m,end:S,appended:T,segmentIndex:d});c.syncInfo=C;let y=o;const k=(c.parts||[]).map((O,I)=>{const D=y,q=y+O.duration,$=!!(g&&g.partsSyncInfo&&g.partsSyncInfo[I]&&g.partsSyncInfo[I].isAppended),U=new jd({start:D,end:q,appended:$,segmentIndex:d,partIndex:I});return y=q,a+=`Media Sequence: ${l}.${I} | Range: ${D} --> ${q} | Appended: ${$}
222
+ `,O.syncInfo=U,U});s.set(l,new p8(C,k)),a+=`${qf(c.resolvedUri)} | Media Sequence: ${l} | Range: ${m} --> ${S} | Appended: ${T}
223
+ `,l++,o=S}),this.end_=o,this.storage_=s,this.diagnostics_=a}calculateBaseTime_(e,t,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const a=s-e;let o=this.storage_.get(s).segmentSyncInfo.start;for(let l=0;l<a;l++){const c=t[l];o-=c.duration}return o}return n}isReliablePlaylist_(e,t){return e!=null&&Array.isArray(t)&&t.length}}class Hd extends Gf{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,n){if(!this.storage_.size){const s=this.parent_.getSyncInfoForMediaSequence(e);return s?s.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,n)}}const m8=86400,Wo=[{name:"VOD",run:(r,e,t,n,s)=>t!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,t,n,s,a)=>{const o=r.getMediaSequenceSync(a);if(!o||!o.isReliable)return null;const l=o.getSyncInfoForTime(s);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(r,e,t,n,s)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,o=null;const l=fl(e);s=s||0;for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=r.timelineToDatetimeMappings[m.timeline];if(!S||!m.dateTimeObject)continue;let C=m.dateTimeObject.getTime()/1e3+S;if(m.parts&&typeof g.partIndex=="number")for(let k=0;k<g.partIndex;k++)C+=m.parts[k].duration;const y=Math.abs(s-C);if(o!==null&&(y===0||o<y))break;o=y,a={time:C,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return a}},{name:"Segment",run:(r,e,t,n,s)=>{let a=null,o=null;s=s||0;const l=fl(e);for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=g.part&&g.part.start||m&&m.start;if(m.timeline===n&&typeof S<"u"){const T=Math.abs(s-S);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:S,segmentIndex:g.segmentIndex,partIndex:g.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,t,n,s)=>{let a=null;if(s=s||0,e.discontinuityStarts&&e.discontinuityStarts.length){let o=null;for(let l=0;l<e.discontinuityStarts.length;l++){const c=e.discontinuityStarts[l],d=e.discontinuitySequence+l+1,g=r.discontinuities[d];if(g){const m=Math.abs(s-g.time);if(o!==null&&o<m)break;(!a||o===null||o>=m)&&(o=m,a={time:g.time,segmentIndex:c,partIndex:null})}}}return a}},{name:"Playlist",run:(r,e,t,n,s)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class g8 extends re.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new Gf,n=new Hd(t),s=new Hd(t);this.mediaSequenceStorage_={main:t,audio:n,vtt:s},this.logger_=xi("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,s,a){if(t!==1/0)return Wo.find(({name:c})=>c==="VOD").run(this,e,t);const o=this.runStrategies_(e,t,n,s,a);if(!o.length)return null;for(const l of o){const{syncPoint:c,strategy:d}=l,{segmentIndex:g,time:m}=c;if(g<0)continue;const S=e.segments[g],T=m,C=T+S.duration;if(this.logger_(`Strategy: ${d}. Current time: ${s}. selected segment: ${g}. Time: [${T} -> ${C}]}`),s>=T&&s<C)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(o,{key:"time",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;const s=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Jr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,s,a){const o=[];for(let l=0;l<Wo.length;l++){const c=Wo[l],d=c.run(this,e,t,n,s,a);d&&(d.strategy=c.name,o.push({strategy:c.name,syncPoint:d}))}return o}selectSyncPoint_(e,t){let n=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy;for(let o=1;o<e.length;o++){const l=Math.abs(e[o].syncPoint[t.key]-t.value);l<s&&(s=l,n=e[o].syncPoint,a=e[o].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${a}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n}saveExpiredSegmentInfo(e,t){const n=t.mediaSequence-e.mediaSequence;if(n>m8){re.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return}for(let s=n-1;s>=0;s--){const a=e.segments[s];if(a&&typeof a.start<"u"){t.syncInfo={mediaSequence:e.mediaSequence+s,time:a.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const n=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;n&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const a=s.dateTimeObject;s.discontinuity&&t&&a&&(this.timelineToDatetimeMappings[s.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,n){const s=e.segment,a=e.part;let o=this.timelines[e.timeline],l,c;if(typeof e.timestampOffset=="number")o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),l=e.startOfSegment,c=t.end+o.mapping;else if(o)l=t.start+o.mapping,c=t.end+o.mapping;else return!1;return a&&(a.start=l,a.end=c),(!s.start||l<s.start)&&(s.start=l),s.end=c,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){let d;l<0?d=n.start-Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):d=n.end+Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:d,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class v8 extends re.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:n}){return typeof t=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:n}){if(typeof t=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:t,to:n},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:n}};this.trigger({type:"timelinechange",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const y8=If(Of(function(){var r=(function(){function y(){this.listeners={}}var k=y.prototype;return k.on=function(I,D){this.listeners[I]||(this.listeners[I]=[]),this.listeners[I].push(D)},k.off=function(I,D){if(!this.listeners[I])return!1;var q=this.listeners[I].indexOf(D);return this.listeners[I]=this.listeners[I].slice(0),this.listeners[I].splice(q,1),q>-1},k.trigger=function(I){var D=this.listeners[I];if(D)if(arguments.length===2)for(var q=D.length,$=0;$<q;++$)D[$].call(this,arguments[1]);else for(var U=Array.prototype.slice.call(arguments,1),N=D.length,z=0;z<N;++z)D[z].apply(this,U)},k.dispose=function(){this.listeners={}},k.pipe=function(I){this.on("data",function(D){I.push(D)})},y})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(y){return y.subarray(0,y.byteLength-y[y.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const y=[[[],[],[],[],[]],[[],[],[],[],[]]],k=y[0],O=y[1],I=k[4],D=O[4];let q,$,U;const N=[],z=[];let b,E,P,Q,L,V;for(q=0;q<256;q++)z[(N[q]=q<<1^(q>>7)*283)^q]=q;for($=U=0;!I[$];$^=b||1,U=z[U]||1)for(Q=U^U<<1^U<<2^U<<3^U<<4,Q=Q>>8^Q&255^99,I[$]=Q,D[Q]=$,P=N[E=N[b=N[$]]],V=P*16843009^E*65537^b*257^$*16843008,L=N[Q]*257^Q*16843008,q=0;q<4;q++)k[q][$]=L=L<<24^L>>>8,O[q][Q]=V=V<<24^V>>>8;for(q=0;q<5;q++)k[q]=k[q].slice(0),O[q]=O[q].slice(0);return y};let n=null;class s{constructor(k){n||(n=t()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];let O,I,D;const q=this._tables[0][4],$=this._tables[1],U=k.length;let N=1;if(U!==4&&U!==6&&U!==8)throw new Error("Invalid aes key size");const z=k.slice(0),b=[];for(this._key=[z,b],O=U;O<4*U+28;O++)D=z[O-1],(O%U===0||U===8&&O%U===4)&&(D=q[D>>>24]<<24^q[D>>16&255]<<16^q[D>>8&255]<<8^q[D&255],O%U===0&&(D=D<<8^D>>>24^N<<24,N=N<<1^(N>>7)*283)),z[O]=z[O-U]^D;for(I=0;O;I++,O--)D=z[I&3?O:O-4],O<=4||I<4?b[I]=D:b[I]=$[0][q[D>>>24]]^$[1][q[D>>16&255]]^$[2][q[D>>8&255]]^$[3][q[D&255]]}decrypt(k,O,I,D,q,$){const U=this._key[1];let N=k^U[0],z=D^U[1],b=I^U[2],E=O^U[3],P,Q,L;const V=U.length/4-2;let M,j=4;const F=this._tables[1],Y=F[0],K=F[1],J=F[2],Z=F[3],ie=F[4];for(M=0;M<V;M++)P=Y[N>>>24]^K[z>>16&255]^J[b>>8&255]^Z[E&255]^U[j],Q=Y[z>>>24]^K[b>>16&255]^J[E>>8&255]^Z[N&255]^U[j+1],L=Y[b>>>24]^K[E>>16&255]^J[N>>8&255]^Z[z&255]^U[j+2],E=Y[E>>>24]^K[N>>16&255]^J[z>>8&255]^Z[b&255]^U[j+3],j+=4,N=P,z=Q,b=L;for(M=0;M<4;M++)q[(3&-M)+$]=ie[N>>>24]<<24^ie[z>>16&255]<<16^ie[b>>8&255]<<8^ie[E&255]^U[j++],P=N,N=z,z=b,b=E,E=P}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(k){this.jobs.push(k),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(y){return y<<24|(y&65280)<<8|(y&16711680)>>8|y>>>24},l=function(y,k,O){const I=new Int32Array(y.buffer,y.byteOffset,y.byteLength>>2),D=new s(Array.prototype.slice.call(k)),q=new Uint8Array(y.byteLength),$=new Int32Array(q.buffer);let U,N,z,b,E,P,Q,L,V;for(U=O[0],N=O[1],z=O[2],b=O[3],V=0;V<I.length;V+=4)E=o(I[V]),P=o(I[V+1]),Q=o(I[V+2]),L=o(I[V+3]),D.decrypt(E,P,Q,L,$,V),$[V]=o($[V]^U),$[V+1]=o($[V+1]^N),$[V+2]=o($[V+2]^z),$[V+3]=o($[V+3]^b),U=E,N=P,z=Q,b=L;return q};class c{constructor(k,O,I,D){const q=c.STEP,$=new Int32Array(k.buffer),U=new Uint8Array(k.byteLength);let N=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+q),O,I,U)),N=q;N<$.length;N+=q)I=new Uint32Array([o($[N-4]),o($[N-3]),o($[N-2]),o($[N-1])]),this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+q),O,I,U));this.asyncStream_.push(function(){D(null,e(U))})}static get STEP(){return 32e3}decryptChunk_(k,O,I,D){return function(){const q=l(k,O,I);D.set(q,k.byteOffset)}}}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof d<"u"?g=d:typeof self<"u"?g=self:g={};var m=g,S=function(k){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(k):k&&k.buffer instanceof ArrayBuffer},T=m.BigInt||Number;T("0x1"),T("0x100"),T("0x10000"),T("0x1000000"),T("0x100000000"),T("0x10000000000"),T("0x1000000000000"),T("0x100000000000000"),T("0x10000000000000000"),(function(){var y=new Uint16Array([65484]),k=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);return k[0]===255?"big":k[0]===204?"little":"unknown"})();const C=function(y){const k={};return Object.keys(y).forEach(O=>{const I=y[O];S(I)?k[O]={bytes:I.buffer,byteOffset:I.byteOffset,byteLength:I.byteLength}:k[O]=I}),k};self.onmessage=function(y){const k=y.data,O=new Uint8Array(k.encrypted.bytes,k.encrypted.byteOffset,k.encrypted.byteLength),I=new Uint32Array(k.key.bytes,k.key.byteOffset,k.key.byteLength/4),D=new Uint32Array(k.iv.bytes,k.iv.byteOffset,k.iv.byteLength/4);new c(O,I,D,function(q,$){self.postMessage(C({source:k.source,decrypted:$}),[$.buffer])})}}));var _8=Nf(y8);const T8=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Wf=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Sl=(r,e)=>{e.activePlaylistLoader=r,r.load()},b8=(r,e)=>()=>{const{segmentLoaders:{[r]:t,main:n},mediaTypes:{[r]:s}}=e,a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastGroup_;if(!(o&&c&&o.id===c.id)&&(s.lastGroup_=o,s.lastTrack_=a,Wf(t,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}t.resyncLoader(),Sl(o.playlistLoader,s)}},x8=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,t.abort(),t.pause()},C8=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,d=a.lastTrack_;if(!(d&&o&&d.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,Wf(n,a),!!l)){if(l.isMainPlaylist){if(!o||!d||o.id===d.id)return;const g=e.vhs.playlistController_,m=g.selectPlaylist();if(g.media()===m)return;a.logger_(`track change. Switching main audio from ${d.id} to ${o.id}`),t.pause(),s.resetEverything(),g.fastQualityChange_(m);return}if(r==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}n.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){Sl(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Sl(l.playlistLoader,a)}},ya={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:t},excludePlaylist:n}=e,s=t.activeTrack(),a=t.activeGroup(),o=(a.filter(c=>c.default)[0]||a[0]).id,l=t.tracks[o];if(s===l){n({error:{message:"Problem encountered loading the default audio track."}});return}re.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in t.tracks)t.tracks[c].enabled=t.tracks[c]===l;t.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:t}}=e;re.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}},zd={AUDIO:(r,e,t)=>{if(!e)return;const{tech:n,requestOptions:s,segmentLoaders:{[r]:a}}=t;e.on("loadedmetadata",()=>{const o=e.media();a.playlist(o,s),(!n.paused()||o.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",ya[r](r,t))},SUBTITLES:(r,e,t)=>{const{tech:n,requestOptions:s,segmentLoaders:{[r]:a},mediaTypes:{[r]:o}}=t;e.on("loadedmetadata",()=>{const l=e.media();a.playlist(l,s),a.track(o.activeTrack()),(!n.paused()||l.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",ya[r](r,t))}},S8={AUDIO:(r,e)=>{const{vhs:t,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:d}},mainPlaylistLoader:g}=e,m=hs(g.main);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},m&&(o[r].main.default.playlists=g.main.playlists));for(const S in o[r]){l[S]||(l[S]=[]);for(const T in o[r][S]){let C=o[r][S][T],y;if(m?(d(`AUDIO group '${S}' label '${T}' is a main playlist`),C.isMainPlaylist=!0,y=null):n==="vhs-json"&&C.playlists?y=new Yn(C.playlists[0],t,a):C.resolvedUri?y=new Yn(C.resolvedUri,t,a):C.playlists&&n==="dash"?y=new _l(C.playlists[0],t,a,g):y=null,C=st({id:T,playlistLoader:y},C),zd[r](r,C.playlistLoader,e),l[S].push(C),typeof c[T]>"u"){const k=new re.AudioTrack({id:T,kind:T8(C),enabled:!1,language:C.language,default:C.default,label:T});c[T]=k}}}s.on("error",ya[r](r,e))},SUBTITLES:(r,e)=>{const{tech:t,vhs:n,sourceType:s,segmentLoaders:{[r]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[r]:{groups:c,tracks:d}},mainPlaylistLoader:g}=e;for(const m in l[r]){c[m]||(c[m]=[]);for(const S in l[r][m]){if(!n.options_.useForcedSubtitles&&l[r][m][S].forced)continue;let T=l[r][m][S],C;if(s==="hls")C=new Yn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(k=>k.excludeUntil!==1/0).length)return;C=new _l(T.playlists[0],n,o,g)}else s==="vhs-json"&&(C=new Yn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=st({id:S,playlistLoader:C},T),zd[r](r,T.playlistLoader,e),c[m].push(T),typeof d[S]>"u"){const y=t.addRemoteTextTrack({id:S,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:S},!1).track;d[S]=y}}}a.on("error",ya[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:t,main:{mediaGroups:n},mediaTypes:{[r]:{groups:s,tracks:a}}}=e;for(const o in n[r]){s[o]||(s[o]=[]);for(const l in n[r][o]){const c=n[r][o][l];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const d=t.options_.vhs&&t.options_.vhs.captionServices||{};let g={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[g.instreamId]&&(g=st(g,d[g.instreamId])),g.default===void 0&&delete g.default,s[o].push(st({id:l},c)),typeof a[l]>"u"){const m=t.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;a[l]=m}}}}},Yf=(r,e)=>{for(let t=0;t<r.length;t++)if(du(e,r[t])||r[t].playlists&&Yf(r[t].playlists,e))return!0;return!1},E8=(r,e)=>t=>{const{mainPlaylistLoader:n,mediaTypes:{[r]:{groups:s}}}=e,a=n.media();if(!a)return null;let o=null;a.attributes[r]&&(o=s[a.attributes[r]]);const l=Object.keys(s);if(!o)if(r==="AUDIO"&&l.length>1&&hs(e.main))for(let c=0;c<l.length;c++){const d=s[l[c]];if(Yf(d,a)){o=d;break}}else s.main?o=s.main:l.length===1&&(o=s[l[0]]);return typeof t>"u"?o:t===null||!o?null:o.filter(c=>c.id===t.id)[0]||null},k8={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].enabled)return t[n];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].mode==="showing"||t[n].mode==="hidden")return t[n];return null}},w8=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},D8=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{S8[d](d,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=E8(d,r),e[d].activeTrack=k8[d](d,r),e[d].onGroupChanged=b8(d,r),e[d].onGroupChanging=x8(d,r),e[d].onTrackChanged=C8(d,r),e[d].getActiveGroup=w8(d,r)});const l=e.AUDIO.activeGroup();if(l){const d=(l.filter(m=>m.default)[0]||l[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),s.on("dispose",()=>{n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const d in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[d])},A8=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:en,activeTrack:en,getActiveGroup:en,onGroupChanged:en,onTrackChanged:en,lastTrack_:null,logger_:xi(`MediaGroups[${e}]`)}}),r};class Gd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=si(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class N8 extends re.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Gd,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=xi("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const n=t.serverUri||t.serverURL;if(!n){this.logger_(`steering manifest URL is ${n}, cannot request steering manifest.`),this.trigger("error");return}if(n.startsWith("data:")){this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1));return}this.steeringManifest.reloadUri=si(e,n),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const n=e?t:this.getRequestURI(t);if(!n){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const s={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:s}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},(a,o)=>{if(a){if(o.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${n} this session.`),this.excludedSteeringManifestURLs.add(n);return}if(o.status===429){const d=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${d} seconds.`),this.startTTLTimeout_(parseInt(d,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:s});let l;try{l=JSON.parse(this.request_.responseText)}catch(d){const g={errorType:re.Error.StreamingContentSteeringParserError,error:d};this.trigger({type:"error",metadata:g})}this.assignSteeringProperties_(l);const c={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new G.URL(e),n=new G.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(G.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new G.URL(e),n=this.getPathway(),s=this.getBandwidth_();if(n){const a=`_${this.manifestType_}_pathway`;t.searchParams.set(a,n)}if(s){const a=`_${this.manifestType_}_throughput`;t.searchParams.set(a,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const n=(s=>{for(const a of s)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==n&&(this.currentPathway=n,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=s=>this.excludedSteeringManifestURLs.has(s);if(this.proxyServerUrl_){const s=this.setProxyServerUrl_(e);if(!t(s))return s}const n=this.setSteeringParams_(e);return t(n)?null:n}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=G.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){G.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Gd}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(si(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const I8=(r,e)=>{let t=null;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{r.apply(null,n)},e)}},O8=10;let Qi;const B8=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],L8=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},M8=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return re.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${d} as current playlist is not set`),!0;if(n.id===r.id)return!1;const g=!!Wn(e,t).length;if(!r.endList)return!g&&typeof r.partTargetDuration=="number"?(c(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${d} as current playlist is live`),!0);const m=lu(e,t),S=l?Bt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Bt.MAX_BUFFER_LOW_WATER_LINE;if(o<S)return c(`${d} as duration < max low water line (${o} < ${S})`),!0;const T=n.attributes.BANDWIDTH,C=r.attributes.BANDWIDTH;if(T<C&&(!l||m<a)){let y=`${d} as next bandwidth < current bandwidth (${T} < ${C})`;return l&&(y+=` and forwardBuffer < bufferHighWaterLine (${m} < ${a})`),c(y),!0}if((!l||T>C)&&m>=s){let y=`${d} as forwardBuffer >= bufferLowWaterLine (${m} >= ${s})`;return l&&(y+=` and next bandwidth > current bandwidth (${T} > ${C})`),c(y),!0}return c(`not ${d} as no switching criteria met`),!1};class P8 extends re.EventTarget{constructor(e){super(),this.fastQualityChange_=I8(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:d,sourceType:g,cacheEncryptionKeys:m,bufferBasedABR:S,leastPixelDiffSelector:T,captionServices:C,experimentalUseMMS:y}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:k}=e;(k===null||typeof k>"u")&&(k=1/0),Qi=o,this.bufferBasedABR=!!S,this.leastPixelDiffSelector=!!T,this.withCredentials=n,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=g,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=k,this.enableLowInitialPlaylist=d,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:k,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=A8(),y&&G.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new G.ManagedMediaSource,this.usingManagedMediaSource_=!0,re.log("Using ManagedMediaSource")):G.MediaSource&&(this.mediaSource=new G.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Mt(),this.hasPlayed_=!1,this.syncController_=new g8(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new _8,this.sourceUpdater_=new zf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new v8,this.keyStatusMap_=new Map;const O={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:C,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new _l(t,this.vhs_,st(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Yn(t,this.vhs_,st(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new xl(st(O,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new xl(st(O,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new d8(st(O,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((q,$)=>{function U(){s.off("vttjserror",N),q()}function N(){s.off("vttjsloaded",U),$()}s.one("vttjsloaded",U),s.one("vttjserror",N),s.addWebVttScript_()})}),e);const I=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new N8(this.vhs_.xhr,I),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),B8.forEach(q=>{this[q+"_"]=L8.bind(this,q)}),this.logger_=xi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const D=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(D,()=>{const q=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-q,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,n){const s=this.media(),a=s&&(s.id||s.uri),o=e&&(e.id||e.uri);if(a&&a!==o){this.logger_(`switch media ${a} -> ${o} from ${t}`);const l={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],n=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(n&&s){const o=(n.length?n[0].playlists:n.playlists).filter(l=>l.attributes.serviceLocation===s);o.length&&this.mediaTypes_[e].activePlaylistLoader.media(o[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=G.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(G.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const n=e.mediaGroups.AUDIO,s=Object.keys(n);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const l=n.main||s.length&&n[s[0]];for(const c in l)if(l[c].default){a={label:c};break}}if(!a)return t;const o=[];for(const l in n)if(n[l][a.label]){const c=n[l][a.label];if(c.playlists&&c.playlists.length)o.push.apply(o,c.playlists);else if(c.uri)o.push(c);else if(e.playlists.length)for(let d=0;d<e.playlists.length;d++){const g=e.playlists[d];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===l&&o.push(g)}}return o.length?o:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;pl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),D8({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let t=this.mainPlaylistLoader_.media();if(!t){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let n;if(this.enableLowInitialPlaylist&&(n=this.selectInitialPlaylist()),n||(n=this.selectPlaylist()),!n||!this.shouldSwitchToMedia_(n)||(this.initialMedia_=n,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;pl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();if(t.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(t)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(t=>{this.mainPlaylistLoader_.on(t,n=>{this.player_.trigger(xt({},n))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const n=e.mediaGroups||{};let s=!0;const a=Object.keys(n.AUDIO);for(const o in n.AUDIO)for(const l in n.AUDIO[o])n.AUDIO[o][l].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Qi.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(n.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),s=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),o=this.tech_.buffered();return M8({buffered:o,currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const n=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const n=this.audioSegmentLoader_.pendingSegment_;if(!n||!n.segment||!n.segment.syncInfo)return;const s=n.segment.syncInfo.end+.01;this.tech_.setCurrentTime(s)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",n=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:O8}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const n=this.getCodecsOrExclude_();n&&this.sourceUpdater_.addOrChangeSourceBuffers(n)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(n=>{this.mainSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},s))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const n=t.end(0);let s=n;if(e.start){const a=e.start.timeOffset;if(a<0){const o=this.mainPlaylistLoader_.main,l=Qi.Playlist.liveEdgeDelay(o,e),c=n+l;s=Math.max(Math.min(c+a,n),t.start(0))}else s=Math.min(n,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,t=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const n=this.syncController_.getExpiredTime(e,this.duration());if(n===null)return!1;const s=Qi.Playlist.playlistEnd(e,n),a=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return s-a<=$i;const l=o.end(o.length-1);return l-a<=$i&&s-l<=$i}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,a=s.filter(ja),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return re.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const C=this.pathwayAttribute_(e),y=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(C),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(C)},y);return}let T=!1;s.forEach(C=>{if(C===e)return;const y=C.excludeUntil;typeof y<"u"&&y!==1/0&&(T=!0,delete C.excludeUntil)}),T&&(re.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+n*1e3,e.excludeUntil=l,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const d=t.internal?this.logger_:re.log.warn,g=t.message?" "+t.message:"";d(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${g} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const m=c.targetDuration/2*1e3||5*1e3,S=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=m;return this.switchMedia_(c,"exclude",o||S)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const n=[],s=e==="all";(s||e==="main")&&n.push(this.mainPlaylistLoader_);const a=[];(s||e==="audio")&&a.push("AUDIO"),(s||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(o=>{const l=this.mediaTypes_[o]&&this.mediaTypes_[o].activePlaylistLoader;l&&n.push(l)}),["main","audio","subtitle"].forEach(o=>{const l=this[`${o}SegmentLoader_`];l&&(e===o||e==="all")&&n.push(l)}),n.forEach(o=>t.forEach(l=>{typeof o[l]=="function"&&o[l]()}))}setCurrentTime(e){const t=Wn(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Qi.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const n=e.media();if(!n)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const l=s.start,c=s.end;if(!isFinite(l)||!isFinite(c))return null;const d=Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),g=Math.max(l,c-d);return Mt([[l,g]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Qi.Playlist.seekable(n,a,Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,t){if(!t)return e;const n=e.start(0),s=e.end(0),a=t.start(0),o=t.end(0);return a>s||n>o?e:Mt([[Math.max(n,a),Math.min(s,o)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_||n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${rf(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:s}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const s=this.seekable();if(!s.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<s.end(s.length-1))&&this.sourceUpdater_.setDuration(s.end(s.length-1));return}const t=this.tech_.buffered();let n=Qi.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(n=Math.max(n,t.end(t.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const n in t)t[n].forEach(s=>{s.playlistLoader&&s.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=es(this.main(),t),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||S_),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Mc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Mc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(d,g)=>d?Xr(g,this.usingManagedMediaSource_):wo(g),l={};let c;if(["video","audio"].forEach(function(d){if(s.hasOwnProperty(d)&&!o(e[d].isFmp4,s[d])){const g=e[d].isFmp4?"browser":"muxer";l[g]=l[g]||[],l[g].push(s[d]),d==="audio"&&(c=g)}}),a&&c&&t.attributes.AUDIO){const d=t.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===d&&g!==t&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const d=Object.keys(l).reduce((g,m)=>(g&&(g+=", "),g+=`${m} does not support codec(s): "${l[m].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(g=>{const m=(Pi(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,S=(Pi(s[g]||"")[0]||{}).type;m&&S&&m.toLowerCase()!==S.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[g]}" -> "${s[g]}"`)}),d.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return s}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(n=>{const s=e[n];if(t.indexOf(s.id)!==-1)return;t.push(s.id);const a=es(this.main,s),o=[];a.audio&&!wo(a.audio)&&!Xr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!wo(a.video)&&!Xr(a.video,this.usingManagedMediaSource_)&&o.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&o.push(`text codec ${a.text}`),o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],n=this.main().playlists,s=as(Pi(e)),a=Dd(s),o=s.video&&Pi(s.video)[0]||null,l=s.audio&&Pi(s.audio)[0]||null;Object.keys(n).forEach(c=>{const d=n[c];if(t.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;t.push(d.id);const g=[],m=es(this.mainPlaylistLoader_.main,d),S=Dd(m);if(!(!m.audio&&!m.video)){if(S!==a&&g.push(`codec count "${S}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=m.video&&Pi(m.video)[0]||null,C=m.audio&&Pi(m.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&g.push(`video codec "${T.type}" !== "${o.type}"`),C&&l&&C.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`audio codec "${C.type}" !== "${l.type}"`)}g.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${g.join(" && ")}`))}})}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),f8(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Bt.GOAL_BUFFER_LENGTH,n=Bt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Bt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Bt.BUFFER_LOW_WATER_LINE,n=Bt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Bt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Bt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Bt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Pd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),G4({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Pd(this.inbandTextTracks_,e,this.tech_),j4({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(t=>{this.contentSteeringController_.on(t,n=>{this.trigger(xt({},n))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),o=[];for(const l of t.playlists){const c=l.attributes.serviceLocation;if(c&&(o.push(c),!a.has(c)))return!0}return!!(!o.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const n=this.main().playlists,s=new Set;let a=!1;Object.keys(n).forEach(o=>{const l=n[o],c=this.pathwayAttribute_(l),d=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!d&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const m=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&d&&m&&(s.add(l.id),l.excludeUntil=1/0,l.lastExcludeReason_="content-steering",this.logger_(`excluding ${l.id} for ${l.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(o=>{const l=this.mediaTypes_[o];if(l.activePlaylistLoader){const c=l.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const t=this.main().playlists,n=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones;if(n&&n.size||s&&s.size){for(const[o,l]of n.entries())s.get(o)||(this.mainPlaylistLoader_.updateOrDeleteClone(l),this.contentSteeringController_.excludePathway(o));for(const[o,l]of s.entries()){const c=n.get(o);if(!c){t.filter(g=>g.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(l,g)}),this.contentSteeringController_.addAvailablePathway(o);continue}this.equalPathwayClones_(c,l)||(this.mainPlaylistLoader_.updateOrDeleteClone(l,!0),this.contentSteeringController_.addAvailablePathway(o))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,s=t["URI-REPLACEMENT"].PARAMS;for(const a in n)if(n[a]!==s[a])return!1;for(const a in s)if(n[a]!==s[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(n=>{const s=this.mainPlaylistLoader_.getKeyIdSet(n);!s||!s.size||s.forEach(a=>{const o="usable",l=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===o,c=n.lastExcludeReason_===t&&n.excludeUntil===1/0;l?l&&c&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_(`enabling playlist ${n.id} because key ID ${a} is ${o}`)):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==t&&(n.excludeUntil=1/0,n.lastExcludeReason_=t,this.logger_(`excluding playlist ${n.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${o}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(n=>{const s=n&&n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.height<720,a=n.excludeUntil===1/0&&n.lastExcludeReason_===t;s&&a&&(delete n.excludeUntil,re.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const a=(typeof e=="string"?e:u8(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const R8=(r,e,t)=>n=>{const s=r.main.playlists[e],a=cu(s),o=ja(s);if(typeof n>"u")return o;n?delete s.disabled:s.disabled=!0;const l={renditionInfo:{id:e,bandwidth:s.attributes.BANDWIDTH,resolution:s.attributes.RESOLUTION,codecs:s.attributes.CODECS},cause:"fast-quality"};return n!==o&&!a&&(n?(t(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class V8{constructor(e,t,n){const{playlistController_:s}=e,a=s.fastQualityChange_.bind(s);if(t.attributes){const o=t.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=es(s.main(),t),this.playlist=t,this.id=n,this.enabled=R8(e.playlists,t.id,a)}}const F8=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=hs(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(n=>!cu(n)).map((n,s)=>new V8(r,n,n.id)):[]}},Wd=["seeking","seeked","pause","playing","error"];class $8 extends re.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=xi("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),o=this.playlistController_,l=["main","subtitle","audio"],c={};l.forEach(g=>{c[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},o[`${g}SegmentLoader_`].on("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].on("playlistupdate",c[g].reset),this.tech_.on(["seeked","seeking"],c[g].reset)});const d=g=>{["main","audio"].forEach(m=>{o[`${m}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(Wd,a),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(Wd,a),this.tech_.off("canplay",n),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(g=>{o[`${g}SegmentLoader_`].off("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].off("playlistupdate",c[g].reset),this.tech_.off(["seeked","seeking"],c[g].reset)}),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=G.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,n=t[`${e}SegmentLoader_`],s=n.buffered_(),a=Eb(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,a){const o={bufferedRanges:s};t.trigger({type:"bufferedrangeschanged",metadata:o}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:n.playlist_&&n.playlist_.id,buffered:Nn(s)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+$i>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Mt([this.lastRecordedTime,e]));const n={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:n}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const t=this.seekable(),n=this.tech_.currentTime(),s=this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(s&&(a=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){const C=t.start(0);a=C+(C===t.end(0)?0:$i)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${rf(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,g=this.media(),m=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-Fi)*2,S=[c,d];for(let C=0;C<S.length;C++){if(!S[C])continue;if(lu(S[C],n)<m)return!1}const T=Us(l,n);return T.length===0?!1:(a=T.start(0)+$i,this.logger_(`Buffered region starts (${T.start(0)}) just beyond seek point (${n}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Wn(t,e);if(n.length&&e+3<=n.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${n.start(0)} -> ${n.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${l}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(l),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const n=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=Us(s,t);return o.length>0?(this.logger_(`Stopped at ${t} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,n,s=!1){if(!e.length)return!1;let a=e.end(e.length-1)+$i;const o=!n.endList,l=typeof n.partTargetDuration=="number";return o&&(l||s)&&(a=e.end(e.length-1)+n.targetDuration*3),t>a}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:n}){if(!e)return;let s;if(e.length&&t.length){const a=Wn(e,n-3),o=Wn(e,n),l=Wn(t,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else Us(e,n).length||(s=this.gapFromVideoUnderflow_(e,n));return s?(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${n}`),!0):!1}skipTheGap_(e){const t=this.tech_.buffered(),n=this.tech_.currentTime(),s=Us(t,n);if(this.resetTimeUpdate_(),s.length===0||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Fi);const a={gapInfo:{from:n,to:s.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const n=xb(e);for(let s=0;s<n.length;s++){const a=n.start(s),o=n.end(s);if(t-a<4&&t-a>2)return{start:a,end:o}}return null}}const U8={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},Xf=function(r,e){let t=0,n=0;const s=st(U8,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&r.currentTime(n)},o=function(g){g!=null&&(n=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(g),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},l=function(){if(Date.now()-t<s.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!="function"){re.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return t=Date.now(),s.getSource.call(r,o)},c=function(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",c)},d=function(g){c(),Xf(r,g)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=d},q8=function(r){Xf(this,r)};var Kf="3.17.3",j8="7.1.0",H8="1.3.1",z8="7.2.0",G8="4.0.2";const gt={PlaylistLoader:Yn,Playlist:ai,utils:Qb,STANDARD_PLAYLIST_SELECTOR:Md,INITIAL_PLAYLIST_SELECTOR:V4,lastBandwidthSelector:Md,movingAverageBandwidthSelector:P4,comparePlaylistBandwidth:fu,comparePlaylistResolution:M4,xhr:Cf()};Object.keys(Bt).forEach(r=>{Object.defineProperty(gt,r,{get(){return re.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Bt[r]},set(e){if(re.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){re.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Bt[r]=e}})});const Qf="videojs-vhs",Zf=function(r,e){const t=e.media();let n=-1;for(let s=0;s<r.length;s++)if(r[s].id===t.id){n=s;break}r.selectedIndex_=n,r.trigger({selectedIndex:n,type:"change"})},W8=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),Zf(r,e.playlists)};gt.canPlaySource=function(){return re.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Y8=(r,e,t)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=as(Pi(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(n.audio=t.attributes.CODECS);const s=rr(n.video),a=rr(n.audio),o={};for(const l in r)o[l]={},a&&(o[l].audioContentType=a),s&&(o[l].videoContentType=s),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(o[l].pssh=e.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return st(r,o)},X8=(r,e)=>r.reduce((t,n)=>{if(!n.contentProtection)return t;const s=e.reduce((a,o)=>{const l=n.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(s).length&&t.push(s),t},[]),K8=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=t?n.concat([t]):n,a=X8(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((d,g)=>{r.tech_.one("keysessioncreated",d)})),o.push(new Promise((d,g)=>{r.eme.initializeMediaKeys({keySystems:c},m=>{if(m){g(m);return}d()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},Q8=({player:r,sourceKeySystems:e,media:t,audioMedia:n})=>{const s=Y8(e,t,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(re.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Jf=()=>{if(!G.localStorage)return null;const r=G.localStorage.getItem(Qf);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Z8=r=>{if(!G.localStorage)return!1;let e=Jf();e=e?st(e,r):r;try{G.localStorage.setItem(Qf,JSON.stringify(e))}catch{return!1}return e},J8=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,ep=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},tp=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},ip=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},np=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};gt.supportsNativeHls=(function(){if(!_e||!_e.createElement)return!1;const r=_e.createElement("video");return re.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1})();gt.supportsNativeDash=(function(){return!_e||!_e.createElement||!re.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(_e.createElement("video").canPlayType("application/dash+xml"))})();gt.supportsTypeNatively=r=>r==="hls"?gt.supportsNativeHls:r==="dash"?gt.supportsNativeDash:!1;gt.isSupported=function(){return re.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};gt.xhr.onRequest=function(r){ep(gt.xhr,r)};gt.xhr.onResponse=function(r){tp(gt.xhr,r)};gt.xhr.offRequest=function(r){ip(gt.xhr,r)};gt.xhr.offResponse=function(r){np(gt.xhr,r)};const ex=re.getComponent("Component");class rp extends ex{constructor(e,t,n){if(super(t,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=xi("VhsHandler"),t.options_&&t.options_.playerId){const s=re.getPlayer(t.options_.playerId);this.player_=s}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(_e,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=_e.fullscreenElement||_e.webkitFullscreenElement||_e.mozFullScreenElement||_e.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=st(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const n=Jf();n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Bt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Bt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(n=>{typeof this.source_[n]<"u"&&(this.options_[n]=this.source_[n])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;typeof t=="number"&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=J8(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=gt,this.options_.sourceType=Sh(t),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new P8(this.options_);const n=st({liveRangeSafeTimeDelta:$i},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new $8(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=re.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),a.error(o)});const s=this.options_.bufferBasedABR?gt.movingAverageBandwidthSelector(.55):gt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=gt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const o=G.navigator.connection||G.navigator.mozConnection||G.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&o){const c=o.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(a+o))},set(){re.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Nn(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Nn(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Z8({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{F8(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=G.URL.createObjectURL(this.playlistController_.mediaSource),(re.browser.IS_ANY_SAFARI||re.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),K8({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(t=>{this.logger_("error while creating EME key session",t),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=Q8({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",n=>{this.playlistController_.updatePlaylistByKeyStatus(n.keyId,n.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=re.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{W8(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Zf(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Kf,"mux.js":j8,"mpd-parser":H8,"m3u8-parser":z8,"aes-decrypter":G8}}version(){return this.constructor.version()}canChangeType(){return zf.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&G.URL.revokeObjectURL&&(G.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return r4({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,n=!0,s=2){return Df({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{ep(this.xhr,e)},this.xhr.onResponse=e=>{tp(this.xhr,e)},this.xhr.offRequest=e=>{ip(this.xhr,e)},this.xhr.offResponse=e=>{np(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],t=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,s=>{this.player_.trigger(xt({},s))})}),t.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(xt({},s))})})}}const _a={name:"videojs-http-streaming",VERSION:Kf,canHandleSource(r,e={}){const t=st(re.options,e);return!t.vhs.experimentalUseMMS&&!Xr("avc1.4d400d,mp4a.40.2",!1)?!1:_a.canPlayType(r.type,t)},handleSource(r,e,t={}){const n=st(re.options,t);return e.vhs=new rp(r,e,n),e.vhs.xhr=Cf(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=Sh(r);if(!t)return"";const n=_a.getOverrideNative(e);return!gt.supportsTypeNatively(t)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(re.browser.IS_ANY_SAFARI||re.browser.IS_IOS),{overrideNative:n=t}=e;return n}},tx=()=>Xr("avc1.4d400d,mp4a.40.2",!0);tx()&&re.getTech("Html5").registerSourceHandler(_a,0);re.VhsHandler=rp;re.VhsSourceHandler=_a;re.Vhs=gt;re.use||re.registerComponent("Vhs",gt);re.options.vhs=re.options.vhs||{};(!re.getPlugin||!re.getPlugin("reloadSourceOnError"))&&re.registerPlugin("reloadSourceOnError",q8);const ix="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",nx={class:"o-meeting-playback-video"},rx={key:0,class:"poster-title"},sx=i.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(r,{expose:e,emit:t}){const n=r,s=i.ref(),a=i.ref(),o=i.ref(),l=t,c=i.ref(!1),d=()=>{c.value=!1},g=(y,k=!1)=>{var D,q;const O=n.instance;if(!O)return;const I=(D=y.activeCues)==null?void 0:D[0];if(s.value&&clearInterval(s.value),I){I.text=((q=I==null?void 0:I.text)==null?void 0:q.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const $=I.text.split(`
224
+ `),U=$.length,N=I.endTime-I.startTime,z=parseFloat((N/U).toFixed(3));let b=0;if(k){const Q=(O.currentTime()-I.startTime)/(I.endTime-I.startTime);for(;(b+1)/U<Q;)b++}b<U?I.text=$.length?$[b]:I==null?void 0:I.text:I.text=$.length?$[0]:I==null?void 0:I.text;let E=z*1e3;const P=()=>{s.value=setInterval(()=>{y.mode="hidden",b++,b>$.length-1?clearInterval(s.value):b===$.length-1?(I.text=$[b],clearInterval(s.value),E=z*(U-b)*1e3,P()):I.text=$[b],y.mode="showing"},E)};P()}},m=i.ref([]);i.watch(()=>m.value,y=>{const k=n.instance;if(k){const O=k.textTracks();for(let I=0;I<O.length;I++)O[I].kind==="subtitles"&&(g(O[I],!0),O[I].mode=y.length?"showing":"hidden")}},{deep:!0});const S=i.ref(!1),T=i.ref("init"),C=async()=>{if(!n.src)return;const y=re("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||ix,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});l("getInstance",y),y.src(n.src),y.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class k extends re.getComponent("Button"){constructor(D,q){super(D,q),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const D=this.player().textTracks();for(let q=0;q<D.length;q++)D[q].kind==="subtitles"&&(g(D[q],!0),D[q].mode=D[q].mode==="showing"?"hidden":"showing",D[q].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(re.registerComponent("SubtitleToggleButton",k),y.controlBar.children_.some(I=>I.name_==="SubtitleToggleButton")||y.controlBar.addChild("SubtitleToggleButton",{},8)),(y==null?void 0:y.textTracks().tracks_).forEach(I=>{I==null||I.addEventListener("cuechange",()=>{g(I)})}),y.on("play",()=>{T.value="playing"}),y.on("timeupdate",()=>{const I=y.currentTime()||0,D=n.captions.findIndex(q=>Qo(q.start_time)>I);l("setTrackIdx",D)}),y.one("loadedmetadata",()=>{l("getDuration",y.duration())}),i.nextTick(()=>{const I=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=I.offsetHeight}),o.value=y};return i.onMounted(()=>{C(),document.addEventListener("click",d)}),i.watch(()=>n.src,()=>{C()}),i.onUnmounted(()=>{var y;(y=n==null?void 0:n.instance)==null||y.dispose(),document.removeEventListener("click",d)}),e({changeTime:y=>{var k;(k=o.value)==null||k.currentTime(y)}}),(y,k)=>(i.openBlock(),i.createElementBlock("div",nx,[i.createElementVNode("div",{class:i.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!r.poster,[T.value]:!0}])},[k[0]||(k[0]=i.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(i.openBlock(),i.createElementBlock("div",rx,i.toDisplayString(r.posterTitle),1)):i.createCommentVNode("",!0)],2)]))}}),ax={class:"o-meeting-playback"},ox={class:"video-header"},lx={class:"video-title"},ux={class:"video-content"},cx={class:"info-wrapper"},dx={class:"tab-content"},hx={key:0,class:"base-info"},fx={class:"info-item"},px={class:"info-item"},mx={class:"info-item"},gx={class:"info-item"},vx={key:1,class:"subject-list"},yx={class:"subject-title"},_x={key:0,class:"subject-progress"},Tx=["data-start","data-end"],Yd=i.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const t=r,n=e,{t:s}=Qe.useI18n(),a=i.ref(null),o=Y=>{a.value=Y},l=i.ref(0),c=Y=>{l.value=Y},d=i.ref([]),g=async Y=>{const J=await(await fetch(Y)).json();d.value=(J.segments||[]).map(Z=>{const ie=Dv(Z.speaker);return{...Z,contentHtml:Z.content,speakerIdx:ie,speakerLabel:`${s("meeting.speaker")}${ie}`}})},m=i.ref([]),S=Y=>O2[Y%3],T=i.ref(0),C=Y=>{T.value=Y},y=i.ref(),k=i.ref(""),O=i.ref([0,0]);function I(Y,K){const J=K.getBoundingClientRect(),ie=(Y.clientX-J.left)/J.width;return O.value[1]=`${K.offsetTop+K.parentElement.offsetTop}px`,O.value[0]=`${ie*100}%`,ie*T.value}const D=Y=>{let K=Y;for(;K&&K.className!=="subject-progress";)K=K.parentElement;return K},q=Y=>{let K=D(Y.target);K&&(k.value=Av(I(Y,K)))},$=()=>{k.value=""},U=Y=>{var J;let K=D(Y.target);K&&((J=y.value)==null||J.changeTime(I(Y,K)))},N=async Y=>{const J=await(await fetch(Y)).json();m.value=(J||[]).map(Z=>({...Z,startTime:Qo(Z.startTime),endTime:Qo(Z.endTime)}))},z=i.ref("info"),b=i.computed(()=>{const Y=[{label:s("meeting.baseInfo"),value:"info"}];return m.value.length&&Y.push({label:s("meeting.subject"),value:"subject"}),Y}),E=()=>{t.data&&(t.data.textJson&&g(t.data.textJson),t.data.topicJson&&N(t.data.topicJson))};i.watchEffect(()=>{E()});const P=Y=>{n("change-date",Y)},Q=i.ref(null),L=i.ref("auto");let V=null,M=null;const j=()=>{Q.value&&(L.value=`${Q.value.offsetHeight}px`)},F=()=>{cancelAnimationFrame(M),M=requestAnimationFrame(j)};return i.onMounted(()=>{Q.value&&(V=new ResizeObserver(F),V.observe(Q.value),j())}),i.onUnmounted(()=>{cancelAnimationFrame(M),V==null||V.disconnect()}),(Y,K)=>{var J,Z,ie,ae,fe;return i.openBlock(),i.createElementBlock("div",ax,[i.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:Q},[i.createElementVNode("div",ox,[i.createElementVNode("div",lx,i.toDisplayString((J=r.detail)==null?void 0:J.topic)+"("+i.toDisplayString((Z=r.detail)==null?void 0:Z.date)+")",1),(ie=r.dates)!=null&&ie.length?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(ae=r.detail)==null?void 0:ae.date,placeholder:i.unref(s)("meeting.selectDate"),onChange:P},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.dates,ce=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:ce,value:ce,label:ce},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",ux,[r.data?(i.openBlock(),i.createBlock(sx,{key:0,ref_key:"playerRef",ref:y,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:C,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",cx,[i.createVNode(i.unref(A.OTab),{modelValue:z.value,"onUpdate:modelValue":K[0]||(K[0]=ce=>z.value=ce)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,ce=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:ce.value,value:ce.value,label:ce.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),i.createElementVNode("div",dx,[z.value===b.value[0].value?(i.openBlock(),i.createElementBlock("div",hx,[i.createElementVNode("div",fx,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item1")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.sponsor),1)]),i.createElementVNode("div",px,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item2")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.groupName),1)]),i.createElementVNode("div",mx,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item3")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.date)+"  "+i.toDisplayString(r.detail.start)+"~"+i.toDisplayString(r.detail.end),1)]),i.createElementVNode("div",gx,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item4")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.agenda||"-"),1)])])):i.createCommentVNode("",!0),z.value===((fe=b.value[1])==null?void 0:fe.value)?(i.openBlock(),i.createElementBlock("div",vx,[k.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mouse-current-time",style:i.normalizeStyle({top:O.value[1],left:O.value[0]})},i.toDisplayString(k.value),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,(ce,Ae)=>(i.openBlock(),i.createElementBlock("div",{class:"subject-item",key:ce.title},[i.createElementVNode("div",yx,i.toDisplayString(ce.title),1),T.value?(i.openBlock(),i.createElementBlock("div",_x,[i.createElementVNode("div",{class:"subject-progress-item",onClick:U,onMousemove:q,onMouseleave:$,"data-start":ce.startTime,"data-end":ce.endTime,style:i.normalizeStyle({"--start":(ce.startTime<0?0:ce.startTime)/T.value,"--end":(ce.endTime>T.value?T.value:ce.endTime)/T.value,background:S(Ae)})},null,44,Tx)])):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0)])])],512),i.createElementVNode("div",{class:"right-card card-wrapper",style:i.normalizeStyle({height:L.value})},[i.createVNode(Ky,{captions:d.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),bx={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xx(r,e){return i.openBlock(),i.createElementBlock("svg",bx,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const Cx={name:"components-icon-tips",render:xx},Sx={class:"o-sig-meeting-aside"},Ex={class:"month"},kx={class:"days"},wx=["onClick"],Dx={class:"day-d"},Ax={class:"day-c"},Nx={class:"arrow-wrapper"},Hs=1,Ix=i.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:t}=Fn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(i.openBlock(),i.createElementBlock("div",Sx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(d,g)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,m=>(i.openBlock(),i.createElementBlock("div",{key:m.month,class:"month-item"},[i.createElementVNode("div",Ex,i.toDisplayString(m.month.replace(/-/g,"/")),1),i.createElementVNode("div",kx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.days,S=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-item",r.active===`${m.month}-${S}`&&"active"]),key:S,onClick:T=>a(`${m.month}-${S}`)},[i.createElementVNode("div",Dx,i.toDisplayString(S),1),i.createElementVNode("div",Ax,[r.meetingDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Me).MEETING,"zIndex"),backgroundColor:i.unref(t)(i.unref(Me).MEETING,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Me).MEETING,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0),r.eventsDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Me).EVENTS,"zIndex"),backgroundColor:i.unref(t)(i.unref(Me).EVENTS,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Me).EVENTS,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0)])],10,wx))),128))])]))),128))],64))),128)),i.createElementVNode("div",Nx,[i.createVNode(i.unref(A.OIcon),{onClick:c[0]||(c[0]=d=>o(0-Hs)),class:i.normalizeClass(r.current-Hs<0&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1},8,["class"]),i.createVNode(i.unref(A.OIcon),{onClick:c[1]||(c[1]=d=>o(Hs)),class:i.normalizeClass(r.current+Hs>=r.total&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),Ox={class:"o-sig-meeting-calendar"},Bx={key:0,class:"meeting-card-header"},Lx={key:0,class:"header-left"},Mx={key:1,class:"date-select"},Px={class:"meeting-card-content"},Rx={class:"list-content"},Xd=i.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t,meetingTabs:n}=Fn(),{lePadV:s}=Nt.useScreen(),a=i.ref(""),o=i.ref(!1),l=i.ref([]),c=i.computed(()=>s.value?100:5),d=i.ref(""),g=i.ref([]),m=i.ref([]),S=i.ref([]),T=i.ref(-1),C=P=>{k(P)},y=P=>{k(P)},k=async P=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=Te(P).format("YYYY-MM-DD");const Q=await e.getMeetingListRequest(a.value,e.sigName);l.value=Q.map(L=>({...L,time:`${L.start}-${L.end}`,date:L.date||a.value,type:Me.MEETING}))}finally{o.value=!1,S.value.forEach(Q=>{Q.dates.includes(a.value)&&l.value.push(Q)})}},O=async()=>{e.getDateListRequest&&(g.value=await e.getDateListRequest()),e.getEventsListRequest&&(S.value=await e.getEventsListRequest(),m.value=(S.value||[]).map(P=>P.dates).flat())},I=i.ref(Me.ALL),D=()=>{O()};i.watch(()=>s.value,()=>{s.value&&D(Me.ALL)});const q=P=>{const Q=Te(P).format("YYYY-MM-DD");return[Q.slice(0,7),Q.slice(8,10)]},$=i.computed(()=>{let P=[];return I.value===Me.ALL?P=[...g.value||[],...m.value]:I.value===Me.MEETING?P=g.value||[]:P=m.value,[...new Set(P)].sort((Q,L)=>Te(Q).isAfter(Te(L))?1:-1).map(Q=>Te(Q).format("YYYY-MM-DD"))}),U=()=>{let P=$.value.find(Q=>Q===Te().format("YYYY-MM-DD"));P||(P=$.value.find(Q=>Te(Q).isAfter(Te()))||[...$.value].reverse().find(Q=>Te().isAfter(Te(Q)))),d.value=P};i.watch(()=>$.value,P=>{P.length&&(U(),i.nextTick(()=>{k(d.value)}))});const N=i.computed(()=>{const P=$.value.reduce((M,j)=>{var K,J;const[F,Y]=q(j);return M[F]={count:(((K=M[F])==null?void 0:K.count)||0)+1,days:[...((J=M[F])==null?void 0:J.days)||[],Y]},M},{}),Q=Object.keys(P).map(M=>({...P[M],month:M})),L=[];let V=[];return Q.forEach(M=>{for(;M.days.length;)if(!V.length)M.days.splice(0,6).forEach(j=>{V.push({month:M.month,day:j})}),V.length>=5&&(L.push(V),V=[]);else{let j=V.length;j%2===1&&(j+=1),M.days.length+V.length<=6?(M.days.splice(0,6).forEach(F=>{V.push({month:M.month,day:F})}),V.length>=5&&(L.push(V),V=[])):(M.days.splice(0,6-j).forEach(F=>{V.push({month:M.month,day:F})}),V.length>=5&&(L.push(V),V=[]))}}),V.length&&(L.push(V),V=[]),L}),z=i.computed(()=>N.value.map(P=>{const Q=P.reduce((L,V)=>(L[V.month]=L[V.month]||[],L[V.month].push(V.day),L),{});return Object.keys(Q).map(L=>({month:L,days:Q[L]||[]}))})),b=()=>{N.value.length?(T.value=N.value.findIndex(P=>P.some(Q=>d.value===`${Q.month}-${Q.day}`)),T.value===-1&&(T.value=N.value.findIndex(P=>P.some(Q=>d.value.includes(Q.month))))):T.value=-1};i.watch([()=>N.value,()=>d.value],()=>{b()},{deep:!0});const E=P=>{T.value+=P};return i.onMounted(()=>{O()}),(P,Q)=>{const L=i.resolveComponent("ElOption"),V=i.resolveComponent("ElSelect");return i.openBlock(),i.createElementBlock("div",Ox,[i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Bx,[d.value?(i.openBlock(),i.createElementBlock("div",Lx,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.latestMeeting")),1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(d.value).format("YYYY/MM/DD")),1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"tips"},{default:i.withCtx(()=>[i.createVNode(i.unref(Cx))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("p",null,i.toDisplayString(i.unref(t)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OTab),{modelValue:I.value,"onUpdate:modelValue":Q[0]||(Q[0]=M=>I.value=M),onChange:D,line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n).slice(0,-1),M=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:M.value,value:M.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(M.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(M.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),i.unref(s)&&$.value.length?(i.openBlock(),i.createElementBlock("div",Mx,[i.createVNode(V,{modelValue:a.value,"onUpdate:modelValue":Q[1]||(Q[1]=M=>a.value=M),onChange:y},{label:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+" "+i.toDisplayString(a.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.value,M=>(i.openBlock(),i.createBlock(L,{key:M,value:M,label:i.unref(Te)(M).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):i.createCommentVNode("",!0),!i.unref(s)||i.unref(s)&&$.value.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"meeting-divider"})):i.createCommentVNode("",!0),i.createElementVNode("div",Px,[!i.unref(s)&&T.value!==-1?(i.openBlock(),i.createBlock(Ix,{key:0,data:z.value.slice(T.value,T.value+1),meetingDates:I.value!==i.unref(Me).EVENTS?g.value:[],eventsDates:I.value!==i.unref(Me).MEETING?m.value:[],onClickDate:C,onChangeMonth:E,current:T.value,total:z.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):i.createCommentVNode("",!0),i.createElementVNode("div",Rx,[i.createVNode(yh,{list:l.value,rows:c.value},{empty:i.withCtx(()=>[i.renderSlot(P.$slots,"empty")]),_:3},8,["list","rows"])])])])}}}),Vx={class:"o-my-meeting-calendar"},Fx={class:"meeting-list"},$x={class:"list-calendar-mb"},Ux={class:"list-calendar"},qx=["onClick"],jx={class:"date-cell-text"},Hx={class:"list-body"},zx=["id"],Gx={class:"item-header-left"},Wx={class:"meeting-icon"},Yx={class:"header-info"},Xx={key:0},Kx={class:"title-wrapper"},Qx={class:"title-text"},Zx={key:1,class:"tag-wrapper"},Jx={class:"meeting-info"},eC={key:0,class:"item-header-right"},tC={class:"meeting-detail"},iC={key:0,class:"meeting-btn"},nC={key:0,class:"load-text"},rC={class:"dialog-content"},Kd=i.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:gi.SIG}},emits:["edit"],setup(r,{emit:e}){const t=A.useMessage(null),n=i.ref(!1),s=i.ref(1),a=i.ref(50),o=i.ref(null),l=i.ref([]),c=i.ref([]),d=i.computed(()=>o.value===null||c.value.length<o.value),g=i.ref(!1),{t:m,locale:S,getPointStr:T,getWeekFromDate:C}=Fn(),y=i.computed(()=>S.value===Qe.Locales.EN),k=r,O=i.ref(!1),{isPhone:I}=Nt.useScreen(),D=i.ref([]),q=e,$=i.ref(!1),U=i.ref(!1),N=i.ref(),z=i.ref(0),b=()=>{var ne;z.value=((ne=N.value)==null?void 0:ne.clientHeight)||0},E=async()=>{if(k.getMeetingListRequest&&!$.value)try{if(o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&I.value){ot("next-month");return}n.value=!0,$.value=!0;const ne=await k.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:Te(ze.value).format("YYYY-MM")}),oe=(ne.data||[]).map(de=>{var Gi,$t,Wi;const{is_cycle:me,date:De,start:Ke,end:ht,cycle_sub:Ve,cycle_start_date:Gt,cycle_end_date:St,cycle_start:li,cycle_end:It,cycle_type:Et,cycle_interval:pi,cycle_point:Ft}=de;if(me){let x="",w="";Et===pn&&(w=m("meeting.cycleDay")),Et===gn&&(pi>1?w=m("meeting.cycleWeek.other",[T(Et,Ft),pi]):w=m("meeting.cycleWeek.one",[T(Et,Ft)])),Et===tn&&(w=m("meeting.cycleMonth",[T(Et,Ft)])),x=m("meeting.cycleMeetingText2",{startDate:Gt,endDate:St,startTime:li,endTime:It,cycleType:w});const X=(Gi=de.obs_data)==null?void 0:Gi.filter(se=>se.text_video_url);return Ve.filter(se=>Te(se.date).isBefore(Te(ze.value).add(1,"month").format("YYYY-MM-01"))&&!Te(se.date).isBefore(Te(ze.value).format("YYYY-MM-01"))).map(({id:se,...ve})=>({...de,...ve,timeRange:x,dateRange:`${ve.start}-${ve.end}`,hasObsData:X.find(Ie=>Ie.sub_id===ve.sub_id),time:`${ve.start}-${ve.end}`,isExpired:Te(`${ve.date} ${ve.start}`).isBefore(Te())}))}return[{...de,dateRange:`${Ke} - ${ht}`,timeRange:`${Ke} - ${ht}`,hasObsData:((Wi=($t=de.obs_data)==null?void 0:$t.filter(x=>x.text_video_url))==null?void 0:Wi.length)>0,time:`${Ke}-${ht}`,isExpired:Te(`${De} ${Ke}`).isBefore(Te())}]}).flat().filter(de=>de.date.slice(0,7)===mt(ze.value,"YYYY-MM-DD").slice(0,7));g.value?(c.value=ne.data||[],l.value=oe):s.value===1&&!I.value?(c.value=ne.data||[],l.value=oe):(c.value=[...c.value,...ne.data||[]],l.value=[...l.value,...oe]),l.value.sort((de,me)=>de.date===me.date?In(de.start)>In(me.start)?1:-1:Te(de.date).isAfter(Te(me.date))?1:-1),o.value=(ne==null?void 0:ne.total)||0,i.nextTick(()=>{Xe(),Ce.value&&!I.value&&M()})}finally{n.value=!1,$.value=!1,U.value=!1,g.value=!1}},P=qi.useDebounceFn(()=>{d.value&&(I.value||(U.value=!0,s.value++,E()))},200),Q=qi.useDebounceFn(()=>{if(!d.value||!I.value)return;const ne=window.scrollY||window.pageYOffset,oe=window.innerHeight;document.documentElement.scrollHeight-(ne+oe)<=300&&!$.value&&(U.value=!0,s.value++,E())},200),L=ne=>{const oe=l.value.filter(de=>de.date===ne);return oe.length&&oe.every(de=>de.is_delete)},V=ne=>{const oe=ne.target;if(!oe)return;const de=oe.scrollTop,me=oe.scrollHeight,De=oe.clientHeight;de+De>=me&&P()},M=()=>{Ce.value.getContainerEl().addEventListener("scroll",V)},j=i.ref({}),F=(ne,oe)=>{ne&&oe&&(j.value[oe]=ne)},Y=async ne=>{await j.value[ne].copyInfo(),t.success({content:m("common.copySuccess")})},K=i.ref(!1),J=i.ref(null),Z=ne=>{q("edit",ne,"whole")},ie=ne=>{J.value=ne,K.value=!0},ae=async()=>{if(k.deleteMeetingRequest)try{O.value=!0,await k.deleteMeetingRequest(J.value.id),K.value=!1,t.success({content:`${m("meeting.meetingCancel",[J.value.topic])}`}),g.value=!0,E()}finally{O.value=!1}},fe=i.ref(!1),ce=i.ref(""),Ae=i.ref(null),we=[{label:m("meeting.meetingSingle"),value:"single"},{label:m("meeting.meetingCycle"),value:"whole"}],Ne=i.ref("single"),Pe=(ne,oe)=>{ne.is_cycle?(Ae.value=ne,ce.value=oe,fe.value=!0):oe==="cancel"?ie(ne):Z(ne)},$e=()=>{fe.value=!1,Ae.value=null,ce.value="",Ne.value="single"},We=async()=>{const ne=Ae.value;if(ce.value==="cancel")try{if(O.value=!0,Ne.value==="single"&&ne.is_cycle){if(!k.cancelSubMeetingRequest)return;await k.cancelSubMeetingRequest(ne.sub_id),t.success({content:`${m("meeting.meetingCancel",[ne.topic])}`})}else{if(!k.deleteMeetingRequest)return;await k.deleteMeetingRequest(ne.id),t.success({content:`${m("meeting.meetingCancel",[ne.topic])}`})}$e(),g.value=!0,E()}finally{O.value=!1}else q("edit",ne,Ne.value),$e()},Ze=i.ref(),Ye=i.computed(()=>[...new Set(l.value.map(ne=>ne.date))].sort((ne,oe)=>Te(ne).isBefore(Te(oe))?-1:1)),He=i.computed(()=>[...new Set(l.value.filter(ne=>!ne.isExpired&&!ne.is_delete).map(ne=>ne.date))].sort((ne,oe)=>Te(ne).isBefore(Te(oe))?-1:1)),ze=i.ref(),Xe=()=>{var de;const ne=He.value.find(me=>!Te(me).isBefore(Te(new Date).format("YYYY-MM-DD")));ne?ze.value=ne:ze.value||(ze.value=Te().format("YYYY-MM-DD")),(de=Ze.value)==null||de.pickDay(Te(ze.value)),ze.value=Te(ze.value).format("YYYY-MM-DD");const oe=l.value.find(me=>me.date===ze.value&&!me.isExpired&&!me.is_delete);oe&&(D.value=[oe.sub_id||oe.id])},Ct=(ne,oe)=>{var de;(!oe||!((de=ne.target)!=null&&de.className.includes("date-cell-text")))&&(ne.stopPropagation(),ne.preventDefault())},ot=ne=>{Ze.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Ze.value.selectDate(ne),g.value=!0,i.nextTick(()=>{ze.value=Te(Ze.value.selectedDay).format("YYYY-MM-DD"),E()}))},Ee=i.computed(()=>l.value.reduce((ne,oe)=>{if(ne.length){const de=ne.at(-1);return de.date===oe.date?de.list.push(oe):ne.push({date:oe.date,list:[oe]}),ne}else return[{date:oe.date,list:[oe]}]},[])),Ce=i.ref();i.watch(()=>ze.value,()=>{pe(ze.value)});const pe=ne=>{var me,De,Ke;const oe=Te(ne).format("YYYY-MM-DD"),de=document.querySelector(`#group-title-${oe}`);de&&(I.value?window.scrollTo({top:(((me=de.parentElement)==null?void 0:me.offsetTop)||0)-52,behavior:"smooth"}):(Ke=Ce.value)==null||Ke.scrollTo({top:((De=de.parentElement)==null?void 0:De.offsetTop)||0,behavior:"smooth"}))};i.onMounted(()=>{E(),window.addEventListener("scroll",Q),window.addEventListener("resize",Q),b(),window.addEventListener("resize",b)}),i.onUnmounted(()=>{var oe;window.removeEventListener("scroll",Q),window.removeEventListener("resize",Q),window.removeEventListener("resize",b);const ne=(oe=Ce.value)==null?void 0:oe.getContainerEl();ne==null||ne.removeEventListener("scroll",V)});const Re=ne=>(ne=Te(ne||void 0),y.value?ne.format("MMMM YYYY"):ne.format("YYYY MM月")),tt=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:O.value,onClick:()=>{We()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{$e()}}]),ge=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:O.value,onClick:()=>{ae()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{K.value=!1}}]);return(ne,oe)=>(i.openBlock(),i.createElementBlock("div",Vx,[i.createElementVNode("div",Fx,[i.createElementVNode("div",$x,[i.createElementVNode("span",null,i.toDisplayString(Re(ze.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:oe[0]||(oe[0]=de=>ot("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:oe[1]||(oe[1]=de=>ot("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),i.createElementVNode("div",Ux,[i.createVNode(i.unref(nt.ElCalendar),{ref_key:"calendarRef",ref:Ze,modelValue:ze.value,"onUpdate:modelValue":oe[4]||(oe[4]=de=>ze.value=de)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(Re(ze.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:oe[2]||(oe[2]=de=>ot("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:oe[3]||(oe[3]=de=>ot("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:de})=>[i.createElementVNode("div",{onClick:me=>Ct(me,Ye.value.includes(de.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":de.isSelected,"is-today":i.unref(mt)(de.day)===i.unref(mt)(),clickable:Ye.value.includes(de.day),expired:i.unref(Te)(i.unref(mt)()).isAfter(i.unref(Te)(de.day)),"all-deleted":L(de.day)})},[i.createElementVNode("div",jx,i.toDisplayString(Number(de.day.split("-")[2])),1)],10,qx)]),_:1},8,["modelValue"])]),i.createElementVNode("div",{class:i.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:Ce,onScrollend:i.unref(P),style:i.normalizeStyle({"--header-height":z.value}),class:"scroller-container","show-type":"hover"},{default:i.withCtx(()=>[i.createElementVNode("div",Hx,[i.createVNode(i.unref(A.OCollapse),{modelValue:D.value,"onUpdate:modelValue":oe[7]||(oe[7]=de=>D.value=de),accordion:i.unref(I)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Ee.value,(de,me)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:de.date},[me===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:oe[5]||(oe[5]=De=>ot("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(m)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["group-item",me===Ee.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"group-bar":!0,"is-active":i.unref(Te)(ze.value).format("YYYY-MM-DD")===de.date,"is-end":de.list.every(De=>De.isExpired)})},[...oe[11]||(oe[11]=[i.createElementVNode("div",{class:"group-bar-line"},null,-1),i.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":de.list.every(De=>De.isExpired)}),id:`group-title-${i.unref(Te)(new Date(de.date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(de.date).format("MM/DD"))+" "+i.toDisplayString(i.unref(C)(de.date)),11,zx),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(de.list,(De,Ke)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:De.sub_id||De.id,value:De.sub_id||De.id,class:i.normalizeClass({"last-item":me===Ee.value.length-1&&Ke===de.list.length-1})},{title:i.withCtx(()=>[i.createElementVNode("div",Gx,[i.createElementVNode("div",Wx,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Dl))]),_:1})]),i.createElementVNode("div",Yx,[i.createElementVNode("div",{class:i.normalizeClass({"meeting-title":!0,"is-delete":De.is_delete,"is-end":De.isExpired})},[De.is_delete?(i.openBlock(),i.createElementBlock("div",Xx,i.toDisplayString(i.unref(m)("meeting.meetingCancelled")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Kx,[i.createElementVNode("div",Qx,i.toDisplayString(De.topic),1)]),De.is_cycle?(i.openBlock(),i.createElementBlock("div",Zx,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",Jx,[i.createElementVNode("span",null,i.toDisplayString(De.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString(r.groupType===i.unref(gi).GROUP?i.unref(m)("meeting.groups"):i.unref(m)("meeting.sigs"))+": "+i.toDisplayString(De.group_name),1)])])]),De.is_delete?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",eC,[De.isExpired?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[De.etherpad?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:De.etherpad},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),De.hasObsData?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",href:`/${i.unref(S)}/video/${De.group_name}/${De.mid}/${De.date}`},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:De.join_url,rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>Y(Ke),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Al))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",tC,[i.createVNode(ts,{show:D.value.includes(De.sub_id||De.id),data:De,ref_for:!0,ref:ht=>F(ht,De.id),from:"my"},null,8,["show","data"]),!De.isExpired&&!De.is_delete?(i.openBlock(),i.createElementBlock("div",iC,[i.createVNode(i.unref(A.OLink),{onClick:ht=>Pe(De,"edit")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),i.createVNode(i.unref(A.OLink),{onClick:ht=>Pe(De,"cancel")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),oe[12]||(oe[12]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),me===Ee.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[U.value?(i.openBlock(),i.createElementBlock("div",nC,i.toDisplayString(i.unref(m)("common.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:oe[6]||(oe[6]=De=>ot("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(m)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?i.createCommentVNode("",!0):i.renderSlot(ne.$slots,"empty",{key:1})],2),i.createVNode(i.unref(A.ODialog),{visible:fe.value,"onUpdate:visible":oe[9]||(oe[9]=de=>fe.value=de),"main-class":"handle-dialog",onClose:$e,actions:tt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.meetingHandleText",[ce.value==="edit"?i.unref(m)("meeting.edit"):i.unref(m)("meeting.cancel2")])),1)]),default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:Ne.value,"onUpdate:modelValue":oe[8]||(oe[8]=de=>Ne.value=de)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(we,de=>i.createVNode(i.unref(A.ORadio),{value:de.value,key:de.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(de.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:K.value,"onUpdate:visible":oe[10]||(oe[10]=de=>K.value=de),"main-class":"cancel-dialog",actions:ge.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.confirmCancel")),1)]),default:i.withCtx(()=>{var de;return[i.createElementVNode("div",rC,i.toDisplayString(i.unref(m)("meeting.confirmCancelDesc",[(de=J.value)==null?void 0:de.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),sC=Object.assign(mc,{install(r){r.component("OMeetingCalendar",mc)}}),aC=Object.assign(yc,{install(r){r.component("OMeetingForm",yc)}}),oC=Object.assign(Yd,{install(r){r.component("OMeetingPlayback",Yd)}}),lC=Object.assign(Xd,{install(r){r.component("OSigMeetingCalendar",Xd)}}),uC=Object.assign(Kd,{install(r){r.component("OMyMeetingCalendar",Kd)}}),cC={class:"o-activity-table"},dC={key:0,class:"table-wrapper"},hC={class:"expand-detail"},fC={class:"sort-btn"},pC={class:"activity-btn"},mC={key:0,class:"pagination-wrapper"},gC={key:1,class:"collapse-wrapper"},vC={class:"title-top"},yC={class:"act-title"},_C={class:"act-sponsor"},TC={class:"sponsor"},bC={class:"activity-btn"},xC={class:"activity-detail"},CC={key:0,class:"pagination"},SC={class:"dialog-content"},EC={class:"dialog-content"},Qd=i.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:t}=Qe.useI18n(),n=i.computed(()=>t.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=Ta(),l=A.useMessage(null),{isPhone:c,lePadV:d}=Nt.useScreen(),g=r,m=i.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),S=i.ref([]),T=i.computed(()=>g.applicantList.map(Ee=>({value:Ee,label:Ee}))),C=()=>{m.sponsor=S.value.join(",")},y=i.ref("desc"),k=()=>{y.value=y.value==="asc"?"desc":"asc",m.order_by=y.value},O=i.ref(),I=i.computed(()=>{let Ee=[];return s.value.forEach(Ce=>{Ee.push(Ce)}),Ee.slice(1)}),D=()=>{m.status=O.value,O.value==="cancel"?m.is_delete=1:m.is_delete=0},q=i.ref([]),$=i.ref(0),U=[10,20,30,40],N=async()=>{const{page:Ee,size:Ce,status:pe,sponsor:Re,order_by:tt,search:ge,is_delete:ne}=m;let oe={page:Ee,size:Ce,sponsor:Re,order_by:tt,search:ge};if(pe!=="all"&&pe!==""&&(oe.is_delete=ne),pe==="cancel"?oe.status="":oe.status=pe,!g.getTableDataRequest)return;const de=await g.getTableDataRequest(oe);q.value=(de.data||[]).map(me=>{var St;const{start_date:De,end_date:Ke,start:ht,end:Ve,activity_type:Gt}=me;return[{...me,time:`${De}-${Ve}`,start_date_time:`${De} ${ht}`,end_date_time:`${Ke} ${Ve}`,type:Me.EVENTS,dateRange:`${De} ${ht}-${Ke} ${Ve}`,activity_type:(St=o.value.get(Gt))==null?void 0:St.label}]}).flat(),$.value=de.total},z=Ee=>{Ee.pageSize!==m.size?m.page=1:m.page=Ee.page,m.size=Ee.pageSize,N()},b=i.ref({reason:""}),E=i.ref(),P=i.ref(!1),Q=i.ref(null),L=i.ref(""),V=i.ref(0),M=i.ref(!1),j=i.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),F=async()=>{var Ee,Ce;if(!(!g.approveActivityRequest||!g.rejectActivityRequest))try{if(P.value=!0,(await((Ee=E.value)==null?void 0:Ee.validate())).some(Re=>!!Re)){P.value=!1;return}V.value===1?await g.approveActivityRequest(Q.value.id,b.value):await g.rejectActivityRequest(Q.value.id,b.value),N(),Y(),l.success({content:e("meeting.reviewSuccess",[(Ce=Q.value)==null?void 0:Ce.title])})}finally{M.value=!1,P.value=!1}},Y=()=>{M.value=!1,J.value=!1,P.value=!1,b.value.reason=""},K=async()=>{var Ee;if(g.deleteActivityRequest&&g.cancelActivityRequest)try{P.value=!0,ae.value===1?await g.cancelActivityRequest(Q.value.id,b.value):await g.deleteActivityRequest(Q.value.id,b.value),N(),Y(),l.success({content:e("meeting.activityActionSuccess",[(Ee=Q.value)==null?void 0:Ee.title,ie.value])})}finally{P.value=!1,J.value=!1}},J=i.ref(!1),Z=i.ref(""),ie=i.ref(""),ae=i.ref(0),fe=Ee=>{Z.value=e("meeting.deleteActivity"),ie.value=e("meeting.deleteActivity").toLowerCase(),Q.value=Ee,ae.value=0,J.value=!0},ce=Ee=>{Z.value=e("meeting.cancelActivity"),ie.value=e("common.cancel").toLowerCase(),Q.value=Ee,ae.value=1,J.value=!0},Ae=Ee=>{Q.value=Ee,L.value=e("meeting.approveReview"),V.value=1,M.value=!0},we=Ee=>{Q.value=Ee,L.value=e("meeting.rejectReview"),V.value=0,M.value=!0},Ne=i.ref([]),Pe=i.ref([]),$e=Ee=>{if(!g.getActivityDetailRequest)return;Ne.value.includes(Ee)||(Ne.value.push(Ee),g.getActivityDetailRequest(Ee).then(pe=>{var Re;(Re=q.value)==null||Re.forEach(tt=>{tt.id===pe.id&&(tt.approve_record=pe.approve_record,tt.approver=pe.approver)})}));const Ce=Pe.value.indexOf(Ee);Pe.value.includes(Ee)?Pe.value.splice(Ce,1):Pe.value.push(Ee)},We=Ee=>{$e(Ee.id)},Ze=Ee=>Ee.id,Ye=i.ref([]),He=Ee=>{Ee.length&&Ee.forEach(Ce=>{$e(Ce)})},ze=i.ref({}),Xe=(Ee,Ce)=>{Ee&&Ce&&(ze.value[Ce]=Ee)};i.onMounted(()=>{N()}),i.watch(()=>[m.status,m.sponsor,m.order_by,m.search,m.is_delete],()=>{N()},{deep:!0});const Ct=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{K()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{Y()}}]),ot=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{F()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{Y()}}]);return(Ee,Ce)=>(i.openBlock(),i.createElementBlock("div",cC,[i.unref(c)?(i.openBlock(),i.createElementBlock("div",gC,[i.createVNode(i.unref(A.OCollapse),{modelValue:Ye.value,"onUpdate:modelValue":Ce[2]||(Ce[2]=pe=>Ye.value=pe),accordion:i.unref(c),onChange:He},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(q.value,(pe,Re)=>{var tt;return i.openBlock(),i.createElementBlock(i.Fragment,{key:pe.id},[i.createElementVNode("div",vC,[i.createElementVNode("p",yC,i.toDisplayString(pe.title),1),pe.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(tt=i.unref(a).get(pe.status))==null?void 0:tt.id}`])},{default:i.withCtx(()=>{var ge;return[i.createTextVNode(i.toDisplayString((ge=i.unref(a).get(pe.status))==null?void 0:ge.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),i.createVNode(i.unref(A.OCollapseItem),{value:pe.id},{title:i.withCtx(()=>[i.createElementVNode("div",_C,[i.createElementVNode("p",TC,i.toDisplayString(pe.sponsor),1),i.createElementVNode("p",null,i.toDisplayString(i.unref(nt.dayjs)(pe.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),i.createElementVNode("div",bC,[pe.status===7||pe.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:i.withModifiers(ge=>fe(pe),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(pe.status===3||pe.status===4)&&pe.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:i.withModifiers(ge=>ce(pe),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:i.withModifiers(ge=>Ae(pe),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:i.withModifiers(ge=>we(pe),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[i.createElementVNode("div",xC,[i.createVNode(ts,{show:Ye.value.includes(pe.id),data:pe,ref_for:!0,ref:ge=>Xe(ge,pe.id),page:i.unref(Me).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),$.value>U[0]?(i.openBlock(),i.createElementBlock("div",CC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:z},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",dC,[i.createVNode(i.unref(nt.ElTable),{data:q.value,onExpandChange:We,"row-key":Ze,"expand-row-keys":Pe.value},{default:i.withCtx(()=>[i.createVNode(i.unref(nt.ElTableColumn),{type:"expand"},{default:i.withCtx(pe=>[i.createElementVNode("div",hC,[i.createVNode(ts,{data:pe.row,page:"approval",show:""},null,8,["data"])])]),_:1}),i.createVNode(i.unref(nt.ElTableColumn),{label:i.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),i.createVNode(i.unref(nt.ElTableColumn),{prop:"sponsor"},{header:i.withCtx(()=>[i.createVNode(hc,{modelValue:S.value,"onUpdate:modelValue":Ce[0]||(Ce[0]=pe=>S.value=pe),onConfirm:C,list:T.value,multiple:!0},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.applicant")),1)]),_:3},8,["modelValue","list"])]),_:3}),i.createVNode(i.unref(nt.ElTableColumn),{prop:"create_time"},{header:i.withCtx(()=>[i.createElementVNode("div",{class:"sort-time",onClick:k},[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("meeting.submissionTime")),1),i.createElementVNode("div",fC,[i.createElementVNode("div",{class:i.normalizeClass(["sort-asc sort-item",{active:y.value==="asc"}])},null,2),i.createElementVNode("div",{class:i.normalizeClass(["sort-desc sort-item",{active:y.value==="desc"}])},null,2)])])]),default:i.withCtx(pe=>[i.createTextVNode(i.toDisplayString(i.unref(nt.dayjs)(pe.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),i.createVNode(i.unref(nt.ElTableColumn),{prop:"status",width:"90px"},{header:i.withCtx(()=>[i.createVNode(hc,{modelValue:O.value,"onUpdate:modelValue":Ce[1]||(Ce[1]=pe=>O.value=pe),onConfirm:D,list:I.value},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:i.withCtx(pe=>{var Re;return[pe.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Re=i.unref(a).get(pe.row.status))==null?void 0:Re.id}`])},{default:i.withCtx(()=>{var tt;return[i.createTextVNode(i.toDisplayString((tt=i.unref(a).get(pe.row.status))==null?void 0:tt.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),i.createVNode(i.unref(nt.ElTableColumn),{label:i.unref(e)("meeting.action")},{default:i.withCtx(pe=>[i.createElementVNode("div",pC,[pe.row.status===7||pe.row.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",onClick:Re=>fe(pe.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(pe.row.status===3||pe.row.status===4)&&pe.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",onClick:Re=>ce(pe.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",onClick:Re=>Ae(pe.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",onClick:Re=>we(pe.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),$.value>U[0]?(i.openBlock(),i.createElementBlock("div",mC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:z},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])),i.createVNode(i.unref(A.ODialog),{visible:M.value,"onUpdate:visible":Ce[4]||(Ce[4]=pe=>M.value=pe),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:ot.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(L.value),1)]),default:i.withCtx(()=>[i.createElementVNode("div",SC,[i.createVNode(i.unref(A.OForm),{model:b.value,ref_key:"formRef",ref:E,"has-required":"",layout:"v",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:j.value.reason,label:`${i.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:b.value.reason,"onUpdate:modelValue":Ce[3]||(Ce[3]=pe=>b.value.reason=pe)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),i.createVNode(i.unref(A.ODialog),{visible:J.value,"onUpdate:visible":Ce[5]||(Ce[5]=pe=>J.value=pe),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:Ct.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(Z.value),1)]),default:i.withCtx(()=>{var pe,Re;return[i.createElementVNode("div",EC,i.toDisplayString(ae.value===1?i.unref(e)("meeting.confirmCancelActivity",[(pe=Q.value)==null?void 0:pe.title]):i.unref(e)("meeting.confirmDeleteActivity",[(Re=Q.value)==null?void 0:Re.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),kC={class:"o-my-activity-calendar"},wC={class:"activity-list"},DC={key:0,class:"list-calendar-mb"},AC={class:"left-calendar"},NC=["onClick"],IC={class:"date-cell-text"},OC={class:"right-meeting"},BC={class:"list-body"},LC=["id"],MC={class:"item-header-left"},PC={class:"act-icon"},RC={class:"header-info"},VC={class:"title-text"},FC={class:"act-info"},$C={class:"date-range"},UC={key:0,class:"item-header-right"},qC={class:"activity-detail"},jC={key:0,class:"activity-btn"},HC={key:0,class:"load-text"},zC={class:"dialog-content"},GC={class:"dialog-content"},Zd=i.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t,locale:n}=Qe.useI18n(),s=i.computed(()=>n.value===Qe.Locales.ZH),{statusMap:a,activityTypeMap:o}=Ta(),l=ge=>{const ne=Te(ge||new Date);return s.value?ne.format("YYYY MM月"):ne.format("MMMM YYYY")},c=A.useMessage(null),{isPhone:d}=Nt.useScreen(),g=r,m=e,S=i.ref([]),T=i.ref([]),C=i.ref(1),y=i.ref(50),k=i.ref(null),O=i.ref(!1),I=i.ref([]),D=i.ref(!1),q=i.ref(!1),$=i.computed(()=>T.value.length<k.value||k.value===null),U=async()=>{if(g.getListRequest&&!D.value)try{if(k.value>0&&(C.value-1)*y.value>k.value)return;if(!$.value&&d.value){K("next-month");return}D.value=!0;const ge=await g.getListRequest({page:C.value,size:y.value,start_date:V.value}),ne=(ge.data||[]).map(oe=>{const{start_date:de,end_date:me,start:De,end:Ke}=oe;return[{...oe,time:`${de}-${Ke}`,start_date_time:`${de} ${De}`,end_date_time:`${me} ${Ke}`,type:Me.EVENTS,dateRange:`${de} ${De}-${me} ${Ke}`,isExpired:Te(`${de} ${De}`).isBefore(Te())}]}).flat().filter(oe=>oe.start_date.slice(0,7)===mt(V.value,"YYYY-MM-DD").slice(0,7));O.value?(T.value=ge.data||[],S.value=ne):C.value===1&&!d.value?(T.value=ge.data||[],S.value=ne):(T.value=[...T.value,...ge.data||[]],S.value=[...S.value,...ne]),S.value.sort((oe,de)=>oe.start_date===de.start_date?In(oe.start)>In(de.start)?1:-1:Te(oe.start_date).isAfter(Te(de.start_date))?1:-1),k.value=(ge==null?void 0:ge.total)||0,i.nextTick(()=>{F(),ae.value&&!d.value&&Q()})}finally{D.value=!1,q.value=!1,O.value=!1}},N=i.ref([]),z=ge=>{g.getActivityDetailRequest&&(N.value.includes(ge)||(N.value.push(ge),g.getActivityDetailRequest(ge).then(ne=>{var oe;(oe=S.value)==null||oe.forEach(de=>{de.id===ne.id&&(de.approve_record=ne.approve_record)})})))},b=ge=>{ge.length&&ge.forEach(ne=>{z(ne)})},E=ge=>{const ne=S.value.filter(oe=>oe.start_date===ge);return ne.length&&ne.every(oe=>oe.status===3||oe.status===4)},P=ge=>{const ne=ge.target;if(!ne)return;const oe=ne.scrollTop,de=ne.scrollHeight,me=ne.clientHeight;oe+me>=de&&ce()},Q=()=>{ae.value.getContainerEl().addEventListener("scroll",P)},L=i.ref(),V=i.ref(Te().format("YYYY-MM-DD")),M=i.computed(()=>[...new Set(S.value.map(ge=>ge.start_date))].sort((ge,ne)=>Te(ge).isBefore(Te(ne))?-1:1)),j=i.computed(()=>[...new Set(S.value.filter(ge=>!ge.isExpired&&!ge.is_delete).map(ge=>ge.start_date))].sort((ge,ne)=>Te(ge).isBefore(Te(ne))?-1:1)),F=()=>{var oe;const ge=j.value.find(de=>!Te(de).isBefore(Te(new Date).format("YYYY-MM-DD")));ge?V.value=ge:V.value||(V.value=Te().format("YYYY-MM-DD")),(oe=L.value)==null||oe.pickDay(Te(V.value)),V.value=Te(V.value).format("YYYY-MM-DD");const ne=S.value.find(de=>de.start_date===V.value&&!de.isExpired&&!de.is_delete);ne&&(z(ne.id),I.value=[ne.id])},Y=(ge,ne)=>{var oe;(!ne||!((oe=ge.target)!=null&&oe.className.includes("date-cell-text")))&&(ge.stopPropagation(),ge.preventDefault())},K=ge=>{L.value&&(C.value=1,k.value=null,N.value=[],window.scrollTo({top:0,behavior:"smooth"}),L.value.selectDate(ge),O.value=!0,i.nextTick(()=>{V.value=Te(L.value.selectedDay).format("YYYY-MM-DD"),U()}))},J=i.computed(()=>S.value.reduce((ge,ne)=>{if(ge.length){const oe=ge.at(-1);return(oe==null?void 0:oe.start_date)===ne.start_date?oe==null||oe.list.push(ne):ge.push({start_date:ne.start_date,list:[ne]}),ge}else return[{start_date:ne.start_date,list:[ne]}]},[])),Z=i.ref({}),ie=(ge,ne)=>{ge&&ne&&(Z.value[ne]=ge)},ae=i.ref(),fe=ge=>{var de,me,De;const ne=Te(ge).format("YYYY-MM-DD"),oe=document.querySelector(`#group-title-${ne}`);oe&&(d.value?window.scrollTo({top:(((de=oe.parentElement)==null?void 0:de.offsetTop)||0)-52,behavior:"smooth"}):(De=ae.value)==null||De.scrollTo({top:((me=oe.parentElement)==null?void 0:me.offsetTop)||0,behavior:"smooth"}))};i.watch(()=>V.value,()=>{fe(V.value)});const ce=qi.useDebounceFn(()=>{$.value&&(d.value||(q.value=!0,C.value++,U()))},200),Ae=i.ref(!1),we=i.ref(null),Ne=i.ref(!1),Pe=ge=>{we.value=ge,Ne.value=!0},$e=()=>{var ge;g.revokeActivityRequest&&(Ae.value=!0,g.revokeActivityRequest((ge=we.value)==null?void 0:ge.id).then(()=>{c.success({content:t("meeting.revokeActivitySuccess",[we.value.title])}),O.value=!0,U()}).finally(()=>{Ne.value=!1,Ae.value=!1}))},We=()=>{Ne.value=!1},Ze=ge=>{m("edit",ge)},Ye=ge=>{if(!g.editActivityRequest)return;const{title:ne,start_date:oe,end_date:de,register_end_date:me,activity_type:De,synopsis:Ke,register_url:ht,content_url:Ve,address:Gt,start:St,end:li,approver:It}=ge;let Et={title:ne,start_date:oe,end_date:de,register_end_date:me,activity_type:De,synopsis:Ke,register_url:ht,content_url:Ve,address:Gt,start:St,end:li,approver:It,is_publish:"true"};g.editActivityRequest(ge.id,Et).then(()=>{c.success({content:t("meeting.submitReviewSuccess",[ge.title])}),O.value=!0,U()})},He=i.ref(!1),ze=ge=>{we.value=ge,He.value=!0},Xe=()=>{var ge;g.deleteActivityRequest&&(Ae.value=!0,g.deleteActivityRequest((ge=we.value)==null?void 0:ge.id).then(()=>{c.success({content:t("meeting.deleteActivitySuccess",[we.value.title])}),O.value=!0,U()}).finally(()=>{He.value=!1,Ae.value=!1}))},Ct=()=>{He.value=!1},ot=i.ref(),Ee=i.ref(0),Ce=()=>{var ge;Ee.value=((ge=ot.value)==null?void 0:ge.clientHeight)||0},pe=qi.useDebounceFn(()=>{if(!$.value||!d.value)return;const ge=window.scrollY||window.pageYOffset,ne=window.innerHeight;document.documentElement.scrollHeight-(ge+ne)<=300&&!D.value&&(q.value=!0,C.value++,U())},200);i.onMounted(()=>{U(),window.addEventListener("scroll",pe),window.addEventListener("resize",pe),Ce(),window.addEventListener("resize",Ce)}),i.onUnmounted(()=>{var ne;window.removeEventListener("scroll",pe),window.removeEventListener("resize",pe),window.removeEventListener("resize",Ce);const ge=(ne=ae.value)==null?void 0:ne.getContainerEl();ge==null||ge.removeEventListener("scroll",P)});const Re=i.computed(()=>[{id:"confirm",loading:Ae.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{$e()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{We()}}]),tt=i.computed(()=>[{id:"confirm",loading:Ae.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{Xe()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{Ct()}}]);return(ge,ne)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",kC,[i.createElementVNode("div",wC,[i.unref(d)?(i.openBlock(),i.createElementBlock("div",DC,[i.createElementVNode("span",null,i.toDisplayString(l(V.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[0]||(ne[0]=oe=>K("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[1]||(ne[1]=oe=>K("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",AC,[i.createVNode(i.unref(nt.ElCalendar),{ref_key:"calendarRef",ref:L,modelValue:V.value,"onUpdate:modelValue":ne[4]||(ne[4]=oe=>V.value=oe)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(l(V.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[2]||(ne[2]=oe=>K("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[3]||(ne[3]=oe=>K("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:oe})=>[i.createElementVNode("div",{onClick:de=>Y(de,M.value.includes(oe.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":oe.isSelected,"is-today":i.unref(mt)(oe.day)===i.unref(mt)(),clickable:M.value.includes(oe.day),approved:E(oe.day)})},[i.createElementVNode("div",IC,i.toDisplayString(Number(oe.day.split("-")[2])),1)],10,NC)]),_:1},8,["modelValue"])]),i.createElementVNode("div",OC,[S.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:ae,onScrollend:i.unref(ce),style:i.normalizeStyle({"--header-height":Ee.value}),"show-type":"hover",class:"scroller-container"},{default:i.withCtx(()=>[i.createElementVNode("div",BC,[i.createVNode(i.unref(A.OCollapse),{modelValue:I.value,"onUpdate:modelValue":ne[7]||(ne[7]=oe=>I.value=oe),accordion:i.unref(d),onChange:b},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(J.value,(oe,de)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:oe.start_date},[de===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ne[5]||(ne[5]=me=>K("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["act-item",de===J.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"act-bar":!0,"is-active":i.unref(Te)(V.value).format("YYYY-MM-DD")===oe.start_date,"is-end":oe.list.every(me=>me.isExpired),approved:oe.list.every(me=>me.status===3||me.status===4)})},[...ne[10]||(ne[10]=[i.createElementVNode("div",{class:"act-bar-line"},null,-1),i.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":oe.list.every(me=>me.isExpired)}),id:`group-title-${i.unref(Te)(new Date(oe.start_date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(oe.start_date).format("MM/DD")),11,LC),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(oe.list,(me,De)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:me.sub_id||me.id,value:me.sub_id||me.id,class:i.normalizeClass({"last-item":de===J.value.length-1&&De===oe.list.length-1})},{title:i.withCtx(()=>{var Ke,ht;return[i.createElementVNode("div",MC,[i.createElementVNode("div",PC,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(wl))]),_:1})]),i.createElementVNode("div",RC,[i.createElementVNode("div",{class:i.normalizeClass({"act-title":!0,"is-delete":me.is_delete,"is-end":me.isExpired})},[i.createElementVNode("div",VC,i.toDisplayString(me.title),1),i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline",class:i.normalizeClass([`tag-${me.is_delete?"delete":(Ke=i.unref(a).get(me.status))==null?void 0:Ke.id}`])},{default:i.withCtx(()=>{var Ve;return[i.createTextVNode(i.toDisplayString(me.is_delete===1?i.unref(t)("meeting.statusCanceled"):(Ve=i.unref(a).get(me.status))==null?void 0:Ve.text),1)]}),_:2},1032,["class"])],2),i.createElementVNode("div",FC,[i.createElementVNode("span",$C,i.toDisplayString(me.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString((ht=i.unref(o).get(me.activity_type))==null?void 0:ht.label),1)])])]),me.content_url&&!me.is_delete&&[3,4,5,6].includes(me.status)?(i.openBlock(),i.createElementBlock("div",UC,[me.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:me.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),me.register_url&&(me.status===3||me.status===4||me.status===2&&me.update_activity_id&&new Date(me.register_end_date).getTime()>new Date().getTime())?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:me.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>ge.copyInfo(De),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Al))]),_:1},8,["onClick"])]}),default:i.withCtx(()=>[i.createElementVNode("div",qC,[i.createVNode(ts,{show:I.value.includes(me.id),data:me,ref_for:!0,ref:Ke=>ie(Ke,me.id)},null,8,["show","data"]),!me.isExpired&&!me.is_delete?(i.openBlock(),i.createElementBlock("div",jC,[me.status===2?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,variant:"text",onClick:Ke=>Pe(me)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===1||me.status===3||me.status===4||me.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:1,variant:"text",onClick:Ke=>Ze(me)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===1||me.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:2,variant:"text",onClick:Ke=>ze(me)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===1||me.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:3,variant:"text",onClick:Ke=>Ye(me)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.submitReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ne[11]||(ne[11]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),de===J.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[q.value?(i.openBlock(),i.createElementBlock("div",HC,i.toDisplayString(i.unref(t)("meeting.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ne[6]||(ne[6]=me=>K("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):i.renderSlot(ge.$slots,"empty",{key:1})])])]),i.createVNode(i.unref(A.ODialog),{visible:Ne.value,"onUpdate:visible":ne[8]||(ne[8]=oe=>Ne.value=oe),"main-class":"handle-dialog-active",actions:Re.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",zC,i.toDisplayString(i.unref(t)("meeting.confirmRevokeActivity",[we.value.title])),1)]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:He.value,"onUpdate:visible":ne[9]||(ne[9]=oe=>He.value=oe),"main-class":"handle-dialog-active",actions:tt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",GC,i.toDisplayString(i.unref(t)("meeting.confirmDeleteActivity",[we.value.title])),1)]),_:1},8,["visible","actions"])],64))}}),WC=Object.assign(nc,{install(r){r.component("OActivityForm",nc)}}),YC=Object.assign(Qd,{install(r){r.component("OActivityApproval",Qd)}}),XC=Object.assign(Zd,{install(r){r.component("OMyActivityCalendar",Zd)}}),KC={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function QC(r,e){return i.openBlock(),i.createElementBlock("svg",KC,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.createElementVNode("path",{id:"矢量 425",d:"M8.36719 4.75439L8.36523 4.75537L8.36523 4.75537C7.63184 5.05518 6.93555 5.44629 6.27734 5.9292C6.00098 6.13184 5.94238 6.5083 6.14551 6.78516C6.34766 7.06201 6.72461 7.11963 7.00098 6.91699C7.61035 6.47119 8.25391 6.11475 8.93262 5.84766C9.05371 5.7998 9.17676 5.75488 9.30078 5.71289C9.73242 5.56641 10.1699 5.45752 10.6143 5.38672C10.6191 5.38574 10.624 5.38525 10.6289 5.38428L10.6289 5.38428C11.0439 5.31836 11.4639 5.28564 11.8896 5.28564C12.3193 5.28564 12.7451 5.31934 13.1641 5.38672L13.165 5.38672C13.6084 5.45752 14.0459 5.56641 14.4775 5.71289C14.6016 5.75488 14.7246 5.7998 14.8457 5.84766C15.5254 6.11475 16.1689 6.47119 16.7773 6.91699C17.0537 7.11963 17.4307 7.06201 17.6328 6.78516C17.8359 6.5083 17.7783 6.13184 17.501 5.9292C16.8418 5.4458 16.1455 5.0542 15.4111 4.75439C15.2334 4.68213 15.0537 4.61475 14.8711 4.55273C14.376 4.38477 13.873 4.25977 13.3643 4.17773C12.8789 4.09961 12.3877 4.06055 11.8896 4.06055C11.3916 4.06055 10.8994 4.09961 10.4141 4.17773L10.4141 4.17773C9.90527 4.25977 9.40332 4.38477 8.90723 4.55273C8.72559 4.61475 8.54492 4.68213 8.36719 4.75439L8.36719 4.75439ZM20.377 14.2979L20.377 13.4229C20.377 13.0801 20.1074 12.8105 19.7646 12.8105C19.4219 12.8105 19.1523 13.0801 19.1523 13.4229L19.1523 14.2979C19.1523 14.334 19.1455 14.3677 19.1328 14.3984L19.1328 14.3989C19.1074 14.4243 19.0215 14.5283 18.9902 14.5415C18.96 14.5542 18.9258 14.5605 18.8896 14.5605L4.88965 14.5605C4.85352 14.5605 4.82031 14.5542 4.78906 14.5415C4.76367 14.5156 4.65918 14.4297 4.64648 14.3989C4.63379 14.3677 4.62695 14.3345 4.62695 14.2979L4.62695 9.04785C4.62695 9.01172 4.63379 8.97803 4.64648 8.94727C4.67188 8.92188 4.75781 8.81738 4.78906 8.80469L4.78906 8.80469C4.82031 8.79199 4.85352 8.78564 4.88965 8.78564L18.8896 8.78564C18.9258 8.78564 18.96 8.79199 18.9902 8.80469C19.0166 8.83057 19.1201 8.9165 19.1328 8.94727C19.1455 8.97803 19.1523 9.01172 19.1523 9.04785L19.1523 11.6729C19.1523 12.0161 19.4219 12.2856 19.7646 12.2856C20.1074 12.2856 20.377 12.0161 20.377 11.6729L20.377 9.04785C20.377 8.94141 20.3662 8.83691 20.3447 8.73535L20.3447 8.73438L20.3447 8.73389C20.3252 8.64355 20.2969 8.55518 20.2598 8.46875C20.2236 8.3833 20.1807 8.30225 20.1299 8.22559C20.0752 8.14355 20.0127 8.06738 19.9414 7.99609C19.8701 7.92529 19.7939 7.8623 19.7119 7.80811C19.6357 7.75732 19.5547 7.71387 19.4688 7.67773C19.3828 7.64111 19.2939 7.61328 19.2041 7.59375C19.1016 7.57178 18.9971 7.56055 18.8896 7.56055L4.88965 7.56055C4.78418 7.56055 4.68066 7.57129 4.5791 7.59277L4.5791 7.59277C4.57812 7.59326 4.57715 7.59326 4.57617 7.59375L4.5752 7.59375C4.48535 7.61328 4.39746 7.64111 4.31055 7.67773C4.22461 7.71387 4.14355 7.75732 4.06738 7.80811C3.98535 7.8623 3.90918 7.92529 3.83789 7.99609C3.7666 8.06738 3.7041 8.14355 3.64941 8.22559C3.64941 8.22656 3.64844 8.22705 3.64844 8.22803C3.59863 8.30371 3.55566 8.38379 3.51953 8.46875C3.48242 8.55518 3.45508 8.64355 3.43555 8.73389C3.41309 8.83643 3.40234 8.94092 3.40234 9.04785L3.40234 14.2979C3.40234 14.4053 3.41309 14.5098 3.43555 14.6123C3.45508 14.7021 3.48242 14.7905 3.51953 14.8774C3.55566 14.9629 3.59961 15.0439 3.64941 15.1201C3.7041 15.2021 3.7666 15.2788 3.83789 15.3501C3.90918 15.4209 3.98535 15.4834 4.06738 15.5381C4.14355 15.5889 4.22461 15.6323 4.31055 15.6685C4.39746 15.7051 4.48535 15.7329 4.5752 15.7524C4.67773 15.7744 4.78223 15.7856 4.88965 15.7856L18.8896 15.7856C18.9971 15.7856 19.1016 15.7744 19.2041 15.7524C19.2939 15.7329 19.3828 15.7051 19.4688 15.6685C19.5547 15.6318 19.6357 15.5889 19.7119 15.5381C19.7939 15.4834 19.8701 15.4209 19.9414 15.3501C20.0127 15.2788 20.0752 15.2021 20.1299 15.1201C20.1807 15.0439 20.2236 14.9629 20.2598 14.8774C20.2969 14.7905 20.3252 14.7021 20.3447 14.6123C20.3662 14.5098 20.377 14.4053 20.377 14.2979ZM14.8291 16.3438L14.8291 16.3438C14.9189 16.3633 15.0078 16.3911 15.0938 16.4277C15.1797 16.4639 15.2607 16.5073 15.3369 16.5581C15.4189 16.6123 15.4951 16.6753 15.5664 16.7461C15.6377 16.8174 15.7002 16.8936 15.7549 16.9756C15.8057 17.0522 15.8486 17.1328 15.8848 17.2188C15.9219 17.3052 15.9502 17.3936 15.9697 17.4839C15.9912 17.5864 16.002 17.6909 16.002 17.7979C16.002 17.9053 15.9912 18.0098 15.9697 18.1123C15.9502 18.2021 15.9219 18.2905 15.8848 18.3774C15.8486 18.4629 15.8057 18.5439 15.7549 18.6201C15.7002 18.7021 15.6377 18.7788 15.5664 18.8501C15.4951 18.9209 15.4189 18.9834 15.3369 19.0381C15.2607 19.0889 15.1797 19.1318 15.0938 19.1685C15.0078 19.2051 14.9189 19.2329 14.8291 19.2524C14.7266 19.2744 14.6221 19.2856 14.5146 19.2856L9.26465 19.2856C9.1582 19.2856 9.05273 19.2744 8.9502 19.2524C8.86035 19.2329 8.77246 19.2051 8.68555 19.1685C8.59961 19.1318 8.51855 19.0889 8.44238 19.0381C8.36035 18.9834 8.28418 18.9209 8.21289 18.8501C8.1416 18.7788 8.0791 18.7021 8.02441 18.6201C7.97461 18.5439 7.93066 18.4629 7.89453 18.3774C7.85742 18.2905 7.83008 18.2021 7.81055 18.1123C7.78809 18.0098 7.77734 17.9053 7.77734 17.7979C7.77734 17.6909 7.78809 17.5864 7.81055 17.4839C7.83008 17.3936 7.85742 17.3052 7.89453 17.2188C7.93066 17.1328 7.97461 17.0522 8.02441 16.9756C8.0791 16.8936 8.1416 16.8174 8.21289 16.7461C8.28418 16.6753 8.36035 16.6123 8.44238 16.5581C8.51855 16.5073 8.59961 16.4639 8.68555 16.4277C8.77246 16.3911 8.86035 16.3633 8.9502 16.3438C9.05273 16.3218 9.1582 16.3105 9.26465 16.3105L14.5146 16.3105C14.6221 16.3105 14.7266 16.3218 14.8291 16.3438ZM9.2666 17.5352L14.5166 17.5352C14.5527 17.5352 14.5859 17.5415 14.6172 17.5547C14.6426 17.5801 14.7471 17.666 14.7598 17.6973C14.7725 17.728 14.7793 17.7617 14.7793 17.7979C14.7793 17.834 14.7725 17.8677 14.7598 17.8984C14.7344 17.9243 14.6484 18.0283 14.6172 18.041C14.5859 18.0542 14.5527 18.0605 14.5166 18.0605L9.2666 18.0605C9.23047 18.0605 9.19629 18.0542 9.16602 18.041C9.13965 18.0156 9.03613 17.9297 9.02344 17.8984C9.01074 17.8677 9.00391 17.834 9.00391 17.7979C9.00391 17.7617 9.01074 17.728 9.02344 17.6973C9.04883 17.6714 9.13477 17.5674 9.16602 17.5547C9.19629 17.5415 9.23047 17.5352 9.2666 17.5352Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const ZC={name:"events-icon-summit",render:QC},JC={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function e5(r,e){return i.openBlock(),i.createElementBlock("svg",JC,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.createElementVNode("path",{id:"矢量 426",d:"M18.3065 11.0924L17.7206 11.6295C17.455 11.8722 17.4384 12.2711 17.6806 12.5362C17.9237 12.8009 18.3221 12.8185 18.5868 12.5758L19.1737 12.0387L20.0418 11.2433C20.1746 11.1217 20.2811 10.9859 20.3631 10.8365C20.4256 10.7198 20.4735 10.5948 20.5057 10.4615C20.5369 10.3316 20.5516 10.2017 20.5496 10.0723C20.5467 9.92 20.5213 9.76765 20.4725 9.61531C20.4237 9.46345 20.3553 9.32478 20.2684 9.19978C20.1942 9.09333 20.1063 8.99665 20.0057 8.90925C19.9012 8.81989 19.7899 8.74616 19.6698 8.68854C19.5165 8.61481 19.3504 8.56744 19.1717 8.54645L15.3212 8.09185C15.2997 8.08355 15.2119 8.05572 15.1923 8.04156C15.1777 8.02398 15.1142 7.9566 15.1044 7.93511L13.4697 4.43751C13.3945 4.27638 13.2978 4.13477 13.1816 4.0127L13.1816 4.0127C13.0898 3.91797 12.9853 3.83496 12.8691 3.76416C12.7549 3.69531 12.6367 3.64209 12.5137 3.60498L12.5137 3.60498C12.3682 3.56104 12.2168 3.53906 12.0586 3.53906C11.8994 3.53906 11.7481 3.56104 11.6025 3.60498L11.6025 3.60498C11.4795 3.64209 11.3613 3.69531 11.2471 3.76416C11.1309 3.83496 11.0264 3.91797 10.9356 4.0127C10.8184 4.13477 10.7217 4.27589 10.6465 4.43751L9.01178 7.93511C8.99713 7.95269 8.94342 8.0274 8.92389 8.04156C8.90241 8.04986 8.81843 8.08892 8.79499 8.09185L4.94448 8.54645C4.76577 8.56744 4.59976 8.61481 4.44644 8.68854L4.44644 8.68854C4.32731 8.74616 4.215 8.81989 4.11149 8.90925C4.00993 8.99665 3.92204 9.09333 3.8488 9.19978C3.76091 9.32478 3.69353 9.46345 3.64373 9.61531C3.5949 9.76765 3.56951 9.92 3.56658 10.0723C3.56463 10.2017 3.57927 10.3316 3.61052 10.4615C3.64275 10.5948 3.6906 10.7198 3.75407 10.8365C3.83513 10.9859 3.94157 11.1217 4.07438 11.2433L6.90635 13.837C6.91807 13.8566 6.97374 13.9313 6.98155 13.9542C6.98155 13.9606 6.98252 13.9713 6.98448 13.9845L6.98448 13.986C6.98838 14.0226 6.99327 14.0763 6.98936 14.0939L6.2384 17.8488C6.20324 18.0241 6.19738 18.196 6.21985 18.3635C6.23645 18.4948 6.2716 18.6232 6.32434 18.7497C6.37512 18.8727 6.43957 18.986 6.51671 19.0891C6.60851 19.2106 6.71788 19.3181 6.84679 19.4118C6.97471 19.5061 7.11045 19.5778 7.254 19.6281C7.37607 19.6711 7.50302 19.698 7.63583 19.7097C7.77157 19.7209 7.90438 19.7155 8.03524 19.6926L8.03524 19.6926C8.20223 19.6628 8.36336 19.6047 8.52058 19.5183L11.9248 17.6369C11.9473 17.631 12.0342 17.6022 12.0586 17.6022C12.0801 17.6081 12.1709 17.6252 12.1914 17.6369L15.5117 19.4719C15.6718 19.5603 15.8368 19.6189 16.0068 19.6481L16.0077 19.6481C16.1396 19.6706 16.2743 19.675 16.412 19.6618C16.5468 19.6491 16.6747 19.6203 16.7968 19.5754C16.9423 19.5222 17.079 19.447 17.2079 19.3488C17.3368 19.2512 17.4462 19.1394 17.537 19.0139C17.6132 18.9079 17.6747 18.7917 17.7235 18.6662C17.7733 18.5368 17.8046 18.4055 17.8182 18.2722C17.8368 18.1008 17.8241 17.926 17.7821 17.7482L16.3495 11.7125C16.2665 11.3629 15.9267 11.1534 15.5771 11.2359C15.2275 11.3189 15.0175 11.6593 15.1005 12.0089L16.5331 18.0446C16.5468 18.1027 16.5458 18.155 16.5292 18.2023C16.5116 18.2492 16.4794 18.2907 16.4325 18.3268C16.3847 18.363 16.3359 18.383 16.286 18.3864C16.2362 18.3903 16.1855 18.3776 16.1327 18.3488L12.8115 16.5133C12.6943 16.4489 12.5732 16.4001 12.4473 16.3678L12.4473 16.3678C12.3223 16.3351 12.1924 16.319 12.0586 16.319C11.9238 16.319 11.794 16.3351 11.669 16.3678C11.543 16.4001 11.4219 16.4489 11.3047 16.5133L7.8995 18.3952C7.84872 18.4235 7.79794 18.4362 7.74911 18.4328C7.69931 18.4299 7.65146 18.4108 7.60458 18.3762C7.55673 18.342 7.52451 18.3015 7.50693 18.2556C7.48837 18.2097 7.48545 18.1579 7.49716 18.1003L8.24813 14.3453C8.27449 14.2116 8.28426 14.0792 8.27644 13.9474C8.26863 13.816 8.24324 13.6852 8.20125 13.5558C8.15926 13.4259 8.10262 13.3058 8.03036 13.1949C7.95907 13.0841 7.87313 12.983 7.77255 12.8907L4.94155 10.297C4.89761 10.2569 4.87026 10.213 4.85757 10.1651C4.84487 10.1173 4.8478 10.0655 4.86538 10.0094C4.88393 9.95369 4.91128 9.90975 4.94936 9.8785C4.98842 9.84676 5.03628 9.82771 5.09487 9.82088L8.94538 9.36628C9.07916 9.35066 9.20709 9.31892 9.32916 9.27155C9.45025 9.22419 9.56646 9.16071 9.67583 9.0821C9.7852 9.003 9.8809 8.91315 9.96391 8.81256C10.0479 8.71198 10.1172 8.60065 10.1748 8.47858L11.8086 4.98097C11.834 4.92824 11.8672 4.88869 11.9082 4.86183C11.9502 4.83546 12 4.82228 12.0586 4.82228C12.1162 4.82228 12.166 4.83546 12.208 4.86183C12.25 4.88869 12.2822 4.92824 12.3076 4.98097L13.9414 8.47858C13.999 8.60065 14.0693 8.71198 14.1523 8.81256C14.2353 8.91315 14.332 9.003 14.4414 9.0821C14.5507 9.16071 14.666 9.22419 14.7871 9.27155C14.9091 9.31892 15.0371 9.35066 15.1708 9.36628L19.0213 9.82088C19.0799 9.82771 19.1278 9.84676 19.1668 9.8785C19.2049 9.90975 19.2333 9.95369 19.2508 10.0094C19.2694 10.0655 19.2713 10.1173 19.2586 10.1651C19.2459 10.213 19.2186 10.2569 19.1747 10.297L18.3065 11.0924ZM9.31256 13.2311L7.93856 11.8561C7.68368 11.6017 7.68368 11.2027 7.93856 10.9483C8.19246 10.6944 8.59187 10.6944 8.84577 10.9483L10.2207 12.3233C10.4746 12.5777 10.4746 12.9772 10.2207 13.2311C9.96586 13.485 9.56743 13.485 9.31256 13.2311Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const t5={name:"events-icon-events",render:e5},i5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function n5(r,e){return i.openBlock(),i.createElementBlock("svg",i5,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.createElementVNode("path",{id:"矢量 578",d:"M3.05078 7.51904L11.6914 4.13965C11.8086 4.09424 11.9219 4.07178 12.0391 4.07178C12.1523 4.07178 12.2695 4.09473 12.3867 4.14062L20.9609 7.51953C21.0625 7.55957 21.1523 7.61328 21.2305 7.67969C21.2969 7.73779 21.3555 7.80566 21.4062 7.88379C21.5078 8.03857 21.5586 8.20898 21.5625 8.39502C21.5625 8.58057 21.5156 8.75195 21.418 8.9082C21.3125 9.07861 21.1641 9.20264 20.9766 9.28076L19.457 9.91309L19.457 12.2915C19.457 12.6558 19.168 12.9419 18.8047 12.9419C18.4414 12.9419 18.1562 12.6558 18.1562 12.292L18.1562 10.4531L16.0742 11.3188L16.0742 14.7134C16.2852 14.897 16.418 15.1675 16.418 15.4692C16.418 16.0215 15.9688 16.4692 15.418 16.4692C14.8672 16.4692 14.418 16.0215 14.418 15.4692C14.418 15.1626 14.5547 14.8887 14.7734 14.7051L14.7734 11.8589L12.4023 12.8442C12.2852 12.8926 12.1641 12.917 12.0391 12.917C11.9141 12.9175 11.793 12.8936 11.6758 12.8452L5.63281 10.354L5.61328 17.6836C5.61328 17.7285 5.62109 17.771 5.63281 17.8101C5.65234 17.854 5.67969 17.894 5.71484 17.9307C5.75 17.9658 5.78906 17.9917 5.83203 18.0088C5.87109 18.0259 5.91797 18.0342 5.96484 18.0342L17.7812 18.0342C17.832 18.0342 17.875 18.0254 17.918 18.0083C17.957 17.9912 17.9961 17.9658 18.0312 17.9316C18.0625 17.8975 18.0898 17.8599 18.1055 17.8184C18.125 17.7773 18.1328 17.7324 18.1328 17.6841L18.1328 14.1411C18.1328 13.7773 18.418 13.4912 18.7812 13.4912C19.1445 13.4912 19.4336 13.7773 19.4336 14.1411L19.4336 17.6841C19.4336 17.8032 19.418 17.9194 19.3945 18.0332C19.375 18.1333 19.3438 18.231 19.3008 18.3267C19.2188 18.5239 19.1016 18.6987 18.9492 18.8511C18.8711 18.9297 18.7852 18.9995 18.6953 19.0596C18.6094 19.1157 18.5195 19.1641 18.4258 19.2041C18.3281 19.2446 18.2305 19.2759 18.1328 19.2974L18.1328 19.2974C18.0156 19.3218 17.9023 19.334 17.7812 19.334L5.96484 19.334C5.84375 19.334 5.73047 19.3218 5.61719 19.2979C5.51562 19.2759 5.41797 19.2446 5.32031 19.2036C5.12109 19.1201 4.94922 19.002 4.79688 18.8501C4.64453 18.6978 4.52734 18.5225 4.44141 18.3252C4.35547 18.1196 4.3125 17.9048 4.3125 17.6797L4.33594 9.81836L3.03125 9.28174C2.84375 9.2041 2.69531 9.08008 2.58984 8.90967C2.54297 8.83496 2.50781 8.75684 2.48438 8.67578C2.45703 8.58643 2.44531 8.49268 2.44531 8.39502C2.44531 8.29736 2.46094 8.20361 2.48828 8.11475C2.51562 8.03369 2.55078 7.95654 2.59766 7.8833C2.65234 7.80469 2.71094 7.73682 2.77734 7.67871C2.85547 7.61182 2.94922 7.55859 3.05078 7.51904ZM18.5547 8.87891L15.457 10.1665L11.5 8.05322C11.1758 7.88184 10.7891 7.99951 10.6172 8.32031C10.4492 8.6416 10.5664 9.02832 10.8867 9.19971L13.9062 10.8115L12.0352 11.5884L5.23438 8.78271L4.33594 8.41211L12.0352 5.40039L19.6797 8.41211L18.5547 8.87891Z",fill:"rgb(255,254.745,254.745)","fill-rule":"evenodd"},null,-1)])])}const r5={name:"events-icon-competition",render:n5},s5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function a5(r,e){return i.openBlock(),i.createElementBlock("svg",s5,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.createElementVNode("path",{id:"矢量 579",d:"M8.94922 6.90332L8.94922 6.3335C8.94922 6.23779 8.95703 6.14404 8.97656 6.05225L8.97656 6.05225C8.99609 5.97119 9.01953 5.89209 9.05469 5.81396C9.08594 5.7373 9.125 5.66455 9.17188 5.59619C9.21875 5.52246 9.27734 5.4541 9.33984 5.39062C9.40234 5.32715 9.47266 5.271 9.54297 5.22217L9.54297 5.22217L9.54297 5.22217C9.61328 5.17676 9.6875 5.1377 9.76172 5.10498C9.83984 5.07227 9.91797 5.04688 10 5.02979L10 5.02979C10.0938 5.00977 10.1875 5 10.2812 5L18.668 5C18.7617 5 18.8555 5.00977 18.9492 5.02979L18.9492 5.02979C19.0273 5.04688 19.1094 5.07227 19.1875 5.10498C19.2617 5.1377 19.3359 5.17676 19.4023 5.22217C19.4766 5.271 19.5469 5.32715 19.6094 5.39062C19.6719 5.4541 19.7305 5.52246 19.7773 5.59619L19.7773 5.59619C19.8242 5.66455 19.8633 5.7373 19.8945 5.81396C19.9297 5.89209 19.9531 5.97119 19.9688 6.05225C19.9883 6.14404 20 6.23779 20 6.3335L20 12.2441C20 12.3398 19.9883 12.4336 19.9688 12.5249C19.9531 12.606 19.9297 12.6855 19.8945 12.7632C19.8633 12.8403 19.8242 12.9131 19.7773 12.9814C19.7305 13.0547 19.6719 13.123 19.6094 13.187C19.5469 13.2505 19.4766 13.3066 19.4023 13.3555C19.3359 13.4009 19.2617 13.4399 19.1875 13.4722C19.1094 13.5054 19.0273 13.5303 18.9492 13.5479C18.8555 13.5674 18.7617 13.5771 18.668 13.5771L18.3906 13.5771C18.0664 13.5771 17.8125 13.3232 17.8125 13C17.8125 12.6768 18.0664 12.4229 18.3906 12.4229L18.668 12.4229C18.6914 12.4229 18.7734 12.3789 18.793 12.3701C18.8086 12.353 18.8359 12.2651 18.8438 12.2441L18.8438 6.3335C18.8438 6.30859 18.8008 6.22803 18.793 6.20703C18.7773 6.18945 18.6875 6.16357 18.668 6.15479L10.2812 6.15479C10.2578 6.15479 10.1758 6.19824 10.1562 6.20703C10.1367 6.22461 10.1133 6.3125 10.1016 6.3335L10.1016 6.90332C10.1016 7.22656 9.84766 7.48047 9.52734 7.48047C9.20312 7.48047 8.94922 7.22656 8.94922 6.90332ZM6.47266 9.39307L6.47266 9.21973C6.47266 9.12402 6.48438 9.03027 6.50391 8.93896C6.51953 8.85791 6.54688 8.77832 6.57812 8.70068C6.61328 8.62354 6.65234 8.55127 6.69531 8.48242C6.74609 8.40918 6.80078 8.34082 6.86328 8.27734C6.92969 8.21338 6.99609 8.15723 7.07031 8.10889C7.13672 8.06299 7.21094 8.02441 7.28906 7.9917C7.36719 7.9585 7.44531 7.93359 7.52734 7.91602C7.61719 7.89648 7.71094 7.88672 7.80859 7.88672L16.1914 7.88672C16.2891 7.88672 16.3828 7.89648 16.4727 7.91602C16.5547 7.93359 16.6328 7.9585 16.7109 7.9917C16.7891 8.02441 16.8594 8.06299 16.9297 8.1084C17.0039 8.15723 17.0703 8.21338 17.1367 8.27734C17.1992 8.34082 17.2539 8.40918 17.3047 8.48242C17.3477 8.55127 17.3867 8.62354 17.4219 8.70068C17.4531 8.77832 17.4805 8.85791 17.4961 8.93896C17.5156 9.03027 17.5273 9.12402 17.5273 9.21973L17.5273 15.1304C17.5273 15.2266 17.5156 15.3198 17.4961 15.4116C17.4805 15.4927 17.4531 15.5718 17.4219 15.6499C17.3867 15.7266 17.3477 15.7993 17.3047 15.8682C17.2539 15.9414 17.1992 16.0098 17.1367 16.0732C17.0703 16.1367 17.0039 16.1929 16.9297 16.2417C16.8633 16.2871 16.7891 16.3262 16.7109 16.3589C16.6328 16.3916 16.5547 16.417 16.4727 16.4346C16.3828 16.4541 16.2891 16.4639 16.1914 16.4639L15.8789 16.4639C15.5547 16.4639 15.3008 16.21 15.3008 15.8867C15.3008 15.5635 15.5547 15.3091 15.8789 15.3091L16.1914 15.3091C16.2188 15.3091 16.2969 15.2656 16.3203 15.2568C16.3359 15.2393 16.3633 15.1519 16.3711 15.1304L16.3711 9.21973C16.3711 9.19531 16.3281 9.11475 16.3203 9.09375C16.3008 9.07617 16.2148 9.0498 16.1914 9.04102L7.80859 9.04102C7.78125 9.04102 7.70312 9.08496 7.67969 9.09375C7.66406 9.11084 7.63672 9.19873 7.62891 9.21973L7.62891 9.39307C7.62891 9.71631 7.375 9.97021 7.05078 9.97021C6.72656 9.97021 6.47266 9.71631 6.47266 9.39307ZM14 10.3901C13.9062 10.3706 13.8125 10.3608 13.7188 10.3608L5.33203 10.3608C5.23828 10.3608 5.14453 10.3706 5.05078 10.3901L5.05078 10.3901C4.97266 10.4077 4.89062 10.4331 4.8125 10.4658C4.73828 10.4985 4.66406 10.5376 4.59766 10.583L4.59766 10.583L4.59766 10.583C4.52344 10.6318 4.45312 10.688 4.39062 10.7515C4.32812 10.8149 4.26953 10.8833 4.22266 10.957C4.17578 11.0254 4.13672 11.0981 4.10547 11.1748C4.07031 11.2529 4.04688 11.332 4.03125 11.4131L4.03125 11.4131C4.01172 11.5049 4 11.5981 4 11.6943L4 17.605C4 17.7007 4.01172 17.7944 4.03125 17.8857C4.04688 17.9668 4.07031 18.0464 4.10547 18.124C4.13672 18.2012 4.17578 18.2739 4.22266 18.3423C4.26953 18.4155 4.32812 18.4839 4.39062 18.5479C4.45312 18.6113 4.52344 18.6675 4.59766 18.7163C4.66406 18.7617 4.73828 18.8008 4.8125 18.833C4.89062 18.8662 4.97266 18.8911 5.05078 18.9087L5.05078 18.9087C5.14453 18.9282 5.23828 18.938 5.33203 18.938L13.7188 18.938C13.8125 18.938 13.9062 18.9282 14 18.9087C14.082 18.8911 14.1602 18.8662 14.2383 18.833C14.3125 18.8008 14.3867 18.7617 14.457 18.7163C14.5273 18.6675 14.5977 18.6113 14.6602 18.5479C14.7227 18.4839 14.7812 18.4155 14.8281 18.3423C14.875 18.2739 14.9141 18.2012 14.9453 18.124C14.9805 18.0464 15.0039 17.9668 15.0234 17.8857C15.043 17.7944 15.0508 17.7007 15.0508 17.605L15.0508 11.6943C15.0508 11.5981 15.043 11.5049 15.0234 11.4131C15.0039 11.332 14.9805 11.2529 14.9453 11.1748C14.9141 11.0981 14.875 11.0254 14.8281 10.957C14.7812 10.8833 14.7227 10.8149 14.6602 10.7515C14.5977 10.688 14.5273 10.6318 14.457 10.583C14.3867 10.5376 14.3125 10.4985 14.2383 10.4658C14.1602 10.4331 14.082 10.4077 14 10.3901ZM5.33203 11.5156L13.7188 11.5156C13.7383 11.5244 13.8281 11.5503 13.8438 11.5679C13.8516 11.5889 13.8984 11.6694 13.8984 11.6943L13.8984 17.605C13.8867 17.626 13.8633 17.7139 13.8438 17.731C13.8242 17.7397 13.7422 17.7837 13.7188 17.7837L5.33203 17.7837C5.3125 17.7749 5.22266 17.7485 5.20703 17.731C5.19922 17.71 5.15625 17.6294 5.15625 17.605L5.15625 11.6943C5.16406 11.6733 5.19141 11.5854 5.20703 11.5679C5.22266 11.5503 5.3125 11.5244 5.33203 11.5156ZM11 12.7754C10.8086 12.5776 10.5 12.5742 10.3008 12.7676C10.1055 12.9614 10.1016 13.2695 10.293 13.4678L11 14.1875L8.36719 14.1875C8.08984 14.1875 7.87109 14.4053 7.87109 14.6826C7.87109 14.9595 8.08984 15.1772 8.36719 15.1772L10.9414 15.1772L10.2969 15.8286C10.1016 16.0254 10.1016 16.3335 10.3008 16.5283C10.4961 16.7236 10.8047 16.7222 11 16.5254L12.5039 15.0078C12.6172 14.8926 12.6758 14.7769 12.6758 14.6611C12.6758 14.5459 12.6172 14.4297 12.5039 14.3135L11 12.7754ZM7.39453 13.6792L7.39453 15.9336C7.39453 16.2109 7.17969 16.4287 6.90234 16.4287C6.625 16.4287 6.40625 16.2109 6.40625 15.9336L6.40625 13.6792C6.40625 13.4019 6.625 13.1841 6.90234 13.1841C7.17969 13.1841 7.39453 13.4019 7.39453 13.6792Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const o5={name:"events-icon-release",render:a5},l5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},u5={events:t5,competition:r5,release:o5,summit:ZC},zs={上海:"https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg",北京:"https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg",南京:"https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg",天津:"https://infrastructure-website.osinfra.cn/picture/city/tianjin.jpg",成都:"https://infrastructure-website.osinfra.cn/picture/city/chengdu.jpg",无锡:"https://infrastructure-website.osinfra.cn/picture/city/wuxi.jpg",杭州:"https://infrastructure-website.osinfra.cn/picture/city/hangzhou.jpg",深圳:["https://infrastructure-website.osinfra.cn/picture/city/shenzhen1.jpg","https://infrastructure-website.osinfra.cn/picture/city/shenzhen2.jpg"],苏州:"https://infrastructure-website.osinfra.cn/picture/city/suzhou.jpg",西安:"https://infrastructure-website.osinfra.cn/picture/city/xian.jpg",郑州:"https://infrastructure-website.osinfra.cn/picture/city/zhengzhou.jpg",武汉:"https://infrastructure-website.osinfra.cn/picture/city/wuhan.jpg"},c5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",d5={class:"o-events-calendar"},h5={key:0,class:"month-list"},f5={class:"collapse-header"},p5={class:"collapse-title"},m5={key:0,class:"collapse-desc"},g5={key:0,class:"month-content month-content-span"},v5={key:0,class:"event-location"},y5={class:"event-name"},_5={key:1},T5={key:0,class:"month-content-row"},b5={class:"month-name"},x5={class:"event-name"},C5={class:"event-location"},S5={class:"event-name"},E5={class:"event-location"},k5={key:1,class:"month-content month-content-column"},w5={class:"event-location"},D5={class:"event-name"},A5={key:1},Jd=i.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=ba(),{lePadV:t}=Nt.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=i.ref([]);i.watch([()=>n.data,()=>t.value],()=>{var m;n.data.length?t.value?a.value=[(m=n.data[0])==null?void 0:m.name]:a.value=n.data.map(S=>S.name):a.value=[]},{immediate:!0});const o=m=>{const S=m.split("/");return parseInt(S[1],10)},l=m=>{const S=new Array(12).fill(0),T=[];return m.forEach((C,y)=>{const[k,O]=Array.isArray(C.date)?[o(C.date[0]),o(C.date[1])]:[o(C.date),o(C.date)];let I=0;for(let q=k-1;q<O;q++)I=Math.max(I,S[q]);const D=I+1;for(let q=k-1;q<O;q++)S[q]=D;T.push({event:C,row:D,eventIndex:y,start:k,end:O})}),T},c=m=>{const S=Array.from({length:12},()=>[]);return m.forEach(T=>{const C=Array.isArray(T.date)?o(T.date[0]):o(T.date);S[C-1].push(T)}),S},d=m=>{const S=m.color||l5[m.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},g=m=>m.icon?m.icon:u5[m.type];return(m,S)=>(i.openBlock(),i.createElementBlock("div",d5,[i.unref(t)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",h5,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,T=>i.createElementVNode("div",{class:"month-header",key:T},i.toDisplayString(T),1)),64))])),i.createVNode(i.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":S[0]||(S[0]=T=>a.value=T)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(T,C)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:C,value:T.name},{title:i.withCtx(()=>[i.createElementVNode("div",f5,[i.createElementVNode("div",p5,[i.createElementVNode("div",{class:"title-icon",style:i.normalizeStyle({"--bg-color":d(T)})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g(T))))]),_:2},1024)],4),i.createElementVNode("span",null,i.toDisplayString(T.name),1)]),T.desc?(i.openBlock(),i.createElementBlock("div",m5,[i.withDirectives(i.createElementVNode("div",null,null,512),[[i.unref(e),T.desc]])])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[T.isSpanMonth?(i.openBlock(),i.createElementBlock("div",g5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l(T.data),({event:y,row:k,eventIndex:O,start:I,end:D})=>(i.openBlock(),i.createElementBlock("div",{key:O,class:i.normalizeClass(["event-item",{"event-item-center":y.align==="center","has-link":y.link}]),style:i.normalizeStyle({gridColumn:`${I} / ${D+1}`,gridRow:k,"--bg-color":d(T)||void 0})},[y.location?(i.openBlock(),i.createElementBlock("div",v5,i.toDisplayString(y.location),1)):i.createCommentVNode("",!0),i.createElementVNode("div",y5,[y.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),i.mergeProps({key:0,href:y.link,target:"_blank"},{ref_for:!0},y.linkProps||{}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(y.name),1)]),_:2},1040,["href"])):(i.openBlock(),i.createElementBlock("span",_5,i.toDisplayString(y.name),1))])],6))),128))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(t)?(i.openBlock(),i.createElementBlock("div",T5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(y,k)=>(i.openBlock(),i.createElementBlock("div",{key:k,class:i.normalizeClass(["month-row",{"empty-month":y.length===0}])},[i.createElementVNode("div",b5,i.toDisplayString(s[k]),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(O,I)=>(i.openBlock(),i.createElementBlock("div",{key:I,class:i.normalizeClass(["event-item",O.link?"has-link":""]),style:i.normalizeStyle({"--bd-color":d(T)||void 0})},[O.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:O.link,target:"_blank"},{default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("div",x5,[i.createElementVNode("span",null,i.toDisplayString(O.name),1)]),i.createElementVNode("div",C5,i.toDisplayString(O.location),1)]),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",S5,i.toDisplayString(O.name),1),i.createElementVNode("div",E5,i.toDisplayString(O.location),1)],64))],6))),128))],2))),128))])):(i.openBlock(),i.createElementBlock("div",k5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(y,k)=>(i.openBlock(),i.createElementBlock("div",{key:k,class:"month-column"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(O,I)=>(i.openBlock(),i.createElementBlock("div",{key:I,class:i.normalizeClass(["event-item",O.link?"has-link":""]),style:i.normalizeStyle({"--bg-color":d(T)||void 0})},[i.createElementVNode("div",w5,i.toDisplayString(O.location),1),i.createElementVNode("div",D5,[O.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:O.link,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(O.name),1)]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock("span",A5,i.toDisplayString(O.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const eh=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),N5={class:"o-events-list"},I5={class:"filter-wrapper"},O5={class:"filter-left"},B5={class:"list-content"},L5={class:"event-name"},M5={class:"event-desc"},P5={class:"event-date"},R5={key:0,class:"event-location"},th=i.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t}=Qe.useI18n(),{lePadV:n}=Nt.useScreen(),s=r,a=[{label:t("events.statusAll"),value:Zi.ALL},{label:t("events.statusIng"),value:Zi.ING},{label:t("events.statusFinish"),value:Zi.FINISH}],o=e,l=i.ref(Zi.ALL),c=i.ref(""),d=i.ref(""),g=(C={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},C))},m=()=>{g()},S=()=>{d.value=c.value,g()},T=i.computed(()=>s.data.map(C=>({...C,status:eh(new Date,C.date)?Zi.FINISH:Zi.ING})).sort((C,y)=>eh(C.date,y.date)?-1:1).map(C=>{var O,I,D;const y=(D=(I=(O=C.city)==null?void 0:O.replace("市",""))==null?void 0:I.replace("中国",""))==null?void 0:D.replaceAll(" ","");let k=null;return Array.isArray(zs[y])?k=zs[y][C.name.length%zs[y].length]:k=zs[y],k||(k=c5),{...C,cover:k}}));return(C,y)=>(i.openBlock(),i.createElementBlock("div",N5,[i.createElementVNode("div",I5,[i.createElementVNode("div",O5,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("events.status")),1),i.createVNode(i.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=k=>l.value=k),style:{"--radio-group-gap":"8px"},onChange:m},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,k=>i.createVNode(i.unref(A.ORadio),{key:k.value,value:k.value},{radio:i.withCtx(({checked:O})=>[i.createVNode(i.unref(A.OToggle),{checked:O},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(k.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),i.createVNode(i.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=k=>c.value=k),placeholder:i.unref(t)("events.searchPlaceholder"),onPressEnter:S,onClear:S,clearable:""},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"input-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",B5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,k=>(i.openBlock(),i.createBlock(i.unref(A.OCard),{key:k.name,cover:k.cover,href:k.link},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTag),{class:"event-status"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(k.status===i.unref(Zi).ING?i.unref(t)("events.statusIng"):i.unref(t)("events.statusFinish")),1)]),_:2},1024),i.createElementVNode("div",L5,i.toDisplayString(k.name),1),i.createElementVNode("div",M5,[i.createElementVNode("div",P5,i.toDisplayString(k.date),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),k.city?(i.openBlock(),i.createElementBlock("div",R5,i.toDisplayString(k.city),1)):i.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?i.createCommentVNode("",!0):i.renderSlot(C.$slots,"empty",{key:0}),r.total>8?(i.openBlock(),i.createBlock(i.unref(A.OPagination),{key:1,page:r.page,simple:i.unref(n),"show-total":!0,pageSize:r.pageSize,total:r.total,onChange:g,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):i.createCommentVNode("",!0)]))}}),V5={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function F5(r,e){return i.openBlock(),i.createElementBlock("svg",V5,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"#1da9ff",d:"M20.4 5.95c0.27-0.27 0.71-0.27 0.99 0 0.24 0.25 0.27 0.63 0.070 0.91l-0.070 0.080-10.5 10.47c-0.53 0.53-1.36 0.56-1.93 0.1l-0.11-0.1-5.23-5.2c-0.28-0.28-0.28-0.72-0.010-0.99 0.25-0.25 0.63-0.28 0.91-0.080l0.080 0.070 5.24 5.21c0.010 0.010 0.030 0.010 0.040 0.010l0.030-0.010 10.49-10.47z"},null,-1)])])}const $5={name:"events-icon-checked",render:F5},U5={class:"o-events-apply"},q5={class:"events-apply-grid"},j5={class:"timeline-number"},H5={class:"number-circle"},z5={class:"step-title"},G5={class:"step-idx"},W5={class:"step-desc"},Y5={key:0},X5={class:"desc-list-wrapper"},K5={key:0,class:"desc-list-title"},Q5={class:"desc-list-content"},Z5={class:"desc-list-item-title"},J5={class:"desc-list-item-desc"},ih=i.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=Nt.useTheme(),t=ba();return(n,s)=>(i.openBlock(),i.createElementBlock("div",U5,[i.createElementVNode("div",q5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.steps,(a,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:o},[i.createElementVNode("div",j5,[i.createElementVNode("div",H5,i.toDisplayString(o+1),1)]),i.createElementVNode("div",{class:i.normalizeClass(["step-item",`step-${o+1} ${i.unref(e)?"is-dark":""}`]),style:{}},[i.createElementVNode("div",z5,[i.createElementVNode("div",G5,i.toDisplayString(o+1),1),i.createElementVNode("span",null,i.toDisplayString(a.title),1)]),i.createElementVNode("div",W5,[a.desc?i.withDirectives((i.openBlock(),i.createElementBlock("div",Y5,null,512)),[[i.unref(t),a.desc]]):i.createCommentVNode("",!0),i.renderSlot(n.$slots,`step${o+1}`),i.createElementVNode("div",X5,[a.listTitle?(i.openBlock(),i.createElementBlock("div",K5,i.toDisplayString(a.listTitle),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Q5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.list,(l,c)=>(i.openBlock(),i.createElementBlock("div",{class:"desc-list-item",key:c},[i.createElementVNode("div",Z5,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref($5))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(l.title),1)]),i.createElementVNode("div",J5,i.toDisplayString(l.desc),1)]))),128))])])]),a.img?(i.openBlock(),i.createElementBlock("div",{key:0,class:"img-wrapper",style:i.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):i.createCommentVNode("",!0),a.imgPhone?(i.openBlock(),i.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:i.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):i.createCommentVNode("",!0)],2)],64))),128))])]))}}),eS=Object.assign(Jd,{install(r){r.component("OEventsCalendar",Jd)}}),tS=Object.assign(th,{install(r){r.component("OEventsList",th)}}),iS=Object.assign(ih,{install(r){r.component("OEventsApply",ih)}}),nS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function rS(r,e){return i.openBlock(),i.createElementBlock("svg",nS,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M9.461 11.616l4.719-3.932c0.212-0.177 0.527-0.148 0.704 0.064 0.075 0.090 0.116 0.203 0.116 0.32v7.865c0 0.276-0.224 0.5-0.5 0.5-0.117 0-0.23-0.041-0.32-0.116l-4.719-3.932c-0.212-0.177-0.241-0.492-0.064-0.704 0.019-0.023 0.041-0.045 0.064-0.064z"},null,-1)])])}const sS={name:"components-icon-caret-left",render:rS},aS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function oS(r,e){return i.openBlock(),i.createElementBlock("svg",aS,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M14.539 11.616l-4.719-3.932c-0.212-0.177-0.527-0.148-0.704 0.064-0.075 0.090-0.116 0.203-0.116 0.32v7.865c0 0.276 0.224 0.5 0.5 0.5 0.117 0 0.23-0.041 0.32-0.116l4.719-3.932c0.212-0.177 0.241-0.492 0.064-0.704-0.019-0.023-0.041-0.045-0.064-0.064z"},null,-1)])])}const lS={name:"components-icon-caret-right",render:oS},uS={class:"header-nav-wrap"},cS={key:0,class:"right-icon"},dS=["onMouseenter","onMouseleave"],hS=["id"],fS={class:"nav-text"},pS=["id","onClick"],mS={class:"nav-text"},gS={key:1,class:"right-icon"},vS=i.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const t=e,{isDark:n}=Nt.useTheme(),s=r,a=i.ref(),o=i.ref(),l=i.ref(null),c=i.ref(!1),d=i.ref(!1),g=i.ref(),m=qi.useDebounceFn(($,U)=>{g.value=$==null?void 0:$.id,U==="mouseenter"&&t("handle-mouseenter",$),U==="mouseleave"&&(g.value="",t("handle-mouseleave",$))},100),S=$=>{t("handle-click",$)},T=()=>{d.value=!0,i.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},C=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},y=()=>{var $,U;(($=a.value)==null?void 0:$.clientWidth)<((U=o.value)==null?void 0:U.clientWidth)?c.value=!0:c.value=!1};let k=0,O=0;const I=()=>O=0,D=$=>O>0?void O++:(O++,k=Date.now(),{event:"hover",properties:{module:"navigation",level1:$,target:$}}),q=$=>({properties:{module:"navigation",level1:$.label,target:$.label,steps:O,url:$.href,duration:Date.now()-k}});return i.onMounted(()=>{window.addEventListener("resize",y),i.nextTick(()=>{y(),l.value=setTimeout(()=>{y()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",y),clearTimeout(l.value)}),($,U)=>{const N=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",uS,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(i.openBlock(),i.createElementBlock("div",cS,[i.createVNode(i.unref(A.OIcon),{onClick:C},{default:i.withCtx(()=>[i.createVNode(i.unref(sS))]),_:1})])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"navRef",ref:a,class:i.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:i.unref(n)}])},[i.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:I},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,(z,b)=>{var E;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:z.id,class:i.normalizeClass({"is-selected":g.value===z.id||s.hoverId===z.id,"is-active":s.activeIndex===b}),onMouseenter:P=>i.unref(m)(z,"mouseenter"),onMouseleave:P=>i.unref(m)(z,"mouseleave")},[(E=z==null?void 0:z.children)!=null&&E.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"tour_headerNav_"+z.id,class:"nav-item"},[i.createElementVNode("span",fS,i.toDisplayString(z.label),1)],8,hS)):(i.openBlock(),i.createElementBlock("div",{key:1,id:"tour_headerNav_"+z.id,class:"nav-item item-other",onClick:P=>S(z)},[i.createElementVNode("span",mS,i.toDisplayString(z.label),1),z.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(z.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,pS))],42,dS)),[[N,D(z.label),"mouseenter"],[N,q(z),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(i.openBlock(),i.createElementBlock("div",gS,[i.createVNode(i.unref(A.OIcon),{onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(lS))]),_:1})])):i.createCommentVNode("",!0)],2)])}}}),yS=Qe._export_sfc(vS,[["__scopeId","data-v-fae66cd3"]]),_S={class:"nav-sub-content"},TS={class:"content-left"},bS={class:"content-label"},xS={class:"content-container"},CS=["href","target"],SS={class:"item-name"},ES={key:0,class:"desc-container"},kS=["title"],wS={key:0,class:"split-line"},DS={key:1,class:"content-right"},AS={class:"content-label"},NS=["href","target"],IS=["href","target"],OS=["src"],BS={class:"review-content"},LS={class:"review-label"},MS={class:"review-property"},PS=i.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const t=e,n=r,{locale:s}=Nt.useLocale(),{theme:a}=Nt.useTheme(),o=i.ref(!1),l=()=>{var T;t("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{t("handle-mouseenter-sub",""),o.value=!1},d=i.ref(!1),g=T=>{!T||!T.target||(d.value=T.target.clientHeight<T.target.scrollHeight)},m=(T,C)=>({properties:{module:"navigation",level1:T.label,level2:C.label,target:C.label,url:T.href}}),S=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,C)=>{var k,O,I;const y=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((O=(k=n.itemData)==null?void 0:k.children)!=null&&O.length)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["nav-content",[(I=n.community)==null?void 0:I.toLowerCase(),n.hoverIndex,i.unref(a),`${n.hoverIndex}-${i.unref(s)}`]])},[i.createElementVNode("div",{class:"nav-background-left",style:i.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),i.createElementVNode("div",{class:"nav-background-right",style:i.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),i.createVNode(mn,null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:i.withCtx(()=>{var D,q,$,U,N,z,b,E;return[i.createElementVNode("div",_S,[i.createElementVNode("div",TS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((D=n.itemData)==null?void 0:D.children,(P,Q)=>(i.openBlock(),i.createElementBlock("div",{class:"item-sub",key:Q},[i.createElementVNode("span",bS,i.toDisplayString(P.label),1),i.createElementVNode("div",xS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(P.children,L=>(i.openBlock(),i.createElementBlock("div",{key:L.label,class:"content-item"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:L.href,target:(L==null?void 0:L.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[i.createElementVNode("span",SS,i.toDisplayString(L.label),1),L.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(L.icon)))]),_:2},1024)):i.createCommentVNode("",!0),L.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(L.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,CS)),[[y,()=>m(P,L)]]),L.description?(i.openBlock(),i.createElementBlock("div",ES,[i.createElementVNode("p",{class:"item-desc",title:d.value?L.description:null,onMouseenter:C[0]||(C[0]=V=>g(V))},i.toDisplayString(L.description),41,kS)])):i.createCommentVNode("",!0)]))),128))])]))),128))]),($=(q=n.itemData)==null?void 0:q.shortcut)!=null&&$.length?(i.openBlock(),i.createElementBlock("div",wS)):i.createCommentVNode("",!0),(N=(U=n.itemData)==null?void 0:U.shortcut)!=null&&N.length?(i.openBlock(),i.createElementBlock("div",DS,[i.createElementVNode("span",AS,i.toDisplayString(i.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(z=n.itemData)!=null&&z.withPicture?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList((E=n.itemData)==null?void 0:E.shortcut,P=>i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:P.label,href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"review"},[i.createElementVNode("img",{src:P.picture,class:"review-picture"},null,8,OS),i.createElementVNode("div",BS,[i.createElementVNode("p",LS,i.toDisplayString(P.label),1),i.createElementVNode("div",MS,i.toDisplayString(P.remark),1)])],8,IS)),[[y,()=>S(P)]])),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList((b=n.itemData)==null?void 0:b.shortcut,P=>(i.openBlock(),i.createElementBlock("div",{key:P.label,class:"shortcut"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[i.createElementVNode("span",null,i.toDisplayString(P.label),1),P.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(P.icon)))]),_:2},1024)):i.createCommentVNode("",!0)],8,NS)),[[y,()=>S(P)]])]))),128))])):i.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):i.createCommentVNode("",!0)],32)}}}),RS=Qe._export_sfc(PS,[["__scopeId","data-v-ebff68f7"]]),VS={class:"header"},FS=["src"],$S={class:"header-nav"},US={key:0,class:"header-toolbar"},qS={class:"header-nav-content"},jS=i.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:t}=Nt.useTheme(),n=e,s=r,a=i.ref(),o=i.ref(),l=i.ref(),c=i.ref(!1),d=()=>{n("go-home")},g=y=>{var k;l.value=y,a.value=y.id,(k=y==null?void 0:y.children)!=null&&k.length&&(c.value=!0)},m=y=>{c.value=!1},S=y=>{n("handle-click",y)},T=y=>{o.value=y},C=y=>{o.value=y};return(y,k)=>(i.openBlock(),i.createElementBlock("div",VS,[i.createElementVNode("div",{class:i.normalizeClass(["header-wrap",{"header-wrap-dark":i.unref(t)}])},[i.createVNode(mn,{class:"header-content"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"header-logo",onClick:d},[i.renderSlot(y.$slots,"logo",{},()=>[s.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,FS)):i.createCommentVNode("",!0)],!0)]),i.createElementVNode("div",$S,[i.renderSlot(y.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(yS,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:g,onHandleMouseleave:m,onHandleClick:S},null,8,["nav-data","hoverId","active-index"])):i.createCommentVNode("",!0)],!0)]),y.$slots.toolbar?(i.openBlock(),i.createElementBlock("div",US,[i.renderSlot(y.$slots,"toolbar",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],2),i.createElementVNode("div",qS,[i.createVNode(RS,{itemData:l.value,"item-visible":c.value,"bg-left":s.bgLeft,"bg-right":s.bgRight,community:s.community,"hover-index":a.value,onHandleMouseenterSub:T,onHandleMouseleaveSub:C},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),nh=Qe._export_sfc(jS,[["__scopeId","data-v-b6e2d780"]]);var wn=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(wn||{});const HS={class:"o-nav"},zS={class:"o-nav-list"},GS=["onClick"],WS={class:"nav-aside"},YS={key:0,class:"nav-aside-wrapper"},XS=["value"],KS={class:"content-label"},QS={class:"container-mobile"},ZS=["onClick"],JS={class:"item-label"},eE={class:"desc-container"},tE={class:"item-desc"},iE=["onClick"],nE={class:"item-label"},rE={key:1,class:"nav-aside-wrapper"},sE=["onClick"],aE={class:"header-tool"},oE={key:2,class:"other-tool"},lE=i.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","handle-click"],setup(r,{emit:e}){const t=e,n=r,s=i.ref(""),a=i.ref({}),o=(d,g)=>{var m;g===wn.NAV?(m=d==null?void 0:d.children)!=null&&m.length?(s.value=d.id,a.value=d):t("handle-click",d):g===wn.CODE?(s.value=g,a.value=n.codeData.list):g===wn.LANG&&(s.value=g,a.value=n.langData.list)},l=(d,g)=>{window.open(d,g||"_self"),t("on-click")},c=d=>{s.value===wn.CODE&&l(d.href,d==null?void 0:d.target)};return i.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),i.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===wn.CODE?a.value=n.codeData.list:s.value===wn.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,g)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["header-nav",{active:r.menuShow}])},[i.createElementVNode("div",HS,[i.createElementVNode("ul",zS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,m=>(i.openBlock(),i.createElementBlock("li",{key:m.id,class:i.normalizeClass({active:s.value===m.id})},[i.createElementVNode("span",{onClick:S=>o(m,"nav")},i.toDisplayString(m.label),9,GS)],2))),128))]),i.createElementVNode("div",WS,[s.value!=="code"&&s.value!=="lang"?(i.openBlock(),i.createElementBlock("ul",YS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.children,m=>(i.openBlock(),i.createElementBlock("li",{value:m.label,key:m.label,class:"nav-aside-content"},[m!=null&&m.children?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("p",KS,i.toDisplayString(m.label),1),i.createElementVNode("div",QS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m==null?void 0:m.children,S=>(i.openBlock(),i.createElementBlock("div",{key:S.label,class:"content-container-mobile"},[i.createElementVNode("a",{onClick:T=>l(S.href,S==null?void 0:S.target),rel:"noopener noreferrer",class:"content-subtitle"},[i.createElementVNode("span",JS,i.toDisplayString(S.label),1),S.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(S.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),S.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(S.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,ZS),i.createElementVNode("div",eE,[i.createElementVNode("p",tE,i.toDisplayString(S.description),1)])]))),128))])],64)):(i.openBlock(),i.createElementBlock("a",{key:1,onClick:S=>l(m.href,m==null?void 0:m.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[i.createElementVNode("span",nE,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),m.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,iE))],8,XS))),128))])):(i.openBlock(),i.createElementBlock("div",rE,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,m=>(i.openBlock(),i.createElementBlock("a",{key:m.label,onClick:S=>c(m),class:"source-code-item"},[i.createElementVNode("span",null,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)],8,sE))),128))]))])]),i.createElementVNode("div",aE,[r.codeData?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:g[0]||(g[0]=m=>o(null,"code"))},i.toDisplayString(r.codeData.label),3)):i.createCommentVNode("",!0),r.langData?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:g[1]||(g[1]=m=>o(null,"lang"))},i.toDisplayString(r.langData.label),3)):i.createCommentVNode("",!0),d.$slots.tool?(i.openBlock(),i.createElementBlock("div",oE,[i.renderSlot(d.$slots,"tool",{},void 0,!0)])):i.createCommentVNode("",!0)])],2))}}),uE=Qe._export_sfc(lE,[["__scopeId","data-v-e34e1959"]]),cE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function dE(r,e){return i.openBlock(),i.createElementBlock("svg",cE,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M3.8 5h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 11h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 17h16.4c0.442 0 0.8 0.358 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.359-0.8-0.8s0.358-0.8 0.8-0.8z"},null,-1)])])}const hE={name:"components-icon-header-menu",render:dE},fE={class:"header"},pE={class:"header-box"},mE={key:0,class:"header-simple"},gE={class:"simple-header-left"},vE={key:0,class:"header-title"},yE={key:0,class:"simple-header-right"},_E={class:"header-left"},TE={class:"header-center"},bE=["src"],xE={class:"header-right"},CE=i.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","go-home"],setup(r,{emit:e}){const t=e,n=r,s=()=>{t("go-back")},a=()=>{t("go-home")},o=i.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()};return(g,m)=>(i.openBlock(),i.createElementBlock("div",fE,[i.createElementVNode("div",pE,[i.createVNode(mn,{class:"header-wrap"},{default:i.withCtx(()=>[r.isSimpleHeader?(i.openBlock(),i.createElementBlock("div",mE,[i.createElementVNode("div",gE,[i.createVNode(i.unref(A.OIcon),{onClick:s},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),r.headerTitle?(i.openBlock(),i.createElementBlock("div",vE,i.toDisplayString(r.headerTitle),1)):i.createCommentVNode("",!0)]),g.$slots.rightConfig?(i.openBlock(),i.createElementBlock("div",yE,[i.renderSlot(g.$slots,"rightConfig",{},void 0,!0)])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",_E,[i.createVNode(i.unref(A.OIcon),{onClick:l},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.unref(El),{key:1})):(i.openBlock(),i.createBlock(i.unref(hE),{key:0}))]),_:1})]),i.createElementVNode("div",TE,[i.createElementVNode("div",{class:"header-logo",onClick:a},[i.renderSlot(g.$slots,"logo",{},()=>[n.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,bE)):i.createCommentVNode("",!0)],!0)])]),i.createElementVNode("div",xE,[i.renderSlot(g.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),i.createElementVNode("div",{class:i.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[i.createVNode(uE,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c},{tool:i.withCtx(()=>[i.renderSlot(g.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),rh=Qe._export_sfc(CE,[["__scopeId","data-v-a551406b"]]),SE=Object.assign(nh,{install(r){r.component("OHeader",nh)}}),EE=Object.assign(rh,{install(r){r.component("OHeaderMobile",rh)}}),kE={OBanner:sh,OCookieNotice:ah,OFooter:oh,OHeaderSearch:lh,OHeaderUser:uh,OPlusConfigProvider:ch,OSection:dh,OSourceCode:hh,OThemeSwitcher:fh},wE={install:r=>{Object.entries(kE).forEach(([e,t])=>{r.component(e,t)})}};exports.OElCookieNotice=Qe.OElCookieNotice;exports.CalendarDataType=Me;exports.EventsStatusT=Zi;exports.MeetingGroupType=gi;exports.OActivityApproval=YC;exports.OActivityForm=WC;exports.OBanner=sh;exports.OCookieNotice=ah;exports.OEventsApply=iS;exports.OEventsCalendar=eS;exports.OEventsList=tS;exports.OFooter=oh;exports.OHeader=SE;exports.OHeaderMobile=EE;exports.OHeaderSearch=lh;exports.OHeaderUser=uh;exports.OMeetingCalendar=sC;exports.OMeetingForm=aC;exports.OMeetingPlayback=oC;exports.OMyActivityCalendar=XC;exports.OMyMeetingCalendar=uC;exports.OPlusConfigProvider=ch;exports.OSection=dh;exports.OSigMeetingCalendar=lC;exports.OSourceCode=hh;exports.OThemeSwitcher=fh;exports.default=wE;