PageSourceSearch

https://holton-jiang.github.io/assets/chunks/theme.B0TJehJx.js

js holton-jiang.github.io collected 2026-10-03 09:18:09 UTC 348,733 bytes, 227 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.DfwFy9h5.js","assets/chunks/framework.BHpayLOB.js"])))=>i.map(i=>d[i]);
2import{d as L,c as T,r as S,n as Q,o as v,a as ye,t as Y,b as M,w as E,T as di,e as A,_ as N,u as ot,i as or,f as lr,g as gi,h as F,j as b,k as m,l as Ge,m as ei,p as J,q as xe,s as Pt,v as Ee,x as pi,y as vi,z as ur,A as cr,F as ie,B as ce,C as ze,D as gn,E as It,G as R,H as Te,I as pn,J as xt,K as Fe,L as Lt,M as fr,N as vn,O as ti,P as mi,Q as mn,R as At,S as hr,U as dr,V as gr,W as yn,X as yi,Y as pr,Z as vr,$ as mr,a0 as yr,a1 as _r,a2 as Ht}from"./framework.BHpayLOB.js";const kr=L({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(s,n)=>(v(),T("span",{class:Q(["VPBadge",s.type])},[S(s.$slots,"default",{},()=>[ye(Y(s.text),1)])],2))}}),br={key:0,class:"VPBackdrop"},Cr=L({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(s,n)=>(v(),M(di,{name:"fade"},{default:E(()=>[s.show?(v(),T("div",br)):A("",!0)]),_:1}))}}),Tr=N(Cr,[["__scopeId","data-v-c79a1216"]]),j=ot;function Sr(o,s){let n,t=!1;return()=>{n&&clearTimeout(n),t?n=setTimeout(o,s):(o(),(t=!0)&&setTimeout(()=>t=!1,s))}}function ii(o){return o.startsWith("/")?o:`/${o}`}function _i(o){const{pathname:s,search:n,hash:t,protocol:e}=new URL(o,"http://a.com");if(or(o)||o.startsWith("#")||!e.startsWith("http")||!lr(s))return o;const{site:i}=j(),r=s.endsWith("/")||s.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${s.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${n}${t}`);return gi(r)}function lt({correspondingLink:o=!1}={}){const{site:s,localeIndex:n,page:t,theme:e,hash:i}=j(),r=F(()=>{var l,u;return{label:(l=s.value.locales[n.value])==null?void 0:l.label,link:((u=s.value.locales[n.value])==null?void 0:u.link)||(n.value==="root"?"/":`/${n.value}/`)}});return{localeLinks:F(()=>Object.entries(s.value.locales).flatMap(([l,u])=>r.value.label===u.label?[]:{text:u.label,link:Er(u.link||(l==="root"?"/":`/${l}/`),e.value.i18nRouting!==!1&&o,t.value.relativePath.slice(r.value.link.length-1),!s.value.cleanUrls)+i.value})),currentLang:r}}function Er(o,s,n,t){return s?o.replace(/\/$/,"")+ii(n.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,t?".html":"")):o}const wr={class:"NotFound"},Pr={class:"code"},Ir={class:"title"},xr={class:"quote"},Lr={class:"action"},Ar=["href","aria-label"],Dr=L({__name:"NotFound",setup(o){const{theme:s}=j(),{currentLang:n}=lt();return(t,e)=>{var i,r,a,l,u;return v(),T("div",wr,[b("p",Pr,Y(((i=m(s).notFound)==null?void 0:i.code)??"404"),1),b("h1",Ir,Y(((r=m(s).notFound)==null?void 0:r.title)??"PAGE NOT FOUND"),1),e[0]||(e[0]=b("div",{class:"divider"},null,-1)),b("blockquote",xr,Y(((a=m(s).notFound)==null?void 0:a.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),b("div",Lr,[b("a",{class:"link",href:m(gi)(m(n).link),"aria-label":((l=m(s).notFound)==null?void 0:l.linkLabel)??"go to home"},Y(((u=m(s).notFound)==null?void 0:u.linkText)??"Take me home"),9,Ar)])])}}}),Or=N(Dr,[["__scopeId","data-v-d6be1790"]]);function _n(o,s){if(Array.isArray(o))return pt(o);if(o==null)return[];s=ii(s);const n=Object.keys(o).sort((e,i)=>i.split("/").length-e.split("/").length).find(e=>s.startsWith(ii(e))),t=n?o[n]:[];return Array.isArray(t)?pt(t):pt(t.items,t.base)}function Rr(o){const s=[];let n=0;for(const t in o){const e=o[t];
2if(e.items){n=s.push(e);continue}s[n]||s.push({items:[]}),s[n].items.push(e)}return s}function Mr(o){const s=[];function n(t){for(const e of t)e.text&&e.link&&s.push({text:e.text,link:e.link,docFooterText:e.docFooterText}),e.items&&n(e.items)}return n(o),s}function ni(o,s){return Array.isArray(s)?s.some(n=>ni(o,n)):Ge(o,s.link)?!0:s.items?ni(o,s.items):!1}function pt(o,s){return[...o].map(n=>{const t={...n},e=t.base||s;return e&&t.link&&(t.link=e+t.link),t.items&&(t.items=pt(t.items,e)),t})}function Ae(){const{frontmatter:o,page:s,theme:n}=j(),t=ei("(min-width: 960px)"),e=J(!1),i=F(()=>{const k=n.value.sidebar,y=s.value.relativePath;return k?_n(k,y):[]}),r=J(i.value);xe(i,(k,y)=>{JSON.stringify(k)!==JSON.stringify(y)&&(r.value=i.value)});const a=F(()=>o.value.sidebar!==!1&&r.value.length>0&&o.value.layout!=="home"),l=F(()=>u?o.value.aside==null?n.value.aside==="left":o.value.aside==="left":!1),u=F(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:n.value.aside!==!1),c=F(()=>a.value&&t.value),f=F(()=>a.value?Rr(r.value):[]);function d(){e.value=!0}function g(){e.value=!1}function p(){e.value?g():d()}return{isOpen:e,sidebar:r,sidebarGroups:f,hasSidebar:a,hasAside:u,leftAside:l,isSidebarEnabled:c,open:d,close:g,toggle:p}}function Nr(o,s){let n;Pt(()=>{n=o.value?document.activeElement:void 0}),Ee(()=>{window.addEventListener("keyup",t)}),pi(()=>{window.removeEventListener("keyup",t)});function t(e){e.key==="Escape"&&o.value&&(s(),n==null||n.focus())}}function Fr(o){const{page:s,hash:n}=j(),t=J(!1),e=F(()=>o.value.collapsed!=null),i=F(()=>!!o.value.link),r=J(!1),a=()=>{r.value=Ge(s.value.relativePath,o.value.link)};xe([s,o,n],a),Ee(a);const l=F(()=>r.value?!0:o.value.items?ni(s.value.relativePath,o.value.items):!1),u=F(()=>!!(o.value.items&&o.value.items.length));Pt(()=>{t.value=!!(e.value&&o.value.collapsed)}),vi(()=>{(r.value||l.value)&&(t.value=!1)});function c(){e.value&&(t.value=!t.value)}return{collapsed:t,collapsible:e,isLink:i,isActiveLink:r,hasActiveLink:l,hasChildren:u,toggle:c}}function Hr(){const{hasSidebar:o}=Ae(),s=ei("(min-width: 960px)"),n=ei("(min-width: 1280px)");return{isAsideEnabled:F(()=>!n.value&&!s.value?!1:o.value?n.value:s.value)}}const Br=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,ri=[];function kn(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function ki(o){const s=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(n=>n.id&&n.hasChildNodes()).map(n=>{const t=Number(n.tagName[1]);return{element:n,title:$r(n),link:"#"+n.id,level:t}});return Vr(s,o)}function $r(o){let s="";for(const n of o.childNodes)if(n.nodeType===1){if(Br.test(n.className))continue;s+=n.textContent}else n.nodeType===3&&(s+=n.textContent);return s.trim()}function Vr(o,s){if(s===!1)return[];const n=(typeof s=="object"&&!Array.isArray(s)?s.level:s)||2,[t,e]=typeof n=="number"?[n,n]:n==="deep"?[2,6]:n;return Gr(o,t,e)}function Ur(o,s){const{isAsideEnabled:n}=Hr(),t=Sr(i,100);let e=null;Ee(()=>{requestAnimationFrame(i),window.addEventListener("scroll",t)}),ur(()=>{r(location.hash)}),pi(()=>{window.removeEventListener("scroll",t)});function i(){if(!n.value)return;const a=window.scrollY,l=window.innerHeight,u=document.body.offsetHeight,c=Math.abs(a+l-u)<1,f=ri.map(({element:g,link:p})=>({link:p,top:jr(g)})).filter(({top:g})=>!Number.isNaN(g)).sort((g,p)=>g.top-p.top);if(!f.length){r(null);return}if(a<1){r(null);return}if(c){r(f[f.length-1].link);return}let d=null;for(const{link:g,top:p}of f){if(p>a+cr()+4)break;d=g}r(d)}function r(a){e&&e.classList.remove("active"),a==null?e=null:e=o.value.querySelector(`a[href="${decodeURIComponent(a)}"]`);const l=e;l?(l.classList.add("active"),s.value.style.top=l.offsetTop+39+"px",s.value.style.opacity="1"):(s.value.style.top="33px",s.value.style.opacity="0")}}function jr(o){let s=0;for(;o!==document.body;){if(o===null)return NaN;s+=o.offsetTop,o=o.offsetParent}return s}function Gr(o,s,n){ri.length=0;const t=[],e=[];return o.forEach(i=>{const r={...i,children:[]};let a=e[e.length-1];for(;a&&a.level>=r.level;)e.pop(),a=e[e.length-1];if(r.element.classList.contains("ignore-header")||a&&"shouldIgnore"in a){e.push({level:r.level,shouldIgnore:!0});return}r.level>n||r.level<s||(ri.push({element:r.element,link:r.link}),a?a.children.push(r):t.push(r),e.push(r))}),t}const zr=["href","title"],Wr=L({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function s({target:n}){const t=n.href.split("#")[1],e=document.getElementById(decodeURIComponent(t));e==null||e.focus({preventScroll:!0})}return(n,t)=>{const e=ze("VPDocOutlineItem",!0);return v(),T("ul",{class:Q(["VPDocOutlineItem",n.root?"root":"nested"])},[(v(!0),T(ie,null,ce(n.headers,({children:i,link:r,title:a})=>(v(),T("li",null,[b("a",{class:"outline-link",href:r,onClick:s,title:a},Y(a),9,zr),i!=null&&i.length?(v(),M(e,{key:0,headers:i},null,8,["headers"])):A("",!0)]))),256))],2)}}}),bn=N(Wr,[["__scopeId","data-v-b933a997"]]),Kr={class:"content"},Yr={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Xr=L({__name:"VPDocAsideOutline",setup(o){const{frontmatter:s,theme:n}=j(),t=gn([]);It(()=>{t.value=ki(s.value.outline??n.value.outline)});const e=J(),i=J();return Ur(e,i),(r,a)=>(v(),T("nav",{"aria-labelledby":"doc-outline-aria-label",class:Q(["VPDocAsideOutline",{"has-outline":t.value.length>0}]),ref_key:"container",ref:e},[b("div",Kr,[b("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),b("div",Yr,Y(m(kn)(m(n))),1),R(bn,{headers:t.value,root:!0},null,8,["headers"])])],2))}}),qr=N(Xr,[["__scopeId","data-v-a5bbad30"]]),Jr={class:"VPDocAsideCarbonAds"},Zr=L({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const s=()=>null;return(n,t)=>(v(),T("div",Jr,[R(m(s),{"carbon-ads":n.carbonAds},null,8,["carbon-ads"])]))}}),Qr={class:"VPDocAside"},es=L({__name:"VPDocAside",setup(o){const{theme:s}=j();return(n,t)=>(v(),T("div",Qr,[S(n.$slots,"aside-top",{},void 0,!0),S(n.$slots,"aside-outline-before",{},void 0,!0),R(qr),S(n.$slots,"aside-outline-after",{},void 0,!0),t[0]||(t[0]=b("div",{class:"spacer"},null,-1)),S(n.$slots,"aside-ads-before",{},void 0,!0),m(s).carbonAds?(v(),M(Zr,{key:0,"carbon-ads":m(s).carbonAds},null,8,["carbon-ads"])):A("",!0),S(n.$slots,"aside-ads-after",{},void 0,!0),S(n.$slots,"aside-bottom",{},void 0,!0)]))}}),ts=N(es,[["__scopeId","data-v-3f215769"]]);function is(){const{theme:o,page:s}=j();return F(()=>{const{text:n="Edit this page",pattern:t=""}=o.value.editLink||{};let e;return typeof t=="function"?e=t(s.value):e=t.replace(/:path/g,s.value.filePath),{url:e,text:n}})}function ns(){const{page:o,theme:s,frontmatter:n}=j();return F(()=>{var u,c,f,d,g,p,k,y;const t=_n(s.value.sidebar,o.value.relativePath),e=Mr(t),i=rs(e,I=>I.link.replace(/[?#].*$/,"")),r=i.findIndex(I=>Ge(o.value.relativePath,I.link)),a=((u=s.value.docFooter)==null?void 0:u.prev)===!1&&!n.value.prev||n.value.prev===!1,l=((c=s.value.docFooter)==null?void 0:c.next)===!1&&!n.value.next||n.value.next===!1;return{prev:a?void 0:{text:(typeof n.value.prev=="string"?n.value.prev:typeof n.value.prev=="object"?n.value.prev.text:void 0)??((f=i[r-1])==null?void 0:f.docFooterText)??((d=i[r-1])==null?void 0:d.text),link:(typeof n.value.prev=="object"?n.value.prev.link:void 0)??((g=i[r-1])==null?void 0:g.link)},next:l?void 0:{text:(typeof n.value.next=="string"?n.value.next:typeof n.value.next=="object"?n.value.next.text:void 0)??((p=i[r+1])==null?void 0:p.docFooterText)??((k=i[r+1])==null?void 0:k.text),link:(typeof n.value.next=="object"?n.value.next.link:void 0)??((y=i[r+1])==null?void 0:y.link)}}})}function rs(o,s){const n=new Set;return o.filter(t=>{const e=s(t);return n.has(e)?!1:n.add(e)})}const Se=L({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const s=o,n=F(()=>s.tag??(s.href?"a":"span")),t=F(()=>s.href&&pn.test(s.href)||s.target==="_blank");return(e,i)=>(v(),M(Te(n.value),{class:Q(["VPLink",{link:e.href,"vp-external-link-icon":t.value,"no-icon":e.noIcon}]),href:e.href?m(_i)(e.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:E(()=>[S(e.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),ss={class:"VPLastUpdated"},as=["datetime"],os=L({__name:"VPDocFooterLastUpdated",setup(o){const{theme:s,page:n,lang:t}=j(),e=F(()=>new Date(n.value.lastUpdated)),i=F(()=>e.value.toISOString()),r=J("");return Ee(()=>{Pt(()=>{var a,l,u;
2r.value=new Intl.DateTimeFormat((l=(a=s.value.lastUpdated)==null?void 0:a.formatOptions)!=null&&l.forceLocale?t.value:void 0,((u=s.value.lastUpdated)==null?void 0:u.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(e.value)})}),(a,l)=>{var u;return v(),T("p",ss,[ye(Y(((u=m(s).lastUpdated)==null?void 0:u.text)||m(s).lastUpdatedText||"Last updated")+": ",1),b("time",{datetime:i.value},Y(r.value),9,as)])}}}),ls=N(os,[["__scopeId","data-v-e98dd255"]]),us={key:0,class:"VPDocFooter"},cs={key:0,class:"edit-info"},fs={key:0,class:"edit-link"},hs={key:1,class:"last-updated"},ds={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},gs={class:"pager"},ps=["innerHTML"],vs=["innerHTML"],ms={class:"pager"},ys=["innerHTML"],_s=["innerHTML"],ks=L({__name:"VPDocFooter",setup(o){const{theme:s,page:n,frontmatter:t}=j(),e=is(),i=ns(),r=F(()=>s.value.editLink&&t.value.editLink!==!1),a=F(()=>n.value.lastUpdated),l=F(()=>r.value||a.value||i.value.prev||i.value.next);return(u,c)=>{var f,d,g,p;return l.value?(v(),T("footer",us,[S(u.$slots,"doc-footer-before",{},void 0,!0),r.value||a.value?(v(),T("div",cs,[r.value?(v(),T("div",fs,[R(Se,{class:"edit-link-button",href:m(e).url,"no-icon":!0},{default:E(()=>[c[0]||(c[0]=b("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),ye(" "+Y(m(e).text),1)]),_:1,__:[0]},8,["href"])])):A("",!0),a.value?(v(),T("div",hs,[R(ls)])):A("",!0)])):A("",!0),(f=m(i).prev)!=null&&f.link||(d=m(i).next)!=null&&d.link?(v(),T("nav",ds,[c[1]||(c[1]=b("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),b("div",gs,[(g=m(i).prev)!=null&&g.link?(v(),M(Se,{key:0,class:"pager-link prev",href:m(i).prev.link},{default:E(()=>{var k;return[b("span",{class:"desc",innerHTML:((k=m(s).docFooter)==null?void 0:k.prev)||"Previous page"},null,8,ps),b("span",{class:"title",innerHTML:m(i).prev.text},null,8,vs)]}),_:1},8,["href"])):A("",!0)]),b("div",ms,[(p=m(i).next)!=null&&p.link?(v(),M(Se,{key:0,class:"pager-link next",href:m(i).next.link},{default:E(()=>{var k;return[b("span",{class:"desc",innerHTML:((k=m(s).docFooter)==null?void 0:k.next)||"Next page"},null,8,ys),b("span",{class:"title",innerHTML:m(i).next.text},null,8,_s)]}),_:1},8,["href"])):A("",!0)])])):A("",!0)])):A("",!0)}}}),bs=N(ks,[["__scopeId","data-v-e257564d"]]),Cs={class:"container"},Ts={class:"aside-container"},Ss={class:"aside-content"},Es={class:"content"},ws={class:"content-container"},Ps={class:"main"},Is=L({__name:"VPDoc",setup(o){const{theme:s}=j(),n=xt(),{hasSidebar:t,hasAside:e,leftAside:i}=Ae(),r=F(()=>n.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(a,l)=>{const u=ze("Content");return v(),T("div",{class:Q(["VPDoc",{"has-sidebar":m(t),"has-aside":m(e)}])},[S(a.$slots,"doc-top",{},void 0,!0),b("div",Cs,[m(e)?(v(),T("div",{key:0,class:Q(["aside",{"left-aside":m(i)}])},[l[0]||(l[0]=b("div",{class:"aside-curtain"},null,-1)),b("div",Ts,[b("div",Ss,[R(ts,null,{"aside-top":E(()=>[S(a.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":E(()=>[S(a.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":E(()=>[S(a.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":E(()=>[S(a.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":E(()=>[S(a.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":E(()=>[S(a.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):A("",!0),b("div",Es,[b("div",ws,[S(a.$slots,"doc-before",{},void 0,!0),b("main",Ps,[R(u,{class:Q(["vp-doc",[r.value,m(s).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),R(bs,null,{"doc-footer-before":E(()=>[S(a.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),S(a.$slots,"doc-after",{},void 0,!0)])])]),S(a.$slots,"doc-bottom",{},void 0,!0)],2)}}}),xs=N(Is,[["__scopeId","data-v-39a288b8"]]),Ls=L({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const s=o,n=F(()=>s.href&&pn.test(s.href)),t=F(()=>s.tag||(s.href?"a":"button"));return(e,i)=>(v(),M(Te(t.value),{class:Q(["VPButton",[e.size,e.theme]]),href:e.href?m(_i)(e.href):void 0,target:s.target??(n.value?"_blank":void 0),rel:s.rel??(n.value?"noreferrer":void 0)},{default:E(()=>[ye(Y(e.text),1)]),_:1},8,["class","href","target","rel"]))}}),As=N(Ls,[["__scopeId","data-v-fa7799d5"]]),Ds=["src","alt"],Os=L({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(s,n)=>{const t=ze("VPImage",!0);return s.image?(v(),T(ie,{key:0},[typeof s.image=="string"||"src"in s.image?(v(),T("img",Fe({key:0,class:"VPImage"},typeof s.image=="string"?s.$attrs:{...s.image,...s.$attrs},{src:m(gi)(typeof s.image=="string"?s.image:s.image.src),alt:s.alt??(typeof s.image=="string"?"":s.image.alt||"")}),null,16,Ds)):(v(),T(ie,{key:1},[R(t,Fe({class:"dark",image:s.image.dark,alt:s.image.alt},s.$attrs),null,16,["image","alt"]),R(t,Fe({class:"light",image:s.image.light,alt:s.image.alt},s.$attrs),null,16,["image","alt"])],64))],64)):A("",!0)}}}),vt=N(Os,[["__scopeId","data-v-8426fc1a"]]),Rs={class:"container"},Ms={class:"main"},Ns={class:"heading"},Fs=["innerHTML"],Hs=["innerHTML"],Bs=["innerHTML"],$s={key:0,class:"actions"},Vs={key:0,class:"image"},Us={class:"image-container"},js=L({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const s=Lt("hero-image-slot-exists");return(n,t)=>(v(),T("div",{class:Q(["VPHero",{"has-image":n.image||m(s)}])},[b("div",Rs,[b("div",Ms,[S(n.$slots,"home-hero-info-before",{},void 0,!0),S(n.$slots,"home-hero-info",{},()=>[b("h1",Ns,[n.name?(v(),T("span",{key:0,innerHTML:n.name,class:"name clip"},null,8,Fs)):A("",!0),n.text?(v(),T("span",{key:1,innerHTML:n.text,class:"text"},null,8,Hs)):A("",!0)]),n.tagline?(v(),T("p",{key:0,innerHTML:n.tagline,class:"tagline"},null,8,Bs)):A("",!0)],!0),S(n.$slots,"home-hero-info-after",{},void 0,!0),n.actions?(v(),T("div",$s,[(v(!0),T(ie,null,ce(n.actions,e=>(v(),T("div",{key:e.link,class:"action"}
2,[R(As,{tag:"a",size:"medium",theme:e.theme,text:e.text,href:e.link,target:e.target,rel:e.rel},null,8,["theme","text","href","target","rel"])]))),128))])):A("",!0),S(n.$slots,"home-hero-actions-after",{},void 0,!0)]),n.image||m(s)?(v(),T("div",Vs,[b("div",Us,[t[0]||(t[0]=b("div",{class:"image-bg"},null,-1)),S(n.$slots,"home-hero-image",{},()=>[n.image?(v(),M(vt,{key:0,class:"image-src",image:n.image},null,8,["image"])):A("",!0)],!0)])])):A("",!0)])],2))}}),Gs=N(js,[["__scopeId","data-v-4f9c455b"]]),zs=L({__name:"VPHomeHero",setup(o){const{frontmatter:s}=j();return(n,t)=>m(s).hero?(v(),M(Gs,{key:0,class:"VPHomeHero",name:m(s).hero.name,text:m(s).hero.text,tagline:m(s).hero.tagline,image:m(s).hero.image,actions:m(s).hero.actions},{"home-hero-info-before":E(()=>[S(n.$slots,"home-hero-info-before")]),"home-hero-info":E(()=>[S(n.$slots,"home-hero-info")]),"home-hero-info-after":E(()=>[S(n.$slots,"home-hero-info-after")]),"home-hero-actions-after":E(()=>[S(n.$slots,"home-hero-actions-after")]),"home-hero-image":E(()=>[S(n.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):A("",!0)}}),Ws={class:"box"},Ks={key:0,class:"icon"},Ys=["innerHTML"],Xs=["innerHTML"],qs=["innerHTML"],Js={key:4,class:"link-text"},Zs={class:"link-text-value"},Qs=L({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(s,n)=>(v(),M(Se,{class:"VPFeature",href:s.link,rel:s.rel,target:s.target,"no-icon":!0,tag:s.link?"a":"div"},{default:E(()=>[b("article",Ws,[typeof s.icon=="object"&&s.icon.wrap?(v(),T("div",Ks,[R(vt,{image:s.icon,alt:s.icon.alt,height:s.icon.height||48,width:s.icon.width||48},null,8,["image","alt","height","width"])])):typeof s.icon=="object"?(v(),M(vt,{key:1,image:s.icon,alt:s.icon.alt,height:s.icon.height||48,width:s.icon.width||48},null,8,["image","alt","height","width"])):s.icon?(v(),T("div",{key:2,class:"icon",innerHTML:s.icon},null,8,Ys)):A("",!0),b("h2",{class:"title",innerHTML:s.title},null,8,Xs),s.details?(v(),T("p",{key:3,class:"details",innerHTML:s.details},null,8,qs)):A("",!0),s.linkText?(v(),T("div",Js,[b("p",Zs,[ye(Y(s.linkText)+" ",1),n[0]||(n[0]=b("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):A("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),ea=N(Qs,[["__scopeId","data-v-a3976bdc"]]),ta={key:0,class:"VPFeatures"},ia={class:"container"},na={class:"items"},ra=L({__name:"VPFeatures",props:{features:{}},setup(o){const s=o,n=F(()=>{const t=s.features.length;if(t){if(t===2)return"grid-2";if(t===3)return"grid-3";if(t%3===0)return"grid-6";if(t>3)return"grid-4"}else return});return(t,e)=>t.features?(v(),T("div",ta,[b("div",ia,[b("div",na,[(v(!0),T(ie,null,ce(t.features,i=>(v(),T("div",{key:i.title,class:Q(["item",[n.value]])},[R(ea,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):A("",!0)}}),sa=N(ra,[["__scopeId","data-v-a6181336"]]),aa=L({__name:"VPHomeFeatures",setup(o){const{frontmatter:s}=j();return(n,t)=>m(s).features?(v(),M(sa,{key:0,class:"VPHomeFeatures",features:m(s).features},null,8,["features"])):A("",!0)}}),oa=L({__name:"VPHomeContent",setup(o){const{width:s}=fr({initialWidth:0,includeScrollbar:!1});return(n,t)=>(v(),T("div",{class:"vp-doc container",style:vn(m(s)?{"--vp-offset":`calc(50% - ${m(s)/2}px)`}:{})},[S(n.$slots,"default",{},void 0,!0)],4))}}),la=N(oa,[["__scopeId","data-v-8e2d4988"]]),ua=L({__name:"VPHome",setup(o){const{frontmatter:s,theme:n}=j();return(t,e)=>{const i=ze("Content");return v(),T("div",{class:Q(["VPHome",{"external-link-icon-enabled":m(n).externalLinkIcon}])},[S(t.$slots,"home-hero-before",{},void 0,!0),R(zs,null,{"home-hero-info-before":E(()=>[S(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":E(()=>[S(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":E(()=>[S(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":E(()=>[S(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":E(()=>[S(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),S(t.$slots,"home-hero-after",{},void 0,!0),S(t.$slots,"home-features-before",{},void 0,!0),R(aa),S(t.$slots,"home-features-after",{},void 0,!0),m(s).markdownStyles!==!1?(v(),M(la,{key:0},{default:E(()=>[R(i)]),_:1})):(v(),M(i,{key:1}))],2)}}}),ca=N(ua,[["__scopeId","data-v-8b561e3d"]]),fa={},ha={class:"VPPage"};function da(o,s){const n=ze("Content");return v(),T("div",ha,[S(o.$slots,"page-top"),R(n),S(o.$slots,"page-bottom")])}const ga=N(fa,[["render",da]]),pa=L({__name:"VPContent",setup(o){const{page:s,frontmatter:n}=j(),{hasSidebar:t}=Ae();return(e,i)=>(v(),T("div",{class:Q(["VPContent",{"has-sidebar":m(t),"is-home":m(n).layout==="home"}]),id:"VPContent"},[m(s).isNotFound?S(e.$slots,"not-found",{key:0}
2,()=>[R(Or)],!0):m(n).layout==="page"?(v(),M(ga,{key:1},{"page-top":E(()=>[S(e.$slots,"page-top",{},void 0,!0)]),"page-bottom":E(()=>[S(e.$slots,"page-bottom",{},void 0,!0)]),_:3})):m(n).layout==="home"?(v(),M(ca,{key:2},{"home-hero-before":E(()=>[S(e.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":E(()=>[S(e.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":E(()=>[S(e.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":E(()=>[S(e.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":E(()=>[S(e.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":E(()=>[S(e.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":E(()=>[S(e.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":E(()=>[S(e.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":E(()=>[S(e.$slots,"home-features-after",{},void 0,!0)]),_:3})):m(n).layout&&m(n).layout!=="doc"?(v(),M(Te(m(n).layout),{key:3})):(v(),M(xs,{key:4},{"doc-top":E(()=>[S(e.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":E(()=>[S(e.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":E(()=>[S(e.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":E(()=>[S(e.$slots,"doc-before",{},void 0,!0)]),"doc-after":E(()=>[S(e.$slots,"doc-after",{},void 0,!0)]),"aside-top":E(()=>[S(e.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":E(()=>[S(e.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":E(()=>[S(e.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":E(()=>[S(e.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":E(()=>[S(e.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":E(()=>[S(e.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),va=N(pa,[["__scopeId","data-v-1428d186"]]),ma={class:"container"},ya=["innerHTML"],_a=["innerHTML"],ka=L({__name:"VPFooter",setup(o){const{theme:s,frontmatter:n}=j(),{hasSidebar:t}=Ae();return(e,i)=>m(s).footer&&m(n).footer!==!1?(v(),T("footer",{key:0,class:Q(["VPFooter",{"has-sidebar":m(t)}])},[b("div",ma,[m(s).footer.message?(v(),T("p",{key:0,class:"message",innerHTML:m(s).footer.message},null,8,ya)):A("",!0),m(s).footer.copyright?(v(),T("p",{key:1,class:"copyright",innerHTML:m(s).footer.copyright},null,8,_a)):A("",!0)])],2)):A("",!0)}}),ba=N(ka,[["__scopeId","data-v-e315a0ad"]]);function Ca(){const{theme:o,frontmatter:s}=j(),n=gn([]),t=F(()=>n.value.length>0);return It(()=>{n.value=ki(s.value.outline??o.value.outline)}),{headers:n,hasLocalNav:t}}const Ta={class:"menu-text"},Sa={class:"header"},Ea={class:"outline"},wa=L({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const s=o,{theme:n}=j(),t=J(!1),e=J(0),i=J(),r=J();function a(f){var d;(d=i.value)!=null&&d.contains(f.target)||(t.value=!1)}xe(t,f=>{if(f){document.addEventListener("click",a);return}document.removeEventListener("click",a)}),ti("Escape",()=>{t.value=!1}),It(()=>{t.value=!1});function l(){t.value=!t.value,e.value=window.innerHeight+Math.min(window.scrollY-s.navHeight,0)}function u(f){f.target.classList.contains("outline-link")&&(r.value&&(r.value.style.transition="none"),mi(()=>{t.value=!1}))}function c(){t.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(f,d)=>(v(),T("div",{class:"VPLocalNavOutlineDropdown",style:vn({"--vp-vh":e.value+"px"}),ref_key:"main",ref:i},[f.headers.length>0?(v(),T("button",{key:0,onClick:l,class:Q({open:t.value})},[b("span",Ta,Y(m(kn)(m(n))),1),d[0]||(d[0]=b("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(v(),T("button",{key:1,onClick:c},Y(m(n).returnToTopLabel||"Return to top"),1)),R(di,{name:"flyout"},{default:E(()=>[t.value?(v(),T("div",{key:0,ref_key:"items",ref:r,class:"items",onClick:u},[b("div",Sa,[b("a",{class:"top-link",href:"#",onClick:c},Y(m(n).returnToTopLabel||"Return to top"),1)]),b("div",Ea,[R(bn,{headers:f.headers},null,8,["headers"])])],512)):A("",!0)]),_:1})],4))}}),Pa=N(wa,[["__scopeId","data-v-8a42e2b4"]]),Ia={class:"container"},xa=["aria-expanded"],La={class:"menu-text"},Aa=L({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:s,frontmatter:n}=j(),{hasSidebar:t}=Ae(),{headers:e}=Ca(),{y:i}=mn(),r=J(0);Ee(()=>{r.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),It(()=>{e.value=ki(n.value.outline??s.value.outline)});const a=F(()=>e.value.length===0),l=F(()=>a.value&&!t.value),u=F(()=>({VPLocalNav:!0,"has-sidebar":t.value,empty:a.value,fixed:l.value}));return(c,f)=>m(n).layout!=="home"&&(!l.value||m(i)>=r.value)?(v(),T("div",{key:0,class:Q(u.value)},[b("div",Ia,[m(t)?(v(),T("button",{key:0,class:"menu","aria-expanded":c.open,"aria-controls":"VPSidebarNav",onClick:f[0]||(f[0]=d=>c.$emit("open-menu"))},[f[1]||(f[1]=b("span",{class:"vpi-align-left menu-icon"},null,-1)),b("span",La,Y(m(s).sidebarMenuLabel||"Menu"),1)],8,xa)):A("",!0),R(Pa,{headers:m(e),navHeight:r.value},null,8,["headers","navHeight"])])],2)):A("",!0)}}),Da=N(Aa,[["__scopeId","data-v-a6f0e41e"]]);function Oa(){const o=J(!1);function s(){o.value=!0,window.addEventListener("resize",e)}function n(){o.value=!1,window.removeEventListener("resize",e)}function t(){o.value?n():s()}function e(){window.outerWidth>=768&&n()}const i=xt();return xe(()=>i.path,n),{isScreenOpen:o,openScreen:s,closeScreen:n,toggleScreen:t}}const Ra={},Ma={class:"VPSwitch",type:"button",role:"switch"},Na={class:"check"},Fa={key:0,class:"icon"};function Ha(o,s){return v(),T("button",Ma,[b("span",Na,[o.$slots.default?(v(),T("span",Fa,[S(o.$slots,"default",{},void 0,!0)])):A("",!0)])])}const Ba=N(Ra,[["render",Ha],["__scopeId","data-v-1d5665e3"]]),$a=L({__name:"VPSwitchAppearance",setup(o){const{isDark:s,theme:n}=j(),t=Lt("toggle-appearance",()=>{s.value=!s.value}),e=J("");return vi(()=>{e.value=s.value?n.value.lightModeSwitchTitle||"Switch to light theme":n.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,r)=>(v(),M(Ba,{title:e.value,class:"VPSwitchAppearance","aria-checked":m(s),onClick:m(t)},{default:E(()=>r[0]||(r[0]=[b("span",{class:"vpi-sun sun"},null,-1),b("span",{class:"vpi-moon moon"},null,-1)])),_:1,__:[0]},8,["title","aria-checked","onClick"]))}}),bi=N($a,[["__scopeId","data-v-5337faa4"]]),Va={key:0,class:"VPNavBarAppearance"},Ua=L({__name:"VPNavBarAppearance",setup(o){const{site:s}=j();return(n,t)=>m(s).appearance&&m(s).appearance!=="force-dark"&&m(s).appearance!=="force-auto"?(v(),T("div",Va,[R(bi)])):A("",!0)}}),ja=N(Ua,[["__scopeId","data-v-6c893767"]]),Ci=J();let Cn=!1,Bt=0;function Ga(o){const s=J(!1);if(At){!Cn&&za(),Bt++;const n=xe(Ci,t=>{var e,i,r;t===o.el.value||(e=o.el.value)!=null&&e.contains(t)?(s.value=!0,(i=o.onFocus)==null||i.call(o)):(s.value=!1,(r=o.onBlur)==null||r.call(o))});pi(()=>{n(),Bt--,Bt||Wa()})}return hr(s)}function za(){document.addEventListener("focusin",Tn),Cn=!0,Ci.value=d
2ocument.activeElement}function Wa(){document.removeEventListener("focusin",Tn)}function Tn(){Ci.value=document.activeElement}const Ka={class:"VPMenuLink"},Ya=["innerHTML"],Xa=L({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:s}=j();return(n,t)=>(v(),T("div",Ka,[R(Se,{class:Q({active:m(Ge)(m(s).relativePath,n.item.activeMatch||n.item.link,!!n.item.activeMatch)}),href:n.item.link,target:n.item.target,rel:n.item.rel,"no-icon":n.item.noIcon},{default:E(()=>[b("span",{innerHTML:n.item.text},null,8,Ya)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),Dt=N(Xa,[["__scopeId","data-v-35975db6"]]),qa={class:"VPMenuGroup"},Ja={key:0,class:"title"},Za=L({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(s,n)=>(v(),T("div",qa,[s.text?(v(),T("p",Ja,Y(s.text),1)):A("",!0),(v(!0),T(ie,null,ce(s.items,t=>(v(),T(ie,null,["link"in t?(v(),M(Dt,{key:0,item:t},null,8,["item"])):A("",!0)],64))),256))]))}}),Qa=N(Za,[["__scopeId","data-v-69e747b5"]]),eo={class:"VPMenu"},to={key:0,class:"items"},io=L({__name:"VPMenu",props:{items:{}},setup(o){return(s,n)=>(v(),T("div",eo,[s.items?(v(),T("div",to,[(v(!0),T(ie,null,ce(s.items,t=>(v(),T(ie,{key:JSON.stringify(t)},["link"in t?(v(),M(Dt,{key:0,item:t},null,8,["item"])):"component"in t?(v(),M(Te(t.component),Fe({key:1,ref_for:!0},t.props),null,16)):(v(),M(Qa,{key:2,text:t.text,items:t.items},null,8,["text","items"]))],64))),128))])):A("",!0),S(s.$slots,"default",{},void 0,!0)]))}}),no=N(io,[["__scopeId","data-v-b98bc113"]]),ro=["aria-expanded","aria-label"],so={key:0,class:"text"},ao=["innerHTML"],oo={key:1,class:"vpi-more-horizontal icon"},lo={class:"menu"},uo=L({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const s=J(!1),n=J();Ga({el:n,onBlur:t});function t(){s.value=!1}return(e,i)=>(v(),T("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:i[1]||(i[1]=r=>s.value=!0),onMouseleave:i[2]||(i[2]=r=>s.value=!1)},[b("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":s.value,"aria-label":e.label,onClick:i[0]||(i[0]=r=>s.value=!s.value)},[e.button||e.icon?(v(),T("span",so,[e.icon?(v(),T("span",{key:0,class:Q([e.icon,"option-icon"])},null,2)):A("",!0),e.button?(v(),T("span",{key:1,innerHTML:e.button},null,8,ao)):A("",!0),i[3]||(i[3]=b("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(v(),T("span",oo))],8,ro),b("div",lo,[R(no,{items:e.items},{default:E(()=>[S(e.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),Ti=N(uo,[["__scopeId","data-v-cf11d7a2"]]),co=["href","aria-label","innerHTML"],fo=L({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const s=o,n=J();Ee(async()=>{var i;await mi();const e=(i=n.value)==null?void 0:i.children[0];e instanceof HTMLElement&&e.className.startsWith("vpi-social-")&&(getComputedStyle(e).maskImage||getComputedStyle(e).webkitMaskImage)==="none"&&e.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${s.icon}.svg')`)});const t=F(()=>typeof s.icon=="object"?s.icon.svg:`<span class="vpi-social-${s.icon}"></span>`);return(e,i)=>(v(),T("a",{ref_key:"el",ref:n,class:"VPSocialLink no-icon",href:e.link,"aria-label":e.ariaLabel??(typeof e.icon=="string"?e.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,co))}}),ho=N(fo,[["__scopeId","data-v-bd121fe5"]]),go={class:"VPSocialLinks"},po=L({__name:"VPSocialLinks",props:{links:{}},setup(o){return(s,n)=>(v(),T("div",go,[(v(!0),T(ie,null,ce(s.links,({link:t,icon:e,ariaLabel:i})=>(v(),M(ho,{key:t,icon:e,link:t,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),Si=N(po,[["__scopeId","data-v-7bc22406"]]),vo={key:0,class:"group translations"},mo={class:"trans-title"},yo={key:1,class:"group"},_o={class:"item appearance"},ko={class:"label"},bo={class:"appearance-action"},Co={key:2,class:"group"},To={class:"item social-links"},So=L({__name:"VPNavBarExtra",setup(o){const{site:s,theme:n}=j(),{localeLinks:t,currentLang:e}=lt({correspondingLink:!0}),i=F(()=>t.value.length&&e.value.label||s.value.appearance||n.value.socialLinks);return(r,a)=>i.value?(v(),M(Ti,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:E(()=>[m(t).length&&m(e).label?(v(),T("div",vo,[b("p",mo,Y(m(e).label),1),(v(!0),T(ie,null,ce(m(t),l=>(v(),M(Dt,{key:l.link,item:l},null,8,["item"]))),128))])):A("",!0),m(s).appearance&&m(s).appearance!=="force-dark"&&m(s).appearance!=="force-auto"?(v(),T("div",yo,[b("div",_o,[b("p",ko,Y(m(n).darkModeSwitchLabel||"Appearance"),1),b("div",bo,[R(bi)])])])):A("",!0),m(n).socialLinks?(v(),T("div",Co,[b("div",To,[R(Si,{class:"social-links-list",links:m(n).socialLinks},null,8,["links"])])])):A("",!0)]),_:1})):A("",!0)}}),Eo=N(So,[["__scopeId","data-v-bb2aa2f0"]]),wo=["aria-expanded"],Po=L({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(s,n)=>(v(),T("button",{type:"button",class:Q(["VPNavBarHamburger",{active:s.active}]),"aria-label":"mobile navigation","aria-expanded":s.active,"aria-controls":"VPNavScreen",onClick:n[0]||(n[0]=t=>s.$emit("click"))},n[1]||(n[1]=[b("span",{class:"container"},[b("span",{class:"top"}),b("span",{class:"middle"}),b("span",{class:"bottom"})],-1)]),10,wo))}}),Io=N(Po,[["__scopeId","data-v-e5dd9c1c"]]),xo=["innerHTML"],Lo=L({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:s}=j();return(n,t)=>(v(),M(Se,{class:Q({VPNavBarMenuLink:!0,active:m(Ge)(m(s).relativePath,n.item.activeMatch||n.item.link,!!n.item.activeMatch)}),href:n.item.link,target:n.item.target,rel:n.item.rel,"no-icon":n.item.noIcon,tabindex:"0"},{default:E(()=>[b("span",{innerHTML:n.item.text},null,8,xo)]),_:1},8,["class","href","target","rel","no-icon"]))}}),Ao=N(Lo,[["__scopeId","data-v-e56f3d57"]]),Do=L({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const s=o,{page:n}=j(),t=i=>"component"in i?!1:"link"in i?Ge(n.value.relativePath,i.link,!!s.item.activeMatch):i.items.some(t),e=F(()=>t(s.item));return(i,r)=>(v(),M(Ti,{class:Q({VPNavBarMenuGroup:!0,active:m(Ge)(m(n).relativePath,i.item.activeMatch,!!i.item.activeMatch)||e.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}
2),Oo={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Ro=L({__name:"VPNavBarMenu",setup(o){const{theme:s}=j();return(n,t)=>m(s).nav?(v(),T("nav",Oo,[t[0]||(t[0]=b("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(v(!0),T(ie,null,ce(m(s).nav,e=>(v(),T(ie,{key:JSON.stringify(e)},["link"in e?(v(),M(Ao,{key:0,item:e},null,8,["item"])):"component"in e?(v(),M(Te(e.component),Fe({key:1,ref_for:!0},e.props),null,16)):(v(),M(Do,{key:2,item:e},null,8,["item"]))],64))),128))])):A("",!0)}}),Mo=N(Ro,[["__scopeId","data-v-dc692963"]]);function No(o){const{localeIndex:s,theme:n}=j();function t(e){var p,k,y;const i=e.split("."),r=(p=n.value.search)==null?void 0:p.options,a=r&&typeof r=="object",l=a&&((y=(k=r.locales)==null?void 0:k[s.value])==null?void 0:y.translations)||null,u=a&&r.translations||null;let c=l,f=u,d=o;const g=i.pop();for(const I of i){let x=null;const P=d==null?void 0:d[I];P&&(x=d=P);const G=f==null?void 0:f[I];G&&(x=f=G);const V=c==null?void 0:c[I];V&&(x=c=V),P||(d=x),G||(f=x),V||(c=x)}return(c==null?void 0:c[g])??(f==null?void 0:f[g])??(d==null?void 0:d[g])??""}return t}const Fo=["aria-label"],Ho={class:"DocSearch-Button-Container"},Bo={class:"DocSearch-Button-Placeholder"},Hi=L({__name:"VPNavBarSearchButton",setup(o){const n=No({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(t,e)=>(v(),T("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":m(n)("button.buttonAriaLabel")},[b("span",Ho,[e[0]||(e[0]=b("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),b("span",Bo,Y(m(n)("button.buttonText")),1)]),e[1]||(e[1]=b("span",{class:"DocSearch-Button-Keys"},[b("kbd",{class:"DocSearch-Button-Key"}),b("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,Fo))}}),$o={class:"VPNavBarSearch"},Vo={id:"local-search"},Uo={key:1,id:"docsearch"},jo=L({__name:"VPNavBarSearch",setup(o){const s=dr(()=>gr(()=>import("./VPLocalSearchBox.DfwFy9h5.js"),__vite__mapDeps([0,1]))),n=()=>null,{theme:t}=j(),e=J(!1),i=J(!1);Ee(()=>{});function r(){e.value||(e.value=!0,setTimeout(a,16))}function a(){const f=new Event("keydown");f.key="k",f.metaKey=!0,window.dispatchEvent(f),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||a()},16)}function l(f){const d=f.target,g=d.tagName;return d.isContentEditable||g==="INPUT"||g==="SELECT"||g==="TEXTAREA"}const u=J(!1);ti("k",f=>{(f.ctrlKey||f.metaKey)&&(f.preventDefault(),u.value=!0)}),ti("/",f=>{l(f)||(f.preventDefault(),u.value=!0)});const c="local";return(f,d)=>{var g;return v(),T("div",$o,[m(c)==="local"?(v(),T(ie,{key:0},[u.value?(v(),M(m(s),{key:0,onClose:d[0]||(d[0]=p=>u.value=!1)})):A("",!0),b("div",Vo,[R(Hi,{onClick:d[1]||(d[1]=p=>u.value=!0)})])],64)):m(c)==="algolia"?(v(),T(ie,{key:1},[e.value?(v(),M(m(n),{key:0,algolia:((g=m(t).search)==null?void 0:g.options)??m(t).algolia,onVnodeBeforeMount:d[2]||(d[2]=p=>i.value=!0)},null,8,["algolia"])):A("",!0),i.value?A("",!0):(v(),T("div",Uo,[R(Hi,{onClick:r})]))],64)):A("",!0)])}}}),Go=L({__name:"VPNavBarSocialLinks",setup(o){const{theme:s}=j();return(n,t)=>m(s).socialLinks?(v(),M(Si,{key:0,class:"VPNavBarSocialLinks",links:m(s).socialLinks},null,8,["links"])):A("",!0)}}),zo=N(Go,[["__scopeId","data-v-0394ad82"]]),Wo=["href","rel","target"],Ko=["innerHTML"],Yo={key:2},Xo=L({__name:"VPNavBarTitle",setup(o){const{site:s,theme:n}=j(),{hasSidebar:t}=Ae(),{currentLang:e}=lt(),i=F(()=>{var l;return typeof n.value.logoLink=="string"?n.value.logoLink:(l=n.value.logoLink)==null?void 0:l.link}),r=F(()=>{var l;return typeof n.value.logoLink=="string"||(l=n.value.logoLink)==null?void 0:l.rel}),a=F(()=>{var l;return typeof n.value.logoLink=="string"||(l=n.value.logoLink)==null?void 0:l.target});return(l,u)=>(v(),T("div",{class:Q(["VPNavBarTitle",{"has-sidebar":m(t)}])},[b("a",{class:"title",href:i.value??m(_i)(m(e).link),rel:r.value,target:a.value},[S(l.$slots,"nav-bar-title-before",{},void 0,!0),m(n).logo?(v(),M(vt,{key:0,class:"logo",image:m(n).logo},null,8,["image"])):A("",!0),m(n).siteTitle?(v(),T("span",{key:1,innerHTML:m(n).siteTitle},null,8,Ko)):m(n).siteTitle===void 0?(v(),T("span",Yo,Y(m(s).title),1)):A("",!0),S(l.$slots,"nav-bar-title-after",{},void 0,!0)],8,Wo)],2))}}),qo=N(Xo,[["__scopeId","data-v-1168a8e4"]]),Jo={class:"items"},Zo={class:"title"},Qo=L({__name:"VPNavBarTranslations",setup(o){const{theme:s}=j(),{localeLinks:n,currentLang:t}=lt({correspondingLink:!0});return(e,i)=>m(n).length&&m(t).label?(v(),M(Ti,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:m(s).langMenuLabel||"Change language"},{default:E(()=>[b("div",Jo,[b("p",Zo,Y(m(t).label),1),(v(!0),T(ie,null,ce(m(n),r=>(v(),M(Dt,{key:r.link,item:r},null,8,["item"]))),128))])]),_:1},8,["label"])):A("",!0)}}),el=N(Qo,[["__scopeId","data-v-88af2de4"]]),tl={class:"wrapper"},il={class:"container"},nl={class:"title"},rl={class:"content"},sl={class:"content-body"},al=L({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const s=o,{y:n}=mn(),{hasSidebar:t}=Ae(),{frontmatter:e}=j(),i=J({});return vi(()=>{i.value={"has-sidebar":t.value,home:e.value.layout==="home",top:n.value===0,"screen-open":s.isScreenOpen}}),(r,a)=>(v(),T("div",{class:Q(["VPNavBar",i.value])},[b("div",tl,[b("div",il,[b("div",nl,[R(qo,null,{"nav-bar-title-before":E(()=>[S(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":E(()=>[S(r.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),b("div",rl,[b("div",sl,[S(r.$slots,"nav-bar-content-before",{},void 0,!0),R(jo,{class:"search"}),R(Mo,{class:"menu"}),R(el,{class:"translations"}),R(ja,{class:"appearance"}),R(zo,{class:"social-links"}),R(Eo,{class:"extra"}),S(r.$slots,"nav-bar-content-after",{},void 0,!0),R(Io,{class:"hamburger",active:r.isScreenOpen,onClick:a[0]||(a[0]=l=>r.$emit("toggle-screen"))},null,8,["active"])])])])]),a[1]||(a[1]=b("div",{class:"divider"},[b("div",{class:"divider-line"})],-1))],2))}}),ol=N(al,[["__scopeId","data-v-6aa21345"]]),ll={key:0,class:"VPNavScreenAppearance"},ul={class:"text"},cl=L({__name:"VPNavScreenAppearance",setup(o){const{site:s,theme:n}=j();return(t,e)=>m(s).appearance&&m(s).appearance!=="force-dark"&&m(s).appearance!=="force-auto"?(v(),T("div",ll,[b("p",ul,Y(m(n).darkModeSwitchLabel||"Appearance"),1),R(bi)])):A("",!0)}}),fl=N(cl,[["__scopeId","data-v-b44890b2"]]),hl=["innerHTML"],dl=L({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const s=Lt("close-screen");return(n,t)=>(v(),M(Se,{class:"VPNavScreenMenuLink",href:n.item.link,target:n.item.target,rel:n.item.rel,"no-icon":n.item.noIcon,onClick:m(s)},{default:E(()=>[b("span",{innerHTML:n.item.text},null,8,hl)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),gl=N(dl,[["__scopeId","data-v-df37e6dd"]]),pl=["innerHTML"],vl=L({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const s=Lt("close-screen");return(n,t)=>(v(),M(Se,{class:"VPNavScreenMenuGroupLink",href:n.item.link,target:n.item.target,rel:n.item.rel,"no-icon":n.item.noIcon,onClick:m(s)},{default:E(()=>[b("span",{innerHTML:n.item.text},null,8,pl)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Sn=N(vl,[["__scopeId","data-v-3e9c20e4"]]),ml={class:"VPNavScreenMenuGroupSection"},yl={key:0,class:"title"},_l=L({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(s,n)=>(v(),T("div",ml,[s.text?(v(),T("p",yl,Y(s.text),1)):A("",!0),(v(!0),T(ie,null,ce(s.items,t=>(v(),M(Sn,{key:t.text,item:t},null,8,["item"]))),128))]))}}),kl=N(_l,[["__scopeId","data-v-8133b170"]]),bl=["aria-controls","aria-expanded"],Cl=["innerHTML"],Tl=["id"],Sl={key:0,class:"item"},El={key:1,class:"item"},wl={key:2,class:"group"},Pl=L({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const s=o,n=J(!1),t=F(()=>`NavScreenGroup-${s.text.replace(" ","-").toLowerCase()}`);function e(){n.value=!n.value}return(i,r)=>(v(),T("div",{class:Q(["VPNavScreenMenuGroup",{open:n.value}])},[b("button",{class:"button","aria-controls":t.value,"aria-expanded":n.value,onClick:e},[b("span",{class:"button-text",innerHTML:i.text},null,8,Cl),r[0]||(r[0]=b("span",{class:"vpi-plus button-icon"},null,-1))],8,bl),b("div",{id:t.value,class:"items"},[(v(!0),T(ie,null,ce(i.items,a=>(v(),T(ie,{key:JSON.stringify(a)},["link"in a?(v(),T("div",Sl,[R(Sn,{item:a},null,8,["item"])])):"component"in a?(v(),T("div",El,[(v(),M(Te(a.component),Fe({ref_for:!0},a.props,{"screen-menu":""}),null,16))])):(v(),T("div",wl,[R(kl,{text:a.text,items:a.items},null,8,["text","items"])]))],64))),128))],8,Tl)],2))}}),Il=N(Pl,[["__scopeId","data-v-b9ab8c58"]]),xl={key:0,class:"VPNavScreenMenu"},Ll=L({__name:"VPNavScreenMenu",setup(o){const{theme:s}=j();return(n,t)=>m(s).nav?(v(),T("nav",xl,[(v(!0),T(ie,null,ce(m(s).nav,e=>(v(),T(ie,{key:JSON.stringify(e)},["link"in e?(v(),M(gl,{key:0,item:e},null,8,["item"])):"component"in e?(v(),M(Te(e.component),Fe({key:1,ref_for:!0},e.props,{"screen-menu":""}),null,16)):(v(),M(Il,{key:2,text:e.text||"",items:e.items},null,8,["text","items"]))],64))),128))])):A("",!0)}}),Al=L({__name:"VPNavScreenSocialLinks",setup(o){const{theme:s}=j();return(n,t)=>m(s).socialLinks?(v(),M(Si,{key:0,class:"VPNavScreenSocialLinks",links:m(s).socialLinks},null,8,["links"])):A("",!0)}}),Dl={class:"list"},Ol=L({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:s,currentLang:n}=lt({correspondingLink:!0}),t=J(!1);function e(){t.value=!t.value}return(i,r)=>m(s).length&&m(n).label?(v(),T("div",{key:0,class:Q(["VPNavScreenTranslations",{open:t.value}])},[b("button",{class:"title",onClick:e},[r[0]||(r[0]=b("span",{class:"vpi-languages icon lang"},null,-1)),ye(" "+Y(m(n).label)+" ",1),r[1]||(r[1]=b("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),b("ul",Dl,[(v(!0),T(ie,null,ce(m(s),a=>
2(v(),T("li",{key:a.link,class:"item"},[R(Se,{class:"link",href:a.link},{default:E(()=>[ye(Y(a.text),1)]),_:2},1032,["href"])]))),128))])],2)):A("",!0)}}),Rl=N(Ol,[["__scopeId","data-v-858fe1a4"]]),Ml={class:"container"},Nl=L({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const s=J(null),n=yn(At?document.body:null);return(t,e)=>(v(),M(di,{name:"fade",onEnter:e[0]||(e[0]=i=>n.value=!0),onAfterLeave:e[1]||(e[1]=i=>n.value=!1)},{default:E(()=>[t.open?(v(),T("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:s,id:"VPNavScreen"},[b("div",Ml,[S(t.$slots,"nav-screen-content-before",{},void 0,!0),R(Ll,{class:"menu"}),R(Rl,{class:"translations"}),R(fl,{class:"appearance"}),R(Al,{class:"social-links"}),S(t.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):A("",!0)]),_:3}))}}),Fl=N(Nl,[["__scopeId","data-v-f2779853"]]),Hl={key:0,class:"VPNav"},Bl=L({__name:"VPNav",setup(o){const{isScreenOpen:s,closeScreen:n,toggleScreen:t}=Oa(),{frontmatter:e}=j(),i=F(()=>e.value.navbar!==!1);return yi("close-screen",n),Pt(()=>{At&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(r,a)=>i.value?(v(),T("header",Hl,[R(ol,{"is-screen-open":m(s),onToggleScreen:m(t)},{"nav-bar-title-before":E(()=>[S(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":E(()=>[S(r.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":E(()=>[S(r.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":E(()=>[S(r.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),R(Fl,{open:m(s)},{"nav-screen-content-before":E(()=>[S(r.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":E(()=>[S(r.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):A("",!0)}}),$l=N(Bl,[["__scopeId","data-v-ae24b3ad"]]),Vl=["role","tabindex"],Ul={key:1,class:"items"},jl=L({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const s=o,{collapsed:n,collapsible:t,isLink:e,isActiveLink:i,hasActiveLink:r,hasChildren:a,toggle:l}=Fr(F(()=>s.item)),u=F(()=>a.value?"section":"div"),c=F(()=>e.value?"a":"div"),f=F(()=>a.value?s.depth+2===7?"p":`h${s.depth+2}`:"p"),d=F(()=>e.value?void 0:"button"),g=F(()=>[[`level-${s.depth}`],{collapsible:t.value},{collapsed:n.value},{"is-link":e.value},{"is-active":i.value},{"has-active":r.value}]);function p(y){"key"in y&&y.key!=="Enter"||!s.item.link&&l()}function k(){s.item.link&&l()}return(y,I)=>{const x=ze("VPSidebarItem",!0);return v(),M(Te(u.value),{class:Q(["VPSidebarItem",g.value])},{default:E(()=>[y.item.text?(v(),T("div",Fe({key:0,class:"item",role:d.value},pr(y.item.items?{click:p,keydown:p}:{},!0),{tabindex:y.item.items&&0}),[I[1]||(I[1]=b("div",{class:"indicator"},null,-1)),y.item.link?(v(),M(Se,{key:0,tag:c.value,class:"link",href:y.item.link,rel:y.item.rel,target:y.item.target},{default:E(()=>[(v(),M(Te(f.value),{class:"text",innerHTML:y.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(v(),M(Te(f.value),{key:1,class:"text",innerHTML:y.item.text},null,8,["innerHTML"])),y.item.collapsed!=null&&y.item.items&&y.item.items.length?(v(),T("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:k,onKeydown:vr(k,["enter"]),tabindex:"0"},I[0]||(I[0]=[b("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):A("",!0)],16,Vl)):A("",!0),y.item.items&&y.item.items.length?(v(),T("div",Ul,[y.depth<5?(v(!0),T(ie,{key:0},ce(y.item.items,P=>(v(),M(x,{key:P.text,item:P,depth:y.depth+1},null,8,["item","depth"]))),128)):A("",!0)])):A("",!0)]),_:1},8,["class"])}}}),Gl=N(jl,[["__scopeId","data-v-b3fd67f8"]]),zl=L({__name:"VPSidebarGroup",props:{items:{}},setup(o){const s=J(!0);let n=null;return Ee(()=>{n=setTimeout(()=>{n=null,s.value=!1},300)}),mr(()=>{n!=null&&(clearTimeout(n),n=null)}),(t,e)=>(v(!0),T(ie,null,ce(t.items,i=>(v(),T("div",{key:i.text,class:Q(["group",{"no-transition":s.value}])},[R(Gl,{item:i,depth:0},null,8,["item"])],2))),128))}}),Wl=N(zl,[["__scopeId","data-v-c40bc020"]]),Kl={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Yl=L({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:s,hasSidebar:n}=Ae(),t=o,e=J(null),i=yn(At?document.body:null);xe([t,e],()=>{var a;t.open?(i.value=!0,(a=e.value)==null||a.focus()):i.value=!1},{immediate:!0,flush:"post"});const r=J(0);return xe(s,()=>{r.value+=1},{deep:!0}),(a,l)=>m(n)?(v(),T("aside",{key:0,class:Q(["VPSidebar",{open:a.open}]),ref_key:"navEl",ref:e,onClick:l[0]||(l[0]=yr(()=>{},["stop"]))},[l[2]||(l[2]=b("div",{class:"curtain"},null,-1)),b("nav",Kl,[l[1]||(l[1]=b("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),S(a.$slots,"sidebar-nav-before",{},void 0,!0),(v(),M(Wl,{items:m(s),key:r.value},null,8,["items"])),S(a.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):A("",!0)}}),Xl=N(Yl,[["__scopeId","data-v-319d5ca6"]]),ql=L({__name:"VPSkipLink",setup(o){const{theme:s}=j(),n=xt(),t=J();xe(()=>n.path,()=>t.value.focus());function e({target:i}){const r=document.getElementById(decodeURIComponent(i.hash).slice(1));if(r){const a=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",a)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",a),r.focus(),window.scrollTo(0,0)}}return(i,r)=>(v(),T(ie,null,[b("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),b("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:e},Y(m(s).skipToContentLabel||"Skip to content"),1)],64))}}),Jl=N(ql,[["__scopeId","data-v-0b0ada53"]]),Zl=L({__name:"Layout",setup(o){const{isOpen:s,open:n,close:t}=Ae(),e=xt();xe(()=>e.path,t),Nr(s,t);const{frontmatter:i}=j(),r=_r(),a=F(()=>!!r["home-hero-image"]);return yi("hero-image-slot-exists",a),(l,u)=>
2{const c=ze("Content");return m(i).layout!==!1?(v(),T("div",{key:0,class:Q(["Layout",m(i).pageClass])},[S(l.$slots,"layout-top",{},void 0,!0),R(Jl),R(Tr,{class:"backdrop",show:m(s),onClick:m(t)},null,8,["show","onClick"]),R($l,null,{"nav-bar-title-before":E(()=>[S(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":E(()=>[S(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":E(()=>[S(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":E(()=>[S(l.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":E(()=>[S(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":E(()=>[S(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),R(Da,{open:m(s),onOpenMenu:m(n)},null,8,["open","onOpenMenu"]),R(Xl,{open:m(s)},{"sidebar-nav-before":E(()=>[S(l.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":E(()=>[S(l.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),R(va,null,{"page-top":E(()=>[S(l.$slots,"page-top",{},void 0,!0)]),"page-bottom":E(()=>[S(l.$slots,"page-bottom",{},void 0,!0)]),"not-found":E(()=>[S(l.$slots,"not-found",{},void 0,!0)]),"home-hero-before":E(()=>[S(l.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":E(()=>[S(l.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":E(()=>[S(l.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":E(()=>[S(l.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":E(()=>[S(l.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":E(()=>[S(l.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":E(()=>[S(l.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":E(()=>[S(l.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":E(()=>[S(l.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":E(()=>[S(l.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":E(()=>[S(l.$slots,"doc-before",{},void 0,!0)]),"doc-after":E(()=>[S(l.$slots,"doc-after",{},void 0,!0)]),"doc-top":E(()=>[S(l.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":E(()=>[S(l.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":E(()=>[S(l.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":E(()=>[S(l.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":E(()=>[S(l.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":E(()=>[S(l.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":E(()=>[S(l.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":E(()=>[S(l.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),R(ba),S(l.$slots,"layout-bottom",{},void 0,!0)],2)):(v(),M(c,{key:1}))}}}),Ql=N(Zl,[["__scopeId","data-v-5d98c3a5"]]),si={Layout:Ql,enhanceApp:({app:o})=>{o.component("Badge",kr)}},eu={class:"linkcard"},tu=["href"],iu={class:"description"},nu={class:"logo"},ru=["src"],su=L({__name:"Linkcard",props:{url:{default:""},title:{default:""},description:{default:""},logo:{default:""}},setup(o){const s=o;return(n,t)=>(v(),T("div",eu,[b("a",{href:s.url,target:"_blank"},[b("p",iu,[ye(Y(s.title),1),t[0]||(t[0]=b("br",null,null,-1)),b("span",null,Y(s.description),1)]),b("div",nu,[b("img",{alt:"logo",width:"70px",height:"70px",src:s.logo},null,8,ru)])],8,tu)]))}});function Bi(o,s){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);s&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})),n.push.apply(n,t)}return n}function ne(o){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?Bi(Object(n),!0).forEach(function(t){C(o,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Bi(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})}return o}function ue(o){"@babel/helpers - typeof";return ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},ue(o)}function D(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")}function $i(o,s){for(var n=0;n<s.length;n++){var t=s[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,En(t.key),t)}}function O(o,s,n){return s&&$i(o.prototype,s),n&&$i(o,n),Object.defineProperty(o,"prototype",{writable:!1}),o}function C(o,s,n){return s=En(s),s in o?Object.defineProperty(o,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[s]=n,o}function H(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(s&&s.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),s&&ai(o,s)}function $(o){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$(o)}
2function ai(o,s){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ai(o,s)}function au(){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 _(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ei(o,s){if(s&&(typeof s=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(o)}function B(o){var s=au();return function(){var t=$(o),e;if(s){var i=$(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return Ei(this,e)}}function ou(o,s){for(;!Object.prototype.hasOwnProperty.call(o,s)&&(o=$(o),o!==null););return o}function U(){return typeof Reflect<"u"&&Reflect.get?U=Reflect.get.bind():U=function(s,n,t){var e=ou(s,n);if(e){var i=Object.getOwnPropertyDescriptor(e,n);return i.get?i.get.call(arguments.length<3?s:t):i.value}},U.apply(this,arguments)}function _e(o){return lu(o)||uu(o)||cu(o)||fu()}function lu(o){if(Array.isArray(o))return oi(o)}function uu(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function cu(o,s){if(o){if(typeof o=="string")return oi(o,s);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor&&(n=o.constructor.name),n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oi(o,s)}}function oi(o,s){(s==null||s>o.length)&&(s=o.length);for(var n=0,t=new Array(s);n<s;n++)t[n]=o[n];return t}function fu(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hu(o,s){if(typeof o!="object"||o===null)return o;var n=o[Symbol.toPrimitive];if(n!==void 0){var t=n.call(o,s);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)}function En(o){var s=hu(o,"string");return typeof s=="symbol"?s:String(s)}var du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wi(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var wn={exports:{}};(function(o){var s=Object.prototype.hasOwnProperty,n="~";function t(){}Object.create&&(t.prototype=Object.create(null),new t().__proto__||(n=!1));function e(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var g=new e(c,f||l,d),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],g]:l._events[p].push(g):(l._events[p]=g,l._eventsCount++),l}function r(l,u){--l._eventsCount===0?l._events=new t:delete l._events[u]}function a(){this._events=new t,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)s.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},a.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,g=f.length,p=new Array(g);d<g;d++)p[d]=f[d].fn;return p},a.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,c,f,d,g,p){var k=n?n+u:u;if(!this._events[k])return!1;var y=this._events[k],I=arguments.length,x,P;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),I){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,f),!0;case 4:return y.fn.call(y.context,c,f,d),!0;case 5:return y.fn.call(y.context,c,f,d,g),!0;case 6:return y.fn.call(y.context,c,f,d,g,p),!0}for(P=1,x=new Array(I-1);P<I;P++)x[P-1]=arguments[P];y.fn.apply(y.context,x)}else{var G=y.length,V;for(P=0;P<G;P++)switch(y[P].once&&this.removeListener(u,y[P].fn,void 0,!0),I){case 1:y[P].fn.call(y[P].context);break;case 2:y[P].fn.call(y[P].context,c);break;case 3:y[P].fn.call(y[P].context,c,f);break;case 4:y[P].fn.call(y[P].context,c,f,d);break;default:if(!x)for(V=1,x=new Array(I-1);V<I;V++)x[V-1]=arguments[V];y[P].fn.apply(y[P].context,x)}}return!0},a.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},a.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},a.prototype.removeListener=function(u,c,f,d){var g=n?n+u:u;if(!this._events[g])return this;if(!c)return r(this,g),this;var p=this._events[g];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&r(this,g);else{for(var k=0,y=[],I=p.length;k<I;k++)(p[k].fn!==c||d&&!p[k].once||f&&p[k].context!==f)&&y.push(p[k]);y.length?this._events[g]=y.length===1?y[0]:y:r(this,g)}return this},a.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&r(this,c)):(this._events=new t,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,o.exports=a})(wn);var Pn=wn.exports;const In=wi(Pn);var gu=typeof window<"u"&&window.location&&window.location.href.indexOf("xgplayerdebugger=1")>
3-1,$t={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},Vt="%c[xgplayer]",K={config:{debug:gu?3:0},logInfo:function(s){for(var n,t=arguments.length,e=new Array(t>1?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];this.config.debug>=3&&(n=console).log.apply(n,[Vt,$t.info,s].concat(e))},logWarn:function(s){for(var n,t=arguments.length,e=new Array(t>1?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];this.config.debug>=1&&(n=console).warn.apply(n,[Vt,$t.warn,s].concat(e))},logError:function(s){var n;if(!(this.config.debug<1)){for(var t=this.config.debug>=2?"trace":"error",e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];(n=console)[t].apply(n,[Vt,$t.error,s].concat(i))}}};function pu(o){o.logInfo=K.logInfo.bind(o),o.logWarn=K.logWarn.bind(o),o.logError=K.logError.bind(o)}var vu=function(){function o(s){D(this,o),this.bufferedList=s}return O(o,[{key:"start",value:function(n){return this.bufferedList[n].start}},{key:"end",value:function(n){return this.bufferedList[n].end}},{key:"length",get:function(){return this.bufferedList.length}}]),o}(),h={};h.createDom=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"div",s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",e=document.createElement(o);return e.className=t,e.innerHTML=s,Object.keys(n).forEach(function(i){var r=i,a=n[i];o==="video"||o==="audio"||o==="live-video"?a&&e.setAttribute(r,a):e.setAttribute(r,a)}),e};h.createDomFromHtml=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";try{var t=document.createElement("div");t.innerHTML=o;var e=t.children;return t=null,e.length>0?(e=e[0],n&&h.addClass(e,n),s&&Object.keys(s).forEach(function(i){e.setAttribute(i,s[i])}),e):null}catch(i){return K.logError("util.createDomFromHtml",i),null}};h.hasClass=function(o,s){if(!o||!s)return!1;try{return Array.prototype.some.call(o.classList,function(t){return t===s})}catch{var n=o.className&&ue(o.className)==="object"?o.getAttribute("class"):o.className;return n&&!!n.match(new RegExp("(\\s|^)"+s+"(\\s|$)"))}};h.addClass=function(o,s){if(!(!o||!s))try{s.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(n){n&&o.classList.add(n)})}catch{h.hasClass(o,s)||(o.className&&ue(o.className)==="object"?o.setAttribute("class",o.getAttribute("class")+" "+s):o.className+=" "+s)}};h.removeClass=function(o,s){if(!(!o||!s))try{s.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(n){n&&o.classList.remove(n)})}catch{h.hasClass(o,s)&&s.split(/\s+/g).forEach(function(t){var e=new RegExp("(\\s|^)"+t+"(\\s|$)");o.className&&ue(o.className)==="object"?o.setAttribute("class",o.getAttribute("class").replace(e," ")):o.className=o.className.replace(e," ")})}};h.toggleClass=function(o,s){o&&s.split(/\s+/g).forEach(function(n){h.hasClass(o,n)?h.removeClass(o,n):h.addClass(o,n)})};h.classNames=function(){for(var o=arguments,s=[],n=function(i){h.typeOf(o[i])==="String"?s.push(o[i]):h.typeOf(o[i])==="Object"&&Object.keys(o[i]).map(function(r){o[i][r]&&s.push(r)})},t=0;t<arguments.length;t++)n(t);return s.join(" ")};h.findDom=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,s=arguments.length>1?arguments[1]:void 0,n;try{n=o.querySelector(s)}catch(t){K.logError("util.findDom",t),s.indexOf("#")===0&&(n=o.getElementById(s.slice(1)))}return n};h.getCss=function(o,s){return o.currentStyle?o.currentStyle[s]:document.defaultView.getComputedStyle(o,!1)[s]};h.padStart=function(o,s,n){for(var t=String(n),e=s>>0,i=Math.ceil(e/t.length),r=[],a=String(o);i--;)r.push(t);return r.join("").substring(0,e-a.length)+a};h.format=function(o){if(window.isNaN(o))return"";o=Math.round(o);var s=h.padStart(Math.floor(o/3600),2,0),n=h.padStart(Math.floor((o-s*3600)/60),2,0),t=h.padStart(Math.floor(o-s*3600-n*60),2,0);return(s==="00"?[n,t]:[s,n,t]).join(":")};
3h.event=function(o){if(o.touches){var s=o.touches[0]||o.changedTouches[0];o.clientX=s.clientX||0,o.clientY=s.clientY||0,o.offsetX=s.pageX-s.target.offsetLeft,o.offsetY=s.pageY-s.target.offsetTop}o._target=o.target||o.srcElement};h.typeOf=function(o){return Object.prototype.toString.call(o).match(/([^\s.*]+)(?=]$)/g)[0]};h.deepCopy=function(o,s){if(h.typeOf(s)==="Object"&&h.typeOf(o)==="Object")return Object.keys(s).forEach(function(n){h.typeOf(s[n])==="Object"&&!(s[n]instanceof Node)?o[n]===void 0||o[n]===void 0?o[n]=s[n]:h.deepCopy(o[n],s[n]):h.typeOf(s[n])==="Array"?o[n]=h.typeOf(o[n])==="Array"?o[n].concat(s[n]):s[n]:o[n]=s[n]}),o};h.deepMerge=function(o,s){return Object.keys(s).map(function(n){if(h.typeOf(s[n])==="Array"&&h.typeOf(o[n])==="Array"){if(h.typeOf(o[n])==="Array"){var t;(t=o[n]).push.apply(t,_e(s[n]))}}else h.typeOf(o[n])===h.typeOf(s[n])&&o[n]!==null&&h.typeOf(o[n])==="Object"&&!(s[n]instanceof window.Node)?h.deepMerge(o[n],s[n]):s[n]!==null&&(o[n]=s[n])}),o};h.getBgImage=function(o){var s=(o.currentStyle||window.getComputedStyle(o,null)).backgroundImage;if(!s||s==="none")return"";var n=document.createElement("a");return n.href=s.replace(/url\("|"\)/g,""),n.href};h.copyDom=function(o){if(o&&o.nodeType===1){var s=document.createElement(o.tagName);return Array.prototype.forEach.call(o.attributes,function(n){s.setAttribute(n.name,n.value)}),o.innerHTML&&(s.innerHTML=o.innerHTML),s}else return""};h.setInterval=function(o,s,n,t){o._interval[s]||(o._interval[s]=window.setInterval(n.bind(o),t))};h.clearInterval=function(o,s){clearInterval(o._interval[s]),o._interval[s]=null};h.setTimeout=function(o,s,n){o._timers||(o._timers=[]);var t=setTimeout(function(){s(),h.clearTimeout(o,t)},n);return o._timers.push(t),t};h.clearTimeout=function(o,s){var n=o._timers;if(h.typeOf(n)==="Array"){for(var t=0;t<n.length;t++)if(n[t]===s){n.splice(t,1),clearTimeout(s);break}}else clearTimeout(s)};h.clearAllTimers=function(o){var s=o._timers;h.typeOf(s)==="Array"&&(s.map(function(n){clearTimeout(n)}),o._timerIds=[])};h.createImgBtn=function(o,s,n,t){var e=h.createDom("xg-".concat(o),"",{},"xgplayer-".concat(o,"-img"));if(e.style.backgroundImage='url("'.concat(s,'")'),n&&t){var i,r,a;["px","rem","em","pt","dp","vw","vh","vm","%"].every(function(l){return n.indexOf(l)>-1&&t.indexOf(l)>-1?(i=parseFloat(n.slice(0,n.indexOf(l)).trim()),r=parseFloat(t.slice(0,t.indexOf(l)).trim()),a=l,!1):!0}),e.style.width="".concat(i).concat(a),e.style.height="".concat(r).concat(a),e.style.backgroundSize="".concat(i).concat(a," ").concat(r).concat(a),o==="start"?e.style.margin="-".concat(r/2).concat(a," auto auto -").concat(i/2).concat(a):e.style.margin="auto 5px auto 5px"}return e};h.Hex2RGBA=function(o,s){var n=[];if(/^\#[0-9A-F]{3}$/i.test(o)){var t="#";o.replace(/[0-9A-F]/ig,function(e){t+=e+e}),o=t}return/^#[0-9A-F]{6}$/i.test(o)?(o.replace(/[0-9A-F]{2}/ig,function(e){n.push(parseInt(e,16))}),"rgba(".concat(n.join(","),", ").concat(s,")")):"rgba(255, 255, 255, 0.1)"};h.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement};h.checkIsFunction=function(o){return o&&typeof o=="function"};h.checkIsObject=function(o){return o!==null&&ue(o)==="object"};h.hide=function(o){o.style.display="none"};h.show=function(o,s){o.style.display=s||"block"};h.isUndefined=function(o){if(typeof o>"u"||o===null)return!0};h.isNotNull=function(o){return o!=null};h.setStyleFromCsstext=function(o,s){if(s)if(h.typeOf(s)==="String"){var n=s.replace(/\s+/g,"").split(";");n.map(function(t){if(t){var e=t.split(":");e.length>1&&(o.style[e[0]]=e[1])}})}else Object.keys(s).map(function(t){o.style[t]=s[t]})};function mu(o,s){for(var n=0,t=s.length;n<t;n++)if(o.indexOf(s[n])>-1)return!0;return!1}h.filterStyleFromText=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=o.style.cssText;if(!n)return{};var t=n.replace(/\s+/g,"").split(";"),e={},i={};return t.map(function(r){if(r){var a=r.split(":");a.length>1&&(mu(a[0],s)?e[a[0]]=a[1]:i[a[0]]=a[1])}}),o.setAttribute("style",""),Object.keys(i).map(function(r){o.style[r]=i[r]}),e};h.getStyleFromCsstext=function(o){var s=o.style.cssText;if(!s)return{};var n=s.replace(/\s+/g,"").split(";"),t={};return n.map(function(e){if(e){var i=e.split(":");i.length>1&&(t[i[0]]=i[1])}}),t};h.preloadImg=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};if(o){var t=new window.Image;t.onload=function(e){t=null,s&&s(e)},t.onerror=function(e){t=null,n&&n(e)},t.src=o}};h.stopPropagation=function(o){o&&o.stopPropagation()};h.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0};h.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};h.checkTouchSupport=function(){return"ontouchstart"in window};h.getBuffered2=function(o){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5,n=[],t=0;t<o.length;t++)n.push({start:o.start(t)<.5?0:o.start(t),end:o.end(t)});n.sort(function(l,u){var c=l.start-u.start;return c||u.end-l.end});var e=[];
3if(s)for(var i=0;i<n.length;i++){var r=e.length;if(r){var a=e[r-1].end;n[i].start-a<s?n[i].end>a&&(e[r-1].end=n[i].end):e.push(n[i])}else e.push(n[i])}else e=n;return new vu(e)};h.getEventPos=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return o.touches&&o.touches.length>0&&(o=o.touches[0]),{x:o.x/s,y:o.y/s,clientX:o.clientX/s,clientY:o.clientY/s,offsetX:o.offsetX/s,offsetY:o.offsetY/s,pageX:o.pageX/s,pageY:o.pageY/s}};h.requestAnimationFrame=function(o){var s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(s)return s(o)};h.getHostFromUrl=function(o){if(h.typeOf(o)!=="String")return"";var s=o.split("/"),n="";return s.length>3&&s[2]&&(n=s[2]),n};h.cancelAnimationFrame=function(o){var s=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;s&&s(o)};h.isMSE=function(o){return o.media&&(o=o.media),!o||!(o instanceof HTMLMediaElement)?!1:/^blob/.test(o.currentSrc)||/^blob/.test(o.src)};h.isBlob=function(o){return typeof o=="string"&&/^blob/.test(o)};h.generateSessionId=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=new Date().getTime();try{o=parseInt(o)}catch{o=0}s+=o,window.performance&&typeof window.performance.now=="function"&&(s+=parseInt(window.performance.now()));var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(s+Math.random()*16)%16|0;return s=Math.floor(s/16),(t==="x"?e:e&3|8).toString(16)});return n};h.createEvent=function(o){var s;return typeof window.Event=="function"?s=new Event(o):(s=document.createEvent("Event"),s.initEvent(o,!0,!0)),s};h.adjustTimeByDuration=function(o,s,n){return!s||!o?o:o>s||n&&o<s?s:o};h.createPositionBar=function(o,s){var n=h.createDom("xg-bar","",{"data-index":-1},o);return s.appendChild(n),n};h.getTransformStyle=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{x:0,y:0,scale:1,rotate:0},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n={scale:"".concat(o.scale||1),translate:"".concat(o.x||0,"%, ").concat(o.y||0,"%"),rotate:"".concat(o.rotate||0,"deg")},t=Object.keys(n);return t.forEach(function(e){var i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),r="".concat(e,"(").concat(n[e],")");i.test(s)?(i.lastIndex=-1,s=s.replace(i,r)):s+="".concat(r," ")}),s};h.convertDeg=function(o){return Math.abs(o)<=1?o*360:o%360};h.getIndexByTime=function(o,s){var n=s.length,t=-1;if(n<1)return t;if(o<=s[0].end||n<2)t=0;else if(o>s[n-1].end)t=n-1;else for(var e=1;e<n;e++)if(o>s[e-1].end&&o<=s[e].end){t=e;break}return t};h.getOffsetCurrentTime=function(o,s){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,t=-1;if(n>=0&&n<s.length?t=n:t=h.getIndexByTime(o,s),t<0)return-1;var e=s.length,i=s[t],r=i.start,a=i.end,l=i.cTime,u=i.offset;return o<r?l:o>=r&&o<=a?o-u:o>a&&t>=e-1?a:-1};h.getCurrentTimeByOffset=function(o,s){var n=-1;if(!s||s.length<0)return o;for(var t=0;t<s.length;t++)if(o<=s[t].duration){n=t;break}if(n!==-1){var e=s[n].start;return n-1<0?e+o:e+(o-s[n-1].duration)}return o};function xn(o){var s=ue(o);return o!==null&&(s==="object"||s==="function")}function yu(o,s,n){var t,e,i,r,a,l,u=0,c=!1,f=!1,d=!0,g=!s&&s!==0&&typeof window.requestAnimationFrame=="function";if(typeof o!="function")throw new TypeError("Expected a function");s=+s||0,xn(n)&&(c=!!n.leading,f="maxWait"in n,i=f?Math.max(+n.maxWait||0,s):i,d="trailing"in n?!!n.trailing:d);function p(W){var he=t,ve=e;return t=e=void 0,u=W,r=o.apply(ve,he),r}function k(W,he){return g?(window.cancelAnimationFrame(a),window.requestAnimationFrame(W)):setTimeout(W,he)}function y(W){if(g)return window.cancelAnimationFrame(W);clearTimeout(W)}
3function I(W){return u=W,a=k(G,s),c?p(W):r}function x(W){var he=W-l,ve=W-u,me=s-he;return f?Math.min(me,i-ve):me}function P(W){var he=W-l,ve=W-u;return l===void 0||he>=s||he<0||f&&ve>=i}function G(){var W=Date.now();if(P(W))return V(W);a=k(G,x(W))}function V(W){return a=void 0,d&&t?p(W):(t=e=void 0,r)}function ee(){a!==void 0&&y(a),u=0,t=l=e=a=void 0}function X(){return a===void 0?r:V(Date.now())}function se(){return a!==void 0}function re(){for(var W=Date.now(),he=P(W),ve=arguments.length,me=new Array(ve),Ve=0;Ve<ve;Ve++)me[Ve]=arguments[Ve];if(t=me,e=this,l=W,he){if(a===void 0)return I(l);if(f)return a=k(G,s),p(l)}return a===void 0&&(a=k(G,s)),r}return re.cancel=ee,re.flush=X,re.pending=se,re}function _u(o,s,n){var t=!0,e=!0;if(typeof o!="function")throw new TypeError("Expected a function");return xn(n)&&(t="leading"in n?!!n.leading:t,e="trailing"in n?!!n.trailing:e),yu(o,s,{leading:t,trailing:e,maxWait:s})}function ku(){var o=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return o==="zh-cn"&&(o="zh"),o}function bu(o,s,n){if(o){var t=o.getAttribute(n);return!!(t&&t===s&&(o.tagName==="VIDEO"||o.tagName==="AUDIO"))}}var Vi={android:/(Android)\s([\d.]+)/,ios:/(Version)\/([\d.]+)/},Cu=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],z={get device(){var o=z.os;return o.isPc?"pc":"mobile"},get browser(){if(typeof navigator>"u")return"";var o=navigator.userAgent.toLowerCase(),s={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(s).filter(function(n){return s[n].test(o)}))[0]},get os(){if(typeof navigator>"u")return{};var o=navigator.userAgent,s=/(?:Windows Phone)/.test(o),n=/(?:SymbianOS)/.test(o)||s,t=/(?:Tizen)/ig.test(o),e=/(?:Web0S)/ig.test(o),i=/(?:Android)/.test(o),r=/(?:Firefox)/.test(o),a=/(?:iPad|PlayBook)/.test(o)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,l=a||i&&!/(?:Mobile)/.test(o)||r&&/(?:Tablet)/.test(o),u=/(?:iPhone)/.test(o)&&!l,c=!u&&!i&&!n&&!l;return{isTablet:l,isPhone:u,isIpad:a,isIos:u||a,isAndroid:i,isPc:c,isSymbian:n,isWindowsPhone:s,isFireFox:r,isTizen:t,isWebOS:e}},get osVersion(){if(typeof navigator>"u")return 0;var o=navigator.userAgent,s="";/(?:iPhone)|(?:iPad|PlayBook)/.test(o)?s=Vi.ios:s=Vi.android;var n=s?s.exec(o):[];if(n&&n.length>=3){var t=n[2].split(".");return t.length>0?parseInt(t[0]):0}return 0},get isWeixin(){if(typeof navigator>"u")return!1;var o=/(micromessenger)\/([\d.]+)/,s=o.exec(navigator.userAgent.toLocaleLowerCase());return!!s},isSupportMP4:function(){var s={isSupport:!1,mime:""};if(typeof document>"u")return s;if(this.supportResult)return this.supportResult;var n=document.createElement("video");return typeof n.canPlayType=="function"&&Cu.map(function(t){n.canPlayType('video/mp4; codecs="'.concat(t,'"'))==="probably"&&(s.isSupport=!0,s.mime+="||".concat(t))}),this.supportResult=s,n=null,s},isMSESupport:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(typeof MediaSource>"u"||!MediaSource)return!1;try{return MediaSource.isTypeSupported(s)}catch(n){return this._logger.error(s,n),!1}},isHevcSupported:function(){return typeof MediaSource>"u"||!MediaSource.isTypeSupported?!1:MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"')},probeConfigSupported:function(s){var n={supported:!1,smooth:!1,powerEfficient:!1};if(!s||typeof navigator>"u")return Promise.resolve(n);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(s);var t=s.video||{},e=s.audio||{};try{var i=MediaSource.isTypeSupported(t.contentType),r=MediaSource.isTypeSupported(e.contentType);
3return Promise.resolve({supported:i&&r,smooth:!1,powerEfficient:!1})}catch{return Promise.resolve(n)}}},li="3.0.22",Ui={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},ji={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},mt=O(function o(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};D(this,o);var t=s&&s.i18n?s.i18n.ERROR_TYPES:null;if(s.media){var e=n.mediaError?n.mediaError:s.media.error||{},i=s.duration,r=s.currentTime,a=s.ended,l=s.src,u=s.currentSrc,c=s.media,f=c.readyState,d=c.networkState,g=n.errorCode||e.code;ji[g]&&(g=ji[g]);var p={playerVersion:li,currentTime:r,duration:i,ended:a,readyState:f,networkState:d,src:l||u,errorType:n.errorType,errorCode:g,message:n.errorMessage||e.message,mediaError:e,originError:n.originError?n.originError.stack:"",host:h.getHostFromUrl(l||u)};return n.ext&&Object.keys(n.ext).map(function(x){p[x]=n.ext[x]}),p}else if(arguments.length>1){for(var k={playerVersion:li,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],I=0;I<arguments.length;I++)k[y[I]]=arguments[I];return k.ex=t?(t[arguments[0]]||{}).msg:"",k}}),pe="play",Pi="playing",We="ended",nt="pause",ut="error",Ot="seeking",Ie="seeked",ge="timeupdate",ct="waiting",Pe="canplay",Tu="canplaythrough",De="durationchange",Ln="volumechange",Le="loadeddata",Su="loadedmetadata",An="ratechange",Dn="progress",Ii="loadstart",Ke="emptied",Eu="stalled",wu="suspend",Pu="abort",Iu="bufferedChange",xi="focus",On="blur",Li="ready",Rn="urlNull",je="autoplay_started",Ai="autoplay_was_prevented",Rt="complete",yt="replay",Di="destroy",Mt="urlchange",ui="download_speed_change",Mn="leaveplayer",Nn="enterplayer",Fn="loading",we="fullscreen_change",_t="cssFullscreen_change",kt="mini_state_change",Oi="definition_change",xu="before_definition_change",ci="after_definition_change",Lu="SEI_PARSED",Au="retry",He="video_resize",fi="pip_change",Hn="rotate",Bn="screenShot",bt="playnext",$n="shortcut",Vn="xglog",Ct="user_action",Nt="reset",Un="source_error",jn="source_success",Du="switch_subtitle",Gn=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],zn={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},Wn="fps_stuck";const Ou=Object.freeze(Object.defineProperty({__proto__:null,ABORT:Pu,AFTER_DEFINITION_CHANGE:ci,AUTOPLAY_PREVENTED:Ai,AUTOPLAY_STARTED:je,BEFORE_DEFINITION_CHANGE:xu,BUFFER_CHANGE:Iu,CANPLAY:Pe,CANPLAY_THROUGH:Tu,COMPLETE:Rt,CSS_FULLSCREEN_CHANGE:_t,DEFINITION_CHANGE:Oi,DESTROY:Di,DOWNLOAD_SPEED_CHANGE:ui,DURATION_CHANGE:De,EMPTIED:Ke,ENDED:We,ENTER_PLAYER:Nn,ERROR:ut,FPS_STUCK:Wn,FULLSCREEN_CHANGE:we,LEAVE_PLAYER:Mn,LOADED_DATA:Le,LOADED_METADATA:Su,LOADING:Fn,LOAD_START:Ii,MINI_STATE_CHANGE:kt,PAUSE:nt,PIP_CHANGE:fi,PLAY:pe,PLAYER_BLUR:On,PLAYER_FOCUS:xi,PLAYING:Pi,PLAYNEXT:bt,PROGRESS:Dn,RATE_CHANGE:An,READY:Li,REPLAY:yt,RESET:Nt,RETRY:Au,ROTATE:Hn,SCREEN_SHOT:Bn,SEEKED:Ie,SEEKING:Ot,SEI_PARSED:Lu,SHORTCUT:$n,SOURCE_ERROR:Un,SOURCE_SUCCESS:jn,STALLED:Eu,STATS_EVENTS:zn,SUSPEND:wu,SWITCH_SUBTITLE:Du,TIME_UPDATE:ge,URL_CHANGE:Mt,URL_NULL:Rn,USER_ACTION:Ct,VIDEO_EVENTS:Gn,VIDEO_RESIZE:He,VOLUME_CHANGE:Ln,WAITING:ct,XGLOG:Vn},Symbol.toStringTag,{value:"Module"}));function Ut(o,s){!this||!this.emit||(o==="error"?this.errorHandler(o,s.error):this.emit(o,s))}function Ru(o,s){return function(n,t){var e={player:s,eventName:o,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:s.currentTime,duration:s.duration,paused:s.paused,ended:s.ended,isInternalOp:!!s._internalOp[n.type],muted:s.muted,volume:s.volume,host:h.getHostFromUrl(s.currentSrc),vtype:s.vtype};if(s.removeInnerOP(n.type),o==="timeupdate"&&(s._currentTime=s.media&&s.media.currentTime),o==="ratechange"){var i=s.media?s.media.playbackRate:0;if(i&&s._rate===i)return;s._rate=s.media&&s.media.playbackRate}if(o==="durationchange"&&(s._duration=s.media.duration),o==="volumechange"&&(e.isMutedChange=s._lastMuted!==s.muted,s._lastMuted=s.muted),o==="error"&&(e.error=t||s.video.error),s.mediaEventMiddleware[o]){var r=Ut.bind(s,o,e);try{s.mediaEventMiddleware[o].call(s,e,r)}catch(a){throw Ut.call(s,o,e),a}}else Ut.call(s,o,e)}}var Mu=function(o){H(n,o);var s=B(n);function n(t){var e;D(this,n),e=s.call(this,t),e._hasStart=!1,e._currentTime=0,e._duration=0,e._internalOp={},e._lastMuted=!1,e.vtype="MP4",e._rate=-1,e.mediaConfig=Object.assign({},{controls:!1,autoplay:t.autoplay,playsinline:t.playsinline,"x5-playsinline":t.playsinline,"webkit-playsinline":t.playsinline,"x5-video-player-fullscreen":t["x5-video-player-fullscreen"]||t.x5VideoPlayerFullscreen,"x5-video-orientation":t["x5-video-orientation"]||t.x5VideoOrientation,airplay:t.airplay,"webkit-airplay":t.airplay,tabindex:t.tabindex|0,mediaType:t.mediaType||"video","data-index":-1},t.videoConfig,t.videoAttributes);var i=t["x5-video-player-type"]||t.x5VideoPlayerType;return z.isWeixin&&z.os.isAndroid&&i&&(e.mediaConfig["x5-video-player-type"]=i,delete e.mediaConfig.playsinline,delete e.mediaConfig["webkit-playsinline"],delete e.mediaConfig["x5-playsinline"]),t.loop&&(e.mediaConfig.loop="loop"),t.autoplayMuted&&!Object.prototype.hasOwnProperty.call(e.mediaConfig,"muted")&&(e.mediaConfig.muted=!0),e.media=t.mediaEl instanceof HTMLMediaElement?t.mediaEl:typeof t.mediaEl=="function"?t.mediaEl(e.mediaConfig):h.createDom(e.mediaConfig.mediaType,"",e.mediaConfig,""),t.defaultPlaybackRate&&(e.media.defaultPlaybackRate=e.media.playbackRate=t.defaultPlaybackRate),h.typeOf(t.volume)==="Number"&&(e.volume=t.volume),t.autoplayMuted&&(e.media.muted=!0,e._lastMuted=!0),t.autoplay&&(e.media.autoplay=!0),t.playsinline&&(e.media.playsinline=!0),e._interval={},e.mediaEventMiddleware={},e.attachVideoEvents(),e}return O(n,[{key:"setEventsMiddleware",value:function(e){var i=this;Object.keys(e).map(function(r){i.mediaEventMiddleware[r]=e[r]})}},{key:"removeEventsMiddleware",value:function(e){var i=this;Object.keys(e).map(function(r){delete i.mediaEventMiddleware[r]})}},{key:"attachVideoEvents",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.media;this._evHandlers||(this._evHandlers=Gn.map(function(r){var a="on".concat(r.charAt(0).toUpperCase()).concat(r.slice(1));return typeof e[a]=="function"&&e.on(r,e[a]),C({},r,Ru(r,e))}
3)),this._evHandlers.forEach(function(r){var a=Object.keys(r)[0];i.addEventListener(a,r[a],!1)})}},{key:"detachVideoEvents",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.media;this._evHandlers.forEach(function(r){var a=Object.keys(r)[0];i.removeEventListener(a,r[a],!1)}),this._evHandlers.forEach(function(r){var a=Object.keys(r)[0],l="on".concat(a.charAt(0).toUpperCase()).concat(a.slice(1));typeof e[l]=="function"&&e.off(a,e[l])}),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,i){var r=this;e.removeAttribute("src"),e.load(),i.forEach(function(f,d){r.media.appendChild(h.createDom("source","",{src:"".concat(f.src),type:"".concat(f.type||""),"data-index":d+1}))});var a=e.children;if(a){this._videoSourceCount=a.length,this._videoSourceIndex=a.length,this._vLoadeddata=function(f){r.emit(jn,{src:f.target.currentSrc,host:h.getHostFromUrl(f.target.currentSrc)})};for(var l=null,u=0;u<this._evHandlers.length;u++)if(Object.keys(this._evHandlers[u])[0]==="error"){l=this._evHandlers[u];break}!this._sourceError&&(this._sourceError=function(f){var d=parseInt(f.target.getAttribute("data-index"),10);if(r._videoSourceIndex--,r._videoSourceIndex===0||d>=r._videoSourceCount){var g={code:4,message:"sources_load_error"};l?l.error(f,g):r.errorHandler("error",g)}var p=Ui[4];r.emit(Un,new mt(r,{errorType:p,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:f.target.src}))});for(var c=0;c<a.length;c++)a[c].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var i=e.children;if(!(!i||i.length===0||!this._sourceError)){for(var r=0;r<i.length;r++)i[r].removeEventListener("error",this._sourceError);for(;i.length>0;)e.removeChild(i[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.media&&(this.media.error||i)){var r=this.media.error||i,a=r.code?Ui[r.code]:"other",l=r.message;this.media.currentSrc||this.media.srcObject||(l="empty_src",r={code:6,message:l}),this.emit(e,new mt(this,{errorType:a,errorCode:r.code,errorMessage:r.message||"",mediaError:r}))}}},{key:"destroy",value:function(){this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null;for(var e in this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){var e=this.media?this.media.play():null;return e}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return this.media?this.media.canPlayType(e):!1}},{key:"getBufferedRange",value:function(e){var i=[0,0];if(!this.media)return i;e||(e=this.media.buffered);var r=this.media.currentTime;if(e)for(var a=0,l=e.length;a<l&&(i[0]=e.start(a),i[1]=e.end(a),!(i[0]<=r&&r<=i[1]));a++);return i[0]-r<=0&&r-i[1]<=0?i:[0,0]}},{key:"autoplay",get:function(){return this.media?this.media.autoplay:!1},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?h.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var i=this.media.buffered;if(!i||i.length===0)return e;for(var r=0;r<i.length;r++)if((i.start(r)<=this.currentTime||i.start(r)<.1)&&i.end(r)>=this.currentTime)return{start:i.start(r),end:i.end(r)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?this.media.currentTime!==void 0?this.media.currentTime:this._currentTime:0}
3,set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return this.media?this.media.defaultMuted:!1},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return this.media?this.media.ended:!1}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){var e=this.media.error;if(!e)return"";var i=["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"];return i[this.media.error.code-1]}},{key:"loop",get:function(){return this.media?this.media.loop:!1},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return this.media?this.media.muted:!1},set:function(e){!this.media||this.media.muted===e||(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return this.media?this.media.paused:!0}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){!this.media||e===1/0||(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return this.media?this.media.preload:!1},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return this.media?this.media.seekable:!1}},{key:"seeking",get:function(){return this.media?this.media.seeking:!1}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){if(this.media){if(this.emit(Mt,e),this.emit(ct),this._currentTime=0,this._duration=0,h.isMSE(this.media)){this.onWaiting();return}this._detachSourceEvents(this.media),h.typeOf(e)==="Array"?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()}}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e===1/0||!this.media||(this.media.volume=e)}},{key:"aspectRatio",get:function(){return this.media?this.media.videoWidth/this.media.videoHeight:0}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,i){for(var r,a=arguments.length,l=new Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];(r=U($(n.prototype),"emit",this)).call.apply(r,[this,e,i].concat(l))}},{key:"on",value:function(e,i){for(var r,a=arguments.length,l=new Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];(r=U($(n.prototype),"on",this)).call.apply(r,[this,e,i].concat(l))}},{key:"once",value:function(e,i){for(var r,a=arguments.length,l=new Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];(r=U($(n.prototype),"once",this)).call.apply(r,[this,e,i].concat(l))}},{key:"off",value:function(e,i){for(var r,a=arguments.length,l=new Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];(r=U($(n.prototype),"off",this)).call.apply(r,[this,e,i].concat(l))}},{key:"offAll",value:function(){U($(n.prototype),"removeAllListeners",this).call(this)}}]),n}(In),Nu=function(){function o(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};D(this,o),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=s}return O(o,[{key:"openDB",value:function(n){var t=this,e=this,i=this.myDB.version||1,r=e.indexedDB.open(e.myDB.name,i);r.onerror=function(a){},r.onsuccess=function(a){t.myDB.db=a.target.result,n.call(e)},r.onupgradeneeded=function(a){var l=a.target.result;a.target.transaction,l.objectStoreNames.contains(e.myDB.ojstore.name)||l.createObjectStore(e.myDB.ojstore.name,{keyPath:e.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){var n=this;n.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(n,t){for(var e=this.myDB.db.transaction(n,"readwrite").objectStore(n),i,r=0;r<t.length;r++)i=e.add(t[r]),i.onerror=function(){},i.onsuccess=function(){}}},{key:"putData",value:function(n,t){for(var e=this.myDB.db.transaction(n,"readwrite").objectStore(n),i,r=0;r<t.length;r++)i=e.put(t[r]),i.onerror=function(){},i.onsuccess=function(){}}},{key:"getDataByKey",value:function(n,t,e){var i=this,r=this.myDB.db.transaction(n,"readwrite").objectStore(n),a=r.get(t);a.onerror=function(){e.call(i,null)},a.onsuccess=function(l){var u=l.target.result;e.call(i,u)}}},{key:"deleteData",value:function(n,t){var e=this.myDB.db.transaction(n,"readwrite").objectStore(n);e.delete(t)}},{key:"clearData",value:function(n){var t=this.myDB.db.transaction(n,"readwrite").objectStore(n);t.clear()}}]),o}(),Gi=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],zi=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],Wi=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],Ne="data-xgplayerid";function ft(o,s,n){for(var t=arguments.length,e=new Array(t>3?t-3:0),i=3;i<t;i++)e[i-3]=arguments[i];var r=s.call.apply(s,[o].concat(e));!n||typeof n!="function"||(r&&r.then?r.then(function(){for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];n.call.apply(n,[o].concat(l))}):n.call.apply(n,[o].concat(e)))}function Tt(o,s){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[o]&&(this.__hooks[o]=null),(function(){var t=arguments,e=this;if(n.pre)try{var i;(i=n.pre).call.apply(i,[this].concat(Array.prototype.slice.call(arguments)))}catch(a){throw a.message="[pluginName: ".concat(this.pluginName,":").concat(o,":pre error] >> ").concat(a.message),a}if(this.__hooks&&this.__hooks[o])try{var r=Ce(this,o,s);r?r.then?r.then(function(a){a!==!1&&ft.apply(void 0,[e,s,n.next].concat(_e(t)))}).catch(function(a){throw a}):ft.apply(void 0,[this,s,n.next].concat(Array.prototype.slice.call(arguments))):r===void 0&&ft.apply(void 0,[this,s,n.next].concat(Array.prototype.slice.call(arguments)))}catch(a){throw a.message="[pluginName: ".concat(this.pluginName,":").concat(o,"] >> ").concat(a.message),a}else ft.apply(void 0,[this,s,n.next].concat(Array.prototype.slice.call(arguments)))}).bind(this)}function Kn(o,s){var n=this.__hooks;if(!n||!Array.isArray(n[o]))return-1;for(var t=n[o],e=0;e<t.length;e++)if(t[e]===s)return e;return-1}function St(o,s){var n=this.__hooks;if(n)return n.hasOwnProperty(o)?(Array.isArray(n[o])||(n[o]=[]),Kn.call(this,o,s)===-1&&n[o].push(s),!0):(console.warn("has no supported hook which name [".concat(o,"]")),!1)}function Et(o,s){var n=this.__hooks;if(n)if(Array.isArray(n[o])){var t=n[o],e=Kn.call(this,o,s);e!==-1&&t.splice(e,1)}else n[o]&&(n[o]=null)}
3function Ki(o){if(!(!this.plugins||!this.plugins[o.toLowerCase()])){for(var s=this.plugins[o.toLowerCase()],n=arguments.length,t=new Array(n>1?n-1:0),e=1;e<n;e++)t[e-1]=arguments[e];return s.useHooks&&s.useHooks.apply(s,t)}}function Yi(o){if(!(!this.plugins||!this.plugins[o.toLowerCase()])){var s=this.plugins[o.toLowerCase()];if(s){for(var n=arguments.length,t=new Array(n>1?n-1:0),e=1;e<n;e++)t[e-1]=arguments[e];return s.removeHooks&&s.removeHooks.apply(s,t)}}}function Yn(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];o.__hooks={},s&&s.map(function(n){o.__hooks[n]=null}),Object.defineProperty(o,"hooks",{get:function(){return o.__hooks&&Object.keys(o.__hooks).map(function(t){if(o.__hooks[t])return t})}})}function Xn(o){o.__hooks=null}function Ce(o,s,n){for(var t=arguments.length,e=new Array(t>3?t-3:0),i=3;i<t;i++)e[i-3]=arguments[i];if(o.__hooks&&Array.isArray(o.__hooks[s])){var r=o.__hooks[s],a=-1,l=function u(c,f,d){for(var g=arguments.length,p=new Array(g>3?g-3:0),k=3;k<g;k++)p[k-3]=arguments[k];if(a++,r.length===0||a===r.length)return d.call.apply(d,[c,c].concat(p));var y=r[a],I=y.call.apply(y,[c,c].concat(p));if(I&&I.then)return I.then(function(x){return x===!1?null:u.apply(void 0,[c,f,d].concat(p))}).catch(function(x){console.warn("[runHooks]".concat(f," reject"),x.message)});if(I!==!1)return u.apply(void 0,[c,f,d].concat(p))};return l.apply(void 0,[o,s,n].concat(e))}else return n.call.apply(n,[o,o].concat(e))}function jt(o,s){K.logError("[".concat(o,"] event or callback cant be undefined or null when call ").concat(s))}var Be=function(){function o(s){D(this,o),h.checkIsFunction(this.beforeCreate)&&this.beforeCreate(s),Yn(this),this.__args=s,this.__events={},this.__onceEvents={},this.config=s.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(s)}return O(o,[{key:"beforeCreate",value:function(n){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(n){this.player=n.player,this.playerConfig=n.player&&n.player.config,this.pluginName=n.pluginName?n.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=n.player&&n.player.logger}},{key:"updateLang",value:function(n){n||(n=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var n=h.checkTouchSupport()?"touch":"mouse";return this.playerConfig&&(this.playerConfig.domEventType==="touch"||this.playerConfig.domEventType==="mouse")&&(n=this.playerConfig.domEventType),n}},{key:"on",value:function(n,t){var e=this;if(!n||!t||!this.player){jt(this.pluginName,"plugin.on(event, callback)");return}typeof n=="string"?(this.__events[n]=t,this.player.on(n,t)):Array.isArray(n)&&n.forEach(function(i){e.__events[i]=t,e.player.on(i,t)})}},{key:"once",value:function(n,t){var e=this;if(!n||!t||!this.player){jt(this.pluginName,"plugin.once(event, callback)");return}typeof n=="string"?(this.__onceEvents[n]=t,this.player.once(n,t)):Array.isArray(n)&&n.forEach(function(i){e.__onceEvents[i]=t,e.player.once(n,t)})}},{key:"off",value:function(n,t){var e=this;if(!n||!t||!this.player){jt(this.pluginName,"plugin.off(event, callback)");return}typeof n=="string"?(delete this.__events[n],this.player.off(n,t)):Array.isArray(n)&&n.forEach(function(i){delete e.__events[n],e.player.off(i,t)})}},{key:"offAll",value:function(){var n=this;["__events","__onceEvents"].forEach(function(t){Object.keys(n[t]).forEach(function(e){n[t][e]&&n.off(e,n[t][e]),e&&delete n[t][e]})}),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(n){var t;if(this.player){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];(t=this.player).emit.apply(t,[n].concat(i))}}},{key:"emitUserAction",value:function(n,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.player){var i=ne(ne({},e),{},{pluginName:this.pluginName});this.player.emitUserAction(n,t,i)}}},{key:"hook",value:function(n,t){return Tt.call.apply(Tt,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(n,t){for(var e=arguments.length,i=new Array(e>2?e-2:0),r=2;r<e;r++)i[r-2]=arguments[r];return St.call.apply(St,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(n,t){for(var e=arguments.length,i=new Array(e>2?e-2:0),r=2;r<e;r++)i[r-2]=arguments[r];return Et.call.apply(Et,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"registerPlugin",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";if(this.player)return e&&(t.pluginName=e),this.player.registerPlugin({plugin:n,options:t})}},{key:"getPlugin",value:function(n){return this.player?this.player.getPlugin(n):null}},{key:"__destroy",value:function(){var n=this,t=this.player,e=this.pluginName;this.offAll(),h.clearAllTimers(this),h.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger","__args","__hooks"].map(function(i){n[i]=null}),t.unRegisterPlugin(e),Xn(this)}}],[{key:"defineGetterOrSetter",value:function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&Object.defineProperty(n,e,t[e])}},{key:"defineMethod",value:function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&typeof t[e]=="function"&&Object.defineProperty(n,e,{configurable:!0,value:t[e]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),o}(),Fu=9;if(typeof Element<"u"&&!Element.prototype.matches){var Xe=Element.prototype;Xe.matches=Xe.matchesSelector||Xe.mozMatchesSelector||Xe.msMatchesSelector||Xe.oMatchesSelector||Xe.webkitMatchesSelector}function Hu(o,s){for(;o&&o.nodeType!==Fu;){if(typeof o.matches=="function"&&o.matches(s))return o;o=o.parentNode}}var Bu=Hu,$u=Bu;function Gt(o,s,n,t,e){var i=Uu.apply(this,arguments);return o.addEventListener(n,i,e),{destroy:function(){o.removeEventListener(n,i,e)}}}function Vu(o,s,n,t,e){return typeof o.addEventListener=="function"?Gt.apply(null,arguments):typeof n=="function"?Gt.bind(null,document).apply(null,arguments):(typeof o=="str
3ing"&&(o=document.querySelectorAll(o)),Array.prototype.map.call(o,function(i){return Gt(i,s,n,t,e)}))}function Uu(o,s,n,t){return function(e){e.delegateTarget=$u(e.target,s),e.delegateTarget&&t.call(o,e)}}var ju=Vu;const Xi=wi(ju);var Gu={CONTROLS:"controls",ROOT:"root"},te={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},qi={ICON_DISABLE:"xg-icon-disable"};function zt(o){return o?o.indexOf&&/^(?:http|data:|\/)/.test(o):!1}function zu(o,s){return ue(o)==="object"&&o.class&&typeof o.class=="string"?"".concat(s," ").concat(o.class):s}function Wu(o,s){return ue(o)==="object"&&o.attr&&ue(o.attr)==="object"&&Object.keys(o.attr).map(function(n){s[n]=o.attr[n]}),s}function Ji(o,s){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},e=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"",i=null;if(o instanceof window.Element)return h.addClass(o,n),Object.keys(t).map(function(r){o.setAttribute(r,t[r])}),o;if(zt(o)||zt(o.url))return t.src=zt(o)?o:o.url||"",i=h.createDom(o.tag||"img","",t,"xg-img ".concat(n)),i;if(typeof o=="function")try{return i=o(),i instanceof window.Element?(h.addClass(i,n),Object.keys(t).map(function(r){i.setAttribute(r,t[r])}),i):(K.logWarn("warn>>icons.".concat(s," in config of plugin named [").concat(e,"] is a function mast return an Element Object")),null)}catch(r){return K.logError("Plugin named [".concat(e,"]:createIcon"),r),null}return typeof o=="string"?h.createDomFromHtml(o,t,n):(K.logWarn("warn>>icons.".concat(s," in config of plugin named [").concat(e,"] is invalid")),null)}function Ku(o,s){var n=s.config.icons||s.playerConfig.icons;Object.keys(o).map(function(t){var e=o[t],i=e&&e.class?e.class:"",r=e&&e.attr?e.attr:{},a=null;n&&n[t]&&(i=zu(n[t],i),r=Wu(n[t],r),a=Ji(n[t],t,i,r,s.pluginName)),!a&&e&&(a=Ji(e.icon?e.icon:e,r,i,{},s.pluginName)),s.icons[t]=a})}function Yu(o,s){Object.keys(o).map(function(n){Object.defineProperty(s.langText,n,{get:function(){var e=s.lang,i=s.i18n;return i[n]?i[n]:o[n]&&o[n][e]||""}})})}var Z=function(o){H(n,o);var s=B(n);function n(){var t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return D(this,n),t=s.call(this,e),t.__delegates=[],t}return O(n,[{key:"__init",value:function(e){if(U($(n.prototype),"__init",this).call(this,e),!!e.root){var i=e.root,r=null;this.icons={},this.root=null,this.parent=null;var a=this.registerIcons()||{};Ku(a,this),this.langText={};var l=this.registerLanguageTexts()||{};Yu(l,this);var u="";try{u=this.render()}catch(d){throw K.logError("Plugin:".concat(this.pluginName,":render"),d),new Error("Plugin:".concat(this.pluginName,":render:").concat(d.message))}if(u)r=n.insert(u,i,e.index),r.setAttribute("data-index",e.index);else if(e.tag)r=h.createDom(e.tag,"",e.attr,e.name),r.setAttribute("data-index",e.index),i.appendChild(r);else return;this.root=r,this.parent=i;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var i=this.children();i&&ue(i)==="object"&&Object.keys(i).length>0&&Object.keys(i).map(function(r){var a=r,l=i[a],u={root:e.root},c,f;typeof l=="function"?(c=e.config[a]||{},f=l):ue(l)==="object"&&typeof l.plugin=="function"&&(c=l.options?h.deepCopy(e.config[a]||{},l.options):e.config[a]||{},f=l.plugin),u.config=c,c.index!==void 0&&(u.index=c.index),c.root&&(u.root=c.root),e.registerPlugin(f,u,a)})}}},{key:"updateLang",value:function(e){e||(e=this.lang);function i(u,c){for(var f=0;f<u.children.length;f++)u.children[f].children.length>0?i(u.children[f],c):c(u.children[f])}var r=this.root,a=this.i18n,l=this.langText;r&&i(r,function(u){var c=u.getAttribute&&u.getAttribute("lang-key");if(c){var f=a[c.toUpperCase()]||l[c];f&&(u.innerHTML=typeof f=="function"?f(e):f)}})}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=this.i18n||{},a=this.langText;e.setAttribute&&e.setAttribute("lang-key",i);var l=r[i]||a[i]||"";l&&(e.innerHTML=l)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,h.addClass(this.find(".xgplayer-icon"),qi.ICON_DISABLE)}},{key:"enable",value:function(){this.config.disable=!1,h.removeClass(this.find(".xgplayer-icon"),qi.ICON_DISABLE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";i.root=i.root||this.root;var a=U($(n.prototype),"registerPlugin",this).call(this,e,i,r);return this._children.push(a),a}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,i,r){var a=this;if(arguments.length<3&&typeof i=="function")Array.isArray(e)?e.forEach(function(u){a.bindEL(u,i)}):this.bindEL(e,i);else{var l=n.delegate.call(this,this.root,e,i,r);this.__delegates=this.__delegates.concat(l)}}},{key:"unbind",value:function(e,i){var r=this;if(arguments.length<3&&typeof i=="function")Array.isArray(e)?e.forEach(function(u){r.unbindEL(u,i)}):this.unbindEL(e,i);else for(var a="".concat(e,"_").concat(i),l=0;l<this.__delegates.length;l++)if(this.__delegates[l].key===a){this.__delegates[l].destroy(),this.__delegates.splice(l,1);break}}},{key:"setStyle",value:function(e,i){var r=this;if(this.root){if(h.typeOf(e)==="String")return this.root.style[e]=i;h.typeOf(e)==="Object"&&Object.keys(e).map(function(a){r.root.style[a]=e[a]})}}},{key:"setAttr",value:function(e,i){var r=this;if(this.root){if(h.typeOf(e)==="String")return this.root.setAttribute(e,i);h.typeOf(e)==="Object"&&Object.keys(e).map(function(a){r.root.setAttribute(a,e[a])})}}},{key:"setHtml",value:function(e,i){this.root&&(this.root.innerHTML=e,typeof i=="function"&&i())}},{key:"bindEL",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.root&&"on".concat(e)in this.root&&typeof i=="function"&&this.root.addEventListener(e,i,r)}},{key:"unbindEL",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.root&&"on".concat(e)in this.root&&typeof i=="function"&&this.root.removeEventListener(e,i,r)}},{key:"show",value:function(e){if(this.root){this.root.style.display=e!==void 0?e:"block";var i=window.getComputedStyle(this.root,null),r=i.getPropertyValue("display");if(r==="none")return this.root.style.display="block"}}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,i){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!i||!(i instanceof window.Element))return null;try{return typeof e=="string"?this.find(e).appendChild(i):e.appendChild(i)}catch(r){return K.logError("Plugin:appendChild",r),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e=this,i=this.player;this.__delegates.map(function(r){r.destroy()}),this.__delegates=[],this._children instanceof Array&&(this._children.map(function(r){i.unRegisterPlugin(r.pluginName)}),this._children=null),this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),U($(n.prototype),"__destroy",this).call(this),this.icons={},["root","parent"].map(function(r){e[r]=null})}}],[{key:"insert",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=i.children.length,l=Number(r),u=e instanceof window.Node;if(a){for(var c=0,f=null,d="";c<a;c++){f=i.children[c];var g=Number(f.getAttribute("data-index"));if(g>=l){d="beforebegin";break}else g<l&&(d="afterend")}return u?d==="afterend"?i.appendChild(e):i.insertBefore(e,f):f.insertAdjacentHTML(d,e),d==="afterend"?i.children[i.children.length-1]:i.children[c]}else return u?i.appendChild(e):i.insertAdjacentHTML("beforeend",e),i.children[i.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,i,r,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,u=[];
3if(e instanceof window.Node&&typeof a=="function")if(Array.isArray(r))r.forEach(function(f){var d=Xi(e,i,f,a,l);d.key="".concat(i,"_").concat(f),u.push(d)});else{var c=Xi(e,i,r,a,l);c.key="".concat(i,"_").concat(r),u.push(c)}return u}},{key:"ROOT_TYPES",get:function(){return Gu}},{key:"POSITIONS",get:function(){return te}}]),n}(Be),Xu=function(){function o(){var s=this;if(D(this,o),C(this,"__trigger",function(n){var t=new Date().getTime();s.timeStamp=t;for(var e=0;e<n.length;e++)s.__runHandler(n[e].target)}),this.__handlers=[],this.timeStamp=0,this.observer=null,!!window.ResizeObserver)try{this.observer=new window.ResizeObserver(_u(this.__trigger,100,{trailing:!0})),this.timeStamp=new Date().getTime()}catch(n){console.error(n)}}return O(o,[{key:"addObserver",value:function(n,t){if(this.observer){this.observer.observe(n);for(var e=n.getAttribute(Ne),i=this.__handlers,r=-1,a=0;a<i.length;a++)i[a]&&n===i[a].target&&(r=a);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:n,handler:t,playerId:e})}}},{key:"unObserver",value:function(n){var t=-1;this.__handlers.map(function(i,r){n===i.target&&(t=r)});try{var e;(e=this.observer)===null||e===void 0||e.unobserve(n)}catch{}t>-1&&this.__handlers.splice(t,1)}},{key:"destroyObserver",value:function(){var n;(n=this.observer)===null||n===void 0||n.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(n){for(var t=this.__handlers,e=0;e<t.length;e++)if(t[e]&&n===t[e].target){try{t[e].handler(n)}catch(i){console.error(i)}return!0}return!1}}]),o}(),st=null;function qu(o,s){return st||(st=new Xu),st.addObserver(o,s),st}function Ju(o,s){var n;(n=st)===null||n===void 0||n.unObserver(o,s)}var oe={pluginGroup:{},init:function(s){var n=s._pluginInfoId;n||(n=new Date().getTime(),s._pluginInfoId=n),!s.config.closeResizeObserver&&qu(s.root,function(){s.resize()}),this.pluginGroup[n]={_originalOptions:s.config||{},_plugins:{}}},formatPluginInfo:function(s,n){var t=null,e=null;return s.plugin&&typeof s.plugin=="function"?(t=s.plugin,e=s.options):(t=s,e={}),n&&(e.config=n||{}),{PLUFGIN:t,options:e}},checkPluginIfExits:function(s,n){for(var t=0;t<n.length;t++)if(s.toLowerCase()===n[t].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(s,n){for(var t=Object.keys(n),e=null,i=0;i<t.length;i++)if(s.toLowerCase()===t[i].toLowerCase()){e=n[t[i]];break}return h.typeOf(e)==="Object"?{root:e.root,position:e.position}:{}},lazyRegister:function(s,n){var t=this,e=n.timeout||1500;return Promise.race([n.loader().then(function(i){var r;i&&i.__esModule?r=i.default:r=i,t.register(s,r,i.options)}),new Promise(function(i,r){setTimeout(function(){r(new Error("timeout"))},e)})])},register:function(s,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!(!s||!n||typeof n!="function"||n.prototype===void 0)){var e=s._pluginInfoId;if(!(!e||!this.pluginGroup[e])){this.pluginGroup[e]._plugins||(this.pluginGroup[e]._plugins={});var i=this.pluginGroup[e]._plugins,r=this.pluginGroup[e]._originalOptions;t.player=s;var a=t.pluginName||n.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(n.isSupported&&!n.isSupported(s.config.mediaType,s.config.codecType)){console.warn("not supported plugin [".concat(a,"]"));return}t.config||(t.config={});for(var l=Object.keys(r),u=0;u<l.length;u++)if(a.toLowerCase()===l[u].toLowerCase()){var c=r[l[u]];h.typeOf(c)==="Object"?t.config=Object.assign({},t.config,r[l[u]]):h.typeOf(c)==="Boolean"&&(t.config.disable=!c);break}n.defaultConfig&&Object.keys(n.defaultConfig).forEach(function(d){typeof t.config[d]>
3"u"&&(t.config[d]=n.defaultConfig[d])}),t.root?typeof t.root=="string"&&(t.root=s[t.root]):t.root=s.root,t.index=t.config.index||0;try{i[a.toLowerCase()]&&(this.unRegister(e,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var f=new n(t);return i[a.toLowerCase()]=f,i[a.toLowerCase()].func=n,f&&typeof f.afterCreate=="function"&&f.afterCreate(),f}catch(d){throw console.error(d),d}}}},unRegister:function(s,n){s._pluginInfoId&&(s=s._pluginInfoId),n=n.toLowerCase();try{var t=this.pluginGroup[s]._plugins[n];t&&(t.pluginName&&t.__destroy(),delete this.pluginGroup[s]._plugins[n])}catch(e){console.error("[unRegister:".concat(n,"] cgid:[").concat(s,"] error"),e)}},deletePlugin:function(s,n){var t=s._pluginInfoId;t&&this.pluginGroup[t]&&this.pluginGroup[t]._plugins&&delete this.pluginGroup[t]._plugins[n]},getPlugins:function(s){var n=s._pluginInfoId;return n&&this.pluginGroup[n]?this.pluginGroup[n]._plugins:{}},findPlugin:function(s,n){var t=s._pluginInfoId;if(!t||!this.pluginGroup[t])return null;var e=n.toLowerCase();return this.pluginGroup[t]._plugins[e]},beforeInit:function(s){var n=this;function t(e){return!e||!e.then?new Promise(function(i){i()}):e}return new Promise(function(e){if(n.pluginGroup){var i;return s._loadingPlugins&&s._loadingPlugins.length?i=Promise.all(s._loadingPlugins):i=Promise.resolve(),i.then(function(){var r=s._pluginInfoId;if(!n.pluginGroup[r]){e();return}var a=n.pluginGroup[r]._plugins,l=[];Object.keys(a).forEach(function(u){if(a[u]&&a[u].beforePlayerInit)try{var c=a[u].beforePlayerInit();l.push(t(c))}catch(f){throw l.push(t(null)),f}}),Promise.all([].concat(l)).then(function(){e()}).catch(function(u){console.error(u),e()})})}})},afterInit:function(s){var n=s._pluginInfoId;if(!(!n||!this.pluginGroup[n])){var t=this.pluginGroup[n]._plugins;Object.keys(t).forEach(function(e){t[e]&&t[e].afterPlayerInit&&t[e].afterPlayerInit()})}},setLang:function(s,n){var t=n._pluginInfoId;if(!(!t||!this.pluginGroup[t])){var e=this.pluginGroup[t]._plugins;Object.keys(e).forEach(function(i){if(e[i].updateLang)e[i].updateLang(s);else try{e[i].lang=s}catch{console.warn("".concat(i," setLang"))}})}},reRender:function(s){var n=this,t=s._pluginInfoId;if(!(!t||!this.pluginGroup[t])){var e=[],i=this.pluginGroup[t]._plugins;
3Object.keys(i).forEach(function(r){r!=="controls"&&i[r]&&(e.push({plugin:i[r].func,options:i[r].__args}),n.unRegister(t,r))}),e.forEach(function(r){n.register(s,r.plugin,r.options)})}},onPluginsReady:function(s){var n=s._pluginInfoId;if(!(!n||!this.pluginGroup[n])){var t=this.pluginGroup[n]._plugins||{};Object.keys(t).forEach(function(e){t[e].onPluginsReady&&typeof t[e].onPluginsReady=="function"&&t[e].onPluginsReady()})}},destroy:function(s){var n=s._pluginInfoId;if(this.pluginGroup[n]){Ju(s.root);for(var t=this.pluginGroup[n]._plugins,e=0,i=Object.keys(t);e<i.length;e++){var r=i[e];this.unRegister(n,r)}delete this.pluginGroup[n],delete s._pluginInfoId}}},w={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function Zi(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:ku(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var Zu=function(s,n){var t,e,i;n.preset&&n.options?i=new n.preset(n.options,s.config):i=new n({},s.config);var r=i,a=r.plugins,l=a===void 0?[]:a,u=r.ignores,c=u===void 0?[]:u,f=r.icons,d=f===void 0?{}:f,g=r.i18n,p=g===void 0?[]:g;s.config.plugins||(s.config.plugins=[]),s.config.ignores||(s.config.ignores=[]),(t=s.config.plugins).push.apply(t,_e(l)),(e=s.config.ignores).push.apply(e,_e(c)),Object.keys(d).map(function(y){s.config.icons[y]||(s.config.icons[y]=d[y])});var k=s.config.i18n||[];p.push.apply(p,_e(k)),s.config.i18n=p},Qu=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onMouseEnter",function(a){var l=_(t),u=l.player,c=l.playerConfig;c.closeControlsBlur&&u.focus({autoHide:!1})}),C(_(t),"onMouseLeave",function(a){var l=_(t),u=l.player;u.focus()}),t}return O(n,[{key:"beforeCreate",value:function(e){!e.config.mode&&z.device==="mobile"&&(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e=this,i=this.config,r=i.disable,a=i.height,l=i.mode;if(!r){l==="flex"&&this.player.addClass(w.FLEX_CONTROLS);var u={height:"".concat(a,"px")};Object.keys(u).map(function(f){e.root.style[f]=u[f]}),this.left=this.find("xg-left-grid"),this.center=this.find("xg-center-grid"),this.right=this.find("xg-right-grid"),this.innerRoot=this.find("xg-inner-control
3s"),this.on(kt,function(f){f?h.addClass(e.root,"mini-controls"):h.removeClass(e.root,"mini-controls")});var c=this.playerConfig.isMobileSimulateMode;z.device!=="mobile"&&c!=="mobile"&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&h.addClass(this.root,w.CONTROLS_AUTOHIDE)}},{key:"pauseAutoHide",value:function(){h.removeClass(this.root,w.CONTROLS_AUTOHIDE)}},{key:"show",value:function(e){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(this.root){var a=e.defaultConfig||{};if(!i.root){var l=i.position?i.position:i.config&&i.config.position?i.config.position:a.position;switch(l){case te.CONTROLS_LEFT:i.root=this.left;break;case te.CONTROLS_RIGHT:i.root=this.right;break;case te.CONTROLS_CENTER:i.root=this.center;break;case te.CONTROLS:i.root=this.root;break;default:i.root=this.left}return U($(n.prototype),"registerPlugin",this).call(this,e,i,r)}}}},{key:"destroy",value:function(){z.device!=="mobile"&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave)),this.left=null,this.center=null,this.right=null,this.innerRoot=null}},{key:"render",value:function(){var e=this.config,i=e.mode,r=e.autoHide,a=e.initShow,l=e.disable;if(!l){var u=h.classNames({"xgplayer-controls":!0},{"flex-controls":i==="flex"},{"bottom-controls":i==="bottom"},C({},w.CONTROLS_AUTOHIDE,r),{"xgplayer-controls-initshow":a||!r});return'<xg-controls class="'.concat(u,`" unselectable="on">
4    <xg-inner-controls class="xg-inner-controls xg-pos">
5      <xg-left-grid class="xg-left-grid">
6      </xg-left-grid>
7      <xg-center-grid class="xg-center-grid"></xg-center-grid>
8      <xg-right-grid class="xg-right-grid">
9      </xg-right-grid>
10    </xg-inner-controls>
11    </xg-controls>`)}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(Z),ec={LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}},de={lang:{},langKeys:[],textKeys:[]};
11function at(o,s){return Object.keys(s).forEach(function(n){var t=h.typeOf(s[n]),e=h.typeOf(o[n]);if(t==="Array"){var i;e!=="Array"&&(o[n]=[]),(i=o[n]).push.apply(i,_e(s[n]))}else t==="Object"?(e!=="Object"&&(o[n]={}),at(o[n],s[n])):o[n]=s[n]}),o}function qn(){Object.keys(de.lang.en).map(function(o){de.textKeys[o]=o})}function tc(o,s){var n=[];if(s||(s=de),!!s.lang){h.typeOf(o)!=="Array"?n=Object.keys(o).map(function(i){var r=i==="zh"?"zh-cn":i;return{LANG:r,TEXT:o[i]}}):n=o;var t=s,e=t.lang;n.map(function(i){i.LANG==="zh"&&(i.LANG="zh-cn"),e[i.LANG]?at(e[i.LANG]||{},i.TEXT||{}):Ri(i,s)}),qn()}}function Ri(o,s){var n=o.LANG;if(s||(s=de),!!s.lang){var t=o.TEXT||{};n==="zh"&&(n="zh-cn"),s.lang[n]?at(s.lang[n],t):(s.langKeys.push(n),s.lang[n]=t),qn()}}function ic(o){var s,n={lang:{},langKeys:[],textKeys:{},pId:o};return at(n.lang,de.lang),(s=n.langKeys).push.apply(s,_e(de.langKeys)),at(n.textKeys,de.textKeys),n}Ri(ec);var it={get textKeys(){return de.textKeys},get langKeys(){return de.langKeys},get lang(){var o={};return de.langKeys.map(function(s){o[s]=de.lang[s]}),de.lang["zh-cn"]&&(o.zh=de.lang["zh-cn"]||{}),o},extend:tc,use:Ri,init:ic},q={INITIAL:1,READY:2,ATTACHING:3,ATTACHED:4,NOTALLOW:5,RUNNING:6,ENDED:7},Qi=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],fe={},Wt=null,Jn=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"add",value:function(e){e&&(fe[e.playerId]=e,Object.keys(fe).length===1&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete fe[e.playerId])}},{key:"_iterate",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(var r in fe)if(Object.prototype.hasOwnProperty.call(fe,r)){var a=fe[r];if(i){if(e(a))break}else e(a)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var i=null;return this._iterate(function(r){var a=e(r);return a&&(i=r),a},!0),i}},{key:"findAll",value:function(e){var i=[];return this._iterate(function(r){e(r)&&i.push(r)}),i}},{key:"setActive",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(fe[e])return i?this.forEach(function(r){e===r.playerId?(r.isUserActive=!0,r.isInstNext=!1):r.isUserActive=!1}):fe[e].isUserActive=i,e}},{key:"getActiveId",value:function(){for(var e=Object.keys(fe),i=0;i<e.length;i++){var r=fe[e[i]];if(r&&r.isUserActive)return e[i]}return null}},{key:"setNext",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(fe[e])return i?this.forEach(function(r){e===r.playerId?(r.isUserActive=!1,r.isInstNext=!0):r.isInstNext=!1}):fe[e].isInstNext=i,e}}],[{key:"getInstance",value:function(){return Wt||(Wt=new n),Wt}}]),n}(Pn.EventEmitter);function nc(o){for(var s=Object.keys(fe),n=0;n<s.length;n++){var t=fe[s[n]];if(t.root===o)return t}return null}var rc=["play","pause","replay","retry"],en=0,tn=0,Oe=null,Ft=function(o){H(n,o);var s=B(n);function n(t){var e;D(this,n);var i=h.deepMerge(Zi(),t);e=s.call(this,i),C(_(e),"canPlayFunc",function(){if(e.config){var p=e.config,k=p.autoplay,y=p.defaultPlaybackRate;K.logInfo("player","canPlayFunc, startTime",e.__startTime),e._seekToStartTime(),e.playbackRate=y,(k||e._useAutoplay)&&e.mediaPlay(),e.off(Pe,e.canPlayFunc),e.removeClass(w.ENTER)}}),C(_(e),"onFullscreenChange",function(p,k){var y=function(){h.setTimeout(_(e),function(){e.resize()},100)},I=h.getFullScreenEl();e._fullActionFrom?e._fullActionFrom="":e.emit(Ct,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:e.currentTime,duration:e.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var x=bu(I,e.playerId,Ne);if(k||I&&(I===e._fullscreenEl||x))y(),!e.config.closeFocusVideoFocus&&e.media.focus(),e.fullscreen=!0,e.changeFullStyle(e.root,I,w.FULLSCREEN),e.emit(we,!0,e._fullScreenOffset),e.cssfullscreen&&e.exitCssFullscreen();else if(e.fullscreen){y();var P=_(e),G=P._fullScreenOffset,V=P.config;if(V.needFullscreenScroll?(window.scrollTo(G.left,G.top),h.setTimeout(_(e),function(){e.fullscreen=!1,e._fullScreenOffset=null},100)):(!e.config.closeFocusVideoFocus&&e.media.focus(),e.fullscreen=!1,e._fullScreenOffset=null),e.cssfullscreen)e.removeClass(w.FULLSCREEN);else{var ee=e._fullscreenEl;!ee&&(e.root.contains(p.target)||p.target===e.root)&&(ee=p.target),e.recoverFullStyle(e.root,ee,w.FULLSCREEN)}e._fullscreenEl=null,e.emit(we,!1)}}),C(_(e),"_onWebkitbeginfullscreen",function(p){e._fullscreenEl=e.media,e.onFullscreenChange(p,!0)}),C(_(e),"_onWebkitendfullscreen",function(p){e.onFullscreenChange(p,!1)}),Yn(_(e),rc),e.config=i,e._pluginInfoId=h.generateSessionId(),pu(_(e));var r=e.constructor.defaultPreset;if(e.config.presets.length){var a=e.config.presets.indexOf("default");a>=0&&r&&(e.config.presets[a]=r)}else r&&e.config.presets.push(r);e.userTimer=null,e.waitTimer=null,e.handleSource=!0,e._state=q.INITIAL,e.isAd=!1,e.isError=!1,e._hasStart=!1,e.isSeeking=!1,e.isCanplay=!1,e._useAutoplay=!1,e.__startTime=-1,e.rotateDeg=0,e.isActive=!1,e.fullscreen=!1,e.cssfullscreen=!1,e.isRotateFullscreen=!1,e._fullscreenEl=null,e.timeSegments=[],e._cssfullscreenEl=null,e.curDefinition=null,e._orgCss="",e._fullScreenOffset=null,e._videoHeight=0,e._videoWidth=0,e.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},e.sizeInfo={width:0,height:0,left:0,top:0},e._accPlayed={t:0,acc:0,loopAcc:0},e._offsetInfo={currentTime:-1,duration:0},e.innerContainer=null,e.controls=null,e.topBar=null,e.root=null,e.__i18n=it.init(e._pluginInfoId),z.os.isAndroid&&z.osVersion>
110&&z.osVersion<6&&(e.config.autoplay=!1),e.database=new Nu,e.isUserActive=!1,e._onceSeekCanplay=null,e._isPauseBeforeSeek=0,e.innerStates={isActiveLocked:!1},e.instManager=Oe;var l=e._initDOM();if(!l)return console.error(new Error("can't find the dom which id is ".concat(e.config.id," or this.config.el does not exist"))),Ei(e);var u=e.config,c=u.definition,f=c===void 0?{}:c,d=u.url;if(!d&&f.list&&f.list.length>0){var g=f.list.find(function(p){return p.definition&&p.definition===f.defaultDefinition});g||(f.defaultDefinition=f.list[0].definition,g=f.list[0]),e.config.url=g.url,e.curDefinition=g}return e._bindEvents(),e._registerPresets(),e._registerPlugins(),oe.onPluginsReady(_(e)),e.getInitDefinition(),e.setState(q.READY),h.setTimeout(_(e),function(){e.emit(Li)},0),e.onReady&&e.onReady(),(e.config.videoInit||e.config.autoplay)&&(!e.hasStart||e.state<q.ATTACHED)&&e.start(),e}return O(n,[{key:"_initDOM",value:function(){var e,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var r=this.config.el;if(r&&r.nodeType===1)this.root=r;else return this.emit(ut,new mt("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1}var a=nc(this.root);if(a&&(K.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(Ne,this.playerId),this.media.setAttribute(Ne,this.playerId),(e=Oe)===null||e===void 0||e.add(this),oe.init(this),this._initBaseDoms(),this.config.controls){var l=this.config.controls.root||null,u=oe.register(this,Qu,{root:l});this.controls=u}var c=this.config.isMobileSimulateMode==="mobile"?"mobile":z.device;if(this.addClass("".concat(w.DEFAULT," ").concat(w.INACTIVE," xgplayer-").concat(c," ").concat(this.config.controls?"":w.NO_CONTROLS)),this.config.autoplay?this.addClass(w.ENTER):this.addClass(w.NO_START),this.config.fluid){var f=this.config,d=f.width,g=f.height;(typeof d!="number"||typeof g!="number")&&(d=600,g=337.5);var p={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(g*100/d,"%")};Object.keys(p).forEach(function(G){i.root.style[G]=p[G]})}else["width","height"].forEach(function(G){i.config[G]&&(typeof i.config[G]!="number"?i.root.style[G]=i.config[G]:i.root.style[G]="".concat(i.config[G],"px"))});var k=this.root.getBoundingClientRect(),y=k.width,I=k.height,x=k.left,P=k.top;return this.sizeInfo.width=y,this.sizeInfo.height=I,this.sizeInfo.left=x,this.sizeInfo.top=P,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=h.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach(function(i){e.on(i,e["on"+i.charAt(0).toUpperCase()+i.slice(1)])}),Gi.forEach(function(i){document&&document.addEventListener(i,e.onFullscreenChange)}),z.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(Le,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(pe,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),Gi.forEach(function(i){document.removeEventListener(i,e.onFullscreenChange)}),this.playFunc&&this.off(pe,this.playFunc),this.off(Pe,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(h.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var i=this;if(this.media&&!((!e||e===""||h.typeOf(e)==="Array"&&e.length===0)&&(e="",this.emit(Rn),K.logWarn("config.url is null, please get url and run player._startInit(url)"),this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),h.typeOf(e)==="Array"&&e.length>0?this._attachSourceEvents(this.media,e):!this.media.src||this.media.src!==e?this.media.src=e:e||this.media.removeAttribute("src")),h.t
11ypeOf(this.config.volume)==="Number"&&(this.volume=this.config.volume);var r=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!r.contains(this.media)&&r.insertBefore(this.media,r.firstChild);var a=this.media.readyState;K.logInfo("_startInit readyState",a),this.config.autoplay&&(!h.isMSE(this.media)&&this.load(),(z.os.isIpad||z.os.isPhone)&&this.mediaPlay());var l=this.config.startTime;this.__startTime=l>0?l:-1,this.config.startTime=0,a>=2&&this.duration>0?this.canPlayFunc():this.on(Pe,this.canPlayFunc),(!this.hasStart||this.state<q.ATTACHED)&&oe.afterInit(this),this.hasStart=!0,this.setState(q.ATTACHED),h.setTimeout(this,function(){i.emit(Rt)},0)}}},{key:"_registerPlugins",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this._loadingPlugins=[];var r=this.config.ignores||[],a=this.config.plugins||[],l=this.config.i18n||[];i&&it.extend(l,this.__i18n);var u=r.join("||").toLowerCase().split("||"),c=this.plugins;a.forEach(function(f){try{var d=f.plugin?f.plugin.pluginName:f.pluginName;if(d&&u.indexOf(d.toLowerCase())>-1)return null;if(!i&&c[d.toLowerCase()])return;if(f.lazy&&f.loader){var g=oe.lazyRegister(e,f);f.forceBeforeInit&&(g.then(function(){e._loadingPlugins.splice(e._loadingPlugins.indexOf(g),1)}).catch(function(p){K.logError("_registerPlugins:loadingPlugin",p),e._loadingPlugins.splice(e._loadingPlugins.indexOf(g),1)}),e._loadingPlugins.push(g));return}return e.registerPlugin(f)}catch(p){K.logError("_registerPlugins:",p)}})}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach(function(i){Zu(e,i)})}},{key:"_getRootByPosition",value:function(e){var i=null;switch(e){case te.ROOT_RIGHT:this.rightBar||(this.rightBar=h.createPositionBar("xg-right-bar",this.root)),i=this.rightBar;break;case te.ROOT_LEFT:this.leftBar||(this.leftBar=h.createPositionBar("xg-left-bar",this.root)),i=this.leftBar;break;case te.ROOT_TOP:this.topBar||(this.topBar=h.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&h.addClass(this.topBar,w.TOP_BAR_AUTOHIDE)),i=this.topBar;break;default:i=this.innerContainer||this.root;break}return i}},{key:"registerPlugin",value:function(e,i){var r=oe.formatPluginInfo(e,i),a=r.PLUFGIN,l=r.options,u=this.config.plugins,c=oe.checkPluginIfExits(a.pluginName,u);!c&&u.push(a);var f=oe.getRootByConfig(a.pluginName,this.config);f.root&&(l.root=f.root),f.position&&(l.position=f.position);var d=l.position?l.position:l.config&&l.config.position||a.defaultConfig&&a.defaultConfig.position;if(!l.root&&typeof d=="string"&&d.indexOf("controls")>-1){var g;return(g=this.controls)===null||g===void 0?void 0:g.registerPlugin(a,l,a.pluginName)}return l.root||(l.root=this._getRootByPosition(d)),oe.register(this,a,l)}},{key:"deregister",value:function(e){typeof e=="string"?oe.unRegister(this,e):e instanceof Be&&oe.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.deregister(e),i&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var i;if(typeof e=="string"?i=e:e instanceof Be&&(i=e.pluginName),!!i)for(var r=this.config.plugins.length-1;r>-1;r--){var a=this.config.plugins[r];if(a.pluginName.toLowerCase()===i.toLowerCase()){this.config.plugins.splice(r,1);break}}}},{key:"plugins",get:function(){return oe.getPlugins(this)}},{key:"getPlugin",value:function(e){var i=oe.findPlugin(this,e);return i&&i.pluginName?i:null}},{key:"addClass",value:function(e){this.root&&(h.hasClass(this.root,e)||h.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&h.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return h.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,i){this.root&&this.root.setAttribute(e,i)}},{key:"removeAttribute",value:function(e,i){this.root&&this.root.removeAttribute(e,i)}},{key:"start",value:function(e){var i=this;if(!(this.state>q.ATTACHING))return!e&&!this.config.url&&this.getInitDefinition(),this.hasStart=!0,this.setState(q.ATTACHING),this._registerPlugins(!1),oe.beforeInit(this).then(function(){if(i.config){e||(e=i.url||i.config.url);var r=i.preProcessUrl(e),a=i._startInit(r.url);return a}}).catch(function(r){throw r.fileName="player",r.lineNumber="236",K.logError("start:beforeInit:",r),r})}},{key:"switchURL",value:function(e,i){var r=this,a=e;h.typeOf(e)==="Object"&&(a=e.url),a=this.preProcessUrl(a).url;var l=this.currentTime;this.__startTime=l;var u=this.paused&&!this.isError;return this.src=a,new Promise(function(c,f){var d=function(k){r.off("timeupdate",g),r.off("canplay",g),f(k)},g=function(){r._seekToStartTime(),u&&r.pause(),r.off("error",d),c(!0)};if(r.once("error",d),!a){r.errorHandler("error",{code:6,message:"empty_src"});return}z.os.isAndroid?r.once("timeupdate",g):r.once("canplay",g),r.play()})}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<q.ATTACHED){this.removeClass(w.NO_START),this.addClass(w.ENTER),this.start(),this._useAutoplay=!0;return}this.state<q.RUNNING&&(this.removeClass(w.NO_START),!this.isCanplay&&this.addClass(w.ENTER));var i=U($(n.prototype),"play",this).call(this);return i!==void 0&&i&&i.then?i.then(function(){e.removeClass(w.NOT_ALLOW_AUTOPLAY),e.addClass(w.PLAYING),e.state<q.RUNNING&&(K.logInfo(">>>>playPromise.then"),e.setState(q.RUNNING),e.emit(je))}).catch(function(r){if(K.logWarn(">>>>playPromise.catch",r.name),e.media&&e.media.error){e.onError(),e.removeClass(w.ENTER);return}r.name==="NotAllowedError"&&(e._errorTimer=h.setTimeout(e,function(){e._errorTimer=null,e.emit(Ai),e.addClass(w.NOT_ALLOW_AUTOPLAY),e.removeClass(w.ENTER),e.pause(),e.setState(q.NOTALLOW)},0))}):(K.logWarn("video.play not return promise"),this.state<q.RUNNING&&(this.setState(q.RUNNING),this.removeClass(w.NOT_ALLOW_AUTOPLAY),this.removeClass(w.NO_START),this.removeClass(w.ENTER),this.addClass(w.PLAYING),this.emit
11(je))),i}},{key:"mediaPause",value:function(){U($(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){U($(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(w.PAUSED),Ce(this,"play",function(){return e.mediaPlay()})}},{key:"pause",value:function(){var e=this;Ce(this,"pause",function(){U($(n.prototype),"pause",e).call(e)})}},{key:"seek",value:function(e,i){var r=this;if(!(!this.media||Number.isNaN(Number(e))||!this.hasStart)){var a=this.config,l=a.isSeekedPlay,u=a.seekedStatus,c=i||(l?"play":u);e=e<0?0:e>this.duration?parseInt(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(Ie,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(r.removeClass(w.ENTER),r.isSeeking=!1,c){case"play":r.play();break;case"pause":r.pause();break;default:r._isPauseBeforeSeek>1||r.paused?r.pause():r.play()}r._isPauseBeforeSeek=0,r._onceSeekCanplay=null},this.once(Ie,this._onceSeekCanplay),this.state<q.RUNNING?(this.removeClass(w.NO_START),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e=this,i=this.config,r=i.definition,a=i.url;!a&&r&&r.list&&r.list.length>0&&r.defaultDefinition&&r.list.map(function(l){l.definition===r.defaultDefinition&&(e.config.url=l.url,e.curDefinition=l)})}},{key:"changeDefinition",value:function(e,i){var r=this,a=this.config.definition;if(Array.isArray(a==null?void 0:a.list)&&a.list.forEach(function(u){(e==null?void 0:e.definition)===u.definition&&(r.curDefinition=u)}),e!=null&&e.bitrate&&typeof e.bitrate!="number"&&(e.bitrate=parseInt(e.bitrate,10)||0),this.emit(Oi,{from:i,to:e}),!this.hasStart){this.config.url=e.url;return}var l=this.switchURL(e.url,ne({seamless:a.seamless!==!1&&typeof MediaSource<"u"&&typeof MediaSource.isTypeSupported=="function"},e));l&&l.then?l.then(function(){r.emit(ci,{from:i,to:e})}):this.emit(ci,{from:i,to:e})}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(Le,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,i=w.NOT_ALLOW_AUTOPLAY,r=w.PLAYING,a=w.NO_START,l=w.PAUSED,u=w.REPLAY,c=w.ENTER,f=w.ENDED,d=w.ERROR,g=w.LOADING,p=[i,r,a,l,u,c,f,d,g];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,p.forEach(function(k){e.removeClass(k)}),this.addClass(w.NO_START),this.emit(Nt)}},{key:"reset",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;this.resetState();var a=this.plugins;if(a&&(i.map(function(u){e.deregister(u)}),r)){var l=Zi();Object.keys(this.config).keys(function(u){e.config[u]!=="undefined"&&(u==="plugins"||u==="presets"||u==="el"||u==="id")&&(e.config[u]=l[u])})}}},{key:"destroy",value:function(){var e,i=this,r=this.innerContainer,a=this.root,l=this.media;if(!(!a||!l)){if(this.hasStart=!1,this._useAutoplay=!1,a.removeAttribute(Ne),l.removeAttribute(Ne),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),h.clearAllTimers(this),this.emit(Di),(e=Oe)===null||e===void 0||e.remove(this),oe.destroy(this),Xn(this),U($(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),r)for(var u=r.children,c=0;c<u.length;c++)r.removeChild(u[c]);!r&&l instanceof window.Node&&a.contains(l)&&!this.config.remainMediaAfterDestroy&&a.removeChild(l),["topBar","leftBar","rightBar","innerContainer"].map(function(d){i[d]&&a.removeChild(i[d]),i[d]=null});var f=a.className.split(" ");f.length>0?a.className=f.filter(function(d){return d.indexOf("xgplayer")<0}).join(" "):a.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach(function(d){i[d]=!1})}}},{key:"replay",value:function(){var e=this;this.removeClass(w.ENDED),this.currentTime=0,this.isSeeking=!1,Ce(this,"replay",function(){e.once(Ie,function(){var i=e.mediaPlay();i&&i.catch&&i.catch(function(r){console.log(r)})}),e.emit(yt),e.onPlay()})}},{key:"retry",value:function(){var e=this;this.removeClass(w.ERROR),this.addClass(w.LOADING),Ce(this,"retry",function(){var i=e.currentTime,r=e.config.url,a=h.isMSE(e.media)?{url:r}:e.preProcessUrl(r);e.src=a.url,!e.config.isLive&&(e.currentTime=i),e.once(Pe,function(){e.mediaPlay()})})}},{key:"changeFullStyle",value:function(e,i,r,a){e&&(a||(a=w.PARENT_FULLSCREEN),this._orgCss||(this._orgCss=h.filterStyleFromText(e)),h.addClass(e,r),i&&i!==e&&!this._orgPCss&&(this._orgPCss=h.filterStyleFromText(i),h.addClass(i,a),i.setAttribute(Ne,this.playerId)))}},{key:"recoverFullStyle",value:function(e,i,r,a){a||(a=w.PARENT_FULLSCREEN),this._orgCss&&(h.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),h.removeClass(e,r),i&&i!==e&&this._orgPCss&&(h.setStyleFromCsstext(i,this._orgPCss),this._orgPCss="",h.removeClass(i,a),i.removeAttribute(Ne))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.fullscreenTarget,i=this.root,r=this.media;(e==="video"||e==="media")&&(e=this[e]),e||(e=i),this._fullScreenOffset={top:h.scrollTop(),left:h.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get";var a=h.getFullScreenEl();if(a===this._fullscreenEl)return this.onFullscreenChange(),Promise.resolve();try{for(var l=0;l<zi.length;l++){var u=zi[l];if(e[u]){var c=u==="webkitRequestFullscreen"?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[u]();return c&&c.then?c:Promise.resolve()}}return r.fullscreenEnabled||r.webkitSupportsFullscreen?(r.webkitEnterFullscreen(),Promise.resolve()):Promise.reject(new Error("call getFullscreen fail"))}catch{return Promise.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),!(!this._fullscreenEl&&!h.getFullScreenEl())){this.root;var i=this.media;this._fullActionFrom="exit";try{for(var r=0;r<Wi.length;r++){var a=Wi[r];if(document[a]){var l=document[a]();return l&&l.then?l:Promise.resolve()}}return i&&i.webkitSupportsFullscreen?(i.webkitExitFullScreen(),Promise.resolve()):Promise.reject(new Error("call exitFullscreen fail"))}catch{return Promise.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var i=e?"".concat(w.INNER_FULLSCREEN," ").concat(w.CSS_FULLSCREEN):w.CSS_FULLSCREEN;this.changeFullStyle(this.root,e,i);var r=this.config.fullscreen,a=r===void 0?{}:r,l=a.useCssFullscreen===!0||typeof a.useCssFullscreen=="function"&&a.useCssFullscreen();
11l&&(this.fullscreen=!0,this.emit(we,!0)),this._cssfullscreenEl=e,this.cssfullscreen=!0,this.emit(_t,!0)}},{key:"exitCssFullscreen",value:function(){var e=this._cssfullscreenEl?"".concat(w.INNER_FULLSCREEN," ").concat(w.CSS_FULLSCREEN):w.CSS_FULLSCREEN;if(!this.fullscreen)this.recoverFullStyle(this.root,this._cssfullscreenEl,e);else{var i=this.config.fullscreen,r=i===void 0?{}:i,a=r.useCssFullscreen===!0||typeof r.useCssFullscreen=="function"&&r.useCssFullscreen();a?(this.recoverFullStyle(this.root,this._cssfullscreenEl,e),this.fullscreen=!1,this.emit(we,!1)):this.removeClass(e)}this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(_t,!1)}},{key:"getRotateFullscreen",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(e);var i=e?"".concat(w.INNER_FULLSCREEN," ").concat(w.ROTATE_FULLSCREEN):w.ROTATE_FULLSCREEN;this._fullscreenEl=e||this.root,this.changeFullStyle(this.root,e,i,w.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(we,!0)}},{key:"exitRotateFullscreen",value:function(e){var i=this._fullscreenEl!==this.root?"".concat(w.INNER_FULLSCREEN," ").concat(w.ROTATE_FULLSCREEN):w.ROTATE_FULLSCREEN;this.recoverFullStyle(this.root,this._fullscreenEl,i,w.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(we,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){window.orientation===90||window.orientation===-90?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};if(this.isActive){this.onFocus(e);return}this.emit(xi,ne({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{ignorePaused:!1};if(!this.isActive){this.onBlur(e);return}this._clearUserTimer(),this.emit(On,ne({paused:this.paused,ended:this.ended},e))}},{key:"onFocus",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{autoHide:!0,delay:3e3},r=this.innerStates;if(this.isActive=!0,this.removeClass(w.INACTIVE),this._clearUserTimer(),i.isLock!==void 0&&(r.isActiveLocked=i.isLock),i.autoHide===!1||i.isLock===!0||r.isActiveLocked){this._clearUserTimer();return}var a=i&&i.delay?i.delay:this.config.inactive;this.userTimer=h.setTimeout(this,function(){e.userTimer=null,e.blur()},a)}},{key:"onBlur",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=e.ignorePaused,r=i===void 0?!1:i;if(!this.innerStates.isActiveLocked){var a=this.config.closePauseVideoFocus;this.isActive=!1,(r||a||!this.paused&&!this.ended)&&this.addClass(w.INACTIVE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(w.ENTER),this.removeClass(w.ERROR),this.removeClass(w.LOADING),this.isCanplay=!0,this.waitTimer&&h.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){var e=this;this.isError=!1,this.isSeeking=!1,this.__startTime>0&&(this.duration>0?this._seekToStartTime():this.once(De,function(){e._seekToStartTime()}))}},{key:"onLoadstart",value:function(){this.removeClass(w.ERROR),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===q.ENDED&&this.setState(q.RUNNING),this.removeClass(w.PAUSED),this.ended&&this.removeClass(w.ENDED),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(w.PAUSED),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(w.ENDED),this.setState(q.ENDED)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(w.NOT_ALLOW_AUTOPLAY),this.removeClass(w.NO_START),this.removeClass(w.ENTER),this.removeClass(w.LOADING),this.addClass(w.ERROR)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(w.SEEKING)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&h.clearTimeout(this,this.waitTimer),this.removeClass(w.LOADING),this.removeClass(w.SEEKING)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&h.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=h.setTimeout(this,function(){e.addClass(w.LOADING),e.emit(Fn),h.clearTimeout(e,e.waitTimer),e.waitTimer=null},this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1;var i=w.NO_START,r=w.PAUSED,a=w.ENDED,l=w.ERROR,u=w.REPLAY,c=w.LOADING,f=[i,r,a,l,u,c];f.forEach(function(d){e.removeClass(d)}),!this._accPlayed.t&&!this.paused&&!this.ended&&(this._accPlayed.t=new Date().getTime())}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(w.LOADING))&&this.media.readyState>2&&(this.removeClass(w.LOADING),h.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===q.NOTALLOW&&this.duration&&(this.setState(q.RUNNING),this.emit
11(je)),!this._accPlayed.t&&!this.paused&&!this.ended&&(this._accPlayed.t=new Date().getTime())}},{key:"onVolumechange",value:function(){h.typeOf(this.config.volume)==="Number"&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,i,r){if(!(!this.media||!i||!e)){var a=h.typeOf(e)==="String"?e:e.type||"";r.props&&h.typeOf(r.props)!=="Array"&&(r.props=[r.props]),this.emit(Ct,ne({eventType:a,action:i,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},r))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var i=new Date().getTime()-this._accPlayed.t;this._accPlayed.acc+=i,this._accPlayed.t=0,(e==="ended"||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{startDiff:0,endDiff:0},r=i||{},a=r.startDiff,l=a===void 0?0:a,u=r.endDiff,c=u===void 0?0:u,f=this.media.buffered;if(!f||f.length===0||!this.duration)return!0;for(var d=e||this.media.currentTime||.2,g=f.length,p=0;p<g;p++)if(f.start(p)+l<=d&&f.end(p)-c>d)return!0;return!1}},{key:"resizePosition",value:function(){var e=this,i=this.videoPos,r=i.vy,a=i.vx,l=i.h,u=i.w,c=this.videoPos.rotate;if(!(c<0&&l<0&&u<0)){var f=this.videoPos._pi;if(!f&&this.media.videoHeight&&(f=this.media.videoWidth/this.media.videoHeight*100),!!f){this.videoPos.pi=f,c=c<0?0:c;var d={rotate:c},g=0,p=0,k=1,y=Math.abs(c/90),I=this.root,x=this.innerContainer,P=I.offsetWidth,G=x?x.offsetHeight:I.offsetHeight,V={},ee=G,X=P;if(y%2===0)k=l>0?100/l:u>0?100/u:1,d.scale=k,g=r>0?(100-l)/2-r:0,d.y=y===2?0-g:g,p=a>0?(100-u)/2-a:0,d.x=y===2?0-p:p,V.width="".concat(X,"px"),V.height="".concat(ee,"px"),V.maxWidth="",V.maxHeight="";else if(y%2===1){X=G,ee=P;var se=G-P;p=-se/2/X*100,d.x=y===3?p+r/2:p-r/2,g=se/2/ee*100,d.y=y===3?g+a/2:g-a/2,d.scale=k,V.width="".concat(X,"px"),V.maxWidth="".concat(X,"px"),V.height="".concat(ee,"px"),V.maxHeight="".concat(ee,"px")}var re=h.getTransformStyle(d,this.media.style.transform||this.media.style.webkitTransform);V.transform=re,V.webkitTransform=re,Object.keys(V).map(function(W){e.media.style[W]=V[W]})}}}},{key:"position",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{h:0,y:0,x:0,w:0};if(!(!this.media||!e||!e.h)){var i=this.videoPos;i.h=e.h*100||0,i.w=e.w*100||0,i.vx=e.x*100||0,i.vy=e.y*100||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var i=this;e&&Object.keys(e).map(function(r){if(r!=="plugins"){i.config[r]=e[r];var a=i.plugins[r.toLowerCase()];a&&h.typeOf(a.setConfig)==="Function"&&a.setConfig(e[r])}})}},{key:"playNext",value:function(e){var i=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,Ce(this,"playnext",function(){i.start(),i.emit(bt,e)})}},{key:"resize",value:function(){var e=this;if(this.media){var i=this.root.getBoundingClientRect();this.sizeInfo.width=i.width,this.sizeInfo.height=i.height,this.sizeInfo.left=i.left,this.sizeInfo.top=i.top;var r=this.media,a=r.videoWidth,l=r.videoHeight,u=this.config,c=u.fitVideoSize,f=u.videoFillMode;if((f==="fill"||f==="cover"||f==="contain")&&this.setAttribute("data-xgfill",f),!(!l||!a)){this._videoHeight=l,this._videoWidth=a;var d=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,g=i.width,p=i.height-d,k=parseInt(a/l*1e3,10),y=parseInt(g/p*1e3,10),I=g,x=p,P={};c==="auto"&&y>k||c==="fixWidth"?(x=g/k*1e3,this.config.fluid?P.paddingTop="".concat(x*100/I,"%"):P.height="".concat(x+d,"px")):(c==="auto"&&y<k||c==="fixHeight")&&(I=k*p/1e3,P.width="".concat(I,"px")),!this.fullscreen&&!this.cssfullscreen&&Object.keys(P).forEach(function(V){e.root.style[V]=P[V]}),(f==="fillHeight"&&y<k||f==="fillWidth"&&y>k)&&this.setAttribute("data-xgfill","cover");var G={videoScale:k,vWidth:I,vHeight:x,cWidth:I,cHeight:x+d};this.resizePosition(),this.emit(He,G)}}}},{key:"updateObjectPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this.media.updateObjectPosition){this.media.updateObjectPosition(e,i);return}this.media.style.objectPosition="".concat(e*100,"% ").concat(i*100,"%")}},{key:"setState",value:function(e){K.logInfo("setState","state from:".concat(Qi[this.state]," to:").concat(Qi[e])),this._state=e}},{key:"preProcessUrl",value:function(e,i){var r=this.config,a=r.preProcessUrl,l=r.preProcessUrlOptions,u=Object.assign({},l,i);return!h.isBlob(e)&&typeof a=="function"?a(e,u):{url:e}}},{key:"_seekToStartTime",value:function(){this.__startTime>0&&this.duration>0&&(this.currentTime=this.__startTime>this.duration?this.duration:this.__startTime,this.__startTime=-1)}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){typeof e=="boolean"&&(this._hasStart=e,e===!1&&this.setState(q.READY),this.emit
11("hasstart"))}},{key:"isPlaying",get:function(){return this._state===q.RUNNING||this._state===q.ENDED},set:function(e){e?this.setState(q.RUNNING):this._state>=q.RUNNING&&this.setState(q.ATTACHED)}},{key:"definitionList",get:function(){return!this.config||!this.config.definition?[]:this.config.definition.list||[]},set:function(e){var i=this,r=this.config.definition,a=null,l=null;r.list=e,this.emit("resourceReady",e),e.forEach(function(u){var c;((c=i.curDefinition)===null||c===void 0?void 0:c.definition)===u.definition&&(a=u),r.defaultDefinition===u.definition&&(l=u)}),!l&&e.length>0&&(l=e[0]),a?this.changeDefinition(a):l&&this.changeDefinition(l)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var i=this.media.getVideoPlaybackQuality();return e.dropped=i.droppedVideoFrames||0,e.total=i.totalVideoFrames||0,e.corrupted=i.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=parseInt(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var i=it.langKeys.filter(function(r){return r===e});if(i.length===0&&e!=="zh"){console.error("Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [").concat(it.langKeys.join(),"] "));return}this.config.lang=e,oe.setLang(e,this)}},{key:"i18n",get:function(){var e=this.config.lang;return e==="zh"&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return li}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return U($(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=U($(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return U($(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return this._fullScreenOffset!==null}},{key:"cumulateTime",get:function(){var e=this._accPlayed,i=e.acc,r=e.t;return r?new Date().getTime()-r+i:i}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){e=h.convertDeg(e),!(e%90!==0||e===this.videoPos.rotate)&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return tn},set:function(e){tn=e}},{key:"realTimeSpeed",get:function(){return en},set:function(e){en=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,i){return Tt.call.apply(Tt,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(e,i){return St.call.apply(St,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(e,i){return Et.call.apply(Et,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"usePluginHooks",value:function(e,i,r){for(var a=arguments.length,l=new Array(a>3?a-3:0),u=3;u<a;u++)l[u-3]=arguments[u];return Ki.call.apply(Ki,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removePluginHooks",value:function(e,i,r){for(var a=arguments.length,l=new Array(a>3?a-3:0),u=3;u<a;u++)l[u-3]=arguments[u];return Yi.call.apply(Yi,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"setUserActive",value:function(e,i){var r;typeof i=="boolean"&&i!==this.muted&&(this.addInnerOP("volumechange"),h.typeOf(i)===Boolean&&(this.muted=i)),(r=Oe)===null||r===void 0||r.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return K.config.debug},set:function(e){K.config.debug=e}},{key:"instManager",get:function(){return Oe},set:function(e){Oe=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return(e=Oe)===null||e===void 0?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,i){var r;(r=Oe)===null||r===void 0||r.setActive(e,i)}},{key:"isHevcSupported",value:function(){return z.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return z.probeConfigSupported(e)}},{key:"install",value:function(e,i){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=i)}},{key:"use",value:function(e,i){n.plugins||(n.plugins={}),n.plugins[e]=i}}]),n}(Mu);C(Ft,"defaultPreset",null);C(Ft,"XgVideoProxy",null);Ft.instManager=Jn.getInstance();function $e(o,s,n){try{return' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="').concat(o.i18nKeys[s],`">
12    `).concat(o.i18n[s],`
13    </div>`)}catch{return'<div class="xg-tips hide"></div>'}}var Ye=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"_onMouseenter",function(a){t.emit("icon_mouseenter",{pluginName:t.pluginName})}),C(_(t),"_onMouseLeave",function(a){t.emit("icon_mouseleave",{pluginName:t.pluginName})}),t}return O(n,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(Z);function sc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
14  <path fill="#fff" transform="scale(1.3, 1.3)" class='path_full' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
15</svg>
16`,"image/svg+xml").firstChild}function ac(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
17  <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
18</svg>
19`,"image/svg+xml").firstChild}var hi=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"beforeCreate",value:function(e){typeof e.player.config.cssFullscreen=="boolean"&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var e=this;U($(n.prototype),"afterCreate",this).call(this),!this.config.disable&&(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(_t,function(i){e.animate(i)}),this.btnClick=this.btnClick.bind(this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(r){r.preventDefault(),r.stopPropagation()}}),this.bind(["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,i=this.find(".xgplayer-icon");i.appendChild(e.cssFullscreen),i.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var i=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:i}
19),i?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var i=this.i18nKeys,r=this.find(".xg-tips");r&&this.changeLangTextKey(r,e?i.EXITCSSFULLSCREEN_TIPS:i.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:sc,class:"xg-get-cssfull"},exitCssFullscreen:{icon:ac,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return`<xg-icon class='xgplayer-cssfullscreen'>
20    <div class="xgplayer-icon">
21    </div>
22    `.concat($e(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),`
23    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(Ye);function oc(){return new DOMParser().parseFromString(`<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
24    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
25        <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>
26    </g>
27</svg>`,"image/svg+xml").firstChild}var lc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(i){i.preventDefault(),i.stopPropagation(),e.config.onClick(i)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:oc,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){h.addClass(this.root,"show")}},{key:"hide",value:function(){h.removeClass(this.root,"show")}},{key:"render",value:function(){return`<xg-icon class="xgplayer-back">
28    </xg-icon>`}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:te.ROOT_TOP,index:0}}}]),n}(Z);function uc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
29  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>
30</svg>
31`,"image/svg+xml").firstChild}function cc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
32  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>
33</svg>
34`,"image/svg+xml").firstChild}var Zn=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"_onOrientationChange",function(a){t.player.fullscreen&&t.config.rotateFullscreen&&(window.orientation===90||window.orientation===-90?t.player.setRotateDeg(0):t.player.setRotateDeg(90))}),t}return O(n,[{key:"afterCreate",value:function(){var e=this;U($(n.prototype),"afterCreate",this).call(this);var i=this.config,r=this.playerConfig;if(!i.disable){i.target&&(this.playerConfig.fullscreenTarget=this.config.target);var a=h.getFullScreenEl();r.fullscreenTarget===a&&this.player.getFullscreen().catch(function(l){}),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(u){var c=e.player.fullscreen;e.emitUserAction(u,"switch_fullscreen",{prop:"fullscreen",from:c,to:!c}
34)}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(we,function(l){var u=e.find(".xg-tips");u&&e.changeLangTextKey(u,l?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(l)}),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:lc,options:{config:{onClick:function(u){e.handleFullscreen(u)}}}})),z.device==="mobile"&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:uc,class:"xg-get-fullscreen"},exitFullscreen:{icon:cc,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon",z.device==="mobile"?"touchend":"click",this.handleFullscreen),z.device==="mobile"&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e instanceof Event&&(e.preventDefault(),e.stopPropagation());var i=this.player,r=this.config,a=r.useCssFullscreen===!0||typeof r.useCssFullscreen=="function"&&r.useCssFullscreen();a?(i.fullscreen?i.exitCssFullscreen():i.getCssFullscreen(),this.animate(i.fullscreen)):r.rotateFullscreen?(i.fullscreen?i.exitRotateFullscreen():i.getRotateFullscreen(),this.animate(i.fullscreen)):r.switchCallback&&typeof r.switchCallback=="function"?r.switchCallback(i.fullscreen):i.fullscreen?(i.exitFullscreen(),r.useScreenOrientation&&this.unlockScreen()):(i.getFullscreen().catch(function(l){}),r.useScreenOrientation&&i.aspectRatio>1&&this.lockScreen(r.lockOrientationType))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){var e="FULLSCREEN_TIPS";return`<xg-icon class="xgplayer-fullscreen">
35    <div class="xgplayer-icon">
36    </div>
37    `.concat($e(this,e,this.playerConfig.isHideTips),`
38    </xg-icon>`)}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch(function(i){})}catch{}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch(function(e){})}catch{}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(Ye);function Mi(){return new DOMParser().parseFromString(`<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
39  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
40</svg>
41`,"image/svg+xml").firstChild}function Ni(){return new DOMParser().parseFromString(`<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
42  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>
43</svg>
44`,"image/svg+xml").firstChild}var Qn=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"btnClick",function(a){a.preventDefault(),a.stopPropagation();var l=_(t),u=l.player;return t.emitUserAction(a,"switch_play_pause",{prop:"paused",from:u.paused,to:!u.paused}),u.ended?u.replay():u.paused?(u.play(),t.animate(!1)):(u.pause(),t.animate(!0)),!1}),t}return O(n,[{key:"afterCreate",value:function(){U($(n.prototype),"afterCreate",this).call(this);var e=this.config;e.disable||(this.initIcons(),this.bind(["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,i=this.player;this.on([pe,nt,ut,Ke],function(){e.animate(i.paused)})}},{key:"registerIcons",value:function(){return{play:{icon:Mi,class:"xg-icon-play"},pause:{icon:Ni,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var i=this.i18nKeys,r=this.find(".xg-tips");e?(this.setAttr("data-state","pause"),r&&this.changeLangTextKey(r,i.PLAY_TIPS)):(this.setAttr("data-state","play"),r&&this.changeLangTextKey(r,i.PAUSE_TIPS))}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return`<xg-icon class="xgplayer-play">
45    <div class="xgplayer-icon">
46    </div>
47    `.concat($e(this,"PLAY_TIPS",this.playerConfig.isHideTips),`
48    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(Ye),fc=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],hc=function(){function o(s){D(this,o),this.fragments=s.fragments||[],this.fragments.length===0&&this.fragments.push({percent:1}),this._callBack=s.actionCallback,this.fragConfig={fragFocusClass:s.fragFocusClass||"inner-focus-point",fragAutoFocus:!!s.fragAutoFocus,fragClass:s.fragClass||""},this.style=s.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return O(o,[{key:"updateDuration",value:function(n){var t=this;this.duration=n;var e=0,i=this.fragments;this.fragments=i.map(function(r){return r.start=parseInt(e,10),r.end=parseInt(e+r.percent*t.duration,10),r.duration=parseInt(r.percent*t.duration,10),e+=r.percent*t.duration,r})}},{key:"updateProgress",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"played",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},e=this.progressList,i=this.fragments;if(!(e.length<1)){var r=t.newIndex,a=t.curIndex,l=t.millisecond;r!==a&&e.map(function(f,d){d<r?f[n].style.width="100%":d>r&&(f[n].style.width=0)});var u=i[r],c=l===0?0:(l-u.start)/u.duration;e[r][n].style.width=c<0?0:"".concat(c*100,"%")}}},{key:"updateFocus",value:function(n){if(!(!this.fragConfig.fragAutoFocus||this.fragments.length<2)){if(!n){
48if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var t={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(t),this.focusIndex=-1}return}var e=this.findIndex(n.currentTime*1e3,this.focusIndex);if(e>=0&&e!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(e);var i={index:e,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=e,this._callBack&&this._callBack(i)}}}},{key:"update",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||parseInt(t*1e3,10)!==this.duration){if(!t&&t!==0)return;this.updateDuration(parseInt(t*1e3,10))}var e=this.playedIndex,i=this.cachedIndex;if(h.typeOf(n.played)!=="Undefined"){var r=this.findIndex(n.played*1e3,e);if(r<0)return;this.updateProgress("played",{newIndex:r,curIndex:e,millisecond:parseInt(n.played*1e3,10)}),this.playedIndex=r}if(h.typeOf(n.cached)!=="Undefined"){var a=this.findIndex(n.cached*1e3,i);if(a<0)return;this.updateProgress("cached",{newIndex:a,curIndex:i,millisecond:parseInt(n.cached*1e3,10)}),this.cachedIndex=a}}},{key:"findIndex",value:function(n,t){var e=this.fragments;if(!e||e.length===0)return-1;if(e.length===1)return 0;if(t>-1&&t<e.length&&n>e[t].start&&n<e[t].end)return t;if(n>e[e.length-1].start)return e.length-1;for(var i=0;i<e.length;i++)if(n>e[i].start&&n<=e[i].end){t=i;break}return t}},{key:"findHightLight",value:function(){for(var n=this.root.children,t=0;t<n.length;t++)if(h.hasClass(n[t],this.fragConfig.fragFocusClass))return{dom:n[t],pos:n[t].getBoundingClientRect()}}},{key:"findFragment",value:function(n){var t=this.root.children;return n<0||n>=t.length?null:{dom:t[n],pos:t[n].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var n=this.root.children,t=0;t<n.length;t++)h.removeClass(n[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(n){var t=this.root.children;if(n<t.length)return h.addClass(t[n],this.fragConfig.fragFocusClass),{dom:t[n],pos:t[n].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(n){var t=this;if(Object.keys(this.fragConfig).forEach(function(i){n[i]!==void 0&&(t.fragConfig[i]=n[i])}),n.fragments){if(this.fragments=n.fragments.length===0?[{percent:1}]:n.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var e=this.root.children;e.length>0;)this.root.removeChild(e[0]);this.render()}}},{key:"render",value:function(){var n=this,t=this.style.progressColor;if(this.root||(this.root=h.createDom("xg-inners","",{},"progress-list")),this.fragments){var e=this.fragConfig,i=e.fragClass,r=e.fragFocusClass;this.progressList=this.fragments.map(function(a){var l=h.createDom("xg-inner","",{style:t?"background:".concat(t,"; flex: ").concat(a.percent):"flex: ".concat(a.percent)},"".concat(a.isFocus?r:""," xgplayer-progress-inner ").concat(i));return n.root.appendChild(l),fc.forEach(function(u){l.appendChild(h.createDom(u.tag,"",{style:u.styleKey?"background: ".concat(n.style[u.styleKey],"; width:0;"):"width:0;"},u.className))}),{cached:l.children[0],played:l.children[1]}})}return this.root}}]),o}(),nn={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},er=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"onMoveOnly",function(i,r){var a=_(e),l=a.pos,u=a.config,c=a.player,f=r;if(i){h.event(i);var d=h.getEventPos(i,c.zoom),g=c.rotateDeg===90?d.clientY:d.clientX;if(l.moving&&Math.abs(l.x-g)<u.miniMoveStep)return;l.moving=!0,l.x=g,f=e.computeTime(i,g)}e.triggerCallbacks("dragmove",f,i),e._updateInnerFocus(f)}),C(_(e),"onBodyClick",function(i){e.pos.isLocked&&(e.pos.isLocked=!1,i.preventDefault(),i.stopPropagation())}
48),C(_(e),"_mouseDownHandler",function(i,r){e._state.time=r.currentTime,e.updateWidth(r.currentTime,r.seekTime,r.percent,0),e._updateInnerFocus(r)}),C(_(e),"_mouseUpHandler",function(i,r){var a=_(e),l=a.pos;l.moving&&e.updateWidth(r.currentTime,r.seekTime,r.percent,2)}),C(_(e),"_mouseMoveHandler",function(i,r){var a=_(e),l=a._state,u=a.pos,c=a.config,f=a.player;l.time<r.currentTime?r.forward=!0:r.forward=!1,l.time=r.currentTime,u.isDown&&!u.moving&&(u.moving=!0,c.isPauseMoving&&f.pause(),e.triggerCallbacks("dragstart",r,i),e.emitUserAction("drag","dragstart",r)),e.updateWidth(r.currentTime,r.seekTime,r.percent,1),e.triggerCallbacks("dragmove",r,i),e._updateInnerFocus(r)}),C(_(e),"onMouseDown",function(i){var r=_(e),a=r._state,l=r.player,u=r.pos,c=r.config,f=r.playerConfig,d=h.getEventPos(i,l.zoom),g=l.rotateDeg===90?d.clientY:d.clientX;if(!(l.isMini||c.closeMoveSeek||!f.allowSeekAfterEnded&&l.ended)){if(!l.duration&&!l.isPlaying){l.play();return}i.stopPropagation(),e.focus(),h.checkIsFunction(f.disableSwipeHandler)&&f.disableSwipeHandler(),h.checkIsFunction(c.onMoveStart)&&c.onMoveStart(),h.event(i),u.x=g,u.isDown=!0,u.moving=!1,a.prePlayTime=l.currentTime,l.focus({autoHide:!1}),e.isProgressMoving=!0,h.addClass(e.progressBtn,"active");var p=e.computeTime(i,g);p.prePlayTime=a.prePlayTime,e._mouseDownHandlerHook(i,p);var k=i.type;return k==="touchstart"?(e.root.addEventListener("touchmove",e.onMouseMove),e.root.addEventListener("touchend",e.onMouseUp),e.root.addEventListener("touchcancel",e.onMouseUp)):(e.unbind("mousemove",e.onMoveOnly),document.addEventListener("mousemove",e.onMouseMove,!1),document.addEventListener("mouseup",e.onMouseUp,!1)),!0}}),C(_(e),"onMouseUp",function(i){var r=_(e),a=r.player,l=r.config,u=r.pos,c=r.playerConfig,f=r._state;if(u){i.stopPropagation(),i.preventDefault(),h.checkIsFunction(c.enableSwipeHandler)&&c.enableSwipeHandler(),h.checkIsFunction(l.onMoveEnd)&&l.onMoveEnd(),h.event(i),h.removeClass(e.progressBtn,"active");var d=e.computeTime(i,u.x);d.prePlayTime=f.prePlayTime,u.moving?(e.triggerCallbacks("dragend",d,i),e.emitUserAction("drag","dragend",d)):(e.triggerCallbacks("click",d,i),e.emitUserAction("click","click",d)),e._mouseUpHandlerHook(i,d),u.moving=!1,u.isDown=!1,u.x=0,u.y=0,u.isLocked=!0,f.prePlayTime=0,f.time=0;var g=i.type;g==="touchend"||g==="touchcancel"?(e.root.removeEventListener("touchmove",e.onMouseMove),e.root.removeEventListener("touchend",e.onMouseUp),e.root.removeEventListener("touchcancel",e.onMouseUp),e.blur()):(document.removeEventListener("mousemove",e.onMouseMove,!1),document.removeEventListener("mouseup",e.onMouseUp,!1),u.isEnter?c.isMobileSimulateMode!=="mobile"&&e.bind("mousemove",e.onMoveOnly):e.onMouseLeave(i)),h.setTimeout(_(e),function(){e.resetSeekState()},1),a.focus()}}),C(_(e),"onMouseMove",function(i){var r=_(e),a=r._state,l=r.pos,u=r.player,c=r.config;h.checkTouchSupport()&&i.preventDefault(),h.event(i);var f=h.getEventPos(i,u.zoom),d=u.rotateDeg===90?f.clientY:f.clientX,g=Math.abs(l.x-d);if(!(l.moving&&g<c.miniMoveStep||!l.moving&&g<c.miniStartStep)){l.x=d;var p=e.computeTime(i,d);p.prePlayTime=a.prePlayTime,e._mouseMoveHandlerHook(i,p)}}),C(_(e),"onMouseOut",function(i){e.triggerCallbacks("mouseout",null,i)}),C(_(e),"onMouseOver",function(i){e.triggerCallbacks("mouseover",null,i)}),C(_(e),"onMouseEnter",function(i){var r=_(e),a=r.player,l=r.pos;if(!(l.isDown||l.isEnter||a.isMini||!a.config.allowSeekAfterEnded&&a.ended)){l.isEnter=!0,e.bind("mousemove",e.onMoveOnly),e.bind("mouseleave",e.onMouseLeave),h.event(i);var u=h.getEventPos(i,a.zoom),c=a.rotateDeg===90?u.clientY:u.clientX,f=e.computeTime(i,c);e.triggerCallbacks("mouseenter",f,i),e.focus()}}),C(_(e),"onMouseLeave",function(i){e.triggerCallbacks("mouseleave",null,i),e.unlock(),e._updateInnerFocus(null)}),C(_(e),"onVideoResize",function(){var i=e.pos,r=i.x,a=i.isDown,l=i.isEnter;if(l&&!a){var u=e.computeTime(null,r);e.onMoveOnly(null,u)}}),e.useable=!1,e.isProgressMoving=!1,e.__dragCallBacks=[],e._state={now:-1,direc:0,time:0,prePlayTime:-1},e._disableBlur=!1,typeof e.config.isDragingSeek=="boolean"&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),e.config.isDraggingSeek=e.config.isDragingSeek),e}return O(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var e=this.player,i=e.offsetCurrentTime,r=e.currentTime;return i>=0?i:r+this.timeOffset}},{key:"changeState",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.useable=e}},{key:"show",value:function(e){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!i||i.length===0)&&(i=[{percent:1}]);var a=ne(ne({fragments:i},r),{},{actionCallback:function(u){e.emitUserAction("fragment_focus","fragment_focus",u)}});this.innerList?this.innerList.reset(a):(this.innerList=new hc(a),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map(function(l){e[l]=e.innerList[l].bind(e.innerList)}))}},{key:"_updateInnerFocus",value:function(e){this.innerList&&this.innerList.updateFocus(e)}},{key:"afterCreate",value:function(){if(!(this.config.disable||this.playerConfig.isLive)){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=this.find("xg-outer");var e=this.config,i=e.fragFocusClass,r=e.fragAutoFocus,a=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:i,fragAutoFocus:r,fragClass:a,style:this.playerConfig.commonStyle||{}}),z.device==="mobile"&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=this.find(".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(De,function(){e.onMouseLeave()}),this.on(ge,function(){e.onTimeupdate()}),this.on(Ie,function(){e.onTimeupdate(),e.onCacheUpdate()}),this.on(Dn,function(){e.onCacheUpdate()}),this.on(We,function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0}),this.on(Ke,function(){e.onReset()}),this.on(He,function(){e.onVideoResize()})}},{key:"setConfig",value:function(e){var i=this,r=null;Object.keys(e).forEach(function(a){i.config[a]=e[a],a==="fragments"&&(r=e[a])}),r&&this._initInner(r,e)}},{key:"initCustomStyle",value:function(){var e=this.playerConfig||{},i=e.commonStyle,r=i.sliderBtnStyle,a=this.progressBtn;r&&(typeof r=="string"?a.style.boxShadow=r:ue(r)==="object"&&Object.keys(r).map(function(l){a.style[l]=r[l]}))}},{key:"triggerCallbacks",value:function(e,i,r){this.__dragCallBacks.length>
480&&this.__dragCallBacks.map(function(a){if(a&&a.handler&&a.type===e)try{a.handler(i,r)}catch(l){console.error("[XGPLAYER][triggerCallbacks] ".concat(a," error"),l)}})}},{key:"addCallBack",value:function(e,i){i&&typeof i=="function"&&this.__dragCallBacks.push({type:e,handler:i})}},{key:"removeCallBack",value:function(e,i){var r=this.__dragCallBacks,a=-1;r.map(function(l,u){l&&l.type===e&&l.handler===i&&(a=u)}),a>-1&&r.splice(a,1)}},{key:"unlock",value:function(){var e=this.player,i=this.pos;if(i.isEnter=!1,i.isLocked=!1,!e.isMini){if(this.unbind("mousemove",this.onMoveOnly),i.isDown){this.unbind("mouseleave",this.onMouseLeave);return}this.blur()}}},{key:"bindDomEvents",value:function(){var e=this.player.config;this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),(this.domEventType==="touch"||this.domEventType==="compatible")&&this.root.addEventListener("touchstart",this.onMouseDown),(this.domEventType==="mouse"||this.domEventType==="compatible")&&(this.bind("mousedown",this.onMouseDown),e.isMobileSimulateMode!=="mobile"&&this.bind("mouseenter",this.onMouseEnter),this.bind("mouseover",this.onMouseOver),this.bind("mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),h.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),h.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,i,r,a){var l=this.config,u=this.player;if(!(l.isCloseClickSeek&&a===0)){var c=i=i>=u.duration?u.duration-l.endedDiff:Number(i).toFixed(1);this.updatePercent(r),this.updateTime(e),!(a===1&&(!l.isDraggingSeek||u.config.mediaType==="audio"))&&(this._state.now=c,this._state.direc=c>u.currentTime?0:1,u.seek(c))}}},{key:"computeTime",value:function(e,i){var r=this.player,a=this.root.getBoundingClientRect(),l=a.width,u=a.height,c=a.top,f=a.left,d,g,p=i;r.rotateDeg===90?(d=u,g=c):(d=l,g=f);var k=p-g;k=k>d?d:k<0?0:k;var y=k/d;y=y<0?0:y>1?1:y,Number.isNaN(y)&&(y=this.player.currentTime/this.offsetDuration);var I=parseInt(y*this.offsetDuration*1e3,10)/1e3,x=h.getCurrentTimeByOffset(I,r.timeSegments);return{percent:y,currentTime:I,seekTime:x,offset:k,width:d,left:g,e}}},{key:"updateTime",value:function(e){var i=this.player,r=this.duration;e>r?e=r:e<0&&(e=0);var a=i.plugins.time;a&&a.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,i){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left="".concat(e*100,"%"),this.innerList.update({played:e*this.offsetDuration},this.offsetDuration);var r=this.player.plugins.miniprogress;r&&r.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var i=this.player,r=this._state,a=this.offsetDuration;if(!(i.isSeeking&&i.media.seeking||this.isProgressMoving||!i.hasStart)){if(r.now>-1){var l=parseInt(r.now*1e3,10)-parseInt(i.currentTime*1e3,10);if(r.direc===0&&l>300||r.direc===1&&l>-300){r.now=-1;return}else r.now=-1}var u=this.currentTime;u=h.adjustTimeByDuration(u,a,e),this.innerList.update({played:u},a),this.progressBtn.style.left="".concat(u/a*100,"%")}}},{key:"onCacheUpdate",value:function(e){var i=this.player,r=this.duration;if(i){var a=i.bufferedPoint.end;a=h.adjustTimeByDuration(a,r,e),this.innerList.update({cached:a},r)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var e=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var i=this.domEventType;(i==="touch"||i==="compatible")&&(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),(i==="mouse"||i==="compatible")&&(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!(this.config.disable||this.playerConfig.isLive)){var e=this.player.controls?this.player.controls.config.mode:"",i=e==="bottom"?"xgplayer-progress-bottom":"";return`
49    <xg-progress class="xgplayer-progress `.concat(i,`">
50      <xg-outer class="xgplayer-progress-outer">
51        <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>
52      </xg-outer>
53    </xg-progress>
54    `)}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:nn.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return nn}}]),n}(Z),tr=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),e.isActiving=!1,e}return O(n,[{key:"duration",get:function(){var e=this.player,i=e.offsetDuration,r=e.duration;return this.playerConfig.customDuration||i||r}},{key:"currentTime",get:function(){var e=this.player,i=e.offsetCurrentTime,r=e.currentTime;return i>=0?i:r}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var e=this.player.controls.config.mode;this.mode=e==="flex"?"flex":"normal",!this.config.disable&&(this.mode==="flex"&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=this.find(".time-duration"),this.timeDom=this.find(".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([De,Ie,ge],function(i){i.eventName==="durationchange"&&(e.isActiving=!1),e.onTimeUpdate()}),this.on(We,function(){e.onTimeUpdate(!0)}),this.on(Ke,function(){e.onReset()})}},{key:"show",value:function(e){if(this.mode==="flex"){this.centerCurDom&&(this.centerCurDom.style.display="block"),this.centerDurDom&&(this.centerDurDom.style.display="block");return}this.root.style.display="block"}},{key:"hide",value:function(){if(this.mode==="flex"){this.centerCurDom&&(this.centerCurDom.style.display="none"),this.centerDurDom&&(this.centerDurDom.style.display="none");return}this.root.style.display="none"}},{key:"onTimeUpdate",value:function(e){var i=this.player,r=this.config,a=this.duration;if(!(r.disable||this.isActiving||!i.hasStart)){var l=this.currentTime+this.timeOffset;l=h.adjustTimeByDuration(l,a,e),this.mode==="flex"?(this.centerCurDom.innerHTML=this.minWidthTime(h.format(l)),a!==1/0&&a>0&&(this.centerDurDom.innerHTML=h.format(a))):(this.timeDom.innerHTML=this.minWidthTime(h.format(l)),a!==1/0&&a>0&&(this.durationDom.innerHTML=h.format(a)))}}},{key:"onReset",value:function(){this.mode==="flex"?(this.centerCurDom.innerHTML=this.minWidthTime(h.format(0)),this.centerDurDom.innerHTML=h.format(0)):(this.timeDom.innerHTML=this.minWidthTime(h.format(0)),this.durationDom.innerHTML=h.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(!(!e.controls||!e.controls.center)){var i=e.controls.center;this.centerCurDom=h.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=h.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),i.children.length>0?i.insertBefore(this.centerCurDom,i.children[0]):i.appendChild(this.centerCurDom),i.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;if(this.duration===1/0||this.playerConfig.isLive?(h.hide(this.durationDom),h.hide(this.timeDom),h.hide(this.find(".time-separator")),h.show(this.find(".time-live-tag"))):h.hide(this.find(".time-live-tag")),e.hide){this.hide();return}this.show()}},{key:"changeLiveState",value:function(e){e?(h.hide(this.durationDom),h.hide(this.timeDom),h.hide(this.find(".time-separator")),h.show(this.find(".time-live-tag"))):(h.hide(this.find(".time-live-tag")),h.show(this.find(".time-separator")),h.show(this.durationDom),h.show(this.timeDom))}},{key:"updateTime",value:function(e){if(this.isActiving=!0,!(!e&&e!==0||e>
54this.duration)){if(this.mode==="flex"){this.centerCurDom.innerHTML=this.minWidthTime(h.format(e));return}this.timeDom.innerHTML=this.minWidthTime(h.format(e))}}},{key:"minWidthTime",value:function(e){return e.split(":").map(function(i){return'<span class="time-min-width">'.concat(i,"</span>")}).join(":")}},{key:"resetActive",value:function(){var e=this,i=this.player,r=function(){e.isActiving=!1};this.off(Ie,r),i.isSeeking&&i.media.seeking?this.once(Ie,r):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return`<xg-icon class="xgplayer-time">
55    <span class="time-current">00:00</span>
56    <span class="time-separator">/</span>
57    <span class="time-duration">00:00</span>
58    <span class="time-live-tag">`.concat(this.i18n.LIVE_TIP,`</span>
59    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(Z);function dc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
60  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
61  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
62</svg>
63`,"image/svg+xml").firstChild}function gc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
64  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
65  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
66</svg>
67`,"image/svg+xml").firstChild}function pc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
68  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
69  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>
70</svg>
71`,"image/svg+xml").firstChild}var ir=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onBarMousedown",function(a){var l=_(t),u=l.player,c=t.find(".xgplayer-bar");h.event(a);var f=c.getBoundingClientRect(),d=h.getEventPos(a,u.zoom),g=f.height-(d.clientY-f.top);if(d.h=g,d.barH=f.height,t.pos=d,!(g<-2))return t.updateVolumePos(g,a),document.addEventListener("mouseup",t.onBarMouseUp),t._d.isStart=!0,!1}),C(_(t),"onBarMouseMove",function(a){var l=_(t),u=l._d;if(u.isStart){var c=_(t),f=c.pos,d=c.player;a.preventDefault(),a.stopPropagation(),h.event(a);var g=h.getEventPos(a,d.zoom);u.isMoving=!0;var p=f.h-g.clientY+f.clientY;p>f.barH||t.updateVolumePos(p,a)}}),C(_(t),"onBarMouseUp",function(a){h.event(a),document.removeEventListener("mouseup",t.onBarMouseUp);var l=_(t),u=l._d;u.isStart=!1,u.isMoving=!1}
71),C(_(t),"onMouseenter",function(a){t._d.isActive=!0,t.focus(),t.emit("icon_mouseenter",{pluginName:t.pluginName})}),C(_(t),"onMouseleave",function(a){t._d.isActive=!1,t.unFocus(100,!1,a),t.emit("icon_mouseleave",{pluginName:t.pluginName})}),C(_(t),"onVolumeChange",function(a){if(t.player){var l=t.player,u=l.muted,c=l.volume;t._d.isMoving||(t.find(".xgplayer-drag").style.height=u||c===0?"4px":"".concat(c*100,"%"),t.config.showValueLabel&&t.updateVolumeValue()),t.animate(u,c)}}),t}return O(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:gc,class:"xg-volume-small"},volumeLarge:{icon:dc,class:"xg-volume"},volumeMuted:{icon:pc,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var i=this.playerConfig,r=i.commonStyle,a=i.volume;r.volumeColor&&(this.find(".xgplayer-drag").style.backgroundColor=r.volumeColor),this.changeMutedHandler=this.hook("mutedChange",function(l){e.changeMuted(l)},{pre:function(u){u.preventDefault(),u.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),z.device!=="mobile"&&this.playerConfig.isMobileSimulateMode!=="mobile"&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(Ln,this.onVolumeChange),this.once(Le,this.onVolumeChange),h.typeOf(a)!=="Number"&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,i){var r=this.player,a=this.find(".xgplayer-drag"),l=this.find(".xgplayer-bar");if(!(!l||!a)){var u=parseInt(e/l.getBoundingClientRect().height*1e3,10);a.style.height="".concat(e,"px");var c=Math.max(Math.min(u/1e3,1),0),f={volume:{from:r.volume,to:c}};r.muted&&(f.muted={from:!0,to:!1}),this.emitUserAction(i,"change_volume",{muted:r.muted,volume:r.volume,props:f}),r.volume=Math.max(Math.min(u/1e3,1),0),r.muted&&(r.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,i=e.volume,r=e.muted,a=this.find(".xgplayer-value-label"),l=Math.max(Math.min(i,1),0);a.innerText=r?0:Math.round(l*100)}},{key:"focus",value:function(){var e=this.player;e.focus({autoHide:!1}),this._timerId&&(h.clearTimeout(this,this._timerId),this._timerId=null),h.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2?arguments[2]:void 0,l=this._d,u=this.player;l.isActive||(this._timerId&&(h.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=h.setTimeout(this,function(){l.isActive||(r?u.blur():u.focus(),h.removeClass(e.root,"slide-show"),l.isStart&&e.onBarMouseUp(a)),e._timerId=null},i))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var i=this.player,r=this._d;r.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:i.muted,volume:i.volume,props:{muted:{from:i.muted,to:!i.muted}}}),i.volume>0&&(i.muted=!i.muted),i.volume<.01&&(i.volume=this.config.miniVolume)}},{key:"animate",value:function(e,i){e||i===0?this.setAttr("data-state","mute"):i<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(h.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon",z.device==="mobile"?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){if(!this.config.disable){var e=this.config.default||this.player.volume,i=this.config.showValueLabel;return`
72    <xg-icon class="xgplayer-volume" data-state="normal">
73      <div class="xgplayer-icon">
74      </div>
75      <xg-slider class="xgplayer-slider">
76        `.concat(i?'<div class="xgplayer-value-label">'.concat(e*100,"</div>"):"",`
77        <div class="xgplayer-bar">
78          <xg-drag class="xgplayer-drag" style="height: `).concat(e*100,`%"></xg-drag>
79        </div>
80      </xg-slider>
81    </xg-icon>`)}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(Z);function le(){return new Date().getTime()}var Re={LOAD_START:"loadstart",LOADED_DATA:"loadeddata",FIRST_FRAME:"firstFrame",WAIT_START:"waitingStart",WAIT_END:"waitingEnd",SEEK_START:"seekStart",SEEK_END:"seekEnd"},vc=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];
81return t=s.call.apply(s,[this].concat(i)),C(_(t),"_onTimeupdate",function(){t._state.isTimeUpdate=!0,t._state.autoplayStart&&(K.logInfo("[xgLogger]".concat(t.player.playerId," _onTimeupdate")),t._sendFF("onTimeupdate"))}),C(_(t),"_onAutoplayStart",function(){K.logInfo("[xgLogger]".concat(t.player.playerId," _onAutoplayStart")),t._state.autoplayStart=!0,t.vt&&t._sendFF("onAutoplayStart")}),C(_(t),"_onReset",function(){t._state={autoplayStart:!1,isFFLoading:!1,isTimeUpdate:!1,isFFSend:!1,isLs:!1},t.vt=0,t.pt=0,t.fvt=0,t.newPointTime=le(),t.loadedCostTime=0,t.startCostTime=0,t._isSeeking=!1,t.seekingStart=0,t.waitingStart=0,t.fixedWaitingStart=0,t._isWaiting=!1,t._waitTimer&&h.clearTimeout(_(t),t._waitTimer),t._waittTimer&&h.clearTimeout(_(t),t._waittTimer),t._waitTimer=null,t._waittTimer=null,t._waitType=0}),C(_(t),"_onSeeking",function(){t.seekingStart||(t.suspendWaitingStatus("seek"),t.seekingStart=le(),t.emitLog(Re.SEEK_START,{start:le()}))}),C(_(t),"_onSeeked",function(){t.suspendSeekingStatus("seeked")}),C(_(t),"_onWaitingLoadStart",function(){t._isWaiting||t.vt||(t._isWaiting=!0,t.waitingStart=le(),t.fixedWaitingStart=le(),t._waitType=1,t.emitLog(Re.WAIT_START,{fixedStart:t.fixedWaitingStart,start:t.waitingStart,type:1,endType:"loadstart"}))}),C(_(t),"_onWaiting",function(){t._isWaiting||!t.vt||(t._isWaiting=!0,t.vt?t.seekingStart?t._waitType=2:t._waitType=0:t._waitType=1,t.fixedWaitingStart=le(),t._waitTimer=h.setTimeout(_(t),function(){t._isWaiting&&(t.waitingStart=le(),h.clearTimeout(_(t),t._waitTimer),t._waitTimer=null,t._startWaitTimeout(),t.emitLog(Re.WAIT_START,{fixedStart:t.fixedWaitingStart,start:t.waitingStart,type:t._waitType,endType:t._waitType===2?"seek":"playing"}))},200))}),C(_(t),"_onError",function(){t.suspendSeekingStatus("error"),t.suspendWaitingStatus("error")}),C(_(t),"_onPlaying",function(){t._isWaiting&&t.suspendWaitingStatus("playing")}),t}return O(n,[{key:"afterCreate",value:function(){var e=this;this._onReset(),this._waitType="firstFrame",this._initOnceEvents(),this.newPointTime=le(),this.loadedCostTime=0,this.startCostTime=0,this.on(Ii,function(){var i=e._state,r=i.autoplayStart,a=i.isFFSend;e.startCostTime=le()-e.newPointTime,K.logInfo("[xgLogger]".concat(e.player.playerId," LOAD_START"),"autoplayStart:".concat(r," isFFSend:").concat(a," startCostTime:").concat(e.startCostTime," newPointTime").concat(e.newPointTime)),!a&&(!i.isLs&&e.emitLog(Re.LOAD_START,{}),i.isLs=!0,i.isTimeUpdate=!1,i.isFFLoading=!0,e.pt=le(),e.vt=0,e.fvt=0,e._initOnceEvents(),e._onWaitingLoadStart())}),this.on(Le,function(){e.vt=le(),e.fvt=e.vt-e.pt,e.loadedCostTime=e.vt-e.newPointTime;var i=e._state,r=i.isTimeUpdate,a=i.isFFSend,l=i.autoplayStart;K.logInfo("[xgLogger]".concat(e.player.playerId," LOADED_DATA"),"fvt:".concat(e.fvt," isTimeUpdate:").concat(e._state.isTimeUpdate," loadedCostTime:").concat(e.loadedCostTime)),(r||l)&&e._sendFF("loadedData"),a||e.emitLog(Re.LOADED_DATA,{}),e.suspendWaitingStatus("loadeddata")}),this.on(Ot,this._onSeeking),this.on(Ie,this._onSeeked),this.on(Di,function(){e.endState("destroy")}),this.on(Mt,function(){e.endState("urlChange"),K.logInfo("[xgLogger]".concat(e.player.playerId," URL_CHANGE")),e._state.isFFSend&&e._onReset()}),this.on([Pi,Pe],this._onPlaying),this.on(ct,this._onWaiting),this.on(ut,this._onError),this.on(Nt,function(){K.logInfo("[xgLogger]".concat(e.player.playerId," RESET")),e.endState("reset"),e._initOnceEvents(),e._onReset()})}},{key:"_initOnceEvents",value:function(){this.off(je,this._onAutoplayStart),this.off(ge,this._onTimeupdate),this.once(je,this._onAutoplayStart),this.once(ge,this._onTimeupdate)}},{key:"_sendFF",value:function(e){this.s=le();var i=this._state,r=i.isFFLoading,a=i.isFFSend;K.logInfo("[xgLogger]".concat(this.player.playerId," _sendFF"),"".concat(e," fvt:").concat(this.fvt," isFFLoading:").concat(r," !isFFSend:").concat(!a)),this.vt>0&&r&&!a&&(K.logInfo("[xgLogger]".concat(this.player.playerId," emitLog_firstFrame"),e),this._state.isFFLoading=!1,this._state.isFFSend=!0,this.emitLog(Re.FIRST_FRAME,{fvt:this.fvt,costTime:this.fvt,vt:this.vt,startCostTime:this.startCostTime,loadedCostTime:this.loadedCostTime}))}},{key:"_startWaitTimeout",value:function(){var e=this;this._waittTimer&&h.clearTimeout(this,this._waittTimer),this._waittTimer=h.setTimeout(this,function(){e.suspendWaitingStatus("timeout"),h.clearTimeout(e,e._waittTimer),e._waittTimer=null},this.config.waitTimeout)}},{key:"endState",value:function(e){this.suspendWaitingStatus(e),this.suspendSeekingStatus(e)}},{key:"suspendSeekingStatus",value:function(e){if(this.seekingStart){var i=le(),r=i-this.seekingStart;this.seekingStart=0,this.emitLog(Re.SEEK_END,{end:i,costTime:r,endType:e})}}},{key:"suspendWaitingStatus",value:function(e){if(this._waitTimer&&(h.clearTimeout(this,this._waitTimer),this._waitTimer=null),this._waittTimer&&(h.clearTimeout(this,this._waittTimer),this._waittTimer=null),this._isWaiting=!1,!!this.waitingStart){var i=le(),r=i-this.waitingStart,a=i-this.fixedWaitingStart,l=this.config.waitTimeout;this._isWaiting=!1,this.waitingStart=0,this.fixedWaitingStart=0,this.emitLog(Re.WAIT_END,{fixedCostTime:a>l?l:a,costTime:r>l?l:r,type:e==="loadeddata"?1:this._waitType,endType:this._waitType===2?"seek":e})}}},{key:"emitLog",value:function(e,i){var r=this.player;
81this.emit(Vn,ne({t:le(),host:h.getHostFromUrl(r.currentSrc),vtype:r.vtype,eventType:e,currentTime:this.player.currentTime,readyState:r.video.readyState,networkState:r.video.networkState},i))}}],[{key:"pluginName",get:function(){return"xgLogger"}},{key:"defaultConfig",get:function(){return{waitTimeout:1e4}}}]),n}(Z);function mc(){return new DOMParser().parseFromString(`<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">
82  <path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>
83</svg>
84`,"image/svg+xml").firstChild}var yc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"registerIcons",value:function(){return{replay:mc}}},{key:"afterCreate",value:function(){var e=this;Z.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayClick",function(){e.player.replay()},{pre:function(r){r.preventDefault(),r.stopPropagation()}}),this.bind(".xgplayer-replay",["click","touchend"],this.__handleReplay),this.on(We,function(){if(e.playerConfig.loop||h.addClass(e.player.root,"replay"),!e.config.disable){e.show();var i=e.root.querySelector("path");if(i){var r=window.getComputedStyle(i).getPropertyValue("transform");if(typeof r=="string"&&r.indexOf("none")>-1)return null;i.setAttribute("transform",r)}}}),this.on(pe,function(){e.hide()})}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),h.removeClass(this.player.root,"replay")}},{key:"show",value:function(e){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind(".xgplayer-replay",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){return`<xg-replay class="xgplayer-replay">
85      <xg-replay-txt class="xgplayer-replay-txt" lang-key="`.concat(this.i18nKeys.REPLAY,'">').concat(this.i18n.REPLAY,`</xg-replay-txt>
86    </xg-replay>`)}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),n}(Z),_c=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){h.addClass(this.root,"hide")}},{key:"show",value:function(e){h.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){typeof e.player.config.poster=="string"&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(We,function(){e.isEndedShow&&h.removeClass(e.root,"hide")}),this.config.hideCanplay?(this.once(ge,function(){e.onTimeUpdate()}),this.on(Mt,function(){h.removeClass(e.root,"hide"),h.addClass(e.root,"xg-showplay"),e.once(ge,function(){e.onTimeUpdate()})})):this.on(pe,function(){h.addClass(e.root,"hide")})}},{key:"setConfig",value:function(e){var i=this;Object.keys(e).forEach(function(a){i.config[a]=e[a]});var r=this.config.poster;this.update(r)}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?h.removeClass(this.root,"xg-showplay"):this.once(ge,function(){e.onTimeUpdate()})}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"getBgSize",value:function(e){var i="";switch(e){case"cover":i="cover";break;case"contain":i="contain";break;case"fixHeight":i="auto 100%";break;default:i=""}return i?"background-size: ".concat(i,";"):""}},{key:"render",value:function(){var e=this.config,i=e.poster,r=e.hideCanplay,a=e.fillMode,l=e.notHidden,u=this.getBgSize(a),c=i?"background-image:url(".concat(i,");").concat(u):u,f=l?"xg-not-hidden":r?"xg-showplay":"";return'<xg-poster class="xgplayer-poster '.concat(f,'" style="').concat(c,`">
87    </xg-poster>`)}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,notHidden:!1,poster:"",fillMode:"fixWidth"}}}]),n}(Z),be={};function kc(o,s){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{start:null,end:null};return be[o]&&window.clearTimeout(be[o].id),be[o]={},n.start&&n.start(),be[o].id=window.setTimeout(function(){n.end&&n.end(),window.clearTimeout(be[o].id),delete be[o]},s),be[o].id}function rn(o){if(o){window.clearTimeout(o);return}Object.keys(be).map(function(s){window.clearTimeout(be[s].id),delete be[s]})}var bc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"onPlayerReset",function(){e.autoPlayStart=!1;var i=e.config.mode==="auto"?"auto-hide":"hide";e.setAttr("data-state","play"),h.removeClass(e.root,i),e.show()}),C(_(e),"onAutoplayStart",function(){if(!e.autoPlayStart){var i=e.config.mode==="auto"?"auto-hide":"hide";h.addClass(e.root,i),e.autoPlayStart=!0,e.toggleTo("play")}}),e.autoPlayStart=!1,e}return O(n,[{key:"afterCreate",value:function(){var e=this.playerConfig;this.initIcons(),this.listenEvents(),this.bindClickEvents(),e.autoplay||this.show()}},{key:"listenEvents",value:function(){var e=this,i=this.player,r=this.playerConfig;this.once(Li,function(){r&&(r.lang&&r.lang==="en"?h.addClass(i.root,"lang-is-en"):r.lang==="jp"&&h.addClass(i.root,"lang-is-jp"))}),this.on(je,this.onAutoplayStart),this.on(Ai,function(){var a=e.config.mode==="auto"?"auto-hide":"hide";e.setAttr("data-state","play"),h.removeClass(e.root,a),e.show()}),this.on(pe,function(){e.toggleTo("play")}),this.on(nt,function(){e.toggleTo("pause")}),this.on(Nt,function(){e.onPlayerReset()})}},{key:"bindClickEvents",value:function(){var e=this;this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(r){r.cancelable&&r.preventDefault(),r.stopPropagation();var a=e.player.paused;e.emitUserAction(r,"switch_play_pause",{props:"paused",from:a,to:!a})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:Mi,class:"xg-icon-play"},startPause:{icon:Ni,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){h.addClass(this.root,"hide")}},{key:"show",value:function(e){h.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){h.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){h.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var i=this;this._animateId=kc("pauseplay",400,{start:function(){h.addClass(i.root,"interact"),i.show(),i.switchStatus(!0)},end:function(){h.removeClass(i.root,"interact"),!e&&i.hide(),i._animateId=null}})}},{key:"endAnimate",value:function(){h.removeClass(this.root,"interact"),rn(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var i=this.player;if(e.cancelable&&e.preventDefault(),e.stopPropagation(),!(i.state<q.READY)){var r=this.player.paused;!r&&i.state===q.RUNNING?i.pause():i.play()}}},{key:"onPlayPause",value:function(e){this.toggleTo(e)}},{key:"toggleTo",value:function(e){var i=this.config,r=this.player;if(!(!r||r.state<q.RUNNING||!this.autoPlayStart)){if(i.mode==="show"){this.switchStatus(),this.show();return}if(i.mode==="auto"){this.switchStatus();return}if(i.isShowPause&&r.paused&&!r.ended||i.isShowEnd&&r.ended){this.switchStatus(),this.show(),this.endAnimate();return}if(i.disableAnimate){this.switchStatus(),this.hide();return}if(e==="play")this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||r.ended)return;this.animate()}}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),rn(this._animateId)}}
87,{key:"render",value:function(){var e=this.playerConfig.autoplay?this.config.mode==="auto"?"auto-hide":"hide":"";return`
88    <xg-start class="xgplayer-start `.concat(e,`">
89    <xg-start-inner></xg-start-inner>
90    </xg-start>`)}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),n}(Z),Cc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"render",value:function(){var e=this.config.innerHtml,i=h.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)i.appendChild(e);else if(e&&typeof e=="string")i.innerHTML=e;else{for(var r="",a=1;a<=12;a++)r+='<div class="xgplayer-enter-bar'.concat(a,'"></div>');i.innerHTML='<div class="xgplayer-enter-spinner">'.concat(r,"</div>")}return i}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(Z),sn=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e="MINISCREEN";return`
91      <xg-icon class="xgplayer-miniicon">
92      <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="`.concat(this.i18nKeys[e],'">').concat(this.i18n[e],`</span></div>
93      </xg-icon>`)}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:10}}}]),n}(Z);function an(o){var s=parseFloat(o),n=o.indexOf("%")===-1&&!Number.isNaN(s);return n&&s}var Fi=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],nr=Fi.length;function Tc(){for(var o={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},s=0;s<nr;s++){var n=Fi[s];o[n]=0}return o}function Sc(o){var s=window.getComputedStyle(o);return s}function on(o){if(typeof o=="string"&&(o=document.querySelector(o)),!(!o||ue(o)!=="object"||!o.nodeType)){var s=Sc(o);if(s.display==="none")return Tc();var n={};n.width=o.offsetWidth,n.height=o.offsetHeight;for(var t=n.isBorderBox=s.boxSizing==="border-box",e=0;e<nr;e++){var i=Fi[e],r=s[i],a=parseFloat(r);n[i]=Number.isNaN(a)?0:a}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,f=n.marginTop+n.marginBottom,d=n.borderLeftWidth+n.borderRightWidth,g=n.borderTopWidth+n.borderBottomWidth,p=t,k=an(s.width);k!==!1&&(n.width=k+(p?0:l+d));var y=an(s.height);return y!==!1&&(n.height=y+(p?0:u+g)),n.innerWidth=n.width-(l+d),n.innerHeight=n.height-(u+g),n.outerWidth=n.width+c,n.outerHeight=n.height+f,n}}function Kt(o,s){for(var n=0;n<o.length;n++){var t=o[n];if(t.identifier===s)return t}}var Yt={START:"dragStart",MOVE:"dragMove",ENDED:"dragEnded"},ln={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},Ec=function(o){H(n,o);var s=B(n);function n(t){var e,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return D(this,n),e=s.call(this),e.isEnabled=!0,e.isDragging=!1,e.isDown=!1,e.position={},e.downPoint={},e.dragPoint={x:0,y:0},e.startPos={x:0,y:0},e._root=t instanceof Element?t:document.querySelector(t),e._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),!e._root||!e._handlerDom?Ei(e):(e._bindStartEvent(),e)}return O(n,[{key:"_bindStartEvent",value:function(){var e=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),ln[this._startKey].map(function(i){e["on".concat(i)]=e["on".concat(i)].bind(e)})}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var i=this;if(e){var r=ln[this._startKey];r.map(function(a){window.addEventListener(a,i["on".concat(a)])}),this._boundPointerEvents=r}}},{key:"_unbindPostStartEvents",value:function(){var e=this;this._boundPointerEvents&&(this._boundPointerEvents.map(function(i){window.removeEventListener(i,e["on".concat(i)])}),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame(function(){e.animate()}))}},{key:"positionDrag",value:function(){var e="translate3d(".concat(this.dragPoint.x,"px, ").concat(this.dragPoint.y,"px, 0)");this._root.style.transform=e,this._root.style.webKitTransform=e}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var i=e.changedTouches[0];this.dragStart(e,i),this.touchIdentifier=i.pointerId!==void 0?i.pointerId:i.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var i=Kt(e.changedTouches,this.touchIdentifier);i&&this.dragMove(e,i)}},{key:"ontouchend",value:function(e){var i=Kt(e.changedTouches,this.touchIdentifier);i&&this.dragEnd(e,i),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var i=Kt(e.changedTouches,this.touchIdentifier);i&&this.dragCancel(e,i)}},{key:"dragStart",value:function(e,i){if(!(!this._root||this.isDown||!this.isEnabled)){this.downPoint=i,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var r=on(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-r.height,this.startPos.maxX=window.innerWidth-r.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,i){this.isDragging=!0,this.animate(),this.emit
93(Yt.START,this.startPos)}},{key:"dragEnd",value:function(e,i){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(Yt.ENDED)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,i){var r={x:i.pageX-this.downPoint.pageX,y:i.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(r)&&this.dragRealStart(e,i),r}},{key:"dragMove",value:function(e,i){if(e=e||window.event,!!this.isDown){var r=this.startPos,a=r.x,l=r.y,u=this._dragPointerMove(e,i),c=u.x,f=u.y;c=this.checkContain("x",c,a),f=this.checkContain("y",f,l),this.position.x=a+c,this.position.y=l+f,this.dragPoint.x=c,this.dragPoint.y=f,this.emit(Yt.MOVE,this.position)}}},{key:"dragCancel",value:function(e,i){this.dragEnd(e,i)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,i,r){return i+r<0?0-r:e==="x"&&i+r>this.startPos.maxX?this.startPos.maxX-r:e==="y"&&i+r>this.startPos.maxY?this.startPos.maxY-r:i}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),i=this._getPositionCoord(e.left,"width"),r=this._getPositionCoord(e.top,"height");this.position.x=Number.isNaN(i)?0:i,this.position.y=Number.isNaN(r)?0:r,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var i=e.transform;if(i.indexOf("matrix")===0){var r=i.split(","),a=i.indexOf("matrix3d")===0?12:4,l=parseInt(r[a],10),u=parseInt(r[a+1],10);this.position.x+=l,this.position.y+=u}}},{key:"_getPositionCoord",value:function(e,i){if(e.indexOf("%")!==-1){var r=on(this._root.parentNode);return r?parseFloat(e)/100*r[i]:0}return parseInt(e,10)}}]),n}(In),wc=function(o){H(n,o);var s=B(n);function n(t){var e;D(this,n),e=s.call(this,t),C(_(e),"onCancelClick",function(a){e.exitMini(),e.isClose=!0}),C(_(e),"onCenterClick",function(a){var l=_(e),u=l.player;u.paused?u.play():u.pause()}),C(_(e),"onScroll",function(a){if(!(!window.scrollY&&window.scrollY!==0||Math.abs(window.scrollY-e.pos.scrollY)<50)){var l=parseInt(h.getCss(e.player.root,"height"));l+=e.config.scrollTop,e.pos.scrollY=window.scrollY,window.scrollY>l+5?!e.isMini&&!e.isClose&&e.getMini():window.scrollY<=l&&(e.isMini&&e.exitMini(),e.isClose=!1)}}),e.isMini=!1,e.isClose=!1;var i=_(e),r=i.config;return e.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:e.config.height,width:e.config.width,scrollY:window.scrollY||0},e.lastStyle=null,e}return O(n,[{key:"beforeCreate",value:function(e){typeof e.player.config.mini=="boolean"&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(nt,function(){e.setAttr("data-state","pause")}),this.on(pe,function(){e.setAttr("data-state","play")})}},{key:"onPluginsReady",value:function(){var e=this,i=this.player,r=this.config;if(!r.disable){if(this.config.isShowIcon){var a={config:{onClick:function(){e.getMini()}}};i.controls.registerPlugin(sn,a,sn.pluginName)}var l=h.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",l,this.onCancelClick),this.bind(".play-icon",l,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new Ec(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:Mi,class:"xg-icon-play"},pause:{icon:Ni,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e=this;if(!this.isMini){var i=this.player,r=this.playerConfig,a=this.config.target||this.player.root;this.lastStyle={},h.addClass(i.root,"xgplayer-mini"),["width","height","top","left"].map(function(l){e.lastStyle[l]=a.style[l],a.style[l]="".concat(e.pos[l],"px")}
93),r.fluid&&(a.style["padding-top"]=""),this.emit(kt,!0),i.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var i=this.player,r=this.playerConfig,a=this.config.target||this.player.root;h.removeClass(i.root,"xgplayer-mini"),this.lastStyle&&Object.keys(this.lastStyle).map(function(l){a.style[l]=e.lastStyle[l]}),this.lastStyle=null,r.fluid&&(i.root.style.width="100%",i.root.style.height="0",i.root.style["padding-top"]="".concat(r.height*100/r.width,"%")),this.emit(kt,!1),this.isMini=i.isMini=!1}},{key:"updatePos",value:function(e){this.pos=Object.assign(this.pos,e),this.isMini&&(this.player.root.style.left="".concat(this.pos.left,"px"),this.player.root.style.top="".concat(this.pos.top,"px"),this.player.root.style.width="".concat(this.pos.width,"px"),this.player.root.style.height="".concat(this.pos.height,"px"))}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=h.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return`
94      <xg-mini-layer class="xg-mini-layer">
95      <xg-mini-header class="xgplayer-mini-header">
96      `.concat($e(this,"MINI_DRAG",this.playerConfig.isHideTips),`
97      </xg-mini-header>
98      <div class="mini-cancel-btn">
99        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
100          <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>
101        </svg>
102      </div>
103      <div class="play-icon">
104      </div>
105      </xg-mini-layer>`)}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),n}(Z),ht={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},Xt=["videoClick","videoDbClick"],qt=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onMouseMove",function(a){var l=_(t),u=l.player,c=l.playerConfig;
105u.isActive||(u.focus({autoHide:!c.closeDelayBlur}),!c.closeFocusVideoFocus&&u.media.focus())}),C(_(t),"onMouseEnter",function(a){var l=_(t),u=l.playerConfig,c=l.player;!u.closeFocusVideoFocus&&c.media.focus(),u.closeDelayBlur?c.focus({autoHide:!1}):c.focus(),t.emit(Nn)}),C(_(t),"onMouseLeave",function(a){var l=t.playerConfig,u=l.closePlayerBlur,c=l.leavePlayerTime,f=l.closeDelayBlur;!u&&!f&&(c?t.player.focus({autoHide:!0,delay:c}):t.player.blur({ignorePaused:!0})),t.emit(Mn)}),C(_(t),"onVideoClick",function(a){var l=_(t),u=l.player,c=l.playerConfig;a.target&&c.closeVideoClick||(a.target===u.root||a.target===u.media||a.target===u.innerContainer||a.target===u.media.__canvas)&&(a.preventDefault(),c.closeVideoStopPropagation||a.stopPropagation(),t._clickCount++,t.clickTimer&&(clearTimeout(t.clickTimer),t.clickTimer=null),t.clickTimer=setTimeout(function(){t._clickCount&&(t._clickCount--,Ce(_(t),Xt[0],function(f,d){t.switchPlayPause(d.e)},{e:a,paused:u.paused}),clearTimeout(t.clickTimer),t.clickTimer=null)},300))}),C(_(t),"onVideoDblClick",function(a){var l=_(t),u=l.player,c=l.playerConfig;if(!(c.closeVideoDblclick||!a.target||a.target!==u.media&&a.target!==u.media.__canvas)){if(!c.closeVideoClick&&t._clickCount<2){t._clickCount=0;return}t._clickCount=0,t.clickTimer&&(clearTimeout(t.clickTimer),t.clickTimer=null),a.preventDefault(),a.stopPropagation(),Ce(_(t),Xt[1],function(f,d){t.emitUserAction(d.e,"switch_fullscreen",{props:"fullscreen",from:u.fullscreen,to:!u.fullscreen}),u.fullscreen?u.exitFullscreen():u.getFullscreen()},{e:a,fullscreen:u.fullscreen})}}),t}return O(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Xt.map(function(r){e.__hooks[r]=null});var i=this.playerConfig.isMobileSimulateMode;i==="mobile"||z.device==="mobile"&&!z.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e=this,i=this.player,r=i.media,a=i.root,l=this.playerConfig.enableContextmenu;a&&a.addEventListener("click",this.onVideoClick,!1),a&&a.addEventListener("dblclick",this.onVideoDblClick,!1),Object.keys(ht).map(function(u){a.addEventListener(u,e[ht[u]],!1)}),!l&&r&&r.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var i=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:i.paused,to:!i.paused}),i.ended?i.duration!==1/0&&i.duration>0&&i.replay():i.paused?i.play():i.pause()}},{key:"onContextmenu",value:function(e){e=e||window.event,e.preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e=this,i=this.player,r=i.video,a=i.root;this.clickTimer&&clearTimeout(this.clickTimer),a.removeEventListener("click",this.onVideoClick,!1),a.removeEventListener("dblclick",this.onVideoDblClick,!1),r.removeEventListener("contextmenu",this.onContextmenu,!1),Object.keys(ht).map(function(l){a.removeEventListener(l,e[ht[l]],!1)})}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(Be),Me={PRESS:"press",PRESS_END:"pressend",DOUBlE_CLICK:"doubleclick",CLICK:"click",TOUCH_MOVE:"touchmove",TOUCH_START:"touchstart",TOUCH_END:"touchend"},Pc={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},Ic={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function un(o){return o&&o.length>0?o[o.length-1]:null}function xc(){return{pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0}}var Lc=function(){function o(s){var n=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{eventType:"touch"};D(this,o),C(this,"onTouchStart",function(e){var i=n._pos,r=n.root,a=un(e.touches);i.x=a?parseInt(a.pageX,10):e.pageX,i.y=a?parseInt(a.pageX,10):e.pageX,i.start=!0,n.__setPress(e),r.addEventListener(n.events.end,n.onTouchEnd),r.addEventListener(n.events.cancel,n.onTouchCancel),r.addEventListener(n.events.move,n.onTouchMove),n.trigger(Me.TOUCH_START,e)}),C(this,"onTouchCancel",function(e){n.onTouchEnd(e)}),C(this,"onTouchEnd",function(e){var i=n._pos,r=n.root;n.__clearPress(),r.removeEventListener(n.events.cancel,n.onTouchCancel),r.removeEventListener(n.events.end,n.onTouchEnd),r.removeEventListener(n.events.move,n.onTouchMove),e.moving=i.mov
105ing,e.press=i.press,i.press&&n.trigger(Me.PRESS_END,e),n.trigger(Me.TOUCH_END,e),!i.press&&!i.moving&&n.__setDb(e),i.press=!1,i.start=!1,i.moving=!1}),C(this,"onTouchMove",function(e){var i=n._pos,r=n.config,a=un(e.touches),l=a?parseInt(a.pageX,10):e.pageX,u=a?parseInt(a.pageY,10):e.pageX,c=l-i.x,f=u-i.y;Math.abs(f)<r.miniStep&&Math.abs(c)<r.miniStep||(n.__clearPress(),i.press&&n.trigger(Me.PRESS_END,e),i.press=!1,i.moving=!0,n.trigger(Me.TOUCH_MOVE,e))}),this._pos={moving:!1,start:!1,x:0,y:0},this.config=xc(),Object.keys(t).map(function(e){n.config[e]=t[e]}),this.root=s,this.events=t.eventType==="mouse"?Ic:Pc,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return O(o,[{key:"_initEvent",value:function(){this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(n){var t=this,e=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout(function(){t.trigger(Me.PRESS,n),t._pos.press=!0,t.__clearPress()},e.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(n){var t=this,e=this.config;if(this.dbIntrvalId){this.__clearDb(),this.trigger(Me.DOUBlE_CLICK,n);return}this.dbIntrvalId=setTimeout(function(){t.__clearDb(),!t._pos.start&&!t._pos.press&&!t._pos.moving&&t.trigger(Me.CLICK,n)},e.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(n,t){this.__handlers[n]||(this.__handlers[n]=[]),this.__handlers[n].push(t)}},{key:"off",value:function(n,t){if(this.__handlers[n]){for(var e=this.__handlers[n],i=-1,r=0;r<e.length;r++)if(e[r]===t){i=r;break}i>=0&&this.__handlers[n].splice(i,1)}}},{key:"trigger",value:function(n,t){this.__handlers[n]&&this.__handlers[n].map(function(e){try{e(t)}catch(i){console.error("trigger>>:".concat(n),i)}})}},{key:"destroy",value:function(){var n=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Object.keys(t).forEach(function(e){n.root.removeEventListener(e,n[t[e]])})}}]),o}();function Ac(){return new DOMParser().parseFromString(`<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"
106  xmlns:xlink="http://www.w3.org/1999/xlink">
107  <path opacity="0.54"
108    d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"
109    fill="white" />
110  <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>
111</svg>`,"image/svg+xml").firstChild}var qe={AUTO:"auto",SEEKING:"seeking",PLAYBACK:"playbackrate"},Jt=["videoClick","videoDbClick"],Dc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"onTouchStart",function(i){var r=_(e),a=r.player,l=r.config,u=r.pos,c=r.playerConfig,f=e.getTouche(i);if(f&&!l.disableGesture&&e.duration>0&&!a.ended){u.isStart=!0,e.timer&&clearTimeout(e.timer),h.checkIsFunction(c.disableSwipeHandler)&&c.disableSwipeHandler(),e.find(".xg-dur").innerHTML=h.format(e.duration);var d=e.root.getBoundingClientRect();a.rotateDeg===90?(u.top=d.left,u.left=d.top,u.width=d.height,u.height=d.width):(u.top=d.top,u.left=d.left,u.width=d.width,u.height=d.height);var g=parseInt(f.pageX-u.left,10),p=parseInt(f.pageY-u.top,10);u.x=a.rotateDeg===90?p:g,u.y=a.rotateDeg===90?g:p,u.scopeL=l.scopeL*u.width,u.scopeR=(1-l.scopeR)*u.width,u.scopeM1=u.width*(1-l.scopeM)/2,u.scopeM2=u.width-u.scopeM1}}),C(_(e),"onTouchMove",function(i){var r=e.getTouche(i),a=_(e),l=a.pos,u=a.config,c=a.player;if(!(!r||u.disableGesture||!e.duration||!l.isStart)){var f=u.miniMoveStep,d=u.hideControlsActive,g=parseInt(r.pageX-l.left,10),p=parseInt(r.pageY-l.top,10),k=c.rotateDeg===90?p:g,y=c.rotateDeg===90?g:p;if(Math.abs(k-l.x)>f||Math.abs(y-l.y)>f){var I=k-l.x,x=y-l.y,P=l.scope;if(P===-1&&(P=e.checkScope(k,y,I,x,l),P===0&&(d?c.blur():c.focus({autoHide:!1}),!l.time&&(l.time=parseInt(c.currentTime*1e3,10)+e.timeOffset*1e3)),l.scope=P),P===-1||P>0&&!u.gestureY||P===0&&!u.gestureX)return;e.executeMove(I,x,P,l.width,l.height),l.x=k,l.y=y}}}),C(_(e),"onTouchEnd",function(i){var r=_(e),a=r.player,l=r.pos,u=r.playerConfig;if(setTimeout(function(){a.getPlugin("progress")&&a.getPlugin("progress").resetSeekState()},10),!!l.isStart){l.scope>-1&&i.cancelable&&i.preventDefault();var c=e.config,f=c.disableGesture,d=c.gestureX;!f&&d?e.endLastMove(l.scope):l.time=0,l.scope=-1,e.resetPos(),h.checkIsFunction(u.enableSwipeHandler)&&u.enableSwipeHandler(),e.changeAction(qe.AUTO)}}),C(_(e),"onRootTouchMove",function(i){e.config.disableGesture||!e.config.gestureX||e.checkIsRootTarget(i)&&(i.stopPropagation(),e.pos.isStart?e.onTouchMove(i):e.onTouchStart(i))}),C(_(e),"onRootTouchEnd",function(i){e.pos.scope>-1&&e.onTouchEnd(i)}),e.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},e.timer=null,e}return O(n,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:Ac,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e=this;Jt.map(function(d){e.__hooks[d]=null});var i=this.playerConfig,r=this.config,a=this.player;i.closeVideoDblclick===!0&&(r.closedbClick=!0),this.resetPos(),h.isUndefined(i.disableGesture)||(r.disableGesture=!!i.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=h.createDom("xg-mask","",{},"xgmask"),a.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var l=this.domEventType==="mouse"?"mouse":"touch";this.touch=new Lc(this.root,{eventType:l,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",function(d){d.preventDefault()}),a.root.addEventListener("touchmove",this.onRootTouchMove,!0),a.root.addEventListener("touchend",this.onRootTouchEnd,!0),a.root.addEventListener("touchcancel",this.onRootTouchEnd,!0);var u=this.player.controls;u&&u.center&&(u.center.addEventListener("touchmove",this.onRootTouchMove,!0),u.center.addEventListener("touchend",this.onRootTouchEnd,!0),u.center.addEventListener("touchcancel",this.onRootTouchEnd,!0)),this.on(De,function(){var d=e.player,g=e.config;d.duration>0&&d.duration*1e3<g.moveDuration&&(g.moveDuration=d.duration*1e3)}),this.on([Pe,We],function(){var d=e.pos,g=d.time,p=d.isStart;!p&&g>0&&(e.pos.time=0)});var c={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Object.keys(c).map(function(d){e.touch.on(d,function(g){e[c[d]](g)})}),!r.disableActive){var f=a.plugins.progress;f&&(f.addCallBack("dragmove",function(d){e.activeSeekNote(d.currentTime,d.forward)}),["dragend","click"].forEach(function(d){f.addCallBack(d,function(){e.changeAction(qe.AUTO)})}))}}},{key:"registerThumbnail",value:function(){var e=this.player,i=e.plugins.thumbnail;if(i&&i.usable){this.thumbnail=i.createThumbnail(null,"mobile-thumbnail");var r=this.find(".time-preview");r.insertBefore(this.thumbnail,r.children[0])}}},{key:"initCustomStyle",value:function(){var e=this.playerConfig||{},i=e.commonStyle,r=i.playedColor,a=i.progressColor,l=i.timePreviewStyle,u=i.curTimeColor,c=i.durationColor;if(r&&(this.find(".xg-curbar").style.backgroundColor=r),a&&(this.find(".xg-bar").style.backgroundColor=a),l){var f=this.find(".time-preview");Object.keys(l).forEach(function(p){f.style[p]=l[p]})}var d=u||r,g=c;d&&(this.find(".xg-cur").style.color=d),g&&(this.find(".xg-dur").style.color=g),this.config.disableTimeProgress&&h.addClass(this.find(".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"].map(function(i){e.pos[i]=0})):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var i=this.player,r=this.root;r.setAttribute("data-xg-action",e);var a=i.plugins.start;a&&a.recover()}},{key:"getTouche",value:function(e){var i=this.player.rotateDeg,r=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return i===0?{pageX:r.pageX,pageY:r.pageY}:{pageX:r.pageX,pageY:r.pageY}}},{key:"checkScope",value:function(e,i,r,a,l){var u=l.width,c=-1;if(e<0||e>u)return c;var f=Math.abs(a===0?r:r/a);return Math.abs(r)>0&&f>=1.73&&e>l.scopeM1&&e<l.scopeM2?c=0:(Math.abs(r)===0||f<=.57)&&(c=e<l.scopeL?1:e>l.scopeR?2:3),c}},{key:"executeMove",value:function(e,i,r,a,l){switch(r){case 0:this.updateTime(e/a*this.config.scopeM);break;case 1:this.updateBrightness(i/l);break;case 2:z.os.isIos||this.updateVolume(i/l);break}}},{key:"endLastMove",value:function(e){var i=this,r=this.pos,a=this.player,l=this.config,u=(r.time-this.timeOffset)/1e3;switch(e){case 0:a.seek(Number(u).toFixed(1)),l.hideControlsEnd?a.blur():a.focus(),this.timer=setTimeout(function(){i.pos.time=0},500);break}this.changeAction(qe.AUTO)}},{key:"checkIsRootTarget",value:function(e){var i=this.player.plugins||{};return i.progress&&i.progress.root.contains(e.target)?!1:i.start&&i.start.root.contains(e.target)||i.controls&&i.controls.root.contains(e.target)}},{key:"sendUseAction",value:function(e){var i=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:i,to:!i})}},{key:"clickHandler",value:function(e){var i=this.player,r=this.config,a=this.playerConfig;if(i.state<q.RUNNING){a.closeVideoClick||(this.sendUseAction(h.createEvent("click")),i.play());return}!r.closedbClick||a.closeVideoClick?i.isActive?i.blur():i.focus():a.closeVideoClick||((i.isActive||r.focusVideoClick)&&(this.sendUseAction(h.createEvent("click")),this.switchPlayPause()),i.focus())}},{key:"dbClickHandler",value:function(e){var i=this.config,r=this.player;!i.closedbClick&&r.state>=q.RUNNING&&(this.sendUseAction(h.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var i=this,r=this.player;Ce(this,Jt[0],function(a,l){i.clickHandler(l.e)},{e,paused:r.paused})}},{key:"onDbClick",value:function(e){var i=this,r=this.player;Ce(this,Jt[1],function(a,l){i.dbClickHandler(l.e)},{e,paused:r.paused})}},{key:"onPress",value:function(e){var i=this.pos,r=this.config,a=this.player;r.disablePress||(i.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:a.playbackRate,to:r.pressRate}),a.playbackRate=r.pressRate,this.changeAction(qe.PLAYBACK))}},{key:"onPressEnd",value:function(e){var i=this.pos,r=this.config,a=this.player;r.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:a.playbackRate,to:i.rate}),a.playbackRate=i.rate,i.rate=1,this.changeAction(qe.AUTO))}},{key:"updateTime",value:function(e){var i=this.player,r=this.config,a=this.player.duration;e=Number(e.toFixed(4));var l=parseInt(e*r.moveDuration,10)+this.timeOffset;l+=this.pos.time,l=l<0?0:l>a*1e3?a*1e3-200:l,i.getPlugin("time")&&i.getPlugin("time").updateTime(l/1e3),i.getPlugin("progress")&&i.getPlugin("progress").updatePercent(l/1e3/this.duration,!0),this.activeSeekNote(l/1e3,e>0),r.isTouchingSeek&&i.seek(Number((l-this.timeOffset)/1e3).toFixed(1)),this.pos.time=l}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var i=this.player,r=this.pos;if(e=parseInt(e*100,10),r.volume+=e,!(Math.abs(r.volume)<10)){var a=parseInt(i.volume*10,10)-parseInt(r.volume/10,10);a=a>10?10:a<1?0:a,i.volume=a/10,r.volume=0}}},{key:"updateBrightness",value:function(e){var i=this.pos,r=this.config,a=this.xgMask;if(r.darkness){this.player.rotateDeg&&(e=-e);var l=i.light+.8*e;l=l>r.maxDarkness?r.maxDarkness:l<0?0:l,a&&(a.style.backgroundColor="rgba(0,0,0,".concat(l,")")),i.light=l}}},{key:"activeSeekNote",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.player,a=this.config,l=!(this.duration!==1/0&&this.duration>0);if(!(!e||typeof e!="number"||l||a.disableActive)){e<0?e=0:e>r.duration&&(e=r.duration-.2),this.changeAction(qe.SEEKING);var u=r.plugins.start;u&&u.focusHide(),this.find(".xg-dur").innerHTML=h.format(this.duration),this.find(".xg-cur").innerHTML=h.format(e),this.find(".xg-curbar").style.width="".concat(e/this.duration*100,"%"),i?h.removeClass(this.find(".xg-seek-show"),"xg-back"):h.addClass(this.find(".xg-seek-show"),"xg-back"),this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var i=this.player,r=i.plugins.thumbnail;r&&r.usable&&this.thumbnail&&r.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<q.ATTACHED)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!0}},{key:"enableGesture",value:function(){this.config.disableGesture=!1}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0),e.root.removeEventListener("touchcancel",this.onRootTouchEnd,!0);var i=this.player.controls;i&&i.center&&(i.center.removeEventListener("touchmove",this.onRootTouchMove,!0),i.center.removeEventListener("touchend",this.onRootTouchEnd,!0),i.center.removeEventListener("touchcancel",this.onRootTouchEnd,!0))}},{key:"render",value:function(){var e=this.config.gradient!=="normal"?"gradient ".concat(this.config.gradient):"gradient";return`
112     <xg-trigger class="trigger">
113     <div class="`.concat(e,`"></div>
114        <div class="time-preview">
115            <div class="xg-seek-show `).concat(this.config.disableSeekIcon?" hide-seek-icon":"",`">
116              <i class="xg-seek-icon"></i>
117              <span class="xg-cur">00:00</span>
118              <span class="xg-separator">/</span>
119              <span class="xg-dur">00:00</span>
120            </div>
121              <div class="xg-bar xg-timebar">
122                <div class="xg-curbar"></div>
123              </div>
124        </div>
125        <div class="xg-playbackrate xg-top-note">
126            <span><i>`).concat(this.config.pressRate,"X</i>").concat(this.i18n.FORWARD,`</span>
127        </div>
128     </xg-trigger>
129    `)}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:60*6*1e3,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),n}(Z);function Oc(o){o.preventDefault(),o.returnValue=!1}function cn(o){var s=o.tagName;return!!(s==="INPUT"||s==="TEXTAREA"||o.isContentEditable)}var fn=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onBodyKeyDown",function(a){if(t.player){var l=a||window.event,u=l.keyCode,c=_(t),f=c._keyState,d=c.player,g=t.config,p=g.disable,k=g.disableBodyTrigger,y=g.isIgnoreUserActive;if(p||k||!(d.isUserActive||y)||cn(l.target)||!t.checkIsVisible()||l.metaKey||l.altKey||l.ctrlKey){f.isBodyKeyDown=!1;return}!a.repeat&&!f.isKeyDown&&((l.target===document.body||t.config.isGlobalTrigger&&!cn(l.target))&&t.checkCode(u,!0)&&(f.isBodyKeyDown=!0),document.addEventListener("keyup",t.onBodyKeyUp)),f.isBodyKeyDown&&t.handleKeyDown(l)}}),C(_(t),"onBodyKeyUp",function(a){t.player&&(document.removeEventListener("keyup",t.onBodyKeyUp),t.handleKeyUp(a))}),C(_(t),"onKeydown",function(a){if(t.player){var l=a||window.event,u=_(t),c=u._keyState;if(!l.repeat){if(t.config.disable||t.config.disableRootTrigger||l.metaKey||l.altKey||l.ctrlKey)return;l&&(l.keyCode===37||t.checkCode(l.keyCode))&&(l.target===t.player.root||l.target===t.player.video||l.target===t.player.controls.el)&&(c.isKeyDown=!0),t.player.root.addEventListener("keyup",t.onKeyup)}c.isKeyDown&&t.handleKeyDown(l)}}),C(_(t),"onKeyup",function(a){t.player&&(t.player.root.removeEventListener("keyup",t.onKeyup),t.handleKeyUp(a))}),t}return O(n,[{key:"mergekeyCodeMap",value:function(){var e=this,i=this.config.keyCodeMap;i&&Object.keys(i).map(function(r){e.keyCodeMap[r]?["keyCode","action","disable","pressAction","disablePress","isBodyTarget"].map(function(a){i[r][a]&&(e.keyCodeMap[r][a]=i[r][a])}):e.keyCodeMap[r]=i[r]})}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e=typeof this.config.seekStep=="function"?this.config.seekStep(this.player):this.config.seekStep;!e||typeof e!="number"||(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,disablePress:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,disablePress:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,disablePress:!1,noBodyTarget:!0}
129,left:{keyCode:37,action:"seekBack",disablePress:!1,disable:!1},right:{keyCode:39,action:"seek",pressAction:"changePlaybackRate",disablePress:!1,disable:!1},esc:{keyCode:27,action:"exitFullscreen",disablePress:!0,disable:!1}},this.mergekeyCodeMap(),this._keyState={isKeyDown:!1,isBodyKeyDown:!1,isPress:!1,tt:0,playbackRate:0},this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"setConfig",value:function(e){var i=this;Object.keys(e).forEach(function(r){i.config[r]=e[r]})}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),i=e.height,r=e.top,a=e.bottom,l=window.innerHeight;return!(r<0&&r<0-i*.9||a>0&&a-l>i*.9)}},{key:"checkCode",value:function(e,i){var r=this,a=!1;return Object.keys(this.keyCodeMap).map(function(l){r.keyCodeMap[l]&&e===r.keyCodeMap[l].keyCode&&!r.keyCodeMap[l].disable&&(a=!i||i&&!r.keyCodeMap[l].noBodyTarget)}),a}},{key:"downVolume",value:function(e){var i=this.player;if(!(i.volume<=0)){var r=parseFloat((i.volume-.1).toFixed(1)),a={volume:{from:i.volume,to:r}};this.emitUserAction(e,"change_volume",{props:a}),r>=0?i.volume=r:i.volume=0}}},{key:"upVolume",value:function(e){var i=this.player;if(!(i.volume>=1)){var r=parseFloat((i.volume+.1).toFixed(1)),a={volume:{from:i.volume,to:r}};this.emitUserAction(e,"change_volume",{props:a}),r<=1?i.volume=r:i.volume=1}}},{key:"seek",value:function(e){var i=this.player,r=i.currentTime,a=i.offsetCurrentTime,l=i.duration,u=i.offsetDuration,c=i.timeSegments,f=a>-1?a:r,d=u||l,g=e.repeat&&this.seekStep>=4?parseInt(this.seekStep/2,10):this.seekStep;f+g<=d?f=f+g:f=d;var p=h.getCurrentTimeByOffset(f,c),k={currentTime:{from:r,to:p}};this.emitUserAction(e,"seek",{props:k}),this.player.currentTime=p}},{key:"seekBack",value:function(e){var i=this.player,r=i.currentTime,a=i.offsetCurrentTime,l=i.timeSegments,u=e.repeat?parseInt(this.seekStep/2,10):this.seekStep,c=a>-1?a:r,f=c-u;f<0&&(f=0),f=h.getCurrentTimeByOffset(f,l);var d={currentTime:{from:r,to:f}};this.emitUserAction(e,"seek",{props:d}),this.player.currentTime=f}},{key:"changePlaybackRate",value:function(e){var i=this._keyState,r=this.config,a=this.player;i.playbackRate===0&&(i.playbackRate=a.playbackRate,a.playbackRate=r.playbackRate)}},{key:"playPause",value:function(e){var i=this.player;i&&(this.emitUserAction(e,"switch_play_pause"),i.paused?i.play():i.pause())}},{key:"exitFullscreen",value:function(e){var i=this.player,r=i.fullscreen,a=i.cssfullscreen;r&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:r,to:!r}),i.exitFullscreen()),a&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:a,to:!a}),i.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var i=this._keyState;if(e.repeat){i.isPress=!0;var r=Date.now();if(r-i.tt<200)return;i.tt=r}this.handleKeyCode(e.keyCode,e,i.isPress)}},{key:"handleKeyUp",value:function(e){var i=this._keyState;i.playbackRate>0&&(this.player.playbackRate=i.playbackRate,i.playbackRate=0),i.isKeyDown=!1,i.isPress=!1,i.tt=0}},{key:"handleKeyCode",value:function(e,i,r){for(var a=Object.keys(this.keyCodeMap),l=0;l<a.length;l++){var u=this.keyCodeMap[a[l]],c=u.action,f=u.keyCode,d=u.disable,g=u.pressAction,p=u.disablePress;if(f===e){if(!d&&!(r&&p)){var k=r&&g||c;typeof k=="function"?c(i,this.player,r):typeof k=="string"&&typeof this[k]=="function"&&this[k](i,this.player,r),this.emit($n,ne({key:a[l],target:i.target,isPress:r},this.keyCodeMap[a[l]]))}Oc(i),i.stopPropagation();break}}}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown),this.player.root.removeEventListener("keyup",this.onKeyup),document.removeEventListener("keyup",this.onBodyKeyUp)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!1,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!0,keyCodeMap:{},disable:!1,playbackRate:2,isIgnoreUserActive:!0}}}]),n}(Be);function Rc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewB
129ox="-5 -5 110 110">
130  <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>
131</svg>
132`,"image/svg+xml").firstChild}var Mc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"registerIcons",value:function(){return{loadingIcon:Rc}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return`
133    <xg-loading class="xgplayer-loading">
134      <xg-loading-inner></xg-loading-inner>
135    </xg-loading>`}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:te.ROOT}}}]),n}(Z),Nc=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"_onDurationChange",function(){t.updateSegments();var a=t.player,l=a.currentTime,u=a.timeSegments;if(t._checkIfEnabled(u)){var c=h.getIndexByTime(l,u),f=h.getOffsetCurrentTime(l,u,c);t.player.offsetCurrentTime=f,t.changeIndex(c,u)}}),C(_(t),"_onLoadedData",function(){var a=t.player.timeSegments;if(t._checkIfEnabled(a)){var l=h.getOffsetCurrentTime(0,a);t.player.offsetCurrentTime=l,t.changeIndex(0,a),t.curPos.start>0&&(t.player.currentTime=t.curPos.start)}}),C(_(t),"_onTimeupdate",function(){var a=t.player,l=a.currentTime,u=a.timeSegments;if(t._checkIfEnabled(u)){var c=u.length;t.lastCurrentTime=l;var f=h.getIndexByTime(l,u);f!==t.curIndex&&t.changeIndex(f,u);var d=h.getOffsetCurrentTime(l,u,f);if(t.player.offsetCurrentTime=d,!!t.curPos){var g=t.curPos,p=g.start,k=g.end;l<p?t.player.currentTime=p:l>k&&f>=c-1&&t.player.pause()}}}),C(_(t),"_onSeeking",function(){var a=t.player,l=a.currentTime,u=a.timeSegments;if(t._checkIfEnabled(u))if(l<u[0].start)t.player.currentTime=u[0].start;else if(l>u[u.length-1].end)t.player.currentTime=u[u.length-1].end;else{var c=h.getIndexByTime(l,u);if(c>=0){var f=t.getSeekTime(l,t.lastCurrentTime,c,u);f>=0&&(t.player.currentTime=f)}}}),C(_(t),"_onPlay",function(){var a=t.player,l=a.currentTime,u=a.timeSegments;t._checkIfEnabled(u)&&l>=u[u.length-1].end&&(t.player.currentTime=u[0].start)}),t}return O(n,[{key:"afterCreate",value:function(){this.curIndex=-1,this.curPos=null,this.lastCurrentTime=0,this.updateSegments(),this.on(De,this._onDurationChange),this.on(Le,this._onLoadedData),this.on(ge,this._onTimeupdate),this.on(Ot,this._onSeeking),this.on(pe,this._onPlay)}},{key:"setConfig",value:function(e){var i=this;if(e){var r=Object.keys(e);r.length<1||(r.forEach(function(a){i.config[a]=e[a]}),this.updateSegments())}}},{key:"updateSegments",value:function(){var e=this.config,i=e.disable,r=e.segments,a=this.player;if(i||!r||r.length===0)a.timeSegments=[],a.offsetDuration=0,a.offsetCurrentTime=-1;else{var l=this.formatTimeSegments(r,a.duration);a.timeSegments=l,a.offsetDuration=l.length>0?l[l.length-1].duration:0}}},{key:"formatTimeSegments",value:function(e,i){var r=[];return e?(e.sort(function(a,l){return a.start-l.start}),e.forEach(function(a,l){var u={};if(u.start=a.start<0?0:a.start,u.end=i>0&&a.end>i?i:a.end,!(i>0&&u.start>i)){r.push(u);var c=u.end-u.start;if(l===0)u.offset=a.start,u.cTime=0,u.segDuration=c,u.duration=c;else{var f=r[l-1];u.offset=f.offset+(u.start-f.end),u.cTime=f.duration+f.cTime,u.segDuration=c,u.duration=f.duration+c}}}),r):[]}},{key:"getSeekTime",value:function(e,i,r,a){var l=-1,u=a[r],c=u.start,f=u.end;if(e>=c&&e<=f)return l;var d=e-i;if(d<0&&e<c){var g=i>c?i-c:0;return l=r-1>=0?a[r-1].end+d+g:0,l}return-1}},{key:"_checkIfEnabled",value:function(e){return!(!e||e.length<1)}},{key:"changeIndex",value:function(e,i){this.curIndex=e,e>=0&&i.length>0?this.curPos=i[e]:this.curPos=null}}],[{key:"pluginName",get:function(){return"TimeSegmentsControls"}},{key:"defaultConfig",get:function(){return{disable:!0,segments:[]}}}]),n}(Be);function Fc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">
136  <g>
137    <path transform="scale(1.5 1.5)" d="M11.6665 9.16663H4.1665C2.78579 9.16663 1.6665 10.2859 1.6665 11.6666V15.8333C1.6665 17.214 2.78579 18.3333 4.1665 18.3333H11.6665C13.0472 18.3333 14.1665 17.214 14.1665 15.8333V11.6666C14.1665 10.2859 13.0472 9.16663 11.6665 9.16663Z" fill="white"/>
138    <path transform="scale(1.5 1.5)" fill-rule="evenodd" clip-rule="evenodd" d="M3.88148 4.06298C3.75371 4.21005 3.67667 4.40231 3.67749 4.61242C3.67847 4.87253 3.79852 5.10435 3.98581 5.25646L6.99111 8.05895C7.32771 8.37283 7.85502 8.35443 8.16891 8.01782C8.48279 7.68122 8.46437 7.15391 8.12778 6.84003L6.62061 5.43457L9.8198 5.4224C9.82848 5.42239 9.8372 5.42221 9.84591 5.4219C10.9714 5.38233 12.0885 5.6285 13.0931 6.13744C14.0976 6.64635 14.957 7.40148 15.5908 8.33234C16.2246 9.2632 16.6122 10.3394 16.7177 11.4606C16.823 12.5819 16.6427 13.7115 16.1934 14.7442C16.0098 15.1661 16.203 15.6571 16.6251 15.8408C17.0471 16.0243 17.5381 15.8311 17.7216 15.4091C18.2833 14.1183 18.5087 12.7063 18.3771 11.3047C18.2453 9.90318 17.7607 8.55792 16.9684 7.39433C16.1761 6.23073 15.1021 5.28683 13.8463 4.65065C12.5946 4.01651 11.203 3.70872 9.80072 3.75583L6.43415 3.76862L7.96326 2.12885C8.27715 1.79225 8.25872 1.26494 7.92213 
1380.951061C7.58553 0.63718 7.05822 0.655585 6.74433 0.99219L3.90268 4.0395C3.89545 4.04724 3.88841 4.05509 3.88154 4.06303L3.88148 4.06298Z" fill="white"/>
139  </g>
140  <defs>
141    <clipPath>
142      <rect width="40" height="40" fill="white"/>
143    </clipPath>
144  </defs>
145</svg>
146`,"image/svg+xml").firstChild}var Hc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),e.rotateDeg=e.config.rotateDeg||0,e}return O(n,[{key:"afterCreate",value:function(){var e=this;if(!this.config.disable){U($(n.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.rotate),this.onBtnClick=this.onBtnClick.bind(this),this.bind(".xgplayer-icon",["click","touchend"],this.onBtnClick),this.on(He,function(){e.rotateDeg&&e.config.innerRotate&&h.setTimeout(e,function(){e.updateRotateDeg(e.rotateDeg,e.config.innerRotate)},100)});var i=this.player.root;this.rootWidth=i.style.width||i.offsetWidth||i.clientWidth,this.rootHeight=i.style.height||i.offsetHeight||i.clientHeight,this.rotateDeg&&this.updateRotateDeg(this.rotateDeg,this.config.innerRotate)}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon",["click","touchend"],this.onBtnClick)}},{key:"onBtnClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"rotate"),this.rotate(this.config.clockwise,this.config.innerRotate,1)}},{key:"updateRotateDeg",value:function(e,i){if(e||(e=0),i){this.player.videoRotateDeg=e;return}var r=this.player,a=this.rootWidth,l=this.rootHeight,u=r.root,c=r.innerContainer,f=r.media,d=u.offsetWidth,g=c&&i?c.offsetHeight:u.offsetHeight,p=a,k=l,y=0,I=0;(e===.75||e===.25)&&(p="".concat(g,"px"),k="".concat(d,"px"),y=-(g-d)/2,I=-(d-g)/2);var x="translate(".concat(y,"px,").concat(I,"px) rotate(").concat(e,"turn)"),P={transformOrigin:"center center",transform:x,webKitTransform:x,height:k,width:p},G=i?f:u,V=i?r.getPlugin("poster"):null;Object.keys(P).map(function(ee){G.style[ee]=P[ee],V&&V.root&&(V.root.style[ee]=P[ee])})}},{key:"rotate",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=this.player;this.rotateDeg||(this.rotateDeg=0);var l=e?1:-1;this.rotateDeg=(this.rotateDeg+1+l*.25*r)%1,this.updateRotateDeg(this.rotateDeg,i),a.emit(Hn,this.rotateDeg*360)}},{key:"registerIcons",value:function(){return{rotate:Fc}}},{key:"render",value:function(){if(!this.config.disable)return`
147    <xg-icon class="xgplayer-rotate">
148      <div class="xgplayer-icon">
149      </div>
150      `.concat($e(this,"ROTATE_TIPS",this.playerConfig.isHideTips),`
151    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"rotate"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:6,innerRotate:!0,clockwise:!1,rotateDeg:0,disable:!1}}}]),n}(Ye);function Bc(){return new DOMParser().parseFromString(`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
152  <path fill-rule="evenodd" clip-rule="evenodd"
153    d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"
154    fill="white" />
155</svg>`,"image/svg+xml").firstChild}function $c(){return new DOMParser().parseFromString(`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
156  <path fill-rule="evenodd" clip-rule="evenodd"
157    d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"
158    fill="white" />
159  <path fill-rule="evenodd" clip-rule="evenodd"
160    d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"
161    fill="white" />
162</svg>`,"image/svg+xml").firstChild}var Je={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"},Vc=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"switchPIP",function(a){if
162(!t.isPIPAvailable())return!1;a.stopPropagation&&a.stopPropagation(),t.isPip?(t.exitPIP(),t.emitUserAction(a,"change_pip",{props:"pip",from:!0,to:!1}),t.setAttr("data-state","normal")):t.player.media.readyState===4&&(t.requestPIP(),t.emitUserAction(a,"change_pip",{props:"pip",from:!1,to:!0}),t.setAttr("data-state","pip"))}),t}return O(n,[{key:"beforeCreate",value:function(e){typeof e.player.config.pip=="boolean"&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(U($(n.prototype),"afterCreate",this).call(this),this.pMode=Je.INLINE,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(Rt,function(){e.config.showIcon&&(h.removeClass(e.find(".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))}))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:Bc,class:"xg-get-pip"},pipIconExit:{icon:$c,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,i=this.player;this.leavePIPCallback=function(){var r=i.paused;h.setTimeout(e,function(){!r&&i.mediaPlay()},0),!r&&i.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,i.emit(fi,!1)},this.enterPIPCallback=function(r){i.emit(fi,!0),r!=null&&r.pictureInPictureWindow&&(e.pipWindow=r.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(r){var a=i.media.webkitPresentationMode;e.pMode===Je.FULLSCREEN&&a!==Je.FULLSCREEN&&i.onFullscreenChange(null,!1),e.pMode=a,a===Je.PIP?e.enterPIPCallback(r):a===Je.INLINE&&e.leavePIPCallback(r)},i.media&&(i.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),i.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(i.media)&&i.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"copyStyleIntoPiPWindow",value:function(e){var i=_e(document.styleSheets).map(function(a){try{return _e(a.cssRules).map(function(u){return u.cssText}).join("")}catch{var l=document.createElement("link");l.rel="stylesheet",l.type=a.type,l.media=a.media,l.href=a.href,e.document.head.appendChild(l)}return""}).filter(Boolean).join(`
163`),r=document.createElement("style");r.textContent=i,e.document.head.appendChild(r)}},{key:"requestPIP",value:function(){var e=this,i=this.player,r=this.playerConfig,a=this.config;if(!(!this.isPIPAvailable()||this.isPip))try{var l=r.poster;if(l&&(i.media.poster=h.typeOf(l)==="String"?l:l.poster),a.preferDocument&&this.isDocPIPAvailable()){var u={};if(a.width&&a.height)u.width=a.width,u.height=a.height;else{var c=i.root.getBoundingClientRect();u.width=c.width,u.height=c.height}documentPictureInPicture.requestWindow(u).then(function(f){var d=a.docPiPNode,g=a.docPiPStyle;e.enterPIPCallback();var p=d||i.root,k=p.parentElement,y=p.previousSibling,I=p.nextSibling;e.copyStyleIntoPiPWindow(f);var x=document.createElement("style");if(x.append("body{padding:0; margin:0;}"),g){var P="";typeof g=="string"?P=g:typeof g=="function"&&(P=g.call(a)),P&&x.append(P)}else p===i.root&&x.append(`
164              .xgplayer{width: 100%!important; height: 100%!important;}
165            `);f.document.head.append(x),f.document.body.append(p),f.addEventListener("pagehide",function(G){k&&(I?k.insertBefore(p,I):y?k.insertBefore(p,y.nextSibling):k.appendChild(p)),e.leavePIPCallback()},{once:!0})})}else n.checkWebkitSetPresentationMode(i.media)?i.media.webkitSetPresentationMode("picture-in-picture"):i.media.requestPictureInPicture();return!0}catch(f){return console.error("requestPiP",f),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{if(this.isPIPAvailable()&&this.isPip){var i;this.isDocPIPAvailable()&&(i=documentPictureInPicture)!==null&&i!==void 0&&i.window?documentPictureInPicture.window.close():n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture()}return!0}catch(r){return console.error("exitPIP",r),!1}}},{key:"isPip",get:function(){var e,i=this.player;return!!(this.isDocPIPAvailable()&&(e=documentPictureInPicture)!==null&&e!==void 0&&e.window)||document.pictureInPictureElement&&document.pictureInPictureElement===i.media||i.media.webkitPresentationMode===Je.PIP}},{key:"isPIPAvailable",value:function(){var e=this.player.media,i=h.typeOf(document.pictureInPictureEnabled)==="Boolean"?document.pictureInPictureEnabled:!1;return i&&(h.typeOf(e.disablePictureInPicture)==="Boolean"&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&h.typeOf(e.webkitSetPresentationMode)==="Function")||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(!(!this.config.showIcon||!this.isPIPAvailable()))return`<xg-icon class="xgplayer-pip">
166      <div class="xgplayer-icon xg-icon-disable">
167      </div>
168      `.concat($e(this,"PIP",this.playerConfig.isHideTips),`
169    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:6,showIcon:!1,preferDocument:!1,width:void 0,height:void 0,docPiPNode:void 0,docPiPStyle:void 0}}},{key:"checkWebkitSetPresentationMode",value:function(e){return typeof e.webkitSetPresentationMode=="function"}}]),n}(Ye);function Uc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="40" viewBox="10 0 24 40">
170  <path transform="scale(0.038 0.028)" d="M800 380v768h-128v-352l-320 320v-704l320 320v-352z"></path>
171</svg>
172`,"image/svg+xml").firstChild}var jc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"playNext",function(i){var r=_(e),a=r.player;i.preventDefault(),i.stopPropagation(),e.idx+1<e.config.urlList.length?(e.idx++,e.nextHandler(e.config.urlList[e.idx],e.idx),a.emit(bt,e.idx+1)):(e.nextHandler(),a.emit(bt))}),e.idx=-1,e}return O(n,[{key:"afterCreate",value:function(){!this.config.urlList||this.config.urlList.length===0||(this.appendChild(".xgplayer-icon",this.icons.playNext),this.initEvents())}},{key:"registerIcons",value:function(){return{playNext:Uc}}},{key:"initEvents",value:function(){this.nextHandler=this.hook("nextClick",this.changeSrc);var e=z.device==="mobile"?"touchend":"click";this.bind(e,this.playNext),this.show()}},{key:"changeSrc",value:function(e){var i=this.player;e&&(i.pause(),i.currentTime=0,i.switchURL?i.switchURL(e):i.src=e,i.config.url=e,i.play())}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.playNext)}},{key:"render",value:function(){if(!(!this.config.urlList||this.config.urlList.length===0))return`
173     <xg-icon class="xgplayer-playnext">
174      <div class="xgplayer-icon">
175      </div>
176      `.concat($e(this,"PLAYNEXT_TIPS",this.playerConfig.isHideTips),`
177     </xg-icon>
178    `)}}],[{key:"pluginName",get:function(){return"playNext"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_LEFT,index:1,url:null,urlList:[]}}}]),n}(Z),rr={exports:{}};(function(o,s){(function(n,t){o.exports=t()})(du,function(){return function n(t,e,i){var r=window,a="application/octet-stream",l=i||a,u=t,c=!e&&!i&&u,f=document.createElement("a"),d=function(X){return String(X)},g=r.Blob||r.MozBlob||r.WebKitBlob||d,p=e||"download",k,y;if(g=g.call?g.bind(r):Blob,String(this)==="true"&&(u=[u,l],l=u[0],u=u[1]),c&&c.length<2048&&(p=c.split("/").pop().split("?")[0],f.href=c,f.href.indexOf(c)!==-1)){var I=new XMLHttpRequest;return I.open("GET",c,!0),I.responseType="blob",I.onload=function(X){n(X.target.response,p,a)},setTimeout(function(){I.send()},0),I}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))if(u.length>1024*1024*1.999&&g!==d)u=V(u),l=u.type||a;else return navigator.msSaveBlob?navigator.msSaveBlob(V(u),p):ee(u);else if(/([\x80-\xff])/.test(u)){var x=0,P=new Uint8Array(u.length),G=P.length;for(x;x<G;++x)P[x]=u.charCodeAt(x);
178u=new g([P],{type:l})}k=u instanceof g?u:new g([u],{type:l});function V(X){var se=X.split(/[:;,]/),re=se[1],W=se[2]=="base64"?atob:decodeURIComponent,he=W(se.pop()),ve=he.length,me=0,Ve=new Uint8Array(ve);for(me;me<ve;++me)Ve[me]=he.charCodeAt(me);return new g([Ve],{type:re})}function ee(X,se){if("download"in f)return f.href=X,f.setAttribute("download",p),f.className="download-js-link",f.innerHTML="downloading...",f.style.display="none",document.body.appendChild(f),setTimeout(function(){f.click(),document.body.removeChild(f),se===!0&&setTimeout(function(){r.URL.revokeObjectURL(f.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(X)&&(X="data:"+X.replace(/^data:([\w\/\-\+]+)/,a)),window.open(X)||confirm(`Displaying New Document
179
180Use Save As... to download, then click back to return to this page.`)&&(location.href=X),!0;var re=document.createElement("iframe");document.body.appendChild(re),!se&&/^data:/.test(X)&&(X="data:"+X.replace(/^data:([\w\/\-\+]+)/,a)),re.src=X,setTimeout(function(){document.body.removeChild(re)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(k,p);if(r.URL)ee(r.URL.createObjectURL(k),!0);else{if(typeof k=="string"||k.constructor===d)try{return ee("data:"+l+";base64,"+r.btoa(k))}catch{return ee("data:"+l+","+encodeURIComponent(k))}y=new FileReader,y.onload=function(X){ee(this.result)},y.readAsDataURL(k)}return!0}})})(rr);var Gc=rr.exports;const zc=wi(Gc);function Wc(){return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">
181  <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
182    <g transform="translate(-488.000000, -340.000000)" fill="#FFFFFF">
183      <g id="Group-2">
184        <g id="volme_big-copy" transform="translate(488.000000, 340.000000)">
185          <rect id="Rectangle-18" x="11" y="4" width="2" height="12" rx="1"></rect>
186          <rect id="Rectangle-2" x="3" y="18" width="18" height="2" rx="1"></rect>
187          <rect id="Rectangle-2" transform="translate(4.000000, 17.500000) rotate(90.000000) translate(-4.000000, -17.500000) " x="1.5" y="16.5" width="5" height="2" rx="1"></rect><rect id="Rectangle-2-Copy-3" transform="translate(20.000000, 17.500000) rotate(90.000000) translate(-20.000000, -17.500000) " x="17.5" y="16.5" width="5" height="2" rx="1"></rect>
188          <path d="M9.48791171,8.26502656 L9.48791171,14.2650266 C9.48791171,14.8173113 9.04019646,15.2650266 8.48791171,15.2650266 C7.93562696,15.2650266 7.48791171,14.8173113 7.48791171,14.2650266 L7.48791171,7.26502656 C7.48791171,6.71274181 7.93562696,6.26502656 8.48791171,6.26502656 L15.4879117,6.26502656 C16.0401965,6.26502656 16.4879117,6.71274181 16.4879117,7.26502656 C16.4879117,7.81731131 16.0401965,8.26502656 15.4879117,8.26502656 L9.48791171,8.26502656 Z" id="Combined-Shape" transform="translate(11.987912, 10.765027) scale(1, -1) rotate(45.000000) translate(-11.987912, -10.765027) "></path>
189        </g>
190      </g>
191    </g>
192  </g>
193</svg>
194`,"image/svg+xml").firstChild}var Kc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"download",function(i){if(!e.isLock){e.emitUserAction(i,"download");var r=e.playerConfig.url,a="";h.typeOf(r)==="String"?a=r:h.typeOf(r)==="Array"&&r.length>0&&(a=r[0].src);var l=e.getAbsoluteURL(a);zc(l),e.isLock=!0,e.timer=window.setTimeout(function(){e.isLock=!1,window.clearTimeout(e.timer),e.timer=null},300)}}),e.timer=null,e.isLock=!1,e}return O(n,[{key:"afterCreate",value:function(){U($(n.prototype),"afterCreate",this).call(this),!this.config.disable&&(this.appendChild(".xgplayer-icon",this.icons.download),this._handler=this.hook("click",this.download,{pre:function(i){i.preventDefault(),i.stopPropagation()}}),this.bind(["click","touchend"],this._handler))}},{key:"registerIcons",value:function(){return{download:Wc}}},{key:"getAbsoluteURL",value:function(e){if(!e.match(/^https?:\/\//)){var i=document.createElement("div");i.innerHTML='<a href="'.concat(e,'">x</a>'),e=i.firstChild.href}return e}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.download),window.clearTimeout(this.timer),this.timer=null}},{key:"render",value:function(){if(!this.config.disable)return`<xg-icon class="xgplayer-download">
195   <div class="xgplayer-icon">
196   </div>
197   `.concat($e(this,"DOWNLOAD_TIPS",this.playerConfig.isHideTips),`
198    </xg-icon>`)}}],[{key:"pluginName",get:function(){return"download"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:3,disable:!0}}}]),n}
198(Ye),Yc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"beforeCreate",value:function(e){typeof e.player.config.screenShot=="boolean"&&(e.config.disable=!e.player.config.screenShot)}},{key:"afterCreate",value:function(){U($(n.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.screenshotIcon);var e=this.config;this.initSize=function(i){e.fitVideo&&(e.width=i.vWidth,e.height=i.vHeight)},this.once(He,this.initSize)}},{key:"onPluginsReady",value:function(){this.show(),this.onClickBtn=this.onClickBtn.bind(this),this.bind(["click","touchend"],this.onClickBtn)}},{key:"saveScreenShot",value:function(e,i){var r=document.createElement("a");r.href=e,r.download=i;var a;try{typeof MouseEvent<"u"?a=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}):(a=document.createEvent("MouseEvents"),a.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null))}catch(l){console.error("MouseEvent unsupported",l)}a&&r.dispatchEvent(a)}},{key:"createCanvas",value:function(e,i){var r=document.createElement("canvas"),a=r.getContext("2d");this.canvasCtx=a,this.canvas=r,r.width=e||this.config.width,r.height=i||this.config.height,a.imageSmoothingEnabled=!0,a.imageSmoothingEnabled&&(a.imageSmoothingQuality="high")}},{key:"onClickBtn",value:function(e){var i=this;e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"shot");var r=this.config;this.shot(r.width,r.height).then(function(a){i.emit(Bn,a),r.saveImg&&i.saveScreenShot(a,r.name+r.format)})}},{key:"shot",value:function(e,i){var r=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{quality:.92,type:"image/png"},l=this.config,u=this.player,c=a.quality||l.quality,f=a.type||l.type;return new Promise(function(d,g){var p=null,k;if(u.media.canvas)p=u.media.canvas;else{r.canvas?(r.canvas.width=e||l.width,r.canvas.height=i||l.height):r.createCanvas(e,i),p=r.canvas,k=r.canvasCtx;var y=u.media.videoWidth/u.media.videoHeight,I=p.width/p.height,x=0,P=0,G=u.media.videoWidth,V=u.media.videoHeight,ee,X,se,re;y>I?(se=p.width,re=p.width/y,ee=0,X=Math.round((p.height-re)/2)):y===I?(se=p.width,re=p.height,ee=0,X=0):y<I&&(se=p.height*y,re=p.height,ee=Math.round((p.width-se)/2),X=0),k.drawImage(u.media,x,P,G,V,ee,X,se,re)}var W=p.toDataURL(f,c).replace(f,"image/octet-stream");W=W.replace(/^data:image\/[^;]+/,"data:application/octet-stream"),d(W)})}},{key:"registerIcons",value:function(){return{screenshotIcon:null}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.onClickBtn),this.off(He,this.initSize)}},{key:"render",value:function(){if(!this.config.disable){var e=this.icons.screenshotIcon?"xgplayer-icon":"xgplayer-icon btn-text",i="SCREENSHOT";return`
199      <xg-icon class="xgplayer-shot">
200      <div class="`.concat(e,`">
201      `).concat(this.icons.screenshotIcon?"":'<span lang-key="'.concat(this.i18nKeys[i],'">').concat(this.i18n[i],"</span>"),`
202      </div>
203    </xg-icon>`)}}}],[{key:"pluginName",get:function(){return"screenShot"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:5,quality:.92,type:"image/png",format:".png",width:600,height:337,saveImg:!0,fitVideo:!0,disable:!1,name:"screenshot"}}}]),n}(Ye),Xc=function(){function o(s){D(this,o),this.config=s.config,this.parent=s.root,this.root=h.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),s.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var t=this.config.domEventType==="touch"?"touchend":"click";this._delegates=Z.delegate.call(this,this.root,"li",t,this.onItemClick)}return O(o,[{key:"renderItemList",value:function(n){var t=this,e=this.config,i=this.root;n?e.data=n:n=e.data,e.style&&Object.keys(e.style).map(function(r){i.style[r]=e[r]}),n.length>0&&(this.attrKeys=Object.keys(n[0])),this.root.innerHTML="",n.map(function(r,a){var l=r.selected?"option-item selected":"option-item";r["data-index"]=a,t.root.appendChild(h.createDom("li","<span>".concat(r.showText,"</span>"),r,l))})}},{key:"onItemClick",value:function(n){n.delegateTarget||(n.delegateTarget=n.target);var t=n.delegateTarget;if(t&&h.hasClass(t,"selected"))return!1;var e=typeof this.config.onItemClick=="function"?this.config.onItemClick:null,i=this.root.querySelector(".selected");h.addClass(t,"selected"),i&&h.removeClass(i,"selected"),e(n,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(n,t){if(!n||!t)return{};var e={};t.map(function(r){e[r]=n.getAttribute(r)});var i=n.getAttribute("data-index");return i&&(e.index=Number(i)),e}},{key:"show",value:function(){h.removeClass(this.root,"hide"),h.addClass(this.root,"active")}},{key:"hide",value:function(){h.removeClass(this.root,"active"),h.addClass(this.root,"hide")}},{key:"setStyle",value:function(n){var t=this;
203Object.keys(n).forEach(function(e){t.root.style[e]=n[e]})}},{key:"destroy",value:function(){this._delegates&&(this._delegates.map(function(n){n.destroy&&n.destroy()}),this._delegates=null),this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),o}(),ke={SIDE:"side",MIDDLE:"middle",DEFAULT:"default"},Ze={CLICK:"click",HOVER:"hover"};function qc(o,s){return o===ke.SIDE?s===te.CONTROLS_LEFT?"xg-side-list xg-left-side":"xg-side-list xg-right-side":""}var Ue=z.device==="mobile",wt=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"onEnter",function(i){i.stopPropagation(),e.emit("icon_mouseenter",{pluginName:e.pluginName}),e.switchActiveState(i)}),C(_(e),"switchActiveState",function(i){i.stopPropagation();var r=e.config.toggleMode;r===Ze.CLICK?e.toggle(!e.isActive):e.toggle(!0)}),C(_(e),"onLeave",function(i){i.stopPropagation(),e.emit("icon_mouseleave",{pluginName:e.pluginName}),e.config.listType!==ke.SIDE&&e.isActive&&e.toggle(!1)}),C(_(e),"onListEnter",function(i){e.enterType=2}),C(_(e),"onListLeave",function(i){e.enterType=0,e.isActive&&e.toggle(!1)}),e.isIcons=!1,e.isActive=!1,e.curValue=null,e.curIndex=0,e}return O(n,[{key:"updateLang",value:function(e){this.renderItemList(this.config.list,this.curIndex)}},{key:"afterCreate",value:function(){var e=this,i=this.config;this.initIcons(),Ue=Ue||this.domEventType==="touch",Ue&&z.device==="mobile"&&i.listType===ke.DEFAULT&&(i.listType=ke.SIDE),i.hidePortrait&&h.addClass(this.root,"portrait"),this.on([He,we],function(){e._resizeList()}),this.once(Pe,function(){i.list&&i.list.length>0&&(e.renderItemList(i.list),e.show())}),Ue&&this.on(xi,function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)}),Ue?(i.toggleMode=Ze.CLICK,this.activeEvent="touchend"):this.activeEvent=i.toggleMode===Ze.CLICK?"click":"mouseenter",i.toggleMode===Ze.CLICK?this.bind(this.activeEvent,this.switchActiveState):(this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)),this.isIcons&&this.bind("click",this.onIconClick)}},{key:"initIcons",value:function(){var e=this,i=this.icons,r=Object.keys(i),a=!1;r.length>0&&(r.forEach(function(l){e.appendChild(".xgplayer-icon",i[l]),!a&&(a=i[l])}),this.isIcons=a),!a&&(this.appendChild(".xgplayer-icon",h.createDom("span","",{},"icon-text")),h.addClass(this.find(".xgplayer-icon"),"btn-text"))}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||h.addClass(this.root,"show")}},{key:"hide",value:function(){h.removeClass(this.root,"show")}},{key:"getTextByLang",value:function(e,i,r){if(e===void 0)return"";var a=this.config.list;!r&&(r=this.player.lang),i=!i||h.isUndefined(e[i])?"text":i,typeof e=="number"&&(e=a[e]);try{return ue(e[i])==="object"?e[i][r]||e[i].en:e[i]}catch(l){return console.warn(l),""}}},{key:"toggle",value:function(e){if(!(e===this.isActive||this.config.disable)){var i=this.player.controls,r=this.config.listType;e?(r===ke.SIDE?i.blur():i.focus(),this.optionsList&&this.optionsList.show()):(r===ke.SIDE?i.focus():i.focusAwhile(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,i){e.stopPropagation();var r=this.config,a=r.listType,l=r.list;this.curIndex=i.to.index,this.curItem=l[this.curIndex],this.changeCurrentText();var u=this.config.isItemClickHide;(u||Ue||a===ke.SIDE)&&this.toggle(!1)}},{key:"onIconClick",value:function(e){}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,i=this.curIndex<e.length?this.curIndex:0,r=e[i];r&&(this.find(".icon-text").innerHTML=this.getTextByLang(r,"iconText"))}}},{key:"renderItemList",value:function(e,i){var r=this,a=this.config,l=this.optionsList,u=this.player;if(typeof i=="number"&&(this.curIndex=i,this.curItem=a.list[i]),l){l.renderItemList(e),this.changeCurrentText();return}var c={config:{data:e||[],className:qc(a.listType,a.position),onItemClick:function(k,y){r.onItemClick(k,y)},domEventType:Ue?"touch":"mouse"},root:a.listType===ke.SIDE?u.innerContainer||u.root:this.root};if(this.config.isShowIcon){var f=this.player.root.getBoundingClientRect(),d=f.height,g=a.listType===ke.MIDDLE?d-50:d;g&&a.heightLimit&&(c.config.maxHeight="".concat(g,"px")),this.optionsList=new Xc(c),this.changeCurrentText(),this.show()}
203this._resizeList()}},{key:"_resizeList",value:function(){if(this.config.heightLimit){var e=this.player.root.getBoundingClientRect(),i=e.height,r=this.config.listType===ke.MIDDLE?i-50:i;this.optionsList&&this.optionsList.setStyle({maxHeight:"".concat(r,"px")})}}},{key:"destroy",value:function(){var e=this.config;e.toggleMode===Ze.CLICK?this.unbind(this.activeEvent,this.switchActiveState):(this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave)),this.isIcons&&this.unbind("click",this.onIconClick),this.optionsList&&(this.optionsList.destroy(),this.optionsList=null)}},{key:"render",value:function(){if(this.config.isShowIcon)return'<xg-icon class="xg-options-icon '.concat(this.config.className||"",`">
204    <div class="xgplayer-icon">
205    </div>
206   </xg-icon>`)}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:te.CONTROLS_RIGHT,index:100,list:[],listType:"default",listStyle:{},hidePortrait:!0,isShowIcon:!1,isItemClickHide:!0,toggleMode:Ze.HOVER,heightLimit:!0}}}]),n}(Z),Jc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),e.curTime=0,e.isPaused=!0,e}return O(n,[{key:"beforeCreate",value:function(e){var i=e.config.list;Array.isArray(i)&&i.length>0&&(e.config.list=i.map(function(r){return!r.text&&r.name&&(r.text=r.name),r.text||(r.text=r.definition),r}))}},{key:"afterCreate",value:function(){var e=this;U($(n.prototype),"afterCreate",this).call(this),this.on("resourceReady",function(i){e.changeDefinitionList(i)}),this.on(Oi,function(i){e.renderItemList(e.config.list,i.to)}),this.player.definitionList.length<2&&this.hide()}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||h.addClass(this.root,"show")}},{key:"initDefinition",value:function(){var e=this.config,i=e.list,r=e.defaultDefinition;if(i.length>0){var a=null;i.map(function(l){l.definition===r&&(a=l)}),a||(a=i[0]),this.changeDefinition(a)}}},{key:"renderItemList",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.list||[],r=arguments.length>1?arguments[1]:void 0,a=r&&r.definition?r.definition:this.config.defaultDefinition;r&&i.forEach(function(c){c.selected=!1});var l=0,u=i.map(function(c,f){var d=ne(ne({},c),{},{showText:e.getTextByLang(c)||c.definition,selected:!1});return(c.selected||c.definition&&c.definition==a)&&(d.selected=!0,l=f),d});U($(n.prototype),"renderItemList",this).call(this,u,l)}},{key:"changeDefinitionList",value:function(e){Array.isArray(e)&&(this.config.list=e.map(function(i){return!i.text&&i.name&&(i.text=i.name),i.text||(i.text=i.definition),i}),this.renderItemList(),this.config.list.length<2?this.hide():this.show())}},{key:"changeDefinition",value:function(e,i){this.player.changeDefinition(e,i)}},{key:"onItemClick",value:function(e,i){var r=this.player.definitionList;U($(n.prototype),"onItemClick",this).apply(this,arguments),this.emitUserAction(e,"change_definition",{from:i.from,to:i.to});for(var a=0;a<r.length;a++)i.to&&r[a].definition===i.to.definition&&(i.to.url=r[a].url),i.from&&r[a].definition===i.from.definition&&(i.from.url=r[a].url);this.player.changeDefinition(i.to,i.from)}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return ne(ne({},wt.defaultConfig),{},{position:te.CONTROLS_RIGHT,index:3,list:[],defaultDefinition:"",disable:!1,hidePortrait:!1,className:"xgplayer-definition",isShowIcon:!0})}}]),n}(wt),Zc=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),e.curRate=1,e}return O(n,[{key:"beforeCreate",value:function(e){var i=e.player.config.playbackRate,r=i?Array.isArray(i)?i:e.config.list:[];Array.isArray(r)&&(e.config.list=r.map(function(a){return typeof a=="number"?a={rate:a,text:"".concat(a,"x")}:!a.text&&a.rate&&(a.text="".concat(a.rate,"x")),a}))}},{key:"afterCreate",value:function(){var e=this;U($(n.prototype),"afterCreate",this).call(this),this.on(An,function(){e.curValue!==e.player.playbackRate&&e.renderItemList()}),this.renderItemList()}},{key:"show",value:function(e){!this.config.list||this.config.list.length===0||U($(n.prototype),"show",this).call(this)}},{key:"onItemClick",value:function(e,i){U($(n.prototype),"onItemClick",this).call(this,e,i);var r=e.delegateTarget,a=Number(r.getAttribute("rate"));if(!a||a===this.curValue)return!1;var l={playbackRate:{from:this.player.playbackRate,to:a}};this.emitUserAction(e,"change_rate",{props:l}),this.curValue=a,this.player.playbackRate=a}},{key:"renderItemList",value:function(){var e=this,i=this.player.playbackRate||1;this.curValue=i;var r=-1,a=this.config.list.map(function(l,u){var c={rate:l.rate};return c.rate===i&&(c.selected=!0,r=u),c.showText=e.getTextByLang(l),c});U($(n.prototype),"renderItemList",this).call(this,a,r)}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,i=this.curIndex<e.length?this.curIndex:0,r=e[i],a="";!r||this.curIndex<0?a="".concat(this.player.playbackRate,"x"):a=this.getTextByLang(r,"iconText"),this.find(".icon-text").innerHTML=a}}},{key:"destroy",value:function(){U($(n.prototype),"destroy",this).call(this)}}],[{key:"pluginName",get:function(){return"playbackRate"}},{key:"defaultConfig",get:function(){return ne(ne({},wt.defaultConfig),{},{position:te.CONTROLS_RIGHT,index:4,list:[2,1.5,1,.75,.5],className:"xgplayer-playbackrate",isShowIcon:!0,hidePortrait:!1})}}]),n}(wt),Qc=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"afterCreate",value:function(){var e=this;this.clickHandler=this.hook("errorRetry",this.errorRetry,{pre:function(r){r.preventDefault(),r.stopPropagation()}}),this.onError=this.hook("showError",this.handleError),this.bind(".xgplayer-error-refresh","click",this.clickHandler),this.on(ut,function(i){e.onError(i)})}},{key:"errorRetry",value:function(e){this.emitUserAction(e,"error_retry",{}),this.player.retry()}},{key:"handleError",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=this.player,r=e.errorType,a=i.errorNote?this.i18n[i.errorNote]:"";if(!a)switch(r){case"decoder":a=this.i18n.MEDIA_ERR_DECODE;break;case"network":a=this.i18n.MEDIA_ERR_NETWORK;break;default:a=this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED}this.find(".xgplayer-error-text").innerHTML=a,this.find(".xgplayer-error-tips").innerHTML="".concat(this.i18n.REFRESH_TIPS,'<span class="xgplayer-error-refresh">').concat(this.i18n.REFRESH,"</span>")}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return`<xg-error class="xgplayer-error">
207      <div class="xgplayer-errornote">
208       <span class="xgplayer-error-text"></span>
209       <span class="xgplayer-error-tips"><em class="xgplayer-error-refresh"></em></span>
210      </div>
211    </xg-error>`}}],[{key:"pluginName",get:function(){return"error"}}]),n}(Z),ef=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"afterCreate",value:function(){var e=this;this.intervalId=0,this.customConfig=null,this.bind(".highlight",["click","touchend"],function(i){(e.config.onClick||e.customOnClick)&&(i.preventDefault(),i.stopPropagation(),e.customOnClick?e.customOnClick(i):e.config.onClick(i))}),this.player.showPrompt=function(){e.showPrompt.apply(e,arguments)},this.player.hidePrompt=function(){e.hide()}}},{key:"setStyle",value:function(e){var i=this;Object.keys(e).map(function(r){i.root.style[r]=e[r]})}},{key:"showPrompt",value:function(e){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){};if(e){this.customOnClick=a;var l=this.config.interval;this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),h.addClass(this.root,"show"),r.mode==="arrow"&&h.addClass(this.root,"arrow"),typeof e=="string"?this.find(".xgplayer-prompt-detail").innerHTML=e:this.find(".xgplayer-prompt-detail").innerHTML="".concat(e.text||"")+"".concat(e.highlight?'<i class="highlight">'.concat(e.highlight,"</i>"):""),r.style&&this.setStyle(r.style);var u=typeof r.autoHide=="boolean"?r.autoHide:this.config.autoHide;if(u){var c=r.interval||l;this.intervalId=setTimeout(function(){i.hide()},c)}}}},{key:"hide",value:function(){h.removeClass(this.root,"show"),h.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'<xg-prompt class="xgplayer-prompt '.concat(w.CONTROLS_FOLLOW,`">
212    <span class="xgplayer-prompt-detail"></span>
213    </xg-prompt>`)}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),n}(Z),hn={time:0,text:"",id:1,duration:1,color:"#fff",style:{},width:6,height:6};function sr(o){Object.keys(hn).map(function(s){o[s]===void 0&&(o[s]=hn[s])})}var dn={_updateDotDom:function(s,n){if(n){var t=this.calcuPosition(s.time,s.duration),e=s.style||{};e.left="".concat(t.left,"%"),e.width="".concat(t.width,"%"),n.setAttribute("data-text",s.text),n.setAttribute("data-time",s.time),t.isMini?h.addClass(n,"mini"):h.removeClass(n,"mini"),Object.keys(e).map(function(i){n.style[i]=e[i]})}},initDots:function(){var s=this;this._ispots.map(function(n){s.createDot(n,!1)}),this.ispotsInit=!0},createDot:function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this.player.plugins.progress;if(t&&(n&&(sr(s),this._ispots.push(s)),!(!this.ispotsInit&&n))){var e=this.calcuPosition(s.time,s.duration),i=s.style||{};i.left="".concat(e.left,"%"),i.width="".concat(e.width,"%");var r="xgspot_".concat(s.id," xgplayer-spot");e.isMini&&(r+=" mini");var a=s.template?'<div class="xgplayer-spot-pop">'.concat(s.template,"</div>"):"",l=h.createDom("xg-spot",a,{"data-text":s.text,"data-time":s.time,"data-id":s.id},r);Object.keys(i).map(function(u){l.style[u]=i[u]}),t.outer&&t.outer.appendChild(l),this.positionDot(l,s.id)}},findDot:function(s){if(this.player.plugins.progress){var n=this._ispots.filter(function(t,e){return t.id===s});return n.length>0?n[0]:null}},updateDot:function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=this.player.plugins.progress;if(t){var e=this.findDot(s.id);if(e&&Object.keys(s).map(function(r){e[r]=s[r]}),!!this.ispotsInit){var i=t.find('xg-spot[data-id="'.concat(s.id,'"]'));i&&(this._updateDotDom(s,i),n&&this.showDot(s.id))}}},deleteDot:function(s){var n=this._ispots,t=this.player.plugins.progress;if(t){for(var e=[],i=0;i<n.length;i++)n[i].id===s&&e.push(i);for(var r=e.length,a=r-1;a>=0;a--)if(n.splice(e[a],1),this.ispotsInit){var l=t.find('xg-spot[data-id="'.concat(s,'"]'));l&&l.parentElement.removeChild(l)}}},deleteAllDots:function(){var s=this.player.plugins.progress;if(s){if(!this.ispotsInit){this._ispots=[];return}for(var n=s.root.getElementsByTagName("xg-spot"),t=n.length-1;t>=0;t--)s.outer.removeChild(n[t]);this._ispots=[]}},updateAllDots:function(){var s=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=this.player.plugins.progress;if(t){if(!this.ispotsInit){this._ispots=n;return}this._ispots=[];var e=t.root.getElementsByTagName("xg-spot"),i=e.length;if(i>n.length)for(var r=i-1;r>n.length-1;r--)t.outer.removeChild(e[r]);
213n.forEach(function(a,l){l<i?(e[l].setAttribute("data-id","".concat(a.id)),s._ispots.push(a),s.updateDot(a)):s.createDot(a)})}},positionDots:function(){var s=this,n=this._ispots,t=this.playerSize,e=this.player.sizeInfo,i=this.player.plugins.progress;!i||e.width===t.width||(t.width=e.width,t.left=e.left,n.forEach(function(r){var a=i.find('xg-spot[data-id="'.concat(r.id,'"]'));a&&s.positionDot(a,r.id)}))},positionDot:function(s,n){var t=h.findDom(s,".xgplayer-spot-pop");if(t){var e=this.playerSize,i=s.getBoundingClientRect(),r=t.getBoundingClientRect(),a=i.left-e.left,l=e.width-a-i.width/2;if(a<r.width/2||e.width<r.width){var u=r.width/2-a;t.style.left="".concat(u,"px")}else if(l<r.width/2){var c=l-r.width/2+i.width/2;t.style.left="".concat(c,"px")}else t.style.left="50%"}},updateDuration:function(){var s=this,n=this.player.plugins.progress;if(n){var t=this._ispots;t.forEach(function(e){var i=n.find('xg-spot[data-id="'.concat(e.id,'"]'));s._updateDotDom(e,i)})}},getAllDotsDom:function(){var s=this.player.plugins.progress;if(!s)return[];var n=s.root.getElementsByTagName("xg-spot");return n},getDotDom:function(s){var n=this.player.plugins.progress;if(n)return n.find('xg-spot[data-id="'.concat(s,'"]'))}};function tf(o){var s=o.config,n=o.player;Object.keys(dn).map(function(e){o[e]=dn[e].bind(o)});var t=n.config.progressDot||s.ispots||[];o._ispots=t.map(function(e){return sr(e),e}),o.ispotsInit=!1,o.playerSize={left:n.sizeInfo.left,width:n.sizeInfo.width},o.on(De,function(){o.ispotsInit?o.updateDuration():o.initDots()}),o.on(He,function(){o.positionDots()})}var Qe={dragmove:"onProgressMove",dragstart:"onProgressDragStart",dragend:"onProgressDragEnd",click:"onProgressClick",mouseover:"onProgressMouseOver",mouseenter:"onProgressMouseOver"},nf=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),C(_(e),"onMousemove",function(i){if(!e.config.disable){if(h.hasClass(i.target,"xg-spot-content")&&e.config.isHideThumbnailHover){e.player.plugins.progress.onMouseLeave(i);return}(e._state.f||h.hasClass(i.target,"xg-spot-content"))&&(h.event(i),i.stopPropagation())}}),C(_(e),"onMousedown",function(i){e.config.disable||(e._state.f||h.hasClass(i.target,"xg-spot-content"))&&(h.event(i),i.stopPropagation())}),C(_(e),"onMouseup",function(i){if(e.isDrag){var r=e.player.plugins.progress;r&&r.pos&&(r.onMouseUp(i),!r.pos.isEnter&&r.onMouseLeave(i))}}),C(_(e),"onDotMouseLeave",function(i){if(!e.config.disable){e._curDot.removeEventListener("mouseleave",e.onDotMouseLeave),e.blurDot(i.target),e._curDot=null;var r=e.player.plugins.progress;r&&r.enableBlur(),e.show()}}),C(_(e),"onProgressMouseOver",function(i,r){if(!e.config.disable&&h.hasClass(r.target,"xgplayer-spot")&&!e._curDot){e._curDot=r.target,e.focusDot(r.target),e._curDot.children.length>0&&e.hide();var a=e.player.plugins.progress;a&&a.disableBlur(),e._curDot.addEventListener("mouseleave",e.onDotMouseLeave)}}),e._ispots=[],e.videoPreview=null,e.videothumbnail=null,e.thumbnail=null,e.timeStr="",e._state={now:0,f:!1},e}return O(n,[{key:"beforeCreate",value:function(e){var i=e.player.plugins.progress;i&&(e.root=i.root)}},{key:"afterCreate",value:function(){var e=this;this._curDot=null,this.handlerSpotClick=this.hook("spotClick",function(i,r){r.seekTime&&e.player.seek(r.seekTime)}),this.transformTimeHook=this.hook("transformTime",function(i){e.setTimeContent(h.format(i))}),tf(this),this.on(De,function(){e.show()}),this.config.disable&&this.disable(),this.extTextRoot=this.find(".xg-spot-ext-text")}},{key:"setConfig",value:function(e){var i=this;e&&Object.keys(e).map(function(r){i.config[r]=e[r]})}},{key:"onPluginsReady",value:function(){var e=this.player;e.plugins.progress&&(this.previewLine=this.find(".xg-spot-line"),this.timePoint=this.find(".xgplayer-progress-point"),this.timeText=this.find(".xg-spot-time"),this.tipText=this.find(".spot-inner-text"),this._hasThumnail=!1,this.registerThumbnail(),this.bindEvents())}},{key:"bindEvents",value:function(){var e=this,i=this.player.plugins.progress;if(i&&(Object.keys(Qe).map(function(a){e[Qe[a]]=e[Qe[a]].bind(e),i.addCallBack(a,e[Qe[a]])}),z.device!=="mobile")){this.bind(".xg-spot-info","mousemove",this.onMousemove),this.bind(".xg-spot-info","mousedown",this.onMousedown),this.bind(".xg-spot-info","mouseup",this.onMouseup);var r=this.hook("previewClick",function(){});this.handlerPreviewClick=function(a){a.stopPropagation(),r(parseInt(e._state.now*1e3,10)/1e3,a),i&&i.onMouseUp(a)},this.bind(".xg-spot-content","mouseup",this.handlerPreviewClick)}}},{key:"onProgressMove",value:function(e,i){this.config.disable||!this.player.duration||this.updatePosition(e.offset,e.width,e.currentTime,e.e)}},{key:"onProgressDragStart",value:function(e){this.config.disable||!this.player.duration||(this.isDrag=!0,this.videoPreview&&h.addClass(this.videoPreview,"show"))}},{key:"onProgressDragEnd",value:function(e){this.config.disable||!this.player.duration||(this.isDrag=!1,this.videoPreview&&h.removeClass(this.videoPreview,"show"))}},{key:"onProgressClick",value:function(e,i){this.config.disable||h.hasClass(i.target,"xgplayer-spot")&&(i.stopPropagation(),i.preventDefault(),["time","id","text"].map(function(r){e[r]=i.target.getAttribute("data-".concat(r))}),e.time&&(e.time=Number(e.time)),this.handlerSpotClick(i,e))}},{key:"updateLinePos",value:function(e,i){var r=this.root,a=this.previewLine,l=this.player,u=this.config,c=l.controls.mode,f=c==="flex",d=r.getBoundingClientRect().width;if(!(!d&&this._hasThumnail)){d=this._hasThumnail&&d<u.width?u.width:d;var g=e-d/2,p;g<0&&!f?(g=0,p=e-d/2):g>i-d&&!f?(p=g-(i-d),g=i-d):p=0,p!==void 0&&(a.style.transform="translateX(".concat(p.toFixed(2),"px)")),r.style.transform="translateX(".concat(g.toFixed(2),"px) translateZ(0)")}}},{key:"updateTimeText",value:function(e){var i=this.timeText,r=this.timePoint;i.innerHTML=e,!this.thumbnail&&(r.innerHTML=e)}},{key:"updatePosition",value:function(e,i,r,a){var l=this.root,u=this.config,c=this._state;if(l){c.now=r,this.transformTimeHook(r);var f=this.timeStr;a&&a.target&&h.hasClass(a.target,"xgplayer-spot")?(this.showTips(a.target.getAttribute("data-text"),!1,f),this.focusDot(a.target),c.f=!0,u.isFocusDots&&c.f&&(c.now=parseInt(a.target.getAttribute("data-time"),10))):u.defaultText?(c.f=!1,this.showTips(u.defaultText,!0,f)):(c.f=!1,this.hideTips("")),this.updateTimeText(f),this.updateThumbnails(c.now),this.updateLinePos(e,i)}}},{key:"setTimeContent",value:function(e){this.timeStr=e}},{key:"updateThumbnails",value:function(e){var i=this.player,r=this.videoPreview,a=this.config,l=i.plugins.thumbnail;if(l&&l.usable){this.thumbnail&&l.update(this.thumbnail,e,a.width,a.height);var u=r&&r.getBoundingClientRect();this.videothumbnail&&l.update(this.videothumbnail,e,u.width,u.height)}}},{key:"registerThumbnail",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(z.device!=="mobile"){var i=this.player,r=this.config,a=i.getPlugin("thumbnail");if(a&&a.setConfig(e),!a||!a.usable||!r.isShowThumbnail){h.addClass(this.root,"short-line no-thumbn
213ail");return}else h.removeClass(this.root,"short-line no-thumbnail");r.mode==="short"&&h.addClass(this.root,"short-line"),this._hasThumnail=!0;var l=this.find(".xg-spot-thumbnail");this.thumbnail=a.createThumbnail(l,"progress-thumbnail"),r.isShowCoverPreview&&(this.videoPreview=h.createDom("xg-video-preview","",{},"xgvideo-preview"),i.root.appendChild(this.videoPreview),this.videothumbnail=a.createThumbnail(this.videoPreview,"xgvideo-thumbnail")),this.updateThumbnails(0)}}},{key:"calcuPosition",value:function(e,i){var r=this.player.plugins.progress,a=this.player,l=r.root.getBoundingClientRect().width,u=a.duration/l*6;return e+i>a.duration&&(i=a.duration-e),e/a.duration*100,i/a.duration,{left:e/a.duration*100,width:i/a.duration*100,isMini:i<u}}},{key:"showDot",value:function(e){var i=this.findDot(e);if(i){var r=this.root.getBoundingClientRect(),a=r.width,l=i.time/this.player.duration*a;this.updatePosition(l,a,i.time)}}},{key:"focusDot",value:function(e,i){e&&(i||(i=e.getAttribute("data-id")),h.addClass(e,"active"),this._activeDotId=i)}},{key:"blurDot",value:function(e){if(!e){var i=this._activeDotId;e=this.getDotDom(i)}e&&(h.removeClass(e,"active"),this._activeDotId=null)}},{key:"showTips",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";h.addClass(this.root,"no-timepoint"),e&&(h.addClass(this.find(".xg-spot-content"),"show-text"),i&&this.config.mode==="production"?(h.addClass(this.root,"product"),this.tipText.textContent=e):(h.removeClass(this.root,"product"),this.tipText.textContent=this._hasThumnail?e:"".concat(r," ").concat(e)))}},{key:"hideTips",value:function(){h.removeClass(this.root,"no-timepoint"),this.tipText.textContent="",h.removeClass(this.find(".xg-spot-content"),"show-text"),h.removeClass(this.root,"product")}},{key:"hide",value:function(){h.addClass(this.root,"hide")}},{key:"show",value:function(e){h.removeClass(this.root,"hide")}},{key:"enable",value:function(){var e=this.config,i=this.playerConfig;this.config.disable=!1,this.show(),!this.thumbnail&&e.isShowThumbnail&&this.registerThumbnail(i.thumbnail||{})}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){var e=this,i=this.player.plugins.progress;i&&Object.keys(Qe).map(function(r){i.removeCallBack(r,e[Qe[r]])}),this.videothumbnail=null,this.thumbnail=null,this.videoPreview&&this.player.root.removeChild(this.videoPreview),this.unbind(".xg-spot-info","mousemove",this.onMousemove),this.unbind(".xg-spot-info","mousedown",this.onMousedown),this.unbind(".xg-spot-info","mouseup",this.onMouseup),this.unbind(".xg-spot-content","mouseup",this.handlerPreviewClick)}},{key:"render",value:function(){return z.device==="mobile"||this.playerConfig.isMobileSimulateMode==="mobile"?"":'<div class="xg-spot-info hide '.concat(this.config.mode==="short"?"short-line":"",`">
214      <div class="xg-spot-content">
215        <div class="xg-spot-thumbnail">
216          <span class="xg-spot-time"></span>
217        </div>
218        <div class="xg-spot-text"><span class="spot-inner-text"></span></div>
219      </div>
220      <div class="xgplayer-progress-point">00:00</div>
221      <div class="xg-spot-ext-text"></div>
222      <div class="xg-spot-line"></div>
223    </div>`)}}],[{key:"pluginName",get:function(){return"progresspreview"}},{key:"defaultConfig",get:function(){return{index:1,miniWidth:6,ispots:[],defaultText:"",isFocusDots:!0,isHideThumbnailHover:!0,isShowThumbnail:!0,isShowCoverPreview:!1,mode:"",disable:!1,width:160,height:90}}}]),n}(Z),rf=function(o){H(n,o);var s=B(n);function n(t){var e;return D(this,n),e=s.call(this,t),e.ratio=1,e.interval=null,e._preloadMark={},e}return O(n,[{key:"afterCreate",value:function(){var e=this;this.usable&&this.initThumbnail(),this.on([De],function(){var i=e.config,r=i.pic_num,a=i.interval;e.usable&&(e.interval=a>0?a:Math.round(e.player.duration*1e3/r)/1e3)})}},{key:"setConfig",value:function(e){var i=this;if(e){var r=Object.keys(e);r.length<1||(r.forEach(function(a){i.config[a]=e[a]}),this.usable&&this.initThumbnail())}}},{key:"usable",get:function(){var e=this.config,i=e.urls,r=e.pic_num;return i&&i.length>0&&r>0}},{key:"initThumbnail",value:function(){var e=this.config,i=e.width,r=e.height,a=e.pic_num,l=e.interval;this.ratio=i/r*100,this.interval=l||Math.round(this.player.duration/a),this._preloadMark={}}},{key:"getUrlByIndex",value:function(e){return e>=0&&e<this.config.urls.length?this.config.urls[e]:""}},{key:"preload",value:function(e){var i=this;if(!this._preloadMark[e]){var r=this.config.urls,a=r.length,l=[];e>0&&l.push(e-1),l.push(e),e>0&&e<a-1&&l.push(e+1),l.map(function(u){!i._preloadMark[u]&&u>
223=0&&u<a&&(i._preloadMark[u]=1,h.preloadImg(r[u],function(){i._preloadMark[u]=2}))})}}},{key:"getPosition",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=this.config,l=a.pic_num,u=a.row,c=a.col,f=a.width,d=a.height;this.interval=Math.round(this.player.duration/l);var g=Math.ceil(e/this.interval);g=g>l?l:g;var p=g<u*c?0:Math.ceil(g/(u*c))-1,k=g-p*(c*u),y=k>0?Math.ceil(k/c)-1:0,I=k>0?k-y*c-1:0,x=0,P=0;if(i&&r){var G=i/r;G<f/d?(P=r,x=P*(f/d)):(x=i,P=x/(f/d))}else r?i||(P=r||d,x=P*(f/d)):(x=i||f,P=x/(f/d));var V=this.getUrlByIndex(p);return{urlIndex:p,rowIndex:y,colIndex:I,url:V,height:P,width:x,style:{backgroundImage:"url(".concat(V,")"),backgroundSize:"".concat(x*c,"px auto"),backgroundPosition:"-".concat(I*x,"px -").concat(y*P,"px"),width:"".concat(x,"px"),height:"".concat(P,"px")}}}},{key:"update",value:function(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"",u=this.config,c=u.pic_num,f=u.urls;if(!(c<=0||!f||f.length===0)){var d=this.getPosition(i,r,a);this.preload(d.urlIndex),Object.keys(d.style).map(function(g){e.style[g]=d.style[g]}),Object.keys(l).map(function(g){e.style[g]=l[g]})}}},{key:"changeConfig",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.setConfig(e)}},{key:"createThumbnail",value:function(e,i){var r=h.createDom("xg-thumbnail","",{},"thumbnail ".concat(i));return e&&e.appendChild(r),r}}],[{key:"pluginName",get:function(){return"thumbnail"}},{key:"defaultConfig",get:function(){return{isShow:!1,urls:[],pic_num:0,col:0,row:0,height:90,width:160,scale:1,className:"",hidePortrait:!1}}}]),n}(Z);function Zt(o){return o?"background:".concat(o,";"):""}var sf=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onTimeupdate",function(){var a=t.player.ended,l=_(t),u=l.offsetDuration,c=t.currentTime;c=h.adjustTimeByDuration(c,u,a),t.update({played:c},u)}),t}return O(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"currentTime",get:function(){var e=this.player,i=e.offsetCurrentTime,r=e.currentTime;return i>=0?i:r}},{key:"afterCreate",value:function(){var e=this;this.root&&(this.on(ge,this.onTimeupdate),this.on(Ke,function(){e.reset()}))}},{key:"reset",value:function(){this.update({played:0,cached:0},0)}},{key:"update",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{cached:0,played:0},i=arguments.length>1?arguments[1]:void 0;!i||!this.root||(e.cached&&(this.find("xg-mini-progress-cache").style.width="".concat(e.cached/i*100,"%")),e.played&&(this.find("xg-mini-progress-played").style.width="".concat(e.played/i*100,"%")))}},{key:"render",value:function(){var e=this.playerConfig,i=e.commonStyle,r=e.miniprogress;if(r){var a=this.config,l=a.mode,u=a.height,c={cached:Zt(i.cachedColor),played:Zt(i.playedColor),progress:Zt(i.progressColor),height:u>0&&u!==2?"height: ".concat(u,"px;"):""},f=l==="show"?"xg-mini-progress-show":"";return'<xg-mini-progress class="xg-mini-progress '.concat(f,'" style="').concat(c.progress," ").concat(c.height,`">
224    <xg-mini-progress-cache class="xg-mini-progress-cache" style="`).concat(c.cached,`"></xg-mini-progress-cache>
225    <xg-mini-progress-played class="xg-mini-progress-played" style="`).concat(c.played,`"></xg-mini-progress-played>
226    </xg-mini-progress>`)}}}],[{key:"pluginName",get:function(){return"MiniProgress"}},{key:"defaultConfig",get:function(){return{mode:"auto",height:2}}}]),n}(Z),et={REAL_TIME:"realtime",FIRST_FRAME:"firstframe",POSTER:"poster"};function af(){try{return parseInt(window.performance.now(),10)}catch{return new Date().getTime()}}function of(){try{var o=document.createElement("canvas").getContext;return!!o}catch{return!1}}var dt=null,lf=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onLoadedData",function(a){t.player&&(t._frameCount=t.config.startFrameCount,t.stop(),t.renderOnTimeupdate(a),t.off(ge,t.renderOnTimeupdate),t.on(ge,t.renderOnTimeupdate))}),C(_(t),"onVisibilitychange",function(a){document.visibilityState==="visible"?t._checkIfCanStart()&&t.start():document.visibilityState==="hidden"&&t.stop()}
226),C(_(t),"renderOnTimeupdate",function(a){if(t._frameCount>0)t.renderOnce(),t._frameCount--;else{t._isLoaded=!0,t.off(ge,t.renderOnTimeupdate);var l=t.config.startInterval;!t.player.paused&&t._checkIfCanStart()&&t.start(0,l)}}),C(_(t),"start",function(a,l){var u=t.player.video,c=af(),f=t.checkVideoIsSupport(u);!f||!t.canvasCtx||(l||(l=t.interval),t.stop(),u.videoWidth&&u.videoHeight&&(t.videoPI=u.videoHeight>0?parseInt(u.videoWidth/u.videoHeight*100,10):0,(t.config.mode===et.REAL_TIME||c-t.preTime>=l)&&(u&&u.videoWidth&&t.update(f,t.videoPI),t.preTime=c)),t.frameId=t._loopType==="timer"?h.setTimeout(_(t),t.start,l):h.requestAnimationFrame(t.start))}),C(_(t),"stop",function(){t.frameId&&(t._loopType==="timer"?h.clearTimeout(_(t),t.frameId):h.cancelAnimationFrame(t.frameId),t.frameId=null)}),t}return O(n,[{key:"afterCreate",value:function(){var e=this;this.playerConfig.dynamicBg===!0&&(this.config.disable=!1),n.isSupport||(this.config.disable=!0);var i=this.config,r=i.disable,a=i.mode,l=i.frameRate;r||(this._pos={width:0,height:0,rwidth:0,rheight:0,x:0,y:0,pi:0},this.isStart=!1,this._isLoaded=!1,this.videoPI=0,this.preTime=0,this.interval=parseInt(1e3/l,10),this.canvas=null,this.canvasCtx=null,this._frameCount=0,this._loopType=this.config.mode!==et.REAL_TIME&&this.interval>=1e3?"timer":"animation",this.once(Rt,function(){e.player&&(e.init(),e.renderByPoster(),e.player.paused||e.start())}),a!==et.POSTER&&(a!==et.FIRST_FRAME&&(this.on(Ke,function(){e.stop()}),this.on(pe,function(){var u=e.config.startInterval;e._checkIfCanStart()&&e.start(0,u)}),this.on(nt,function(){e.stop()})),this.on(Le,this.onLoadedData),this.on(Ii,function(){e._isLoaded=!1,e.stop()}),document.addEventListener("visibilitychange",this.onVisibilitychange)))}},{key:"setConfig",value:function(e){var i=this;Object.keys(e).forEach(function(r){r==="root"&&e[r]!==i.config[r]?i.reRender(e[r]):r==="frameRate"?i.interval=parseInt(1e3/e[r],10):r==="disable"&&e[r]&&i.stop(),i.config[r]=e[r]})}},{key:"init",value:function(e){var i=this.player,r=this.config;this.canvasFilter=n.supportCanvasFilter();try{var a=e||r.root;a||(a=r.isInnerRender&&i.innerContainer||i.root),a.insertAdjacentHTML("afterbegin",'<div class="xgplayer-dynamic-bg" data-index="'.concat(r.index,`"><canvas>
227        </canvas><xgmask></xgmask></div>`)),this.root=a.children[0],this.canvas=this.find("canvas"),this.canvasFilter||(this.canvas.style.filter=r.filter,this.canvas.style.webkitFilter=r.filter),this.mask=this.find("xgmask"),r.addMask&&(this.mask.style.background=r.maskBg),this.canvasCtx=this.canvas.getContext("2d")}catch(l){K.logError("plugin:DynamicBg",l)}}},{key:"reRender",value:function(e){var i=this.config.disable;if(!(!i&&!this.root)){this.stop();var r=this.root?this.root.parentElement:null;if(r!==e&&r.removeChild(this.root),!e){this.root=null;return}this.init(e),this.renderOnce();var a=this.config.startInterval;this._checkIfCanStart()&&this.start(0,a)}}},{key:"checkVideoIsSupport",value:function(e){if(!e)return null;var i=e&&e instanceof window.HTMLVideoElement?e:e.canvas?e.canvas:e.flyVideo?e.flyVideo:null;if(i&&!(z.browser==="safari"&&h.isMSE(i)))return i;var r=i?i.tagName.toLowerCase():"";return r==="canvas"||r==="img"?i:null}},{key:"renderByPoster",value:function(){var e=this.playerConfig.poster;if(e){var i=h.typeOf(e)==="String"?e:h.typeOf(e.poster)==="String"?e.poster:null;this.updateImg(i)}}},{key:"_checkIfCanStart",value:function(){var e=this.config.mode;return this._isLoaded&&!this.player.paused&&e!==et.FIRST_FRAME&&e!==et.POSTER}},{key:"renderOnce",value:function(){var e=this.player.video;if(!(!e.videoWidth||!e.videoHeight)){this.videoPI=parseInt(e.videoWidth/e.videoHeight*100,10);var i=this.checkVideoIsSupport(e);i&&this.update(i,this.videoPI)}}},{key:"updateImg",value:function(e){var i=this;if(e){var r=this.canvas.getBoundingClientRect(),a=r.width,l=r.height,u=new window.Image;u.onload=function(){if(!(!i.canvas||i.frameId||i.isStart)){i.canvas.height=l,i.canvas.width=a;var c=parseInt(a/l*100,10);i.update(u,c),u=null}},u.src=e}}},{key:"update",value:function(e,i){if(!(!this.canvas||!this.canvasCtx||!i))try{var r=this._pos,a=this.config,l=this.canvas.getBoundingClientRect(),u=l.width,c=l.height;if(u!==r.width||c!==r.height||r.pi!==i){var f=parseInt(u/c*100,10);
227r.pi=i,r.width!==u&&(r.width=this.canvas.width=u),r.height!==c&&(r.height=this.canvas.height=c);var d=c,g=u;f<i?g=parseInt(c*i/100,10):f>i&&(d=parseInt(u*100/i,10)),r.rwidth=g*a.multiple,r.rheight=d*a.multiple,r.x=(u-r.rwidth)/2,r.y=(c-r.rheight)/2}this.canvasFilter&&(this.canvasCtx.filter=a.filter),this.canvasCtx.drawImage(e,r.x,r.y,r.rwidth,r.rheight)}catch(p){K.logError("plugin:DynamicBg",p)}}},{key:"destroy",value:function(){this.stop(),document.removeEventListener("visibilitychange",this.onVisibilitychange),this.canvasCtx=null,this.canvas=null}},{key:"render",value:function(){return""}}],[{key:"pluginName",get:function(){return"dynamicBg"}},{key:"defaultConfig",get:function(){return{isInnerRender:!1,disable:!0,index:-1,mode:"framerate",frameRate:10,filter:"blur(50px)",startFrameCount:2,startInterval:0,addMask:!0,multiple:1.2,maskBg:"rgba(0,0,0,0.7)"}}},{key:"isSupport",get:function(){return typeof dt=="boolean"||(dt=of()),dt}},{key:"supportCanvasFilter",value:function(){return!(z.browser==="safari"||z.browser==="firefox")}}]),n}(Z),uf={LANG:"zh-cn",TEXT:{ERROR_TYPES:{network:{code:1,msg:"视频下载错误"},mse:{code:2,msg:"流追加错误"},parse:{code:3,msg:"解析错误"},format:{code:4,msg:"格式错误"},decoder:{code:5,msg:"解码错误"},runtime:{code:6,msg:"语法错误"},timeout:{code:7,msg:"播放超时"},other:{code:8,msg:"其他错误"}},HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"网络错误",MEDIA_ERR_DECODE:"解码错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}},rt="info",Qt=zn,cf=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"_recordUserActions",function(a){var l=t._getTime(),u=Object.assign({},a,{msg:a.msg||a.action});t._stats[rt].push(ne(ne({type:"userAction"},l),{},{payload:u}))}),C(_(t),"_onReset",function(){t.reset()}),C(_(t),"_recordInfo",function(a){t.info(a)}),C(_(t),"_downloadStats",function(){var a=t.getStats(),l=new Blob([JSON.stringify(a)],{type:"application/json"}),u=window.URL.createObjectURL(l),c=document.createElement("a");c.style.display="none",c.href=u,c.download="player.txt",c.disabled=!1,c.click()}),t}return O(n,[{key:"_getTime",value:function(){return{timestamp:Date.now(),timeFormat:new Date().toISOString()}}},{key:"afterCreate",value:function(){this.reset(),this.on(Ct,this._recordUserActions),this.on(Qt.STATS_INFO,this._recordInfo),this.on(Qt.STATS_DOWNLOAD,this._downloadStats),this.on(Qt.STATS_RESET,this._onReset)}},{key:"destroy",value:function(){this.offAll()}},{key:"downloadStats",value:function(){this._downloadStats()}},{key:"info",value:function(e){e.profile?this._infoProfile(e):this._info(e)}},{key:"_info",value:function(e){var i=this._getTime();this._stats[rt].push(ne(ne({},i),{},{payload:e}))}},{key:"_infoProfile",value:function(e){if(e&&e.startMs){var i=Date.now(),r=i-e.startMs,a=ne({cat:"function",dur:r,name:e.name||e.msg,ph:"X",pid:0,tid:0,ts:e.startMs,profile:!0},e);this._info(a)}else console.warn("infoProfile need object data, include startMs")}},{key:"reset",value:function(){var e;this._stats=(e={},C(e,rt,[]),C(e,"media",{}),e)}},{key:"getStats",value:function(){for(var e=this.player,i=e.media,r=[],a=0;a<i.buffered.length;a++)r.push({start:i.buffered.start(a),end:i.buffered.end(a)});var l={currentTime:i.currentTime,readyState:i.readyState,buffered:r,paused:i.paused,ended:i.ended};return this._stats.media=l,{raw:this._stats,timestat:this._getTimeStats(),profile:this._getProfile()}}},{key:"_getTimeStats",value:function(){var e=this._stats[rt],i=e.map(function(r){var a=r.payload.data,l="";try{a instanceof Error?l=a.msg:a!==void 0&&(l=JSON.stringify(a))}catch(u){console.log("err",u)}return"[".concat(r.timeFormat,"] : ").concat(r.payload.msg," ").concat(l," ")});return i}},{key:"_getProfile",value:function(){var e={traceEvents:[]},i=this._stats[rt];
227return i.forEach(function(r){r.payload.profile&&e.traceEvents.push(r.payload)}),e}}],[{key:"pluginName",get:function(){return"stats"}},{key:"defaultConfig",get:function(){return{}}}]),n}(Be),ar=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onGapJump",function(){var a=_(t),l=a.player,u=a.config;if(l.media.readyState!==HTMLMediaElement.HAVE_NOTHING){if(l.media.seeking){if(!t.seekingEventReceived)return}else t.seekingEventReceived=!1;if(!(l.media.paused&&l.media.currentTime!==0&&t.hasPlayed)){var c=l.media.buffered,f=u.smallGapLimit||.5,d=u.gapDetectionThreshold||.3,g=l.media.currentTime,p=t._getIndex(c,g,d);if(!(p===null||p===0)){console.log("GapJump  bufferRange ",c.start(p),c.end(p));var k=c.start(p)+.1,y=l.media.duration;if(!(k>y)){var I=k-g,x=I<=f;I<n.BROWSER_GAP_TOLERANCE||x&&(u.useGapJump!==!1&&(l.media.currentTime=t.isSafari?k+.1:k),t.player&&t.player.emit("detectGap"),console.log("gapJump gapIndex",p," isGapSamll:",x," currentTime:",l.media.currentTime," jumpSize:",g-l.media.currentTime),k!==.08&&l&&l.emit("log",{type:"oneevent",end_type:"gap",vid:l.config.vid,ext:{video_postion:Math.floor(k*1e3)}}))}}}}}),t}return O(n,[{key:"afterCreate",value:function(){var e=this,i=this.config.useGapJump;i!==!1&&(this.hasPlayed=!1,this.seekingEventReceived=!1,this.isSafari=/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),this.on(ct,this.onGapJump),this.on(pe,function(){e.hasPlayed=!0}),this.on(Ot,function(){e.seekingEventReceived=!0}))}},{key:"_getIndex",value:function(e,i,r){if(!e||!e.length||e.length===1&&e.end(0)-e.start(0)<1e-6)return null;for(var a=this._getBuffered(e),l=null,u=0;u<a.length;u++){var c=a[u];if(c.start>i&&(u===0||a[u-1].end-i<=r)){l=u;break}}return l}},{key:"_getBuffered",value:function(e){if(!e)return[];for(var i=[],r=0;r<e.length;r++)i.push({start:e.start(r),end:e.end(r)});return i}}],[{key:"pluginName",get:function(){return"gapJump"}},{key:"defaultConfig",get:function(){return{useGapJump:!1,smallGapLimit:.5,gapDetectionThreshold:.3}}}]),n}(Z);ar.BROWSER_GAP_TOLERANCE=.001;var ff=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"onWaiting",function(){var a=_(t),l=a.config;t.jumpCnt>l.jumpCntMax||t.timer||l.useWaitingTimeoutJump===!1||(t.timer=setTimeout(t.onJump,l.waitingTime*1e3))}),C(_(t),"onJump",function(){var a=_(t),l=a.player,u=a.config;if(clearTimeout(t.timer),t.timer=null,!(t.jumpCnt>u.jumpCntMax||u.useWaitingTimeoutJump===!1)&&!(l.media.paused&&l.media.currentTime!==0&&t.hasPlayed)){t.jumpSize=u.jumpSize*(t.jumpCnt+1),t.jumpCnt===u.jumpSize&&t.jumpSize<6&&(t.jumpSize=6);var c=l.currentTime+t.jumpSize,f=l.media.duration;c>f||(t.jumpCnt++,l.currentTime=c)}}),t}return O(n,[{key:"afterCreate",value:function(){var e=this,i=this.config,r=i.useWaitingTimeoutJump,a=i.jumpSize;r!==!1&&(this.hasPlayed=!1,this.jumpCnt=0,this.timer=null,this.jumpSize=a,this.on(ct,this.onWaiting),this.on([Pi,Pe],function(){clearTimeout(e.timer),e.timer=null,e.jumpSize=e.config.jumpSize}),this.on(pe,function(){e.hasPlayed=!0}))}}],[{key:"pluginName",get:function(){return"waitingTimeoutJump"}},{key:"defaultConfig",get:function(){return{useWaitingTimeoutJump:!1,waitingTime:15,jumpSize:2,jumpCntMax:4}}}]),n}(Z),tt="cdn",gt=["cdn"],hf=function(o){H(n,o);var s=B(n);function n(){var t;D(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t=s.call.apply(s,[this].concat(i)),C(_(t),"getSpeed",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt;if(!t.speedListCache||!t.speedListCache[a]||t.speedListCache[a].length<=0)return 0;var l=0;return t.speedListCache[a].map(function(u){l+=u}),Math.floor(l/t.speedListCache[a].length)}),C(_(t),"startTimer",function(){h.isMSE(t.player.video)||(t.initSpeedList(),t.cnt=0,t.timer=setTimeout(t.testSpeed,t.config.testTimeStep))}),C(_(t),"initSpeedList",function(){t.speedListCache={},gt.forEach(function(a){t.speedListCache[a]=[]})}),C(_(t),"_onRealSpeedChange",function(a){a.speed&&t.appendList(a.speed,a.type||tt)}),C(_(t),"testSpeed",function(){if(clearTimeout(t.timer),t.timer=null,!(!t.player||!t.config.openSpeed)){var a=t.config,l=a.url,u=a.loadSize,c=a.testCnt,f=a.testTimeStep,d=l+(l.indexOf("?")<0?"?testst=":"&testst=")+Date.now();if(!(t.cnt>=c)){t.cnt++;try{var g=new Date().getTime(),p=null,k=new XMLHttpRequest;t.xhr=k,k.open("GET",d);var y={},I=Math.floor(Math.random()*10);
227y.Range="bytes="+I+"-"+(u+I),y&&Object.keys(y).forEach(function(x){k.setRequestHeader(x,y[x])}),k.onreadystatechange=function(){if(k.readyState===4){t.xhr=null,p=new Date().getTime();var x=k.getResponseHeader("Content-Length")/1024*8,P=Math.round(x*1e3/(p-g));t.appendList(P),t.timer=setTimeout(t.testSpeed,f)}},k.send()}catch(x){console.error(x)}}}}),C(_(t),"appendList",function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt;if(!(!t.speedListCache||!t.speedListCache[l])){var u=t.config.saveSpeedMax;t.speedListCache[l].length>=u&&t.speedListCache[l].shift(),t.speedListCache[l].push(a);var c=_(t),f=c.player;f&&(l===tt?f.realTimeSpeed=a:f[t.getSpeedName("realTime",l)]=a),t.updateSpeed(l)}}),C(_(t),"updateSpeed",function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt,l=t.getSpeed(a),u=_(t),c=u.player;if(c)if(a===tt)(!c.avgSpeed||l!==c.avgSpeed)&&(c.avgSpeed=l,c.emit(ui,{speed:l,realTimeSpeed:c.realTimeSpeed}));else{var f=t.getSpeedName("avg",a);(!c[f]||l!==c[f])&&(c[f]=l,c.emit(ui,{speed:l,realTimeSpeed:c.realTimeSpeed}))}}),t}return O(n,[{key:"afterCreate",value:function(){var e=this.config,i=e.openSpeed,r=e.addSpeedTypeList;(r==null?void 0:r.length)>0&&gt.push.apply(gt,_e(r)),this.initSpeedList(),this.on("real_time_speed",this._onRealSpeedChange),this.timer=null,this.cnt=0,this.xhr=null,i&&this.on([Le,yt],this.startTimer)}},{key:"getSpeedName",value:function(e,i){return e+"Speed"+i.toUpperCase()}},{key:"openSpeed",get:function(){return this.config.openSpeed},set:function(e){if(this.config.openSpeed=e,!e&&this.timer){clearTimeout(this.timer),this.timer=null;return}if(this.config.openSpeed){if(this.timer)return;this.timer=setTimeout(this.testSpeed,this.config.testTimeStep)}}},{key:"destroy",value:function(){var e=this;this.off("real_time_speed",this._onRealSpeedChange),this.off([Le,yt],this.startTimer),gt.forEach(function(i){e.speedListCache&&e.speedListCache[i]&&(e.speedListCache[i]=[])}),this.speedListCache&&(this.speedListCache={}),clearTimeout(this.timer),this.timer=null,this.xhr&&this.xhr.readyState!==4&&(this.xhr.cancel&&this.xhr.cancel(),this.xhr=null)}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"defaultConfig",get:function(){return{openSpeed:!1,testCnt:3,loadSize:200*1024,testTimeStep:3e3,url:"",saveSpeedMax:5,addSpeedTypeList:[]}}}]),n}(Z),df=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n,[{key:"afterCreate",value:function(){var e=this,i=this.player,r=this.config,a=i.media||i.video;if(this.timer=null,this._lastDecodedFrames=0,this._currentStuckCount=0,this._lastCheckPoint=null,this._payload=[],!r.disabled){var l=a.getVideoPlaybackQuality;l&&(this.on(pe,function(){e._startTick()}),this.on(nt,function(){e._stopTick()}),this.on(We,function(){e._stopTick()}),this.on(Ke,function(){e._stopTick()}))}}},{key:"_startTick",value:function(){var e=this;this._stopTick(),this._timer=setTimeout(function(){e._checkDecodeFPS(),e._startTick()},this.config.tick)}},{key:"_stopTick",value:function(){clearTimeout(this._timer),this._timer=null}},{key:"_checkBuffer",value:function(e,i){for(var r=!1,a=[],l=0;l<i.length;l++){var u=i.start(l),c=i.end(l);if(a.push({start:u,end:c}),u<=e&&e<=c-1){r=!0;break}}return{enoughBuffer:r,buffers:a}}},{key:"_checkStuck",value:function(e,i,r,a){var l=this.player.media||this.player.video,u=document.hidden,c=l.paused,f=l.readyState,d=l.currentTime,g=l.buffered;if(!(u||c||f<4)){var p=this._checkBuffer(d,g),k=p.enoughBuffer,y=p.buffers;k&&(e<=this.config.reportFrame?(this._currentStuckCount++,this._payload.push({currentTime:d,buffers:y,curDecodedFrames:e,totalVideoFrames:i,droppedVideoFrames:r,checkInterval:a}),this._currentStuckCount>
227=this.config.stuckCount&&(this.emit(Wn,this._payload),this._reset())):this._reset())}}},{key:"_reset",value:function(){this._payload=[],this._currentStuckCount=0}},{key:"_checkDecodeFPS",value:function(){var e=this.player.media||this.player.video;if(e){var i=e.getVideoPlaybackQuality(),r=i.totalVideoFrames,a=i.droppedVideoFrames,l=performance.now();if(r&&this._lastCheckPoint){var u=r-this._lastDecodedFrames,c=l-this._lastCheckPoint;this._checkStuck(u,r,a,c)}this._lastDecodedFrames=r,this._lastCheckPoint=l}}},{key:"destroy",value:function(){this._stopTick()}}],[{key:"pluginName",get:function(){return"FpsDetect"}},{key:"defaultConfig",get:function(){return{disabled:!1,tick:1e3,stuckCount:3,reportFrame:0}}}]),n}(Z);it.use(uf);var gf=O(function o(s,n){var t,e,i;D(this,o);var r=n&&n.isMobileSimulateMode==="mobile",a=n.isLive,l=a?[]:[Nc,er,sf,nf,tr],u=[].concat(l,[Qn,Zn,Hc,jc,Jc,Zc,Kc,Yc,ir,Vc]),c=[yc,_c,bc,Mc,Cc,Qc,ef,rf,wc];this.plugins=[cf,vc].concat(_e(u),c,[ar,ff]);var f=r?"mobile":z.device;switch(f){case"pc":(t=this.plugins).push.apply(t,[fn,qt,hi,hf,df]);break;case"mobile":(e=this.plugins).push.apply(e,[Dc]);break;default:(i=this.plugins).push.apply(i,[fn,qt,hi])}(z.os.isIpad||f==="pc")&&this.plugins.push(lf),z.os.isIpad&&this.plugins.push(qt),this.ignores=[],this.i18n=[]}),ae=function(o){H(n,o);var s=B(n);function n(){return D(this,n),s.apply(this,arguments)}return O(n)}(Ft);C(ae,"defaultPreset",gf);C(ae,"Util",h);C(ae,"Sniffer",z);C(ae,"Errors",mt);C(ae,"Events",Ou);C(ae,"Plugin",Z);C(ae,"BasePlugin",Be);C(ae,"I18N",it);C(ae,"STATE_CLASS",w);C(ae,"InstManager",Jn);C(ae,"PlayIcon",Qn);C(ae,"TimeIcon",tr);C(ae,"Progress",er);C(ae,"FullscreenIcon",Zn);C(ae,"CssFullscreenIcon",hi);C(ae,"VolumeIcon",ir);const pf={id:"mse"},vf=L({__name:"xgplayer",props:{url:{default:""},poster:{default:""}},setup(o){const s=o;return Ee(()=>{new ae({id:"mse",volume:0,lang:"zh",autoplay:!1,fluid:!0,controls:!0,leavePlayerTime:0,download:!0,keyShortcut:!0,url:s.url,poster:s.poster,start:{isShowPause:!0}})}),(n,t)=>(v(),T("div",pf))}}),mf=N(vf,[["__scopeId","data-v-32debd8d"]]),yf=L({__name:"Layout",setup(o){const{isDark:s}=ot(),n=()=>"startViewTransition"in document&&window.matchMedia("(prefers-reduced-motion: no-preference)").matches;return yi("toggle-appearance",async({clientX:t,clientY:e})=>{if(!n()){s.value=!s.value;return}const i=[`circle(0px at ${t}px ${e}px)`,`circle(${Math.hypot(Math.max(t,innerWidth-t),Math.max(e,innerHeight-e))}px at ${t}px ${e}px)`];await document.startViewTransition(async()=>{s.value=!s.value,await mi()}).ready,document.documentElement.animate({clipPath:s.value?i.reverse():i},{duration:300,easing:"ease-in",pseudoElement:`::view-transition-${s.value?"old":"new"}(root)`})}),(t,e)=>(v(),M(m(si).Layout))}}),_f=/[a-zA-Z0-9_\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g;function kf(o){const s=o.match(_f);let n=0;if(!s)return 0;for(let t=0;t<s.length;t+=1)s[t].charCodeAt(0)>=19968?n+=s[t].length:n+=1;return n}const bf={class:"word"},Cf=L({__name:"ArticleMetadata",setup(o){const{page:s}=ot(),n=F(()=>new Date(s.value.lastUpdated)),t=J(0),e=J(0),i=F(()=>t.value/275*60),r=F(()=>{const u=e.value;return e.value<=10?u*13+u*(u-1)/2:175+(u-10)*3}),a=F(()=>Math.ceil((i.value+r.value)/60));function l(){var d;document.querySelectorAll(".meta-des").forEach(g=>g.remove());const u=window.document.querySelector("#VPContent"),c=u==null?void 0:u.querySelectorAll(".content-container .main img");e.value=(c==null?void 0:c.length)||0;const f=((d=u==null?void 0:u.querySelector(".content-container .main"))==null?void 0:d.textContent)||"";t.value=kf(f)}return Ee(()=>{l()}),(u,c)=>(v(),T("div",bf,[b("p",null,[c[0]||(c[0]=b("svg",{t:"1751011240374",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"13978",width:"16",height:"16"},[b("path",{d:"M960 128H833c0-53-43-96-96-96h-16c-53 0-96 43-96 96H400c0-26.5-10.7-50.5-28.1-67.9C354.5 42.7 330.5 32 304 32h-16c-53 0-96 43-96 96H64c-35.3 0-64 28.6-64 64v736c0 35.3 28.7 64 64 64h896c35.3 0 64-28.7 64-64V192c0-35.4-28.7-64-64-64z m-271 8c0-22.1 17.9-40 40-40s40 17.9 40 40v80c0 22.1-17.9 40-40 40-11 0-21-4.5-28.3-11.7C693.5 237 689 227 689 216v-80z m-433 0c0-22.1 17.9-40 40-40s40 17.9 40 40v80c0 22.1-17.9 40-40 40-11 0-21-4.5-28.3-11.7C260.5 237 256 227 256 216v-80z m704 760c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V448h896v448z","p-id":"13979",fill:"#f98328"}),b("path",{d:"M96 512h256v160H96zM96 704h256v160H96zM384 512h256v160H384zM384 704h256v160H384zM672 512h256v160H672zM672 704h256v160H672z","p-id":"13980",fill:"#f8ae75","data-spm-anchor-id":"a313x.search_index.
2270.i16.2a553a81YgfA2S",class:""})],-1)),ye(" 更新时间: "+Y(n.value.toLocaleDateString())+"  ",1),c[1]||(c[1]=b("svg",{t:"1751011085940",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"11932",width:"16",height:"16"},[b("path",{d:"M367.3984 422.4l-174.6432 22.5536s-33.3568 1.3952-25.0112 32.3072l119.552 429.696s3.584 21.9776 30.208 12.0832L473.6 874.7776 367.3984 422.4z",fill:"#FF7805","p-id":"11933"}),b("path",{d:"M78.1696 320L268.8 273.1776l-72.064-52.672L130.1888 217.6s-63.4368 12.416-52.032 102.4z",fill:"#FFBF59","p-id":"11934"}),b("path",{d:"M883.1104 764.288L351.488 921.6s-52.7104-477.6064-113.7152-615.936c0 0-31.9488-77.6448-109.7728-85.44L695.1296 89.6896s92.5056-6.7456 125.7984 93.8624c0-0.0384 64.9984 185.216 62.1824 580.736z",fill:"#FFECCD","p-id":"11935"}),b("path",{d:"M328.96 301.3504l405.7088-108.9664c5.9904-1.6128 12.1088 2.0224 14.0416 8.32l5.888 19.1104c1.024 3.3664 0.7296 7.04-0.8576 10.1376a11.9552 11.9552 0 0 1-7.4752 6.2208l-407.2832 109.056a11.0336 11.0336 0 0 1-8.9344-1.472 12.6592 12.6592 0 0 1-5.3504-7.8592l-4.352-19.1872c-1.536-6.7968 2.304-13.6704 8.6016-15.36zM354.6112 412.7872l407.6288-117.9776a10.496 10.496 0 0 1 9.1392 1.664c2.7264 1.9584 4.6464 5.12 5.3376 8.768l3.8016 20.096c1.3952 7.296-2.4832 14.5408-8.704 16.3584l-407.0656 118.6944a10.496 10.496 0 0 1-9.024-1.5744 13.8368 13.8368 0 0 1-5.4016-8.5504l-4.3776-20.8c-1.5488-7.3856 2.3296-14.848 8.6656-16.6784z",fill:"#FFD694","p-id":"11936"}),b("path",{d:"M281.6 636.544a51.2 51.2 0 0 1 44.48-50.7648l177.4848-23.5136a51.2 51.2 0 0 0 33.4592-19.0208l90.2016-114.176A51.2 51.2 0 0 1 667.4048 409.6H896a51.2 51.2 0 0 1 51.2 51.2V853.4784a51.2 51.2 0 0 1-48.7296 51.1488l-563.2 27.1872A51.2 51.2 0 0 1 281.6 880.6656V636.544z",fill:"#FA9600","p-id":"11937"}),b("path",{d:"M788.9536 563.2H719.232a16.7552 16.7552 0 0 0-11.9552 5.8368c-3.1488 3.584-4.9024 8.3712-4.9024 13.3632s1.7536 9.7792 4.9024 13.3632 7.4368 5.6704 11.9552 5.8368h27.648l-74.7904 82.4064-10.0864 11.1232-1.7536 1.8944-22.3104 24.576-80.6272-88.768a17.3568 17.3568 0 0 0-5.632-4.1984 15.9616 15.9616 0 0 0-13.3504 0 17.3568 17.3568 0 0 0-5.6448 4.1984l-92.9536 102.3744c-3.0208 3.648-4.6336 8.448-4.5312 13.376 0.1152 4.928 1.9328 9.6256 5.1072 13.12 3.1744 3.4944 7.424 5.504 11.904 5.6192 4.48 0.128 8.832-1.664 12.16-4.992l80.6144-88.8064 80.64 88.8192c1.6 1.792 3.52 3.2128 5.632 4.1856a15.9488 15.9488 0 0 0 13.3504 0c2.112-0.9728 4.032-2.3936 5.632-4.1856l34.6624-38.1824 86.6304-95.424v30.4256a20.992 20.992 0 0 0 1.152 7.552c0.8448 2.3936 2.1248 4.5824 3.7504 6.4384 1.6256 1.8432 3.5712 3.328 5.7216 4.3264a16.064 16.064 0 0 0 13.6064 0c2.1504-0.9984 4.096-2.4832 5.7344-4.3264a19.584 19.584 0 0 0 3.7376-6.4512 20.992 20.992 0 0 0 1.152-7.5392v-76.8c0-5.0816-1.8432-9.9584-5.12-13.5552a16.6656 16.6656 0 0 0-12.3136-5.6064z",fill:"#FEE4BB","p-id":"11938"})],-1)),ye(" 字数: "+Y(t.value)+" 字  ",1),c[2]||(c[2]=b("svg",{t:"1751011557748",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"21978",width:"16",height:"16"},[b("path",{d:"M510.476308 235.176577a48.701392 48.701392 0 0 0-48.526835 48.526834v244.379744a48.526835 48.526835 0 1 0 96.879113 0v-244.379744a48.526835 48.526835 0 0 0-48.352278-48.526834z",fill:"#2e55f5","p-id":"21979","data-spm-anchor-id":"a313x.search_index.0.i39.2a553a81YgfA2S",class:""}),b("path",{d:"M513.094662 486.713155a48.526835 48.526835 0 0 0-34.911392 82.739999l120.967973 120.967973a48.526835 48.526835 0 1 0 68.600885-68.600885l-120.967972-120.967973a48.352278 48.352278 0 0 0-34.911392-14.139114z",fill:"#2e55f5","p-id":"21980","data-spm-anchor-id":"a313x.search_index.0.i38.2a553a81YgfA2S",class:""}),b("path",{d:"M384.097069 622.867584a74.012151 74.012151 0 1 0 74.012151 74.01215A73.837594 73.837594 0 0 0 384.097069 622.867584z",fill:"#1296db",opacity:".3","p-id":"21981","data-spm-anchor-id":"a313x.search_index.0.i41.2a553a81YgfA2S",class:""}),b("path",{d:"M511.872764 1023.999476a508.833537 508.833537 0 0 1-173.335061-30.198354 43.63924 43.63924 0 1 1 29.674683-82.041771 425.046196 425.046196 0 1 0-163.908985-107.003416 43.63924 43.63924 0 1 1-63.189619 60.222151 511.975562 511.975562 0 1 1 370.758982 159.02139z",fill:"#2e55f5","p-id":"21982","data-spm-anchor-id":"a313x.search_index.
2270.i37.2a553a81YgfA2S",class:""})],-1)),ye(" 阅读时长约: "+Y(a.value)+" 分钟 ",1)])]))}}),Tf={class:"LastUpdated"},Sf=L({__name:"update",setup(o){const{page:s}=ot(),n=F(()=>new Date(s.value.lastUpdated));return(t,e)=>(v(),T("div",Tf,[b("p",null,"⌛️更新时间: "+Y(n.value.toLocaleString()),1)]))}}),Ef={key:0,class:"fdate"},wf=L({__name:"tags",setup(o){const{frontmatter:s}=ot();return(n,t)=>m(s).date?(v(),T("span",Ef,"🔥 更新时间:"+Y(m(s).date),1)):A("",!0)}}),If={...si,enhanceApp({app:o}){o.component("ArticleMetadata",Cf),o.component("update",Sf),o.component("xgplayer",mf),o.component("Linkcard",su)},MyLayout(){return Ht(si.Layout,null,{"doc-before":()=>Ht(wf)})},Layout(){return Ht(yf,null,{})}};export{If as R,No as c,j as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.