UNPKG

@kwai-video-team/kwai-player-web

Version:

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

8 lines 446 kB
(function(ge,ce){typeof exports=="object"&&typeof module!="undefined"?ce(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],ce):(ge=typeof globalThis!="undefined"?globalThis:ge||self,ce(ge.KwaiPlayer={},ge.Vue))})(this,function(ge,ce){"use strict";var rf=Object.defineProperty;var Qs=Object.getOwnPropertySymbols;var nf=Object.prototype.hasOwnProperty,of=Object.prototype.propertyIsEnumerable;var Zs=(ge,ce,mt)=>ce in ge?rf(ge,ce,{enumerable:!0,configurable:!0,writable:!0,value:mt}):ge[ce]=mt,Xs=(ge,ce)=>{for(var mt in ce||(ce={}))nf.call(ce,mt)&&Zs(ge,mt,ce[mt]);if(Qs)for(var mt of Qs(ce))of.call(ce,mt)&&Zs(ge,mt,ce[mt]);return ge};Number.isFinite||(Number.isFinite=t=>typeof t=="number"&&isFinite(t)),Array.prototype.find||(Array.prototype.find=function(t,e){if(this===null||this===void 0)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof t!="function")throw new TypeError("callback must be a function");const r=Object(this),s=r.length>>>0;for(let l=0;l<s;l++)if(t.call(e,r[l],l,r))return r[l]}),Array.prototype.findIndex||(Array.prototype.findIndex=function(t,e){if(this===null||this===void 0)throw new TypeError("Array.prototype.findIndex called on null or undefined");if(typeof t!="function")throw new TypeError("callback must be a function");const r=Object(this),s=r.length>>>0;for(let l=0;l<s;l++)if(l in r&&t.call(e,r[l],l,r))return l;return-1}),Array.prototype.fill||(Array.prototype.fill=function(t,e=0,r=this.length){if(this===null||this===void 0)throw new TypeError("Array.prototype.fill called on null or undefined");const s=Object(this),l=s.length>>>0,d=e>>0,f=r>>0,c=d<0?Math.max(l+d,0):Math.min(d,l),R=f<0?Math.max(l+f,0):Math.min(f,l);for(let A=c;A<R;A++)s[A]=t;return s});var mt=Object.defineProperty,Cl=(t,e,r)=>e in t?mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Rn=(t,e,r)=>(Cl(t,typeof e!="symbol"?e+"":e,r),r),$t=function(t){var e={};function r(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=e,r.d=function(s,l,d){r.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:d})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,l){if(1&l&&(s=r(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var f in s)r.d(d,f,function(c){return s[c]}.bind(null,f));return d},r.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(l,"a",l),l},r.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},r.p="",r(r.s=8)}([function(t,e,r){var s=r(5);function l(d,f){for(var c=0;c<f.length;c++){var R=f[c];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(d,s(R.key),R)}}t.exports=function(d,f,c){return f&&l(d.prototype,f),c&&l(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(s){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t.exports.__esModule=!0,t.exports.default=t.exports,r(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(7)();t.exports=s;try{regeneratorRuntime=s}catch(l){typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},function(t,e){function r(){return t.exports=r=Object.assign?Object.assign.bind():function(s){for(var l=1;l<arguments.length;l++){var d=arguments[l];for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(s[f]=d[f])}return s},t.exports.__esModule=!0,t.exports.default=t.exports,r.apply(this,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(s,l,d,f,c,R,A){try{var v=s[R](A),O=v.value}catch(m){return void d(m)}v.done?l(O):Promise.resolve(O).then(f,c)}t.exports=function(s){return function(){var l=this,d=arguments;return new Promise(function(f,c){var R=s.apply(l,d);function A(O){r(R,f,c,A,v,"next",O)}function v(O){r(R,f,c,A,v,"throw",O)}A(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default,l=r(6);t.exports=function(d){var f=l(d,"string");return s(f)=="symbol"?f:f+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default;t.exports=function(l,d){if(s(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,d||"default");if(s(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(l)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default;function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=l=function(){return f},t.exports.__esModule=!0,t.exports.default=t.exports;var d,f={},c=Object.prototype,R=c.hasOwnProperty,A=Object.defineProperty||function(C,M,B){C[M]=B.value},v=typeof Symbol=="function"?Symbol:{},O=v.iterator||"@@iterator",m=v.asyncIterator||"@@asyncIterator",x=v.toStringTag||"@@toStringTag";function g(C,M,B){return Object.defineProperty(C,M,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[M]}try{g({},"")}catch(C){g=function(M,B,Z){return M[B]=Z}}function E(C,M,B,Z){var K=M&&M.prototype instanceof I?M:I,se=Object.create(K.prototype),ve=new z(Z||[]);return A(se,"_invoke",{value:S(C,B,ve)}),se}function k(C,M,B){try{return{type:"normal",arg:C.call(M,B)}}catch(Z){return{type:"throw",arg:Z}}}f.wrap=E;var y="suspendedStart",w="executing",_="completed",b={};function I(){}function P(){}function G(){}var H={};g(H,O,function(){return this});var Q=Object.getPrototypeOf,ue=Q&&Q(Q(Y([])));ue&&ue!==c&&R.call(ue,O)&&(H=ue);var he=G.prototype=I.prototype=Object.create(H);function j(C){["next","throw","return"].forEach(function(M){g(C,M,function(B){return this._invoke(M,B)})})}function F(C,M){function B(K,se,ve,fe){var Re=k(C[K],C,se);if(Re.type!=="throw"){var ee=Re.arg,ze=ee.value;return ze&&s(ze)=="object"&&R.call(ze,"__await")?M.resolve(ze.__await).then(function(Ie){B("next",Ie,ve,fe)},function(Ie){B("throw",Ie,ve,fe)}):M.resolve(ze).then(function(Ie){ee.value=Ie,ve(ee)},function(Ie){return B("throw",Ie,ve,fe)})}fe(Re.arg)}var Z;A(this,"_invoke",{value:function(K,se){function ve(){return new M(function(fe,Re){B(K,se,fe,Re)})}return Z=Z?Z.then(ve,ve):ve()}})}function S(C,M,B){var Z=y;return function(K,se){if(Z===w)throw Error("Generator is already running");if(Z===_){if(K==="throw")throw se;return{value:d,done:!0}}for(B.method=K,B.arg=se;;){var ve=B.delegate;if(ve){var fe=D(ve,B);if(fe){if(fe===b)continue;return fe}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(Z===y)throw Z=_,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);Z=w;var Re=k(C,M,B);if(Re.type==="normal"){if(Z=B.done?_:"suspendedYield",Re.arg===b)continue;return{value:Re.arg,done:B.done}}Re.type==="throw"&&(Z=_,B.method="throw",B.arg=Re.arg)}}}function D(C,M){var B=M.method,Z=C.iterator[B];if(Z===d)return M.delegate=null,B==="throw"&&C.iterator.return&&(M.method="return",M.arg=d,D(C,M),M.method==="throw")||B!=="return"&&(M.method="throw",M.arg=new TypeError("The iterator does not provide a '"+B+"' method")),b;var K=k(Z,C.iterator,M.arg);if(K.type==="throw")return M.method="throw",M.arg=K.arg,M.delegate=null,b;var se=K.arg;return se?se.done?(M[C.resultName]=se.value,M.next=C.nextLoc,M.method!=="return"&&(M.method="next",M.arg=d),M.delegate=null,b):se:(M.method="throw",M.arg=new TypeError("iterator result is not an object"),M.delegate=null,b)}function U(C){var M={tryLoc:C[0]};1 in C&&(M.catchLoc=C[1]),2 in C&&(M.finallyLoc=C[2],M.afterLoc=C[3]),this.tryEntries.push(M)}function N(C){var M=C.completion||{};M.type="normal",delete M.arg,C.completion=M}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(U,this),this.reset(!0)}function Y(C){if(C||C===""){var M=C[O];if(M)return M.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var B=-1,Z=function K(){for(;++B<C.length;)if(R.call(C,B))return K.value=C[B],K.done=!1,K;return K.value=d,K.done=!0,K};return Z.next=Z}}throw new TypeError(s(C)+" is not iterable")}return P.prototype=G,A(he,"constructor",{value:G,configurable:!0}),A(G,"constructor",{value:P,configurable:!0}),P.displayName=g(G,x,"GeneratorFunction"),f.isGeneratorFunction=function(C){var M=typeof C=="function"&&C.constructor;return!!M&&(M===P||(M.displayName||M.name)==="GeneratorFunction")},f.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,G):(C.__proto__=G,g(C,x,"GeneratorFunction")),C.prototype=Object.create(he),C},f.awrap=function(C){return{__await:C}},j(F.prototype),g(F.prototype,m,function(){return this}),f.AsyncIterator=F,f.async=function(C,M,B,Z,K){K===void 0&&(K=Promise);var se=new F(E(C,M,B,Z),K);return f.isGeneratorFunction(M)?se:se.next().then(function(ve){return ve.done?ve.value:se.next()})},j(he),g(he,x,"Generator"),g(he,O,function(){return this}),g(he,"toString",function(){return"[object Generator]"}),f.keys=function(C){var M=Object(C),B=[];for(var Z in M)B.push(Z);return B.reverse(),function K(){for(;B.length;){var se=B.pop();if(se in M)return K.value=se,K.done=!1,K}return K.done=!0,K}},f.values=Y,z.prototype={constructor:z,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(N),!C)for(var M in this)M.charAt(0)==="t"&&R.call(this,M)&&!isNaN(+M.slice(1))&&(this[M]=d)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var M=this;function B(Re,ee){return se.type="throw",se.arg=C,M.next=Re,ee&&(M.method="next",M.arg=d),!!ee}for(var Z=this.tryEntries.length-1;Z>=0;--Z){var K=this.tryEntries[Z],se=K.completion;if(K.tryLoc==="root")return B("end");if(K.tryLoc<=this.prev){var ve=R.call(K,"catchLoc"),fe=R.call(K,"finallyLoc");if(ve&&fe){if(this.prev<K.catchLoc)return B(K.catchLoc,!0);if(this.prev<K.finallyLoc)return B(K.finallyLoc)}else if(ve){if(this.prev<K.catchLoc)return B(K.catchLoc,!0)}else{if(!fe)throw Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return B(K.finallyLoc)}}}},abrupt:function(C,M){for(var B=this.tryEntries.length-1;B>=0;--B){var Z=this.tryEntries[B];if(Z.tryLoc<=this.prev&&R.call(Z,"finallyLoc")&&this.prev<Z.finallyLoc){var K=Z;break}}K&&(C==="break"||C==="continue")&&K.tryLoc<=M&&M<=K.finallyLoc&&(K=null);var se=K?K.completion:{};return se.type=C,se.arg=M,K?(this.method="next",this.next=K.finallyLoc,b):this.complete(se)},complete:function(C,M){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&M&&(this.next=M),b},finish:function(C){for(var M=this.tryEntries.length-1;M>=0;--M){var B=this.tryEntries[M];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),N(B),b}},catch:function(C){for(var M=this.tryEntries.length-1;M>=0;--M){var B=this.tryEntries[M];if(B.tryLoc===C){var Z=B.completion;if(Z.type==="throw"){var K=Z.arg;N(B)}return K}}throw Error("illegal catch attempt")},delegateYield:function(C,M,B){return this.delegate={iterator:Y(C),resultName:M,nextLoc:B},this.method==="next"&&(this.arg=d),b}},f}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){r.r(e),r.d(e,"KwaiVideoLocalLog",function(){return he}),r.d(e,"LogLevel",function(){return m}),r.d(e,"DefaultLogger",function(){return k}),r.d(e,"Logger",function(){return E}),r.d(e,"printVersion",function(){return R}),r.d(e,"DEFAULT_LOG_LEVEL",function(){return x});var s=r(0),l=r.n(s),d=r(3),f=r.n(d),c={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function R(j,F){console.log("%c "+j+" %c "+F+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")}var A=function(){function j(){this.timeout=6048e5}var F=j.prototype;return F.write=function(S,D){if(j.available)try{localStorage.setItem(S,JSON.stringify({value:D,time:Date.now()}))}catch(U){}},F.read=function(S,D){if(D===void 0&&(D=!0),j.available)try{var U=localStorage.getItem(S);if(U){var N=JSON.parse(U),z=N.value,Y=N.time,C=Y===void 0?0:Y;if(!D||Date.now()-C<(typeof D=="number"?D:this.timeout))return z}}catch(M){}},l()(j,null,[{key:"available",get:function(){if(j._available===void 0)try{localStorage.setItem("alg","test"),j._available=!0}catch(S){j._available=!1}return j._available}}])}();A._available=void 0;var v,O=A,m=function(j){return j.NONE="none",j.ERROR="e",j.WARN="w",j.INFO="i",j.DEBUG="d",j.VERBOSE="v",j}({}),x=m.ERROR,g=((v={})[m.NONE]={value:1,str:"N"},v[m.ERROR]={value:100,str:"E"},v[m.WARN]={value:200,str:"W"},v[m.INFO]={value:300,str:"I"},v[m.DEBUG]={value:400,str:"D"},v[m.VERBOSE]={value:500,str:"V"},v),E=function(){function j(S){if(this._name="kwai-v",this._level=x,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&location.protocol==="blob:"){var D,U=location.href.split("/"),N=(D=U[U.length-1])==null?void 0:D.match(/(\w+)-/);N&&(this._workerTag=S?S+"-"+N[1]:N[1])}else S&&(this._workerTag=S)}j.loadLogLevel=function(S,D){if(D===void 0&&(D=!0),location.href){var U=new RegExp(S+"=([a-z]{1})"),N=location.href.match(U);if(N&&N.length>1){var z=N[1];if(this._isValueInLevel(z))return z}}var Y=new O().read(S,D);if(this._isValueInLevel(Y))return Y},j.saveLogLevel=function(S,D){this._isValueInLevel(D)&&new O().write(S,D)},j._isValueInLevel=function(S){return Object.values(m).indexOf(S)!==-1};var F=j.prototype;return F.setOutput=function(S){return this._output=S,this},F.setLevel=function(S){return this._level=S,this},F.setId=function(S){return this._id=S,this},F.setName=function(S){return this._name=S,this},F.getLevel=function(){return this._level},F.getOutput=function(){return this._output},F.hasOutput=function(){return!!this._output},F.e=function(S){if(this._isLevelEnabled(this._level,m.ERROR)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.ERROR,S,U);try{var Y;(Y=this._output)==null||Y.e.apply(Y,[z].concat(U))}catch(C){}}},F.w=function(S){if(this._isLevelEnabled(this._level,m.WARN)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.WARN,S,U);try{var Y;(Y=this._output)==null||Y.w.apply(Y,[z].concat(U))}catch(C){}}},F.i=function(S){if(this._isLevelEnabled(this._level,m.INFO)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.INFO,S,U);try{var Y;(Y=this._output)==null||Y.i.apply(Y,[z].concat(U))}catch(C){}}},F.d=function(S){if(this._isLevelEnabled(this._level,m.DEBUG)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.DEBUG,S,U);try{var Y;(Y=this._output)==null||Y.d.apply(Y,[z].concat(U))}catch(C){}}},F.v=function(S){if(this._isLevelEnabled(this._level,m.VERBOSE)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.VERBOSE,S,U);try{var Y;(Y=this._output)==null||Y.v.apply(Y,[z].concat(U))}catch(C){}}},F._isLevelEnabled=function(S,D){return g[S].value>=g[D].value},F._printLog=function(S,D,U){var N,z,Y=typeof D;if(Y==="object")D=((z=D)==null?void 0:z.constructor.name)||"unknown";else if(Y==="function"){var C;D=((C=Object.getOwnPropertyDescriptor(D,"name"))==null?void 0:C.value)||"unknown"}var M,B,Z=(((N=g[S])==null?void 0:N.str)||"")+"|"+this._name+"["+(typeof this._id=="function"?this._id():this._id)+"]["+this._workerTag+"]::"+D;return S===m.ERROR?(M=console).error.apply(M,[Z].concat(U.slice(0))):(B=console).log.apply(B,[Z].concat(U.slice(0))),Z},j}(),k=new E,y=function(){return l()(function j(F){this._logger=void 0,this._id=0,this._config=c,this._id=j._id,j._id++,this._logger=new E().setId(this._id).setLevel(m.INFO),this._config=f()({},c,F)},[{key:"config",get:function(){return this._config}},{key:"logger",get:function(){return this._logger}},{key:"id",get:function(){return this._id}}],[{key:"packName",get:function(){return"ll_es"}},{key:"version",get:function(){return"1.0.13"}},{key:"buildTime",get:function(){return"Tue Oct 08 2024 17:18:49 GMT+0800 (中国标准时间)"}}])}();y._id=0;var w=r(4),_=r.n(w),b=r(2),I=r.n(b),P=function(){function j(S,D,U,N,z){var Y=this;z===void 0&&(z=1),this._logger=void 0,this._name=void 0,this._storeName=void 0,this._dbIndex=void 0,this._version=void 0,this._taskQueue=[],this._openReq=void 0,this._isTransactionActive=!1,this._runTaskQueue=function(){for(;Y._taskQueue.length;){var C=Y._taskQueue.shift();C&&Y.run(C.task,C.mode)}},this._logger=S,this._name=D,this._storeName=U,this._dbIndex=N,this._version=z}var F=j.prototype;return F.init=function(){var S=this;if(!this._openReq&&indexedDB){var D=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",D),D.onerror=function(){S._logger.i("idb-wrapper","open error.")},D.onsuccess=function(){S._logger.i("idb-wrapper","open success."),S._runTaskQueue()},D.onupgradeneeded=function(){S._logger.i("idb-wrapper","open upgradeneeded."),D.result.objectStoreNames.contains(S._storeName)&&D.result.deleteObjectStore(S._storeName);var U=D.result.createObjectStore(S._storeName,{keyPath:"id",autoIncrement:!0});S._dbIndex&&S._dbIndex.forEach(function(N){U.createIndex(N.name,N.keyPath,N.option)})}}},F.run=function(S,D){if(D===void 0&&(D="readwrite"),this.init(),this._openReq&&this._openReq.readyState==="done"&&!this._openReq.error)return this._doTask(S,D);this.state!=="error"&&(this._taskQueue.push({task:S,mode:D}),this._taskQueue.length>1e3&&this._taskQueue.shift())},F.close=function(){var S=this;this._logger.i("idb-wrapper","close"),this._openReq&&(this._openReq.readyState==="done"?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){S.close()})},F.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},F._doTask=function(S,D){var U=this;if(D===void 0&&(D="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var N=this._openReq.result.transaction(this._storeName,D),z=void 0;N.oncomplete=function(){U._isTransactionActive=!1,S.callback&&S.callback(z),U._runTaskQueue()},N.onabort=N.onerror=function(){U._isTransactionActive=!1,S.callback&&S.callback(z),U._runTaskQueue()},z=S.exec(N.objectStore(this._storeName))}catch(Y){}else S.callback&&S.callback()},l()(j,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&this._openReq.readyState==="done"?this._openReq.error?"error":"ready":"idle"}}])}(),G=[{name:"id",keyPath:"id",option:{unique:!0}}],H=[function(){function j(S){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=S,this._idb=new P(S.logger,S.config.idbName,S.config.idbName,G),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}j.isSupported=function(){return typeof indexedDB<"u"};var F=j.prototype;return F.saveLog=function(S){var D=this,U={exec:function(N){return N.add({value:S})},callback:function(N){D._saveCount++,D._saveCount%D._reCountOnSaveCount==0&&D._count(),N!=null&&N.error&&D._ctx.logger.i("idb-backend","save log err",N.error)}};this._idb.run(U)},F.exportLog=function(){var S=_()(I.a.mark(function D(){var U=this;return I.a.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.abrupt("return",new Promise(function(z,Y){U._ctx.logger.i("idb-backend","export start");var C={exec:function(M){return M.getAll()},callback:function(M){z(M===void 0?"":U._mergeGetAll(M.result))}};U._idb.run(C,"readonly")}));case 1:case"end":return N.stop()}},D)}));return function(){return S.apply(this,arguments)}}(),F.destroy=function(){this._idb.destroy()},F.clean=function(){this._idb.run({exec:function(S){return S.clear()}})},F._count=function(){var S=this,D={exec:function(U){return U.count()},callback:function(U){U!=null&&U.error||U==null||!U.result||(S._ctx.logger.i("idb-backend","count: "+U.result+" max: "+S._ctx.config.idbMaxDataCount),S._logCount=U.result,S._logCount>=S._ctx.config.idbMaxDataCount&&!S._reduceData&&S._deleteFromHead(S._logCount-Math.round(S._ctx.config.idbMaxDataCount/2)))}};this._idb.run(D)},F._deleteFromHead=function(S){var D=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var U={exec:function(N){return N.openCursor()},callback:function(N){if(D._reduceData=!1,N!=null&&N.result){var z=IDBKeyRange.bound(N.result.key,N.result.key+S,!1,!1),Y={exec:function(C){return D._ctx.logger.i("idb-backend","del: "+z.lower+"~"+z.upper),C.delete(z)},callback:function(C){D._ctx.logger.i("idb-backend","del result: "+!(C==null||!C.error))}};D._idb.run(Y)}}};this._idb.run(U)},F._mergeGetAll=function(S){return S.length?S.reduce(function(D,U){return""+D+U.value+`
`},""):""},l()(j,[{key:"isActive",get:function(){return this._idb.state!=="error"}}])}()];function Q(j,F,S){var D=new Date;typeof j!="string"&&(j=j.toString());var U=D.toLocaleString()+"."+D.getMilliseconds().toString().padStart(3,"0")+"|"+j+"|";return F.forEach(function(N){U+=typeof N=="object"?JSON.stringify(N)+" ":N+" "}),U.length>S?U.substring(0,S):U}function ue(j){return j.join(`
`)}var he=function(){function j(S){var D=this;this._ctx=void 0,this._backend=void 0,this._delayTimer=void 0,this._logCache=[],this._loggerForAdd=void 0,this._downloadHref=void 0,this._startDelay=function(){D._delayTimer=setInterval(function(){D._saveLog(!0)},1e3)},this._stopDelay=function(){D._delayTimer&&(clearTimeout(D._delayTimer),D._delayTimer=void 0)},R("kwai-video-local-log","1.0.13"),this._ctx=new y(S);var U=function(N){for(var z=arguments.length,Y=new Array(z>1?z-1:0),C=1;C<z;C++)Y[C-1]=arguments[C];D.addLog.apply(D,[N].concat(Y))};this._loggerForAdd={e:U,w:U,i:U,d:U,v:U},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",S,this._ctx.config),this._backend=function(N){for(var z=0;z<H.length;z++){var Y=H[z];if(Y!=null&&Y.isSupported())return new Y(N)}}(this._ctx),this._backend&&this._startDelay()}j.isSupported=function(){return function(){for(var S=0;S<H.length;S++){var D=H[S];if(D!=null&&D.isSupported())return!0}return!1}()};var F=j.prototype;return F.addLog=function(S){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];this._logCache.push(Q(S,U,this._ctx.config.maxLogLen)),this._saveLog()},F.cleanLog=function(){var S;this._ctx.logger.i("kwai-video-local-log","clean"),(S=this._backend)==null||S.clean()},F.exportLog=function(){var S=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise(function(D,U){S._backend?S._backend.exportLog().then(function(N){D(ue([N].concat(S._logCache)))}):D("")})},F.downloadLog=function(S){var D=this;this._ctx.logger.i("kwai-video-local-log","download log: "+S),this._destroyDownloadHref(),this.exportLog().then(function(U){var N=new Blob([U],{type:"text/plain"});if(document){var z=document.createElement("a");D._downloadHref=z.href=URL.createObjectURL(N),z.download=S||"Log_web_"+new Date().toLocaleString()+".log",document.body.appendChild(z),z.click(),z.remove()}else console.log("无document,当前是否在worker中")})},F.destroy=function(){var S;this._destroyDownloadHref(),(S=this._backend)==null||S.destroy(),this._stopDelay()},F.getLoggerForAdd=function(){return this._loggerForAdd},F._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(S){}},F._saveLog=function(S){if(S===void 0&&(S=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&S)){var D=ue(this._logCache);this._logCache.splice(0,this._logCache.length),D&&this._backend.saveLog(D)}},l()(j,null,[{key:"version",get:function(){return"1.0.13"}}])}();e.default=he}]);$t===void 0&&console.error("esm-webpack-plugin: nothing exported!"),$t.KwaiVideoLocalLog;const Sn=$t.LogLevel,Ye=$t.DefaultLogger,Ln=$t.Logger,Dl=$t.printVersion;$t.DEFAULT_LOG_LEVEL,$t.default;var Ol=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gr={exports:{}},ci=typeof Reflect=="object"?Reflect:null,kn=ci&&typeof ci.apply=="function"?ci.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Ui;ci&&typeof ci.ownKeys=="function"?Ui=ci.ownKeys:Object.getOwnPropertySymbols?Ui=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ui=function(t){return Object.getOwnPropertyNames(t)};function Nl(t){console&&console.warn&&console.warn(t)}var In=Number.isNaN||function(t){return t!==t};function Be(){Be.init.call(this)}gr.exports=Be,gr.exports.once=Bl,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var xn=10;function Fi(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Be,"defaultMaxListeners",{enumerable:!0,get:function(){return xn},set:function(t){if(typeof t!="number"||t<0||In(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");xn=t}}),Be.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Be.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||In(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Cn(t){return t._maxListeners===void 0?Be.defaultMaxListeners:t._maxListeners}Be.prototype.getMaxListeners=function(){return Cn(this)},Be.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s=t==="error",l=this._events;if(l!==void 0)s=s&&l.error===void 0;else if(!s)return!1;if(s){var d;if(e.length>0&&(d=e[0]),d instanceof Error)throw d;var f=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw f.context=d,f}var c=l[t];if(c===void 0)return!1;if(typeof c=="function")kn(c,this,e);else for(var R=c.length,A=Pn(c,R),r=0;r<R;++r)kn(A[r],this,e);return!0};function Dn(t,e,r,s){var l,d,f;if(Fi(r),d=t._events,d===void 0?(d=t._events=Object.create(null),t._eventsCount=0):(d.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),d=t._events),f=d[e]),f===void 0)f=d[e]=r,++t._eventsCount;else if(typeof f=="function"?f=d[e]=s?[r,f]:[f,r]:s?f.unshift(r):f.push(r),l=Cn(t),l>0&&f.length>l&&!f.warned){f.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=f.length,Nl(c)}return t}Be.prototype.addListener=function(t,e){return Dn(this,t,e,!1)},Be.prototype.on=Be.prototype.addListener,Be.prototype.prependListener=function(t,e){return Dn(this,t,e,!0)};function Pl(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function On(t,e,r){var s={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},l=Pl.bind(s);return l.listener=r,s.wrapFn=l,l}Be.prototype.once=function(t,e){return Fi(e),this.on(t,On(this,t,e)),this},Be.prototype.prependOnceListener=function(t,e){return Fi(e),this.prependListener(t,On(this,t,e)),this},Be.prototype.removeListener=function(t,e){var r,s,l,d,f;if(Fi(e),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(l=-1,d=r.length-1;d>=0;d--)if(r[d]===e||r[d].listener===e){f=r[d].listener,l=d;break}if(l<0)return this;l===0?r.shift():Ul(r,l),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,f||e)}return this},Be.prototype.off=Be.prototype.removeListener,Be.prototype.removeAllListeners=function(t){var e,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var l=Object.keys(r),d;for(s=0;s<l.length;++s)d=l[s],d!=="removeListener"&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this};function Mn(t,e,r){var s=t._events;if(s===void 0)return[];var l=s[e];return l===void 0?[]:typeof l=="function"?r?[l.listener||l]:[l]:r?Fl(l):Pn(l,l.length)}Be.prototype.listeners=function(t){return Mn(this,t,!0)},Be.prototype.rawListeners=function(t){return Mn(this,t,!1)},Be.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Nn.call(t,e)},Be.prototype.listenerCount=Nn;function Nn(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Be.prototype.eventNames=function(){return this._eventsCount>0?Ui(this._events):[]};function Pn(t,e){for(var r=new Array(e),s=0;s<e;++s)r[s]=t[s];return r}function Ul(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Fl(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Bl(t,e){return new Promise(function(r,s){function l(f){t.removeListener(e,d),s(f)}function d(){typeof t.removeListener=="function"&&t.removeListener("error",l),r([].slice.call(arguments))}Un(t,e,d,{once:!0}),e!=="error"&&Hl(t,l,{once:!0})})}function Hl(t,e,r){typeof t.on=="function"&&Un(t,"error",e,r)}function Un(t,e,r,s){if(typeof t.on=="function")s.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function l(d){s.once&&t.removeEventListener(e,l),r(d)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Vl=gr.exports,Fn=function(){if(typeof Map<"u")return Map;function t(e,r){var s=-1;return e.some(function(l,d){return l[0]===r?(s=d,!0):!1}),s}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var s=t(this.__entries__,r),l=this.__entries__[s];return l&&l[1]},e.prototype.set=function(r,s){var l=t(this.__entries__,r);~l?this.__entries__[l][1]=s:this.__entries__.push([r,s])},e.prototype.delete=function(r){var s=this.__entries__,l=t(s,r);~l&&s.splice(l,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,s){s===void 0&&(s=null);for(var l=0,d=this.__entries__;l<d.length;l++){var f=d[l];r.call(s,f[1],f[0])}},e}()}(),yr=typeof window<"u"&&typeof document<"u"&&window.document===document,Bi=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),Gl=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Bi):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),Wl=2;function jl(t,e){var r=!1,s=!1,l=0;function d(){r&&(r=!1,t()),s&&c()}function f(){Gl(d)}function c(){var R=Date.now();if(r){if(R-l<Wl)return;s=!0}else r=!0,s=!1,setTimeout(f,e);l=R}return c}var Kl=20,zl=["top","right","bottom","left","width","height","size","weight"],Jl=typeof MutationObserver<"u",$l=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=jl(this.refresh.bind(this),Kl)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,s=r.indexOf(e);~s&&r.splice(s,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!yr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Jl?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!yr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,s=r===void 0?"":r,l=zl.some(function(d){return!!~s.indexOf(d)});l&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Bn=function(t,e){for(var r=0,s=Object.keys(e);r<s.length;r++){var l=s[r];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},di=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Bi},Hn=Vi(0,0,0,0);function Hi(t){return parseFloat(t)||0}function Vn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(s,l){var d=t["border-"+l+"-width"];return s+Hi(d)},0)}function ql(t){for(var e=["top","right","bottom","left"],r={},s=0,l=e;s<l.length;s++){var d=l[s],f=t["padding-"+d];r[d]=Hi(f)}return r}function Yl(t){var e=t.getBBox();return Vi(0,0,e.width,e.height)}function Ql(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return Hn;var s=di(t).getComputedStyle(t),l=ql(s),d=l.left+l.right,f=l.top+l.bottom,c=Hi(s.width),R=Hi(s.height);if(s.boxSizing==="border-box"&&(Math.round(c+d)!==e&&(c-=Vn(s,"left","right")+d),Math.round(R+f)!==r&&(R-=Vn(s,"top","bottom")+f)),!Xl(t)){var A=Math.round(c+d)-e,v=Math.round(R+f)-r;Math.abs(A)!==1&&(c-=A),Math.abs(v)!==1&&(R-=v)}return Vi(l.left,l.top,c,R)}var Zl=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof di(t).SVGGraphicsElement}:function(t){return t instanceof di(t).SVGElement&&typeof t.getBBox=="function"}}();function Xl(t){return t===di(t).document.documentElement}function eu(t){return yr?Zl(t)?Yl(t):Ql(t):Hn}function tu(t){var e=t.x,r=t.y,s=t.width,l=t.height,d=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,f=Object.create(d.prototype);return Bn(f,{x:e,y:r,width:s,height:l,top:r,right:e+s,bottom:l+r,left:e}),f}function Vi(t,e,r,s){return{x:t,y:e,width:r,height:s}}var iu=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Vi(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=eu(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),ru=function(){function t(e,r){var s=tu(r);Bn(this,{target:e,contentRect:s})}return t}(),nu=function(){function t(e,r,s){if(this.activeObservations_=[],this.observations_=new Fn,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=s}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof di(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new iu(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof di(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(s){return new ru(s.target,s.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Gn=typeof WeakMap<"u"?new WeakMap:new Fn,Wn=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=$l.getInstance(),s=new nu(e,r,this);Gn.set(this,s)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Wn.prototype[t]=function(){var e;return(e=Gn.get(this))[t].apply(e,arguments)}}),function(){return typeof Bi.ResizeObserver<"u"?Bi.ResizeObserver:Wn}();var jn={},ou=Object.prototype.hasOwnProperty,au;function Kn(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return null}}function zn(t){try{return encodeURIComponent(t)}catch(e){return null}}function su(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},s;s=e.exec(t);){var l=Kn(s[1]),d=Kn(s[2]);l===null||d===null||l in r||(r[l]=d)}return r}function lu(t,e){e=e||"";var r=[],s,l;typeof e!="string"&&(e="?");for(l in t)if(ou.call(t,l)){if(s=t[l],!s&&(s===null||s===au||isNaN(s))&&(s=""),l=zn(l),s=zn(s),l===null||s===null)continue;r.push(l+"="+s)}return r.length?e+r.join("&"):""}jn.stringify=lu,jn.parse=su;var hi=function(t){var e={};function r(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=e,r.d=function(s,l,d){r.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:d})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,l){if(1&l&&(s=r(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var f in s)r.d(d,f,function(c){return s[c]}.bind(null,f));return d},r.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(l,"a",l),l},r.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},r.p="",r(r.s=4)}([function(t,e){function r(s){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t.exports.__esModule=!0,t.exports.default=t.exports,r(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(2);function l(d,f){for(var c=0;c<f.length;c++){var R=f[c];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(d,s(R.key),R)}}t.exports=function(d,f,c){return f&&l(d.prototype,f),c&&l(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(0).default,l=r(3);t.exports=function(d){var f=l(d,"string");return s(f)=="symbol"?f:f+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(0).default;t.exports=function(l,d){if(s(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,d||"default");if(s(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(l)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){function s(g,E){console.log("%c "+g+" %c "+E+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")}r.r(e),r.d(e,"LogLevel",function(){return A}),r.d(e,"DefaultLogger",function(){return x}),r.d(e,"Logger",function(){return m}),r.d(e,"printVersion",function(){return s}),r.d(e,"DEFAULT_LOG_LEVEL",function(){return v});var l=r(1),d=r.n(l),f=function(){function g(){this.timeout=6048e5}var E=g.prototype;return E.write=function(k,y){if(g.available)try{localStorage.setItem(k,JSON.stringify({value:y,time:Date.now()}))}catch(w){}},E.read=function(k,y){if(y===void 0&&(y=!0),g.available)try{var w=localStorage.getItem(k);if(w){var _=JSON.parse(w),b=_.value,I=_.time,P=I===void 0?0:I;if(!y||Date.now()-P<(typeof y=="number"?y:this.timeout))return b}}catch(G){}},d()(g,null,[{key:"available",get:function(){if(g._available===void 0)try{localStorage.setItem("alg","test"),g._available=!0}catch(k){g._available=!1}return g._available}}])}();f._available=void 0;var c,R=f,A=function(g){return g.NONE="none",g.ERROR="e",g.WARN="w",g.INFO="i",g.DEBUG="d",g.VERBOSE="v",g}({}),v=A.ERROR,O=((c={})[A.NONE]={value:1,str:"N"},c[A.ERROR]={value:100,str:"E"},c[A.WARN]={value:200,str:"W"},c[A.INFO]={value:300,str:"I"},c[A.DEBUG]={value:400,str:"D"},c[A.VERBOSE]={value:500,str:"V"},c),m=function(){function g(k){if(this._name="kwai-v",this._level=v,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&location.protocol==="blob:"){var y,w=location.href.split("/"),_=(y=w[w.length-1])==null?void 0:y.match(/(\w+)-/);_&&(this._workerTag=k?k+"-"+_[1]:_[1])}else k&&(this._workerTag=k)}g.loadLogLevel=function(k,y){if(y===void 0&&(y=!0),location.href){var w=new RegExp(k+"=([a-z]{1})"),_=location.href.match(w);if(_&&_.length>1){var b=_[1];if(this._isValueInLevel(b))return b}}var I=new R().read(k,y);if(this._isValueInLevel(I))return I},g.saveLogLevel=function(k,y){this._isValueInLevel(y)&&new R().write(k,y)},g._isValueInLevel=function(k){return Object.values(A).indexOf(k)!==-1};var E=g.prototype;return E.setOutput=function(k){return this._output=k,this},E.setLevel=function(k){return this._level=k,this},E.setId=function(k){return this._id=k,this},E.setName=function(k){return this._name=k,this},E.getLevel=function(){return this._level},E.getOutput=function(){return this._output},E.hasOutput=function(){return!!this._output},E.e=function(k){if(this._isLevelEnabled(this._level,A.ERROR)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.ERROR,k,w);try{var I;(I=this._output)==null||I.e.apply(I,[b].concat(w))}catch(P){}}},E.w=function(k){if(this._isLevelEnabled(this._level,A.WARN)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.WARN,k,w);try{var I;(I=this._output)==null||I.w.apply(I,[b].concat(w))}catch(P){}}},E.i=function(k){if(this._isLevelEnabled(this._level,A.INFO)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.INFO,k,w);try{var I;(I=this._output)==null||I.i.apply(I,[b].concat(w))}catch(P){}}},E.d=function(k){if(this._isLevelEnabled(this._level,A.DEBUG)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.DEBUG,k,w);try{var I;(I=this._output)==null||I.d.apply(I,[b].concat(w))}catch(P){}}},E.v=function(k){if(this._isLevelEnabled(this._level,A.VERBOSE)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.VERBOSE,k,w);try{var I;(I=this._output)==null||I.v.apply(I,[b].concat(w))}catch(P){}}},E._isLevelEnabled=function(k,y){return O[k].value>=O[y].value},E._printLog=function(k,y,w){var _,b,I=typeof y;if(I==="object")y=((b=y)==null?void 0:b.constructor.name)||"unknown";else if(I==="function"){var P;y=((P=Object.getOwnPropertyDescriptor(y,"name"))==null?void 0:P.value)||"unknown"}var G,H,Q=(((_=O[k])==null?void 0:_.str)||"")+"|"+this._name+"["+(typeof this._id=="function"?this._id():this._id)+"]["+this._workerTag+"]::"+y;return k===A.ERROR?(G=console).error.apply(G,[Q].concat(w.slice(0))):(H=console).log.apply(H,[Q].concat(w.slice(0))),Q},g}(),x=new m}]);hi===void 0&&console.error("esm-webpack-plugin: nothing exported!"),hi.LogLevel;const wi=hi.DefaultLogger;hi.Logger,hi.printVersion,hi.DEFAULT_LOG_LEVEL;/*! js-cookie v3.0.5 | MIT */function Gi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)t[s]=r[s]}return t}var uu={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function br(t,e){function r(l,d,f){if(!(typeof document>"u")){f=Gi({},e,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),l=encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var R in f)f[R]&&(c+="; "+R,f[R]!==!0&&(c+="="+f[R].split(";")[0]));return document.cookie=l+"="+t.write(d,l)+c}}function s(l){if(!(typeof document>"u"||arguments.length&&!l)){for(var d=document.cookie?document.cookie.split("; "):[],f={},c=0;c<d.length;c++){var R=d[c].split("="),A=R.slice(1).join("=");try{var v=decodeURIComponent(R[0]);if(f[v]=t.read(A,v),l===v)break}catch(O){}}return l?f[l]:f}}return Object.create({set:r,get:s,remove:function(l,d){r(l,"",Gi({},d,{expires:-1}))},withAttributes:function(l){return br(this.converter,Gi({},this.attributes,l))},withConverter:function(l){return br(Gi({},this.converter,l),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Er=br(uu,{path:"/"});const Ti="did",wr="kwai_player_device_id";function Jn(){try{const t=Math.random()*1e9>>>0,e=[],r="0123456789ABCDEF";for(let l=0;l<7;l++)e.push(r.charAt(Math.random()*16));const s=`web_${t}${e.join("")}`;return wi.i(Ti,"generate nanoId",s),s}catch(t){}return"web_did_generation_failed"}function cu(){let t="";try{t=(Er.get("did")||Er.get("_did")||Er.get("weblogger_did")||"").trim(),wi.i(Ti,"generate deviceId from cookie",t)}catch(e){wi.i(Ti,"generate deviceId from cookie err",e)}try{t?localStorage==null||localStorage.setItem(wr,t):(t=((localStorage==null?void 0:localStorage.getItem(wr))||"").trim(),wi.i(Ti,"generate deviceId from ls",t)),t||(t=Jn(),localStorage==null||localStorage.setItem(wr,t))}catch(e){wi.i(Ti,"generate deviceId from ls err",e)}return t||Jn()}cu();const $n=class si{constructor(){Rn(this,"timeout",7*24*3600*1e3)}write(e,r){if(si.available)try{localStorage.setItem(e,JSON.stringify({value:r,time:Date.now()}))}catch(s){}}read(e,r=!0){if(si.available)try{const s=localStorage.getItem(e);if(s){const{value:l,time:d=0}=JSON.parse(s);if(!r||Date.now()-d<(typeof r=="number"?r:this.timeout))return l}}catch(s){}}static get available(){if(typeof si._available>"u")try{localStorage.setItem("alg","test"),si._available=!0}catch(e){si._available=!1}return si._available}};Rn($n,"_available");let qn=$n;var Tr={exports:{}};(function(t,e){(function(r,s){var l="1.0.2",d="",f="?",c="function",R="undefined",A="object",v="string",O="major",m="model",x="name",g="type",E="vendor",k="version",y="architecture",w="console",_="mobile",b="tablet",I="smarttv",P="wearable",G="embedded",H=255,Q="Amazon",ue="Apple",he="ASUS",j="BlackBerry",F="Browser",S="Chrome",D="Edge",U="Firefox",N="Google",z="Huawei",Y="LG",C="Microsoft",M="Motorola",B="Opera",Z="Samsung",K="Sony",se="Xiaomi",ve="Zebra",fe="Facebook",Re=function(oe,le){var ne={};for(var ye in oe)le[ye]&&le[ye].length%2===0?ne[ye]=le[ye].concat(oe[ye]):ne[ye]=oe[ye];return ne},ee=function(oe){for(var le={},ne=0;ne<oe.length;ne++)le[oe[ne].toUpperCase()]=oe[ne];return le},ze=function(oe,le){return typeof oe===v?Ie(le).indexOf(Ie(oe))!==-1:!1},Ie=function(oe){return oe.toLowerCase()},Gt=function(oe){return typeof oe===v?oe.replace(/[^\d\.]/g,d).split(".")[0]:s},rt=function(oe,le){if(typeof oe===v)return oe=oe.replace(/^\s\s*/,d).replace(/\s\s*$/,d),typeof le===R?oe:oe.substring(0,H)},Ae=function(oe,le){for(var ne=0,ye,ae,St,pe,it,qe;ne<le.length&&!it;){var Lt=le[ne],oi=le[ne+1];for(ye=ae=0;ye<Lt.length&&!it;)if(it=Lt[ye++].exec(oe),it)for(St=0;St<oi.length;St++)qe=it[++ae],pe=oi[St],typeof pe===A&&pe.length>0?pe.length===2?typeof pe[1]==c?this[pe[0]]=pe[1].call(this,qe):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===c&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=qe?pe[1].call(this,qe,pe[2]):s:this[pe[0]]=qe?qe.replace(pe[1],pe[2]):s:pe.length===4&&(this[pe[0]]=qe?pe[3].call(this,qe.replace(pe[1],pe[2])):s):this[pe]=qe||s;ne+=2}},Ve=function(oe,le){for(var ne in le)if(typeof le[ne]===A&&le[ne].length>0){for(var ye=0;ye<le[ne].length;ye++)if(ze(le[ne][ye],oe))return ne===f?s:ne}else if(ze(le[ne],oe))return ne===f?s:ne;return oe},Nt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},de={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[k,[x,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[k,[x,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[x,k],[/opios[\/ ]+([\w\.]+)/i],[k,[x,B+" Mini"]],[/\bopr\/([\w\.]+)/i],[k,[x,B]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[x,k],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[k,[x,"UC"+F]],[/\bqbcore\/([\w\.]+)/i],[k,[x,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[k,[x,"WeChat"]],[/konqueror\/([\w\.]+)/i],[k,[x,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[k,[x,"IE"]],[/yabrowser\/([\w\.]+)/i],[k,[x,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[x,/(.+)/,"$1 Secure "+F],k],[/\bfocus\/([\w\.]+)/i],[k,[x,U+" Focus"]],[/\bopt\/([\w\.]+)/i],[k,[x,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[k,[x,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[k,[x,"Dolphin"]],[/coast\/([\w\.]+)/i],[k,[x,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[k,[x,"MIUI "+F]],[/fxios\/([-\w\.]+)/i],[k,[x,U]],[/\bqihu|(qi?ho?o?|360)browser/i],[[x,"360 "+F]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[x,/(.+)/,"$1 "+F],k],[/(comodo_dragon)\/([\w\.]+)/i],[[x,/_/g," "],k],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[x,k],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[x],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[x,fe],k],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[x,k],[/\bgsa\/([\w\.]+) .*safari\//i],[k,[x,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[k,[x,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[x,S+" WebView"],k],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[k,[x,"Android "+F]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[x,k],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[k,[x,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[k,x],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[x,[k,Ve,Nt]],[/(webkit|khtml)\/([\w\.]+)/i],[x,k],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[x,"Netscape"],k],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[k,[x,U+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[x,k]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,Ie]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,d,Ie]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,Ie]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[E,Z],[g,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[E,Z],[g,_]],[/\((ip(?:hone|od)[\w ]*);/i],[m,[E,ue],[g,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[E,ue],[g,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[E,z],[g,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[m,[E,z],[g,_]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[E,se],[g,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[E,se],[g,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[E,"OPPO"],[g,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[E,"Vivo"],[g,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[m,[E,"Realme"],[g,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[E,M],[g,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[E,M],[g,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[E,Y],[g,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[E,Y],[g,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[E,"Lenovo"],[g,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[E,"Nokia"],[g,_]],[/(pixel c)\b/i],[m,[E,N],[g,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[E,N],[g,_]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[E,K],[g,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[E,K],[g,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[E,"OnePlus"],[g,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[E,Q],[g,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[E,Q],[g,_]],[/(playbook);[-\w\),; ]+(rim)/i],[m,E,[g,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[E,j],[g,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[E,he],[g,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[E,he],[g,_]],[/(nexus 9)/i],[m,[E,"HTC"],[g,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[E,[m,/_/g," "],[g,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[E,"Acer"],[g,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[E,"Meizu"],[g,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[E,"Sharp"],[g,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[E,m,[g,_]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[E,m,[g,b]],[/(surface duo)/i],[m,[E,C],[g,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[E,"Fairphone"],[g,_]],[/(u304aa)/i],[m,[E,"AT&T"],[g,_]],[/\bsie-(\w*)/i],[m,[E,"Siemens"],[g,_]],[/\b(rct\w+) b/i],[m,[E,"RCA"],[g,b]],[/\b(venue[\d ]{2,7}) b/i],[m,[E,"Dell"],[g,b]],[/\b(q(?:mv|ta)\w+) b/i],[m,[E,"Verizon"],[g,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[E,"Barnes & Noble"],[g,b]],[/\b(tm\d{3}\w+) b/i],[m,[E,"NuVision"],[g,b]],[/\b(k88) b/i],[m,[E,"ZTE"],[g,b]],[/\b(nx\d{3}j) b/i],[m,[E,"ZTE"],[g,_]],[/\b(gen\d{3}) b.+49h/i],[m,[E,"Swiss"],[g,_]],[/\b(zur\d{3}) b/i],[m,[E,"Swiss"],[g,b]],[/\b((zeki)?tb.*\b) b/i],[m,[E,"Zeki"],[g,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[E,"Dragon Touch"],m,[g,b]],[/\b(ns-?\w{0,9}) b/i],[m,[E,"Insignia"],[g,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[E,"NextBook"],[g,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[E,"Voice"],m,[g,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[E,"LvTel"],m,[g,_]],[/\b(ph-1) /i],[m,[E,"Essential"],[g,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[E,"Envizen"],[g,b]],[/\b(trio[-\w\. ]+) b/i],[m,[E,"MachSpeed"],[g,b]],[/\btu_(1491) b/i],[m,[E,"Rotor"],[g,b]],[/(shield[\w ]+) b/i],[m,[E,"Nvidia"],[g,b]],[/(sprint) (\w+)/i],[E,m,[g,_]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[E,C],[g,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[E,ve],[g,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[E,ve],[g,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[E,m,[g,w]],[/droid.+; (shield) bui/i],[m,[E,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[m,[E,K],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[E,C],[g,w]],[/smart-tv.+(samsung)/i],[E,[g,I]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[E,Z],[g,I]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[E,Y],[g,I]],[/(apple) ?tv/i],[E,[m,ue+" TV"],[g,I]],[/crkey/i],[[m,S+"cast"],[E,N],[g,I]],[/droid.+aft(\w)( bui|\))/i],[m,[E,Q],[g,I]],[/\(dtv[\);].+(aquos)/i],[m,[E,"Sharp"],[g,I]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[E,rt],[m,rt],[g,I]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,I]],[/((pebble))app/i],[E,m,[g,P]],[/droid.+; (glass) \d/i],[m,[E,N],[g,P]],[/droid.+; (wt63?0{2,3})\)/i],[m,[E,ve],[g,P]],[/(quest( 2)?)/i],[m,[E,fe],[g,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[E,[g,G]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[m,[g,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[g,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,b]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[g,_]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[E,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[k,[x,D+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[k,[x,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[x,k],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[k,x]],os:[[/microsoft (windows) (vista|xp)/i],[x,k],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[x,[k,Ve,de]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[x,"Windows"],[k,Ve,de]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[k,/_/g,"."],[x,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[x,"Mac OS"],[k,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[k,x],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[x,k],[/\(bb(10);/i],[k,[x,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[k,[x,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[k,[x,U+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[k,[x,"webOS"]],[/crkey\/([\d\.]+)/i],[k,[x,S+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[x,"Chromium OS"],k],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[x,k],[/(sunos) ?([\w\.\d]*)/i],[[x,"Solaris"],k],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[x,k]]},Pe=function(oe,le){if(typeof oe===A&&(le=oe,oe=s),!(this instanceof Pe))return new Pe(oe,le).getResult();var ne=oe||(typeof r!==R&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:d),ye=le?Re(Ge,le):Ge;return this.getBrowser=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.browser),ae.major=Gt(ae.version),ae},this.getCPU=function(){var ae={};return ae[y]=s,Ae.call(ae,ne,ye.cpu),ae},this.getDevice=function(){var ae={};return ae[E]=s,ae[m]=s,ae[g]=s,Ae.call(ae,ne,ye.device),ae},this.getEngine=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.engine),ae},this.getOS=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.os),ae},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ne},this.setUA=function(ae){return ne=typeof ae===v&&ae.length>H?rt(ae,H):ae,this},this.setUA(ne),this};Pe.VERSION=l,Pe.BROWSER=ee([x,k,O]),Pe.CPU=ee([y]),Pe.DEVICE=ee([m,E,g,w,_,I,b,P,G]),Pe.ENGINE=Pe.OS=ee([x,k]),t.exports&&(e=t.exports=Pe),e.UAParser=Pe;var Fe=typeof r!==R&&(r.jQuery||r.Zepto);if(Fe&&!Fe.ua){var be=new Pe;Fe.ua=be.getResult(),Fe.ua.get=function(){return be.getUA()},Fe.ua.set=function(oe){be.setUA(oe);var le=be.getResult();for(var ne in le)Fe.ua[ne]=le[ne]}}})(typeof window=="object"?window:Ol)})(Tr,Tr.exports);var du=Tr.exports;const hu=Ml(du);let Wi=0;function fu(){return Wi=Wi?Wi+1:Date.now(),`c-${Wi}`}const xt=hu(),ji=xt.os.name,Au=ji&&ji.toLowerCase().indexOf("android")>=0,pu=ji&&ji.toLowerCase().indexOf("ios")>=0,fi=xt.device.type==="mobile"||Au||pu,Yn="kwai-p";let Rr=Sn.ERROR;typeof location<"u"&&(Rr=Ln.loadLogLevel("kwai-player-log")||Sn.ERROR,Ye.setLevel(Rr).setName(Yn));const Qn=Vl.EventEmitter;(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("._kwai-player_1ufc0_2{position:relative;margin:0;padding:0}._kwai-player_1ufc0_2 *{margin:0;padding:0}._kwai-player-video-interactive_1ufc0_11{display:block;width:100%;height:100%;position:absolute;top:0;left:0}._kwai-player-poster_1ufc0_19{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#333;background-size:contain;background-position:center;background-repeat:no-repeat}._kwai-player-video_1ufc0_11{display:block;width:100%;height:100%;position:absolute;top:0;left:0}._kwai-player-video_1ufc0_11 video{display:block;width:100%;height:100%}._kwai-player-video_1ufc0_11 canvas{display:block;margin:0 auto;width:100%;height:100%;max-width:100%;max-height:100%;position:relative}._kwai-player-disable-scroll_1ufc0_52{overflow:hidden;height:100%}._kwai-player-yoda_1ufc0_56{display:block;width:100%;height:100%;position:absolute;top:0;left:0}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var vu=Object.defineProperty,_u=(t,e,r)=>e in t?vu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e,r)=>(_u(t,typeof e!="symbol"?e+"":e,r),r),ti=(t=>(t.NONE="none",t.KWAI="kwai",t.KWAI2="kwai2",t))(ti||{}),Rt=(t=>(t.SYSTEM="system",t.WINDOW="window",t))(Rt||{}),Ri=(t=>(t.VIDEO="video",t.VIDEO_INTERACTIVE="videoInteractive",t.DEFAULT="default",t))(Ri||{}),J=(t=>(t.ERROR="error",t.MANIFEST_PARSED="manifestparsed",t.LEVEL_SWITCHING="levelswitching",t.LEVEL_SWITCHED="levelswitched",t.LEVEL_SWITCH_PLAYING="levelswitchplaying",t.LEVEL_SWITCH_FAILED="levelswitchfailed",t.LEVEL_UPDATED="levelupdated",t.AUDIO_TRACKS_SWITCHING="audiotrackswitching",t.AUDIO_TRACKS_SWITCHED="audiotrackswitched",t.LOADSTART="loadstart",t.PROGRESS="progress",t.SUSPEND="suspend",t.ABORT="abort",t.EMPTIED="emptied",t.STALLED="stalled",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.CANPLAY="canplay",t.CANPLAYTHROUGH="canplaythrough",t.PLAYING="playing",t.WAITING="waiting",t.SEEKING="seeking",t.SEEKED="seeked",t.ENDED="ended",t.DURATIONCHANGE="durationchange",t.TIMEUPDATE="timeupdate",t.PLAY="play",t.PAUSE="pause",t.RATECHANGE="ratechange",t.RESIZE="resize",t.VOLUMECHANGE="volumechange",t.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",t.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",t.REPORT="report",t.VIDEO_RENDERER_CHANGE="videorendererchange",t.FULLSCREEN_CHANGE="fullscreenchange",t.ATTRIBUTE_CHANGE="attribute:change",t.INTERACTION="interaction",t.LIVE_SHIFT_CHANGE="liveshiftchange",t.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",t.OBJECT_FIT_CHANGE="objectfitchange",t.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",t.ATTRIBUTE_CHANGE_SRC="attribute:change:src",t.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",t.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",t.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",t.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",t.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",t.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",t.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",t.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",t.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",t.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",t.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",t.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",t.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",t.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",t.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",t.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",t.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",t.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",t.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",t.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",t.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",t.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",t.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",t.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",t.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",t.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",t.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",t.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",t.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",t.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",t.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",t.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",t.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",t.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",t.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",t.CLICK_NEXT="clicknext",t.CLICK_LOGIN="clicklogin",t.CLICK_REGISTER="clickregister",t.CLICK_VIP="clickvip",t))(J||{}),Ke=function(t){var e={};function r(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=e,r.d=function(s,l,d){r.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:d})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,l){if(1&l&&(s=r(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var f in s)r.d(d,f,function(c){return s[c]}.bind(null,f));return d},r.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(l,"a",l),l},r.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},r.p="",r(r.s=16)}([function(t,e,r){var s=r(10);function l(d,f){for(var c=0;c<f.length;c++){var R=f[c];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(d,s(R.key),R)}}t.exports=function(d,f,c){return f&&l(d.prototype,f),c&&l(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(){return t.exports=r=Object.assign?Object.assign.bind():function(s){for(var l=1;l<arguments.length;l++){var d=arguments[l];for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(s[f]=d[f])}return s},t.exports.__esModule=!0,t.exports.default=t.exports,r.apply(this,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(12);t.exports=function(l,d){l.prototype=Object.create(d.prototype),l.prototype.constructor=l,s(l,d)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=void 0},function(t,e,r){var s=r(14),l=r(15),d=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,f=/[\n\r\t]/g,c=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,R=/:\d+$/,A=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,v=/^[a-zA-Z]:/;function O(w){return(w||"").toString().replace(d,"")}var m=[["#","hash"],["?","query"],function(w,_){return E(_.protocol)?w.replace(/\\/g,"/"):w},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],x={hash:1,query:1};function g(w){var _,b=(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{}).location||{},I={},P=typeof(w=w||b);if(w.protocol==="blob:")I=new y(unescape(w.pathname),{});else if(P==="string")for(_ in I=new y(w,{}),x)delete I[_];else if(P==="object"){for(_ in w)_ in x||(I[_]=w[_]);I.slashes===void 0&&(I.slashes=c.test(w.href))}return I}function E(w){return w==="file:"||w==="ftp:"||w==="http:"||w==="https:"||w==="ws:"||w==="wss:"}function k(w,_){w=(w=O(w)).replace(f,""),_=_||{};var b,I=A.exec(w),P=I[1]?I[1].toLowerCase():"",G=!!I[2],H=!!I[3],Q=0;return G?H?(b=I[2]+I[3]+I[4],Q=I[2].length+I[3].length):(b=I[2]+I[4],Q=I[2].length):H?(b=I[3]+I[4],Q=I[3].length):b=I[4],P==="file:"?Q>=2&&(b=b.slice(2)):E(P)?b=I[4]:P?G&&(b=b.slice(2)):Q>=2&&E(_.protocol)&&(b=I[4]),{protocol:P,slashes:G||E(P),slashesCount:Q,rest:b}}function y(w,_,b){if(w=(w=O(w)).replace(f,""),!(this instanceof y))return new y(w,_,b);var I,P,G,H,Q,ue,he=m.slice(),j=typeof _,F=this,S=0;for(j!=="object"&&j!=="string"&&(b=_,_=null),b&&typeof b!="function"&&(b=l.parse),I=!(P=k(w||"",_=g(_))).protocol&&!P.slashes,F.slashes=P.slashes||I&&_.slashes,F.protocol=P.protocol||_.protocol||"",w=P.rest,(P.protocol==="file:"&&(P.slashesCount!==2||v.test(w))||!P.slashes&&(P.protocol||P.slashesCount<2||!E(F.protocol)))&&(he[3]=[/(.*)/,"pathname"]);S<he.length;S++)typeof(H=he[S])!="function"?(G=H[0],ue=H[1],G!=G?F[ue]=w:typeof G=="string"?~(Q=G==="@"?w.lastIndexOf(G):w.indexOf(G))&&(typeof H[2]=="number"?(F[ue]=w.slice(0,Q),w=w.slice(Q+H[2])):(F[ue]=w.slice(Q),w=w.slice(0,Q))):(Q=G.exec(w))&&(F[ue]=Q[1],w=w.slice(0,Q.index)),F[ue]=F[ue]||I&&H[3]&&_[ue]||"",H[4]&&(F[ue]=F[ue].toLowerCase())):w=H(w,F);b&&(F.query=b(F.query)),I&&_.slashes&&F.pathname.charAt(0)!=="/"&&(F.pathname!==""||_.pathname!=="")&&(F.pathname=function(D,U){if(D==="")return U;for(var N=(U||"/").split("/").slice(0,-1).concat(D.split("/")),z=N.length,Y=N[z-1],C=!1,M=0;z--;)N[z]==="."?N.splice(z,1):N[z]===".."?(N.splice(z,1),M++):M&&(z===0&&(C=!0),N.splice(z,1),M--);return C&&N.unshift(""),Y!=="."&&Y!==".."||N.push(""),N.join("/")}(F.pathname,_.pathname)),F.pathname.charAt(0)!=="/"&&E(F.protocol)&&(F.pathname="/"+F.pathname),s(F.port,F.protocol)||(F.host=F.hostname,F.port=""),F.username=F.password="",F.auth&&(~(Q=F.auth.indexOf(":"))?(F.username=F.auth.slice(0,Q),F.username=encodeURIComponent(decodeURIComponent(F.username)),F.password=F.auth.slice(Q+1),F.password=encodeURIComponent(decodeURIComponent(F.password))):F.username=encodeURIComponent(decodeURIComponent(F.auth)),F.auth=F.password?F.username+":"+F.password:F.username),F.origin=F.protocol!=="file:"&&E(F.protocol)&&F.host?F.protocol+"//"+F.host:"null",F.href=F.toString()}y.prototype={set:function(w,_,b){var I=this;switch(w){case"query":typeof _=="string"&&_.length&&(_=(b||l.parse)(_)),I[w]=_;break;case"port":I[w]=_,s(_,I.protocol)?_&&(I.host=I.hostname+":"+_):(I.host=I.hostname,I[w]="");break;case"hostname":I[w]=_,I.port&&(_+=":"+I.port),I.host=_;break;case"host":I[w]=_,R.test(_)?(_=_.split(":"),I.port=_.pop(),I.hostname=_.join(":")):(I.hostname=_,I.port="");break;case"protocol":I.protocol=_.toLowerCase(),I.slashes=!b;break;case"pathname":case"hash":if(_){var P=w==="pathname"?"/":"#";I[w]=_.charAt(0)!==P?P+_:_}else I[w]=_;break;case"username":case"password":I[w]=encodeURIComponent(_);break;case"auth":var G=_.indexOf(":");~G?(I.username=_.slice(0,G),I.username=encodeURIComponent(decodeURIComponent(I.username)),I.password=_.slice(G+1),I.password=encodeURIComponent(decodeURIComponent(I.password))):I.username=encodeURIComponent(decodeURIComponent(_))}for(var H=0;H<m.length;H++){var Q=m[H];Q[4]&&(I[Q[1]]=I[Q[1]].toLowerCase())}return I.auth=I.password?I.username+":"+I.password:I.username,I.origin=I.protocol!=="file:"&&E(I.protocol)&&I.host?I.protocol+"//"+I.host:"null",I.href=I.toString(),I},toString:function(w){w&&typeof w=="function"||(w=l.stringify);var _,b=this,I=b.host,P=b.protocol;P&&P.charAt(P.length-1)!==":"&&(P+=":");var G=P+(b.protocol&&b.slashes||E(b.protocol)?"//":"");return b.username?(G+=b.username,b.password&&(G+=":"+b.password),G+="@"):b.password?(G+=":"+b.password,G+="@"):b.protocol!=="file:"&&E(b.protocol)&&!I&&b.pathname!=="/"&&(G+="@"),(I[I.length-1]===":"||R.test(b.hostname)&&!b.port)&&(I+=":"),G+=I+b.pathname,(_=typeof b.query=="object"?w(b.query):b.query)&&(G+=_.charAt(0)!=="?"?"?"+_:_),b.hash&&(G+=b.hash),G}},y.extractProtocol=k,y.location=g,y.trimLeft=O,y.qs=l,t.exports=y},function(t,e,r){var s,l,d,f,c;s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,l=/^(?=([^\/?#]*))\1([^]*)$/,d=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,c={buildAbsoluteURL:function(R,A,v){if(v=v||{},R=R.trim(),!(A=A.trim())){if(!v.alwaysNormalize)return R;var O=c.parseURL(R);if(!O)throw new Error("Error trying to parse base URL.");return O.path=c.normalizePath(O.path),c.buildURLFromParts(O)}var m=c.parseURL(A);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return v.alwaysNormalize?(m.path=c.normalizePath(m.path),c.buildURLFromParts(m)):A;var x=c.parseURL(R);if(!x)throw new Error("Error trying to parse base URL.");if(!x.netLoc&&x.path&&x.path[0]!=="/"){var g=l.exec(x.path);x.netLoc=g[1],x.path=g[2]}x.netLoc&&!x.path&&(x.path="/");var E={scheme:x.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(E.netLoc=x.netLoc,m.path[0]!=="/"))if(m.path){var k=x.path,y=k.substring(0,k.lastIndexOf("/")+1)+m.path;E.path=c.normalizePath(y)}else E.path=x.path,m.params||(E.params=x.params,m.query||(E.query=x.query));return E.path===null&&(E.path=v.alwaysNormalize?c.normalizePath(m.path):m.path),c.buildURLFromParts(E)},parseURL:function(R){var A=s.exec(R);return A?{scheme:A[1]||"",netLoc:A[2]||"",path:A[3]||"",params:A[4]||"",query:A[5]||"",fragment:A[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(d,"");R.length!==(R=R.replace(f,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}},t.exports=c},function(t,e,r){t.exports=function(s){var l={};function d(f){if(l[f])return l[f].exports;var c=l[f]={i:f,l:!1,exports:{}};return s[f].call(c.exports,c,c.exports,d),c.l=!0,c.exports}return d.m=s,d.c=l,d.d=function(f,c,R){d.o(f,c)||Object.defineProperty(f,c,{enumerable:!0,get:R})},d.r=function(f){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},d.t=function(f,c){if(1&c&&(f=d(f)),8&c||4&c&&typeof f=="object"&&f&&f.__esModule)return f;var R=Object.create(null);if(d.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:f}),2&c&&typeof f!="string")for(var A in f)d.d(R,A,function(v){return f[v]}.bind(null,A));return R},d.n=function(f){var c=f&&f.__esModule?function(){return f.default}:function(){return f};return d.d(c,"a",c),c},d.o=function(f,c){return Object.prototype.hasOwnProperty.call(f,c)},d.p="",d(d.s=4)}([function(s,l){function d(f){return s.exports=d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s.exports.__esModule=!0,s.exports.default=s.exports,d(f)}s.exports=d,s.exports.__esModule=!0,s.exports.default=s.exports},function(s,l,d){var f=d(2);function c(R,A){for(var v=0;v<A.length;v++){var O=A[v];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(R,f(O.key),O)}}s.exports=function(R,A,v){return A&&c(R.prototype,A),v&&c(R,v),Object.defineProperty(R,"prototype",{writable:!1}),R},s.exports.__esModule=!0,s.exports.default=s.exports},function(s,l,d){var f=d(0).default,c=d(3);s.exports=function(R){var A=c(R,"string");return f(A)=="symbol"?A:A+""},s.exports.__esModule=!0,s.exports.default=s.exports},function(s,l,d){var f=d(0).default;s.exports=function(c,R){if(f(c)!="object"||!c)return c;var A=c[Symbol.toPrimitive];if(A!==void 0){var v=A.call(c,R||"default");if(f(v)!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(c)},s.exports.__esModule=!0,s.exports.default=s.exports},function(s,l,d){function f(y,w){console.log("%c "+y+" %c "+w+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")}d.r(l),d.d(l,"LogLevel",function(){return m}),d.d(l,"DefaultLogger",function(){return k}),d.d(l,"Logger",function(){return E}),d.d(l,"printVersion",function(){return f}),d.d(l,"DEFAULT_LOG_LEVEL",function(){return x});var c=d(1),R=d.n(c),A=function(){function y(){this.timeout=6048e5}var w=y.prototype;return w.write=function(_,b){if(y.available)try{localStorage.setItem(_,JSON.stringify({value:b,time:Date.now()}))}catch(I){}},w.read=function(_,b){if(b===void 0&&(b=!0),y.available)try{var I=localStorage.getItem(_);if(I){var P=JSON.parse(I),G=P.value,H=P.time,Q=H===void 0?0:H;if(!b||Date.now()-Q<(typeof b=="number"?b:this.timeout))return G}}catch(ue){}},R()(y,null,[{key:"available",get:function(){if(y.A===void 0)try{localStorage.setItem("alg","test"),y.A=!0}catch(_){y.A=!1}return y.A}}])}();A.A=void 0;var v,O=A,m=function(y){return y.NONE="none",y.ERROR="e",y.WARN="w",y.INFO="i",y.DEBUG="d",y.VERBOSE="v",y}({}),x=m.ERROR,g=((v={})[m.NONE]={value:1,str:"N"},v[m.ERROR]={value:100,str:"E"},v[m.WARN]={value:200,str:"W"},v[m.INFO]={value:300,str:"I"},v[m.DEBUG]={value:400,str:"D"},v[m.VERBOSE]={value:500,str:"V"},v),E=function(){function y(_){if(this.h="kwai-v",this.M=x,this._=-1,this.R=void 0,this.D="main",typeof location<"u"&&location.protocol==="blob:"){var b,I=location.href.split("/"),P=(b=I[I.length-1])==null?void 0:b.match(/(\w+)-/);P&&(this.D=_?_+"-"+P[1]:P[1])}else _&&(this.D=_)}y.loadLogLevel=function(_,b){if(b===void 0&&(b=!0),location.href){var I=new RegExp(_+"=([a-z]{1})"),P=location.href.match(I);if(P&&P.length>1){var G=P[1];if(this.T(G))return G}}var H=new O().read(_,b);if(this.T(H))return H},y.saveLogLevel=function(_,b){this.T(b)&&new O().write(_,b)},y.T=function(_){return Object.values(m).indexOf(_)!==-1};var w=y.prototype;return w.setOutput=function(_){return this.R=_,this},w.setLevel=function(_){return this.M=_,this},w.setId=function(_){return this._=_,this},w.setName=function(_){return this.h=_,this},w.getLevel=function(){return this.M},w.getOutput=function(){return this.R},w.hasOutput=function(){return!!this.R},w.e=function(_){if(this.S(this.M,m.ERROR)){for(var b=arguments.length,I=new Array(b>1?b-1:0),P=1;P<b;P++)I[P-1]=arguments[P];var G=this.O(m.ERROR,_,I);try{var H;(H=this.R)==null||H.e.apply(H,[G].concat(I))}catch(Q){}}},w.w=function(_){if(this.S(this.M,m.WARN)){for(var b=arguments.length,I=new Array(b>1?b-1:0),P=1;P<b;P++)I[P-1]=arguments[P];var G=this.O(m.WARN,_,I);try{var H;(H=this.R)==null||H.w.apply(H,[G].concat(I))}catch(Q){}}},w.i=function(_){if(this.S(this.M,m.INFO)){for(var b=arguments.length,I=new Array(b>1?b-1:0),P=1;P<b;P++)I[P-1]=arguments[P];var G=this.O(m.INFO,_,I);try{var H;(H=this.R)==null||H.i.apply(H,[G].concat(I))}catch(Q){}}},w.d=function(_){if(this.S(this.M,m.DEBUG)){for(var b=arguments.length,I=new Array(b>1?b-1:0),P=1;P<b;P++)I[P-1]=arguments[P];var G=this.O(m.DEBUG,_,I);try{var H;(H=this.R)==null||H.d.apply(H,[G].concat(I))}catch(Q){}}},w.v=function(_){if(this.S(this.M,m.VERBOSE)){for(var b=arguments.length,I=new Array(b>1?b-1:0),P=1;P<b;P++)I[P-1]=arguments[P];var G=this.O(m.VERBOSE,_,I);try{var H;(H=this.R)==null||H.v.apply(H,[G].concat(I))}catch(Q){}}},w.S=function(_,b){return g[_].value>=g[b].value},w.O=function(_,b,I){var P,G,H=typeof b;if(H==="object")b=((G=b)==null?void 0:G.constructor.name)||"unknown";else if(H==="function"){var Q;b=((Q=Object.getOwnPropertyDescriptor(b,"name"))==null?void 0:Q.value)||"unknown"}var ue,he,j=(((P=g[_])==null?void 0:P.str)||"")+"|"+this.h+"["+(typeof this._=="function"?this._():this._)+"]["+this.D+"]::"+b;return _===m.ERROR?(ue=console).error.apply(ue,[j].concat(I.slice(0))):(he=console).log.apply(he,[j].concat(I.slice(0))),j},y}(),k=new E}])},function(t,e,r){var s,l=typeof Reflect=="object"?Reflect:null,d=l&&typeof l.apply=="function"?l.apply:function(w,_,b){return Function.prototype.apply.call(w,_,b)};s=l&&typeof l.ownKeys=="function"?l.ownKeys:Object.getOwnPropertySymbols?function(w){return Object.getOwnPropertyNames(w).concat(Object.getOwnPropertySymbols(w))}:function(w){return Object.getOwnPropertyNames(w)};var f=Number.isNaN||function(w){return w!=w};function c(){c.init.call(this)}t.exports=c,t.exports.once=function(w,_){return new Promise(function(b,I){function P(H){w.removeListener(_,G),I(H)}function G(){typeof w.removeListener=="function"&&w.removeListener("error",P),b([].slice.call(arguments))}y(w,_,G,{once:!0}),_!=="error"&&function(H,Q,ue){typeof H.on=="function"&&y(H,"error",Q,ue)}(w,P,{once:!0})})},c.EventEmitter=c,c.prototype.C=void 0,c.prototype.L=0,c.prototype.N=void 0;var R=10;function A(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}function v(w){return w.N===void 0?c.defaultMaxListeners:w.N}function O(w,_,b,I){var P,G,H,Q;if(A(b),(G=w.C)===void 0?(G=w.C=Object.create(null),w.L=0):(G.newListener!==void 0&&(w.emit("newListener",_,b.listener?b.listener:b),G=w.C),H=G[_]),H===void 0)H=G[_]=b,++w.L;else if(typeof H=="function"?H=G[_]=I?[b,H]:[H,b]:I?H.unshift(b):H.push(b),(P=v(w))>0&&H.length>P&&!H.warned){H.warned=!0;var ue=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");ue.name="MaxListenersExceededWarning",ue.emitter=w,ue.type=_,ue.count=H.length,Q=ue,console&&console.warn&&console.warn(Q)}return w}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(w,_,b){var I={fired:!1,wrapFn:void 0,target:w,type:_,listener:b},P=m.bind(I);return P.listener=b,I.wrapFn=P,P}function g(w,_,b){var I=w.C;if(I===void 0)return[];var P=I[_];return P===void 0?[]:typeof P=="function"?b?[P.listener||P]:[P]:b?function(G){for(var H=new Array(G.length),Q=0;Q<H.length;++Q)H[Q]=G[Q].listener||G[Q];return H}(P):k(P,P.length)}function E(w){var _=this.C;if(_!==void 0){var b=_[w];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}function k(w,_){for(var b=new Array(_),I=0;I<_;++I)b[I]=w[I];return b}function y(w,_,b,I){if(typeof w.on=="function")I.once?w.once(_,b):w.on(_,b);else{if(typeof w.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w);w.addEventListener(_,function P(G){I.once&&w.removeEventListener(_,P),b(G)})}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return R},set:function(w){if(typeof w!="number"||w<0||f(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");R=w}}),c.init=function(){this.C!==void 0&&this.C!==Object.getPrototypeOf(this).C||(this.C=Object.create(null),this.L=0),this.N=this.N||void 0},c.prototype.setMaxListeners=function(w){if(typeof w!="number"||w<0||f(w))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+w+".");return this.N=w,this},c.prototype.getMaxListeners=function(){return v(this)},c.prototype.emit=function(w){for(var _=[],b=1;b<arguments.length;b++)_.push(arguments[b]);var I=w==="error",P=this.C;if(P!==void 0)I=I&&P.error===void 0;else if(!I)return!1;if(I){var G;if(_.length>0&&(G=_[0]),G instanceof Error)throw G;var H=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw H.context=G,H}var Q=P[w];if(Q===void 0)return!1;if(typeof Q=="function")d(Q,this,_);else{var ue=Q.length,he=k(Q,ue);for(b=0;b<ue;++b)d(he[b],this,_)}return!0},c.prototype.addListener=function(w,_){return O(this,w,_,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(w,_){return O(this,w,_,!0)},c.prototype.once=function(w,_){return A(_),this.on(w,x(this,w,_)),this},c.prototype.prependOnceListener=function(w,_){return A(_),this.prependListener(w,x(this,w,_)),this},c.prototype.removeListener=function(w,_){var b,I,P,G,H;if(A(_),(I=this.C)===void 0)return this;if((b=I[w])===void 0)return this;if(b===_||b.listener===_)--this.L==0?this.C=Object.create(null):(delete I[w],I.removeListener&&this.emit("removeListener",w,b.listener||_));else if(typeof b!="function"){for(P=-1,G=b.length-1;G>=0;G--)if(b[G]===_||b[G].listener===_){H=b[G].listener,P=G;break}if(P<0)return this;P===0?b.shift():function(Q,ue){for(;ue+1<Q.length;ue++)Q[ue]=Q[ue+1];Q.pop()}(b,P),b.length===1&&(I[w]=b[0]),I.removeListener!==void 0&&this.emit("removeListener",w,H||_)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(w){var _,b,I;if((b=this.C)===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this.C=Object.create(null),this.L=0):b[w]!==void 0&&(--this.L==0?this.C=Object.create(null):delete b[w]),this;if(arguments.length===0){var P,G=Object.keys(b);for(I=0;I<G.length;++I)(P=G[I])!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this.C=Object.create(null),this.L=0,this}if(typeof(_=b[w])=="function")this.removeListener(w,_);else if(_!==void 0)for(I=_.length-1;I>=0;I--)this.removeListener(w,_[I]);return this},c.prototype.listeners=function(w){return g(this,w,!0)},c.prototype.rawListeners=function(w){return g(this,w,!1)},c.listenerCount=function(w,_){return typeof w.listenerCount=="function"?w.listenerCount(_):E.call(w,_)},c.prototype.listenerCount=E,c.prototype.eventNames=function(){return this.L>0?s(this.C):[]}},function(t,e){function r(s){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t.exports.__esModule=!0,t.exports.default=t.exports,r(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){function s(A){var v={};function O(x){if(v[x])return v[x].exports;var g=v[x]={i:x,l:!1,exports:{}};return A[x].call(g.exports,g,g.exports,O),g.l=!0,g.exports}O.m=A,O.c=v,O.i=function(x){return x},O.d=function(x,g,E){O.o(x,g)||Object.defineProperty(x,g,{configurable:!1,enumerable:!0,get:E})},O.r=function(x){Object.defineProperty(x,"__esModule",{value:!0})},O.n=function(x){var g=x&&x.__esModule?function(){return x.default}:function(){return x};return O.d(g,"a",g),g},O.o=function(x,g){return Object.prototype.hasOwnProperty.call(x,g)},O.p="/",O.oe=function(x){throw console.error(x),x};var m=O(O.s=ENTRY_MODULE);return m.default||m}var l="[\\.|\\-|\\+|\\w|/|@]+",d="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+l+").*?\\)";function f(A){return(A+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(A,v,O){var m={};m[O]=[];var x=v.toString(),g=x.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!g)return m;for(var E,k=g[1],y=new RegExp("(\\\\n|\\W)"+f(k)+d,"g");E=y.exec(x);)E[3]!=="dll-reference"&&m[O].push(E[3]);for(y=new RegExp("\\("+f(k)+'\\("(dll-reference\\s('+l+'))"\\)\\)'+d,"g");E=y.exec(x);)A[E[2]]||(m[O].push(E[1]),A[E[2]]=r(E[1]).m),m[E[2]]=m[E[2]]||[],m[E[2]].push(E[4]);for(var w,_=Object.keys(m),b=0;b<_.length;b++)for(var I=0;I<m[_[b]].length;I++)w=m[_[b]][I],isNaN(1*w)||(m[_[b]][I]=1*m[_[b]][I]);return m}function R(A){return Object.keys(A).reduce(function(v,O){return v||A[O].length>0},!1)}t.exports=function(A,v){v=v||{};var O={main:r.m},m=v.all?{main:Object.keys(O.main)}:function(y,w){for(var _={main:[w]},b={main:[]},I={main:{}};R(_);)for(var P=Object.keys(_),G=0;G<P.length;G++){var H=P[G],Q=_[H].pop();if(I[H]=I[H]||{},!I[H][Q]&&y[H][Q]){I[H][Q]=!0,b[H]=b[H]||[],b[H].push(Q);for(var ue=c(y,y[H][Q],H),he=Object.keys(ue),j=0;j<he.length;j++)_[he[j]]=_[he[j]]||[],_[he[j]]=_[he[j]].concat(ue[he[j]])}}return b}(O,A),x="";Object.keys(m).filter(function(y){return y!=="main"}).forEach(function(y){for(var w=0;m[y][w];)w++;m[y].push(w),O[y][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",x=x+"var "+y+" = ("+s.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+m[y].map(function(_){return JSON.stringify(_)+": "+O[y][_].toString()}).join(",")+`});
`}),x=x+"new (("+s.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+m.main.map(function(y){return JSON.stringify(y)+": "+O.main[y].toString()}).join(",")+"}))(self);";var g=new window.Blob([x],{type:"text/javascript"});if(v.bare)return g;var E=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(g),k=new window.Worker(E);return k.objectURL=E,k}},function(t,e,r){var s=r(8).default,l=r(11);t.exports=function(d){var f=l(d,"string");return s(f)==="symbol"?f:String(f)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(8).default;t.exports=function(l,d){if(s(l)!=="object"||l===null)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,d||"default");if(s(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(l)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(s,l){return t.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,f){return d.__proto__=f,d},t.exports.__esModule=!0,t.exports.default=t.exports,r(s,l)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){Number.isFinite||(Number.isFinite=function(r){return typeof r=="number"&&isFinite(r)}),Number.MAX_SAFE_INTEGER||(Number.MAX_SAFE_INTEGER=Math.pow(2,53)-1),Object.values||(Object.values=function(r){if(r==null)throw new TypeError("Cannot convert undefined or null to object");var s=[];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&s.push(r[l]);return s})},function(t,e,r){t.exports=function(s,l){if(l=l.split(":")[0],!(s=+s))return!1;switch(l){case"http":case"ws":return s!==80;case"https":case"wss":return s!==443;case"ftp":return s!==21;case"gopher":return s!==70;case"file":return!1}return s!==0}},function(t,e,r){var s=Object.prototype.hasOwnProperty;function l(f){try{return decodeURIComponent(f.replace(/\+/g," "))}catch(c){return null}}function d(f){try{return encodeURIComponent(f)}catch(c){return null}}e.stringify=function(f,c){c=c||"";var R,A,v=[];for(A in typeof c!="string"&&(c="?"),f)if(s.call(f,A)){if((R=f[A])||R!=null&&!isNaN(R)||(R=""),A=d(A),R=d(R),A===null||R===null)continue;v.push(A+"="+R)}return v.length?c+v.join("&"):""},e.parse=function(f){for(var c,R=/([^=?#&]+)=?([^&]*)/g,A={};c=R.exec(f);){var v=l(c[1]),O=l(c[2]);v===null||O===null||v in A||(A[v]=O)}return A}},function(t,e,r){r.r(e),r.d(e,"default",function(){return qs}),r.d(e,"createKernel",function(){return Zh}),r.d(e,"AbstractDestroyable",function(){return S}),r.d(e,"CanvasContextType",function(){return g}),r.d(e,"CodecType",function(){return v}),r.d(e,"DestroyableList",function(){return F}),r.d(e,"Decoder",function(){return E}),r.d(e,"DemuxerType",function(){return Ge}),r.d(e,"DownloadStatus",function(){return ih}),r.d(e,"ErrorDetails",function(){return be}),r.d(e,"ErrorTypes",function(){return Fe}),r.d(e,"HttpRangeType",function(){return I}),r.d(e,"KEvents",function(){return q}),r.d(e,"LiveShiftType",function(){return he}),r.d(e,"LogLevel",function(){return Oi.LogLevel}),r.d(e,"MediaBox",function(){return y}),r.d(e,"ReportTypes",function(){return _t}),r.d(e,"StereoType",function(){return Q}),r.d(e,"VideoDecBlockPolicy",function(){return b}),r.d(e,"VideoDropFramePolicy",function(){return _}),r.d(e,"VideoRendererType",function(){return x}),r.d(e,"WasmDecoder",function(){return m});var s=r(1),l=r.n(s),d=r(0),f=r.n(d),c=r(2),R=r.n(c),A=(r(13),r(7)),v=function(n){return n.unknown="unknown",n.h264="h264",n.hevc="hevc",n.av1="av1",n.kvc3="kvc3",n.kvc4="kvc4",n.kvc5="kvc5",n.kvc6="kvc6",n.aac="aac",n.mp3="mp3",n.opus="opus",n.yuv="yuv",n.rawvideo="rawvideo",n.vvc="vvc",n.bvc2="bvc2",n.kvc30="kvc30",n}({}),O=function(n){return n.UNKNOWN="unknown",n.FHD="fhd",n.UHD_4K="4k",n}({}),m=function(n){return n.kvc3="kvc3",n.kvc4="kvc4",n.kvc5="kvc5",n.kvc6="kvc6",n.h265="h265",n.kw265="kw265",n.kvc30="kvc30",n}({}),x=function(n){return n.video="video",n.canvas="canvas",n}({}),g=function(n){return n.canvas2d="canvas2d",n.webgl="webgl",n}({}),E=function(n){return n.buildin="buildin",n.wasm="wasm",n.none="none",n.unsupported="unsupported",n}({}),k=function(n){return n.KWAI_FLV_ABR="kwaiFlvAbr",n.KWAI_FLV_MP="kwaiFlvMultipart",n.KWAI="kwai",n.FILE="file",n.OTHERS="others",n}({}),y=function(n){return n.flv="flv",n.hls="hls",n.hls_ts="hls_ts",n.hls_fmp4="hls_fmp4",n.webrtc="webrtc",n.mp4="mp4",n.raw="raw",n.mp3="mp3",n.wav="wav",n.aac="aac",n.matroska="matroska",n.ts="ts",n.ivf="ivf",n.yuv="yuv",n.unknown="unknown",n}({}),w=function(n){return n.RTC="rtc_retry",n.BACKUP="backup",n.FALLBACK="fallback",n.LOADER="loader",n}({}),_=function(n){return n.AUTO="auto",n.MIN="min",n}({}),b=function(n){return n.NONE="none",n.WAITING="waiting",n}({}),I=function(n){return n.STANDARD="standard",n.QUERY_START_END="queryStartEnd",n}({}),P=function(n){return n.MAIN="main",n.AUDIO="audio",n.SUBTITLE="subtitle",n}({}),G=function(n){return n.VIDEO="video",n.AUDIO="audio",n}({}),H=function(n){return n.unknown="unknown",n.native="native",n.mse="mse",n.rtc="rtc",n}({}),Q=function(n){return n[n.Normal=0]="Normal",n[n.V360=1]="V360",n[n.V180=2]="V180",n}({}),ue=function(n){return n[n.normal=0]="normal",n[n.internal=1]="internal",n[n.retry=2]="retry",n}({}),he=function(n){return n.NONE="none",n.KWAI="kwai",n.KWAI2="kwai2",n}({}),j=function(n){return n.UNKNOWN="",n.PROBABLY="probably",n}({}),F=function(){function n(){var a;this.I=[],(a=this.I).push.apply(a,arguments)}var h=n.prototype;return h.push=function(){var a;(a=this.I).push.apply(a,arguments)},h.destroyItem=function(a){for(var i=0;i<this.I.length;i++)if(this.I[i]===a)return this.I.splice(i,1),void a.destroy()},h.destroy=function(){for(;this.I.length;){var a=this.I.shift();a&&a.destroy()}},f()(n,[{key:"destroyed",get:function(){return!!this.I.length}}])}(),S=function(){function n(){this.F=new F}return n.prototype.destroy=function(){this.F.destroy()},n}(),D=function(n){return n.LOADER_CONNECT_TIMEOUT="connectTimeout",n.LOADER_TRANS_TIMEOUT="transTimeout",n.HANDLING_DATA_ERROR="handlingDataError",n}({}),U=function(n){return n.XHR_ERROR_NAME="XHRError",n.FETCH_ERROR_NAME="FetchError",n.FETCH_READ_ERROR_NAME="ReadError",n.SLICE_UNPACK_ERROR_NAME="SliceUnpackError",n}({}),N=function(n){return n.UNKNOWN="unknown",n.FETCH="fetch",n.XHR="xhr",n}({}),z=255,Y=20;function C(n,h,a){if(n[h]===void 0)n[h]=a;else{var i=n[h];Array.isArray(i)?i.push(a):typeof i=="string"&&(n[h]=[i,a])}}function M(n){var h={};return typeof n=="string"?n.trim().split(/[\r\n]+/).forEach(function(a){var i=a.split(": "),o=i.shift(),u=i.join(":");o&&C(h,o,u)}):n&&n.forEach(function(a,i){a.split(",").forEach(function(o){C(h,i,o)})}),h}function B(n){var h=[];if(n)for(var a in n){var i=n[a];i&&h.push(a+": "+(Array.isArray(i)?i.join(","):i).slice(0,z))}if(h.length)return h.length>Y?(h.sort(function(o,u){return Z(u)-Z(o)}),h.slice(0,Y)):h}var Z=function(n){return n.toLowerCase().indexOf("kwaisign")===0||n.toLowerCase().indexOf("x-ks-")===0?1:0},K=function(n){return n.MOZ_CHUNK="moz-chunked-arraybuffer",n.UNKNOW="unknow",n.UNSUPPORT="",n}({}),se=function(){function n(){var a=this;this.tag="xhr",this.B=null,this.j=void 0,this.U=null,this.P=K.UNKNOW,this.V=function(){if(a.B){var i=a.B;i.readyState===2&&(a.j.responseUrl=i.responseURL,a.j.responseHeader=M(i.getAllResponseHeaders()),a.U&&a.U.onConnect&&a.U.onConnect(a.j,i.status),(i.status<200||i.status>299)&&a.H())}},this.W=function(){if(a.B){var i=a.B.response;a.U&&a.U.onProgress&&i&&a.U.onProgress(a.j,i)}},this.G=function(){var i=null,o=a.B;!a.P&&o&&(i=o.response),a.U&&a.U.onEnd(a.j,i)},this.H=function(){var i;if(a.U&&a.U.onError){var o=new Error("xhr load error.");o.name=U.XHR_ERROR_NAME,a.U.onError(o)}(i=a.B)==null||i.abort()},this.B=null}n.isSupportChunk=function(){if(n.Y!==K.UNKNOW)return n.Y;try{var a=new XMLHttpRequest;if(a.open("GET","https://example.com",!0),a.responseType=K.MOZ_CHUNK,a.responseType===K.MOZ_CHUNK)return n.Y=K.MOZ_CHUNK,n.Y}catch(i){n.Y=K.UNSUPPORT}return K.UNSUPPORT};var h=n.prototype;return h.load=function(a,i){this.U=i,this.j=a,this.P=K.UNSUPPORT,a.progress&&a.responseType==="arraybuffer"&&(this.P=n.isSupportChunk());var o=this.B=new XMLHttpRequest;o.open(a.requestMethod?a.requestMethod:"GET",this.j.url,!0),this.P===K.MOZ_CHUNK?(o.responseType=K.MOZ_CHUNK,o.onprogress=this.W,o.onload=this.G):(o.responseType=a.responseType||"arraybuffer",o.onload=this.G),o.onreadystatechange=this.V,o.onerror=this.H,o.withCredentials=!!a.credentials,a.range&&o.setRequestHeader("Range",a.range),a.headers&&a.headers.forEach(function(u){o.setRequestHeader(u.header,u.value)}),o.send(a.requestBody)},h.abort=function(){this.B&&(this.B.onreadystatechange=null,this.B.onprogress=null,this.B.onload=null,this.B.onerror=null,this.B.abort(),this.B=null)},h.destroy=function(){this.U=null,this.abort()},n}();se.Y=K.UNKNOW;var ve=[y.hls,y.hls_ts,y.hls_fmp4];function fe(n){return!!n&&ve.indexOf(n)!==-1}var Re={version:{major:0,string:""}};(function(n){if(typeof navigator<"u"){n=n?n.toLowerCase():navigator.userAgent.toLowerCase();var h=/(edge)\/([\w.]+)/.exec(n)||/(edg)\/([\w.]+)/.exec(n)||/(opr)[/]([\w.]+)/.exec(n)||/(chrome)[ /]([\w.]+)/.exec(n)||/(iemobile)[/]([\w.]+)/.exec(n)||/(version)(applewebkit)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+).*(version)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(firefox)[ /]([\w.]+)/.exec(n)||[],a=/(ipad)/.exec(n)||/(ipod)/.exec(n)||/(windows phone)/.exec(n)||/(iphone)/.exec(n)||/(kindle)/.exec(n)||/(android)/.exec(n)||/(windows)/.exec(n)||/(mac)/.exec(n)||/(linux)/.exec(n)||/(cros)/.exec(n)||[],i=/(?:iphone|ipad|cpu) os (\d+)[._]\d+/.exec(n)||/android ([\d.]+)/.exec(n)||[],o={browser:h[5]||h[3]||h[1]||"",version:h[2]||h[4]||"0",majorVersion:h[4]||h[2]||"0",platform:a[0]||"",platformVersion:i[1]||""},u={x5:/ tbs\//.test(n),xweb:/ xweb\//.test(n),version:{major:0,string:""}};if(o.browser){u[o.browser]=!0;var p=o.majorVersion.split(".");u.version={major:parseInt(o.majorVersion,10),string:o.version},p.length>1&&(u.version.minor=parseInt(p[1],10)),p.length>2&&(u.version.build=parseInt(p[2],10))}if(o.platform&&(u[o.platform]=!0),(u.chrome||u.opr||u.safari)&&(u.webkit=!0),u.rv||u.iemobile){u.rv&&delete u.rv;var T="msie";o.browser=T,u[T]=!0}if(u.edg||u.edge){delete u.edg,delete u.edge;var L="msedge";o.browser=L,u[L]=!0}if(u.opr){var V="opera";o.browser=V,u[V]=!0}if(u.safari&&u.android){var W="android";o.browser=W,u[W]=!0}if(u.android){var $=n.match(/android[\s0-9.]+;([\w\s-]+)(build)?/);if($)try{var te;u.model=(te=$[1].split("build")[0])==null?void 0:te.trim()}catch(ie){}}else u.ipad?u.model="ipad":u.iphone&&(u.model="iphone");for(var Te in(u.android||u.iphone||u.ipad)&&(u.mobile=!0),u.ios=u.iphone||u.ipad,u.name=o.browser,u.platform=o.platform,u.platformVersion=o.platformVersion,Re)Object.prototype.hasOwnProperty.call(Re,Te)&&delete Re[Te];l()(Re,u)}})();var ee=Re;function ze(n,h){var a=n.toString();return a.toLowerCase().indexOf("[native code]")!==-1&&a.indexOf(h)!==-1?j.UNKNOWN:j.PROBABLY}var Ie=function(){function n(a){this.tag="fetch",this.J=void 0,this.j=void 0,this.U=null,this.Z=null,this.K=null,this.q=!1,this.J=a}n.isSupported=function(){return typeof fetch<"u"&&typeof ReadableStream<"u"};var h=n.prototype;return h.load=function(a,i){var o=this;this.j=a,this.U=i;var u=new Headers;a.headers&&a.headers.forEach(function(V){u.append(V.header,V.value)}),a.range&&u.append("Range",a.range);var p={method:a.requestMethod?a.requestMethod:"GET",headers:u,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade",signal:this.X()};a.requestBody&&(p.body=a.requestBody),a.credentials&&(p.credentials="include");var T=fetch;if(a.preferNative===!0){var L=this.$();T=L.func,a.monkeyPatched=L.patched,a.useResetNativeFetch=L==null?void 0:L.resetNativeFetch}else a.monkeyPatched=ze(T,"fetch");T(a.url,p).then(function(V){if(a.responseUrl=V.url,a.redirected=V.redirected,a.responseHeader=M(V.headers),o.U&&o.U.onConnect&&o.U.onConnect(a,V.status),V.ok)return o.q?void(V.body&&V.body.getReader().cancel().catch(function($){return o.J.i(o.tag,$)})):a.responseType==="arraybuffer"?a.progress?void(V.body&&(o.K=V.body.getReader(),o.tt(o.K))):void V.arrayBuffer().then(function($){o.it(a,$)}).catch(function($){if(!o.q){var te=new Error("arraybuffer error. "+V.status+" "+$);te.name=U.FETCH_ERROR_NAME,o.H(te)}}):void V.text().then(function($){o.it(a,$)}).catch(function($){if(!o.q){var te=new Error("text error. "+V.status+" "+$);te.name=U.FETCH_ERROR_NAME,o.H(te)}});var W=new Error("res not ok. "+V.status+" "+V.statusText);W.name=U.FETCH_ERROR_NAME,o.H(W)}).catch(function(V){V.name!=="AbortError"&&o.H(V)})},h.abort=function(){this.Z&&(this.Z.abort(),this.Z=null),this.K&&(this.K.cancel().catch(function(){}),this.K=null),this.q=!0},h.destroy=function(){this.U=null,this.abort()},h.W=function(a,i){this.U&&this.U.onProgress&&this.U.onProgress(a,i)},h.it=function(a,i){this.U&&this.U.onEnd&&(this.K=null,this.Z=null,this.U.onEnd(a,i))},h.H=function(a){this.U&&this.U.onError&&this.U.onError(a)},h.tt=function(a){var i=this;a.read().then(function(o){if(i.q)return a.cancel(),null;if(o.done)return i.it(i.j,null),null;var u=o.value.buffer;return i.j.useResetNativeFetch&&ee.safari&&(u=new Uint8Array(new Uint8Array(u).subarray()).buffer),i.W(i.j,u),i.tt(a)}).catch(function(o){o.name!=="AbortError"&&(o.name=U.FETCH_READ_ERROR_NAME,i.H(o))})},h.X=function(){try{if(AbortController)return this.Z=new AbortController,this.Z.signal}catch(a){return null}return null},h.$=function(){if(n.et!==void 0)return n.et;if(ze(fetch,"fetch")===j.PROBABLY){var a=function(i){var o,u,p=document.createElement("iframe");document.body.appendChild(p);var T=(o=((u=p.contentWindow)==null?void 0:u.fetch)||null)==null?void 0:o.bind(i);return document.body.removeChild(p),T}(window);this.J.i(this.tag,"detected io monkey patched. get native io, fetch: "+!!a),n.et=a?{func:a,patched:j.PROBABLY,resetNativeFetch:!0}:{func:fetch,patched:j.PROBABLY,resetNativeFetch:!1}}else n.et={func:fetch,patched:j.UNKNOWN,resetNativeFetch:!1};return n.et},n}();Ie.et=void 0;var Gt=r(3),rt=r.n(Gt),Ae=536870912,Ve={alwaysSeekKeyframe:!1,lazyLoadMaxDuration:-1,lazyLoadRecoverDuration:20,webWorker:!0,appendErrorMaxRetry:3,credentials:!1,streamingMux:!0,autoPlaybackRate:!0,autoPlaybackRateConf:void 0,enableSoftwareAES:!0,startPlayBufferSec:0,startFromSec:-1,startFromKeyframe:!0,defaultSpts:-5e3,resourceBuffer:!0,resourceBufferSize:500,ntp:!0,ensureVideo:!1,adaptive:!0,abrSpeedTest:!0,httpRangeType:I.STANDARD,enableAacPriv:!1,mseDecErrSkip:2,maxAudioFramesDrift:5,forceKeyFrameOnDiscontinuity:!1,videoDropFramePolicy:_.AUTO,videoDecBlockPolicy:b.WAITING,videoFrameBufferSize:Ae,maxVideoDecThreads:8,mainThreadRendering:!1,mainThreadDecoding:!1,wasmDecoderEnabled:!ee.mobile,maxRetry:3,connectionTimeout:1e4,transmissionTimeout:3e4,retryDelay:100,maxFragFailSec:11,flvLoadEndError:!0,catchUpPausedLive:!0,breakpointContinuation:!0,manifestLoadingMaxRetry:3,manifestConnectionTimeout:1e4,manifestTransmissionTimeout:1e4,manifestLoadingRetryDelay:1,levelLoadingMaxRetry:3,levelConnectionTimeout:1e4,levelTransmissionTimeout:1e4,levelLoadingRetryDelay:100,levelNoUpdateRetry:10,emeEnabled:!0,widevineLicenseUrl:"",playreadyLicenseUrl:"",fairplayLicenseUrl:"",keyLoadingMaxRetry:3,keyConnectionTimeout:1e4,keyTransmissionTimeout:5e3,keyLoadingRetryDelay:300,sdpConnectionTimeout:1e4,peerConnectionTimeout:1e4,peerConnectionMaxRetry:5,peerConnectionRetryDelay:3e3,decLibLoadingMaxRetry:2,decLibConnectionTimeout:5e3,decLibLoadingRetryDelay:300,liveDelayFragNum:3,liveShiftDelaySec:60,liveShiftType:he.NONE,preferNativeLoader:void 0,playbackAbilityCacheTimeout:864e5,adjustFragTime:!0},Nt={maxRetry:1,retryDelay:100,connectionTimeout:1e4,levelConnectionTimeout:1e4,manifestConnectionTimeout:1e4},de=function(){function n(){}return n.isStreamingSupported=function(){return n.nt===void 0&&(n.nt=Ie.isSupported()||!!se.isSupportChunk()),n.nt},n.processConfig=function(h){if(h){var a=h.src,i=h.preprocessUrl,o=h.logger;h=l()(JSON.parse(JSON.stringify(h)),{src:a,preprocessUrl:i,logger:o})}h.isLive?Ve.videoFrameBufferSize=104857600:Ve.videoFrameBufferSize=Ae;var u=fe(h.box)?l()({},Ve,Nt):l()({},Ve);return l()(u,h),u.wasmDecoderEnabled=u.wasmDecoderEnabled&&!!rt.a,u.startPlayBufferSec=Math.min(5,Math.max(0,u.startPlayBufferSec)),this.rt(u),Worker||(u.webWorker=!1),u},n.rt=function(h){var a=h.autoPlaybackRateConf;if(a){var i=a.rule;if(i&&Array.isArray(i)&&((i=i.filter(function(o){return o.upper>o.lower&&o.rate>0})).sort(function(o,u){return u.rate-o.rate}),i.length>1))return a.rule=i,void(h.autoPlaybackRateConf=a)}},n}();de.nt=void 0;var Ge=function(n){return n.UNKNOWN="unknown",n.FLV="flv",n.FMP4="fmp4",n.TS="ts",n.MP4="mp4",n.RAW="raw",n.IVF="ivf",n.YUV="yuv",n}({}),Pe=function(n){return n.MANIFEST="manifest",n.LEVEL="level",n.AUDIO_TRACK="audioTrack",n.SUBTITLE_TRACK="subtitleTrack",n}({}),Fe=function(n){return n.NETWORK_ERROR="networkError",n.MEDIA_ERROR="mediaError",n.KEY_SYSTEM_ERROR="keySystemError",n.MUX_ERROR="muxError",n.OTHER_ERROR="otherError",n.MSE_ERROR="mseError",n.DECODER_ERROR="decoderError",n.RENDERER_ERROR="rendererError",n}({}),be=function(n){return n[n.LOAD_ERROR=10]="LOAD_ERROR",n[n.MANIFEST_LOAD_ERROR=11]="MANIFEST_LOAD_ERROR",n[n.LEVEL_LOAD_ERROR=12]="LEVEL_LOAD_ERROR",n[n.AUDIO_TRACK_LOAD_ERROR=13]="AUDIO_TRACK_LOAD_ERROR",n[n.KEY_LOAD_ERROR=14]="KEY_LOAD_ERROR",n[n.KEY_SYSTEM_LICENSE_REQUEST_FAILED=15]="KEY_SYSTEM_LICENSE_REQUEST_FAILED",n[n.DEC_LIB_LOAD_ERROR=16]="DEC_LIB_LOAD_ERROR",n[n.RTC_SDP_LOAD_ERROR=17]="RTC_SDP_LOAD_ERROR",n[n.SUBTITLE_TRACK_LOAD_ERROR=18]="SUBTITLE_TRACK_LOAD_ERROR",n[n.CANNOT_SEEK=100]="CANNOT_SEEK",n[n.VIDEO_ERROR=101]="VIDEO_ERROR",n[n.UNSUPPORTED=102]="UNSUPPORTED",n[n.CONFIG_ERROR=103]="CONFIG_ERROR",n[n.OTHER=104]="OTHER",n[n.UNKNOWN=105]="UNKNOWN",n[n.CANNOT_SEEK_BY_FRAME_INDEX=106]="CANNOT_SEEK_BY_FRAME_INDEX",n[n.SRC_EMPTY=107]="SRC_EMPTY",n[n.VIDEO_NO_SIZE=108]="VIDEO_NO_SIZE",n[n.NO_TRACKS_AVAILABLE=109]="NO_TRACKS_AVAILABLE",n[n.VIDEO_ERROR_1=111]="VIDEO_ERROR_1",n[n.VIDEO_ERROR_2=112]="VIDEO_ERROR_2",n[n.VIDEO_ERROR_3=113]="VIDEO_ERROR_3",n[n.VIDEO_ERROR_4=114]="VIDEO_ERROR_4",n[n.MEDIASOURCE_ERROR=200]="MEDIASOURCE_ERROR",n[n.ADDSOURCEBUFFER_ERROR=201]="ADDSOURCEBUFFER_ERROR",n[n.SOURCEBUFFER_ERROR=202]="SOURCEBUFFER_ERROR",n[n.ENDOFSTREAM_ERROR=203]="ENDOFSTREAM_ERROR",n[n.APPENDBUFFER_ERROR=204]="APPENDBUFFER_ERROR",n[n.CHANGETYPE_ERROR=205]="CHANGETYPE_ERROR",n[n.MSE_CAPABILITY_ERROR=206]="MSE_CAPABILITY_ERROR",n[n.MSE_SOURCE_BUFFER_CLOSE_ERROR=207]="MSE_SOURCE_BUFFER_CLOSE_ERROR",n[n.PARSING_ERROR=301]="PARSING_ERROR",n[n.REMUX_ERROR=302]="REMUX_ERROR",n[n.REMUX_ALLOC_ERROR=303]="REMUX_ALLOC_ERROR",n[n.REMUX_WORKER_ERROR=304]="REMUX_WORKER_ERROR",n[n.DEMUX_NOT_FOUND=305]="DEMUX_NOT_FOUND",n[n.MANIFEST_PARSING_ERROR=400]="MANIFEST_PARSING_ERROR",n[n.LEVEL_NO_UPDATE_ERROR=402]="LEVEL_NO_UPDATE_ERROR",n[n.KEY_SYSTEM_NO_ACCESS=500]="KEY_SYSTEM_NO_ACCESS",n[n.KEY_SYSTEM_NO_SESSION=501]="KEY_SYSTEM_NO_SESSION",n[n.KEY_SYSTEM_URL_ERROR=502]="KEY_SYSTEM_URL_ERROR",n[n.KEY_SYSTEM_NO_KEYS=505]="KEY_SYSTEM_NO_KEYS",n[n.FRAG_DECRYPT_ERROR=506]="FRAG_DECRYPT_ERROR",n[n.KEY_SYSTEM_NO_INIT_DATA=507]="KEY_SYSTEM_NO_INIT_DATA",n[n.KEY_SYSTEM_UNSUPPORTED=508]="KEY_SYSTEM_UNSUPPORTED",n[n.DECODER_LOAD_ERROR=600]="DECODER_LOAD_ERROR",n[n.DECODER_INIT_ERROR=601]="DECODER_INIT_ERROR",n[n.DECODER_DRAW_ERROR=602]="DECODER_DRAW_ERROR",n[n.DECODER_WEBGL_ERROR=603]="DECODER_WEBGL_ERROR",n[n.DECODER_UNSUPPORTED=604]="DECODER_UNSUPPORTED",n[n.DECODER_COPY_YUV_ERROR=605]="DECODER_COPY_YUV_ERROR",n[n.DECODER_DEC_ERROR=606]="DECODER_DEC_ERROR",n[n.DECODER_2D_ERROR=607]="DECODER_2D_ERROR",n[n.SCREENSHOT_INIT_ERROR=700]="SCREENSHOT_INIT_ERROR",n[n.SCREENSHOT_EMPTY_DATA_ERROR=701]="SCREENSHOT_EMPTY_DATA_ERROR",n[n.SCREENSHOT_CREATE_IMG_ERROR=702]="SCREENSHOT_CREATE_IMG_ERROR",n[n.LIVE_DISCONNECTED_ERROR=1009]="LIVE_DISCONNECTED_ERROR",n[n.WEBRTC_DISCONNECTED_ERROR=1010]="WEBRTC_DISCONNECTED_ERROR",n[n.WEBRTC_FAILED_ERROR=1011]="WEBRTC_FAILED_ERROR",n[n.WEBRTC_CLOSED_ERROR=1012]="WEBRTC_CLOSED_ERROR",n[n.WEBRTC_ICE_CANDIDATE_ERROR=1013]="WEBRTC_ICE_CANDIDATE_ERROR",n[n.WEBRTC_ICE_CONNECTION_ERROR=1014]="WEBRTC_ICE_CONNECTION_ERROR",n[n.WEBRTC_OFFER_ERROR=1015]="WEBRTC_OFFER_ERROR",n[n.WEBRTC_ANSWER_ERROR=1016]="WEBRTC_ANSWER_ERROR",n[n.WEBRTC_TRANSMISSION_DATA_NULL=1017]="WEBRTC_TRANSMISSION_DATA_NULL",n[n.WEBRTC_CONNECT_TIMEOUT=1018]="WEBRTC_CONNECT_TIMEOUT",n[n.WEBRTC_CONNECT_FAILED=1019]="WEBRTC_CONNECT_FAILED",n}({}),oe=[be.VIDEO_ERROR,be.VIDEO_ERROR_1,be.VIDEO_ERROR_2,be.VIDEO_ERROR_3,be.VIDEO_ERROR_4];function le(n,h,a,i){var o={type:n,details:h,code:0,fatal:!0,reason:a};if(i)for(var u in i){var p=i[u];p!==void 0&&(o[u]=p)}return o}var ne={other4xx:"05",serverError:"06",timeoutOpen:"07",timeoutIO:"08",handlingDataError:"10",other:"99"},ye={400:"01",401:"02",403:"03",404:"04",200:"09",206:"09"};function ae(n,h,a){if(a===void 0&&(a=0),n>=100)return n;var i="00";return function(o){return o.indexOf(D.LOADER_CONNECT_TIMEOUT)>=0}(h)?i=ne.timeoutOpen:function(o){return o.indexOf(D.LOADER_TRANS_TIMEOUT)>=0}(h)?i=ne.timeoutIO:function(o){return o.indexOf(D.HANDLING_DATA_ERROR)>=0}(h)?i=ne.handlingDataError:Object.prototype.hasOwnProperty.call(ye,a)?i=a!==200&&a!==206||!h?ye[a]||"00":ne.other:/^4\d{2}$/.test(a.toString())?i=ne.other4xx:/^5\d{2}$/.test(a.toString())&&(i=ne.serverError),parseInt(n+i,10)}var St=/\.[^./\\?#]+(?=$|[?#])/i,pe={".mp4":y.mp4,".m4s":y.mp4,".mov":y.mp4,".m4a":y.mp4,".flv":y.flv,".m3u8":y.hls,".sdp":y.webrtc,".webm":y.matroska,".mkv":y.matroska,".mka":y.matroska,".mp3":y.mp3,".wav":y.wav,".aac":y.aac,".ts":y.ts,".yuv":y.yuv,".slice":y.flv};function it(n){var h=function(a){var i=a.toLocaleLowerCase().match(St);return i?i[0]:""}(n);return h&&pe[h]||y.unknown}var qe=r(4),Lt=r.n(qe),oi=/^[^_][A-Za-z0-9_-]*$/,Xd=/_([A-Za-z0-9]+)_/;function eh(n){var h=new Lt.a(n).pathname,a=it(n),i=a===y.flv||fe(a)||a===y.ts,o="",u="",p=h.split("/"),T=p[p.length-1]||"";if(i){try{var L=h.lastIndexOf("/");L>=0&&(h=h.slice(L+1));var V=h.split(".")[0].split("_");V.length===1?(o=Ei(V[0]),u=Ya(n)):V.length===2?(o=Ei(V[0]),u=Ei(V[1])):V.length>2&&(o=Ei(V.slice(0,V.length-1).join("_")),u=Ei(V[V.length-1]))}catch(W){}return{streamID:o,transcodingTpl:u,filename:T}}return{streamID:"",transcodingTpl:Ya(n),filename:T}}var Ya=function(n){var h=n.match(Xd),a="";return h!=null&&h.length&&h.length>1&&(a=h[1]),Ei(a)},Ei=function(n){return oi.test(n)?n:""};function th(n){var h;performance.addEventListener&&(h=n,performance&&(typeof performance.setResourceTimingBufferSize=="function"?performance.setResourceTimingBufferSize(h):typeof performance.webkitSetResourceTimingBufferSize=="function"&&performance.webkitSetResourceTimingBufferSize(h)),performance.addEventListener("resourcetimingbufferfull",Qa))}var dr,Qa=function(){performance&&(typeof performance.clearResourceTimings=="function"?performance.clearResourceTimings():typeof performance.webkitClearResourceTimings=="function"&&performance.webkitClearResourceTimings())},ih=function(n){return n.FAIL="FAIL",n.ABORT="ABORT",n.SUCCESS="SUCCESS",n.CONNECTED="CONNECTED",n}({});(dr={})[Pe.MANIFEST]=be.MANIFEST_LOAD_ERROR,dr[Pe.LEVEL]=be.LEVEL_LOAD_ERROR,dr[Pe.AUDIO_TRACK]=be.AUDIO_TRACK_LOAD_ERROR,dr[Pe.SUBTITLE_TRACK]=be.SUBTITLE_TRACK_LOAD_ERROR;var hr,at,rn,Za=function(n){return n.METADATA="metadata",n.MEDIA_INFO="mediaInfo",n.PARSING_INIT_SEGMENT="parsingInitSegment",n.PARSING_DATA="parsingData",n.PARSED_DATA="parsedData",n.SCRIPT_PARSED="scriptParsed",n.KEY_FRAME_INDEXS="keyFrameIndexs",n.VIDEO_FRAME_INFO="videoFrameInfo",n.DISCONTINUITY="discontinuity",n.REPORT="report",n.LOAD_END="loadEnd",n.ERROR="error",n.MANIFEST_LOADED="manifestLoaded",n.MANIFEST_PARSED="manifestParsed",n.LEVEL_SWITCHING="levelSwitching",n.LEVEL_SWITCHED="levelSwitched",n.LEVEL_SWITCH_PLAYING="levelSwitchPlaying",n.LEVEL_SWITCH_FAILED="levelSwitchFailed",n.LEVEL_LOADED="levelLoaded",n.LEVEL_UPDATED="levelUpdated",n.AUDIO_TRACK_SWITCHING="audioTrackSwitching",n.AUDIO_TRACK_SWITCHED="audioTrackSwitched",n.AUDIO_TRACK_UPDATED="audioTrackUpdated",n.AUDIO_TRACK_SWITCH_FAILED="audioTrackSwitchFailed",n.HLS_MANIFEST_PARSED="hlsManifestParsed",n.HLS_KEY_LOADED="hlsKeyLoaded",n.AUDIO_TRACK_LOADED="audioLoaded",n.SUBTITLE_TRACK_LOADED="subtitleTrackLoaded",n.SUBTITLE_LOADED="subtitleLoaded",n.SUBTITLE_TRACK_SWITCHED="subtitleTrackSwitched",n.SUBTITLE_TRACK_UPDATED="subtitleTrackUpdated",n.BUFFER_CLEANING="bufferCleaning",n.VIDEO_SEEK="vdeoSeek",n.ABR_NEXT="abrNext",n.PRIV_NAL="privNal",n.SEI="sei",n.AAC_PRIV="aacPriv",n.RAW_DATA="rawData",n.MP4_NOT_FASTSTART="mp4NotFaststart",n.VIDEO_CODEC_DETECTED="videoCodecChange",n.H265_DETECTED="h265Detected",n.VIDEO_RENDERER_CHANGE="videoRendererChange",n.DEC_LIB_LOADED="decLibLoaded",n.DEC_INIT_COMPLETE="decoderInitComplete",n.DEC_VIDEO_READY="decVideoReady",n.STEP="step",n.RENDERER_INIT_COMPLETE="rendererInitComplete",n.RENDERER_BUF_EXPIRED="rendererBufExpired",n.RENDERER_SEEK="rendererSeek",n.RENDERER_BUF_UPDATE="rendererBufUpdate",n.RENDERER_DRAW="rendererDraw",n.RENDERER_WAITING="rendererWaiting",n.RENDERER_WAITING_END="rendererWaitingEnd",n.DECODER_FRAME="decoderFrame",n.DECODER_IMG="decoderImg",n.DECODER_SEEK="decoderSeek",n.DECODER_SEEK_ABORT="decoderSeekAbort",n.DECODER_WAITING="decoderWaiting",n.DECODER_DATA_END="decoderDataEnd",n.DECODER_BUF_LOW="decoderDataEmpty",n.DECODER_DROP_FRAME="decocerDropFrame",n.DECODER_MEDIA_INFO="decoderMediaInfo",n.MEDIA_CONNECTED="mediaConnected",n.LOADER_CHUNK_ARRIVAL="loaderChunkArrival",n.DEMUXER_DETECTED="demuxerDetected",n.MEDIA_DEMUX="mediaDemux",n.KEY_FRAME="keyFrame",n.USE_BACKUP="useBackup",n.NEW_SOURCE="newSource",n.DOWNLOAD="download",n.STOP_LOAD="stopLoad",n.LOAD="load",n.WAITING="waiting",n.LOADEDMETADATA="loadedmetadata",n.LOADEDDATA="loadeddata",n.CANPLAY="canplay",n.SEEKING="seeking",n.SEEK_WITH_LOAD="seekWithLoad",n.SEEKED="seeked",n.PLAYING="playing",n.PAUSE="pause",n.PLAY="play",n.ENDED="ended",n.TIMEUPDATE="timeupdate",n.PROGRESS="progress",n.RATE_CHANGE="ratechange",n.DURATION_CHANGE="durationchange",n.HEARTBEAT="heartbeat",n.MSE_UPDATE="mseUpdate",n.MSE_BUFFER_FULL="mseBufferFull",n.MSE_SOURCE_CLOSE="mseSourceClose",n.RETRY="retry",n.WORKER_LOG="workerLog",n.VISIBILITY_CHANGE="visibilityChange",n.SCREENSHOT="screenshot",n}(Za||{}),q=Za,nn="event-bus-consumer-manager",rh=function(){function n(a,i){this.J=void 0,this.At=[],this.ot=void 0,a.i(nn,"constructor"),this.J=a,this.ot=i,this.st()}var h=n.prototype;return h.destroy=function(){this.J.i(nn,"destroy"),this.ot.removeAllListeners(),this.At.splice(0,this.At.length)},h.register=function(a,i){i===void 0&&(i=!1),this.J.i(nn,"register",a.getName()),i?this.At.unshift(a):this.At.push(a),a.setEvtEmitter(this.ot)},h.unregister=function(a){for(var i=this.At.length-1;i>=0;i--)a===this.At[i]&&this.At.splice(i,1)},h.st=function(){var a=this;Object.values(q).forEach(function(i){var o="on"+i.charAt(0).toUpperCase()+i.slice(1);a.ot.on(i,function(){for(var u=arguments.length,p=new Array(u),T=0;T<u;T++)p[T]=arguments[T];for(var L=0;L<a.At.length;L++){var V=a.At[L];if(V&&o in V){var W,$=(W=V[o]).call.apply(W,[V].concat(p));if($!=null&&$.stop)break}}})})},f()(n,[{key:"evt",get:function(){return this.ot}}])}(),on=function(n){function h(){for(var i,o=arguments.length,u=new Array(o),p=0;p<o;p++)u[p]=arguments[p];return(i=n.call.apply(n,[this].concat(u))||this).ot=void 0,i}R()(h,n);var a=h.prototype;return a.getName=function(){throw new Error("getName method must be override.")},a.setEvtEmitter=function(i){this.ot=i},a.emit=function(i,o){var u;return((u=this.ot)==null?void 0:u.emit(i,o))||!1},a.onWorkerLog=function(i){},h}(S),Xa="exposed-event",nh=function(n){function h(i,o){var u;return(u=n.call(this)||this).ut=void 0,u.J=void 0,u.ht=void 0,u.ut=i,u.J=i.logger,u.ht=o,u}R()(h,n);var a=h.prototype;return a.onReport=function(i){this.ht.emit(q.REPORT,i)},a.onError=function(i){if((i==null||!i.preventFollowUp)&&i.fatal){var o=l()({},i);if(this.ut.stat.coreType===H.native){var u=this.ut.stat.retryInfo.getLastMseError();u&&(this.J.i(Xa,"replace error info by mse error."),l()(o,{type:u.type,details:u.details,reason:u.reason,code:u.code}),u.url!==void 0&&(o.url=u.url),u.statusCode!==void 0&&(o.statusCode=u.statusCode))}this.ht.emit(q.ERROR,o)}},a.onManifestParsed=function(i){i!=null&&i.preventFollowUp||this.ht.emit(q.MANIFEST_PARSED,i)},a.onLevelSwitching=function(i){this.ht.emit(q.LEVEL_SWITCHING,i)},a.onLevelSwitched=function(i){this.ht.emit(q.LEVEL_SWITCHED,i)},a.onLevelSwitchFailed=function(){this.ht.emit(q.LEVEL_SWITCH_FAILED)},a.onLevelUpdated=function(i){this.ht.emit(q.LEVEL_UPDATED,i)},a.onLevelSwitchPlaying=function(i){this.ht.emit(q.LEVEL_SWITCH_PLAYING,i)},a.onAudioTrackSwitching=function(i){this.ht.emit(q.AUDIO_TRACK_SWITCHING,i)},a.onAudioTrackSwitched=function(i){this.ht.emit(q.AUDIO_TRACK_SWITCHED,i)},a.onAudioTrackUpdated=function(i){this.ht.emit(q.AUDIO_TRACK_UPDATED,i)},a.onAudioTrackSwitchFailed=function(){this.ht.emit(q.AUDIO_TRACK_SWITCH_FAILED)},a.onSubtitleTrackSwitched=function(i){this.ht.emit(q.SUBTITLE_TRACK_SWITCHED,i)},a.onLoadEnd=function(i){i!=null&&i.preventFollowUp||this.ht.emit(q.LOAD_END)},a.onVideoRendererChange=function(i){this.ht.emit(q.VIDEO_RENDERER_CHANGE,i)},a.onH265Detected=function(i){this.ht.emit(q.H265_DETECTED,i)},a.onScreenshot=function(i){i.pts===-1&&(i.pts=this.ut.video?1e3*this.ut.video.currentTime:0),this.ht.emit(q.SCREENSHOT,i)},a.getName=function(){return Xa},h}(on),es="fallback",an=function(n){function h(i){var o;return(o=n.call(this)||this).ut=void 0,o.J=void 0,o.ct=!1,o.ft=void 0,o.ut=i,o.J=i.logger,o}R()(h,n);var a=h.prototype;return a.reset=function(){return this.J.i(es,"reset"),this.ct=!1,this},a.stop=function(){return this},a.setRetryFunc=function(i){return this.ft=i,this},a.destroy=function(){this.J.i(es,"fallback: "+this.constructor.name+" destroy."),this.ft=void 0,n.prototype.destroy.call(this)},a.getAvailable=function(){return!(!this.ft||this.ct)},a.vt=function(i){if(this.ft&&this.ft()!==!1)return this.ct=!0,i},a.emit=function(i,o){return this.ut.evt.emit(i,o)},h}(S),Ce=function(n){return n.FLV_LIVE_RELOAD="flvLiveReload",n.USE_BACKUP="useBackup",n.USE_BACKUP_MULTIPART="useBackupMultipart",n.NO_WORKER="noWorker",n.SWAP_REMUX_TYPE="swapRemuxType",n.SWAP_AUDIO_CODECSTR="swapAudioCodecStr",n.NEXT_DESC="nextDesc",n.SWAP_WASM_DECODER="swapWasmDecoder",n.SWAP_CORE="swapCore",n.SWAP_264="swap264",n.RELOAD_WASM="reloadWasm",n.DROP_V_FRAME="dropVFrame",n}({}),Wt="fallback",oh=function(n){function h(i){var o;return(o=n.call(this)||this).ut=void 0,o.J=void 0,o.dt={},o.lt=void 0,o.H=function(u){if(o.J.i(Wt,"on error",u,Object.keys(o.dt)),o.lt||(o.lt=o.yt()),u.fatal){o.J.i(Wt,"error. type: "+u.type+" details: "+u.details+" reason: "+u.reason);for(var p=0;p<o.lt.actions.length;p++){var T=o.lt.actions[p];if(T){var L=o.dt[T.type];if(L!=null&&L.getAvailable()){var V=o.ut.stat.coreType,W=L.run(u);if(W)return o.J.i(Wt,"fallback run. type: "+T.type+" "+p+"/"+o.lt.actions.length+". reason: "+u.reason),u.preventFollowUp=!0,W.code=ae(u.details,u.reason,u.statusCode),W.errorData=l()({},u),W.core=V,o.ut.evt.emit(q.RETRY,W),void o.Mt(p)}}}o.J.i(Wt,"no fallback matched. reason: "+u.reason)}},o.ut=i,o.J=i.logger,o.F.push(o.ut.evt.prependListener(q.ERROR,o.H)),o}R()(h,n);var a=h.prototype;return a.register=function(i,o){var u=this;return this.J.i(Wt,"register "+i+" "+o.constructor.name),this.dt[i]&&(this.J.i(Wt,i+" existed."),this.F.destroyItem(o)),this.dt[i]=o,this.F.push(o),{destroy:function(){return u.unregisterAndDestroy(i)}}},a.unregisterAndDestroy=function(i){var o=this.dt[i];return o&&(this.F.destroyItem(o),o.destroy(),delete this.dt[i],this.J.i(Wt,"unregisterAndDestroy "+i)),this},a.hasFallback=function(i){return!!this.dt[i]},a.reset=function(){for(var i in this.J.i(Wt,"reset"),this.dt)this.unregisterAndDestroy(i);this.dt={},this.lt=void 0},a.stop=function(){for(var i in this.dt)this.dt[i].stop()},a.Mt=function(i){if(this.lt){var o=this.lt.actions[i];!o||o.type!==Ce.SWAP_CORE&&o.type!==Ce.NO_WORKER||(this.wt(Ce.USE_BACKUP),this.wt(Ce.USE_BACKUP_MULTIPART),this.wt(Ce.FLV_LIVE_RELOAD))}},a.yt=function(){this.J.i(Wt,"generate fallback policy.");var i=this.ut,o=(ee.mobile,{core:i.stat.coreType,actions:[]});return i.stat.coreType===H.mse?o.actions.push({type:Ce.RELOAD_WASM},{type:Ce.FLV_LIVE_RELOAD},{type:Ce.USE_BACKUP_MULTIPART},{type:Ce.USE_BACKUP},{type:Ce.NO_WORKER},{type:Ce.DROP_V_FRAME},{type:Ce.SWAP_REMUX_TYPE},{type:Ce.SWAP_AUDIO_CODECSTR},{type:Ce.SWAP_264},{type:Ce.NEXT_DESC},{type:Ce.SWAP_WASM_DECODER},{type:Ce.SWAP_CORE}):i.stat.coreType===H.native&&o.actions.push({type:Ce.USE_BACKUP},{type:Ce.SWAP_264},{type:Ce.NEXT_DESC},{type:Ce.SWAP_CORE},{type:Ce.RELOAD_WASM},{type:Ce.FLV_LIVE_RELOAD},{type:Ce.USE_BACKUP_MULTIPART},{type:Ce.NO_WORKER},{type:Ce.SWAP_REMUX_TYPE},{type:Ce.SWAP_AUDIO_CODECSTR},{type:Ce.SWAP_WASM_DECODER}),o},a.wt=function(i){var o;(o=this.dt[i])==null||o.reset()},h}(S),ah=function(n){function h(){return n.apply(this,arguments)||this}return R()(h,n),h.prototype.run=function(a){if(this.getAvailable()&&this.ut.hasNextMediaDesc()&&(this.ut.stat.coreType===H.mse||this.ut.stat.coreType===H.native)&&(this.J.i("fallback-next-desc","run"),this.ut.nextMediaDesc()))return this.vt({type:w.FALLBACK,message:"use next media description.",fallback:Ce.NEXT_DESC})},h}(an),sh={preferLowPowerToHighPerformance:!0,preserveDrawingBuffer:!0};function ts(){return typeof HTMLCanvasElement>"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function sn(){if(!hr){var n=ts();is(n,hr={webGL:!1,performance:!1},!0)||is(n,hr,!1)}return hr}function is(n,h,a){a===void 0&&(a=!1);var i=!1,o=l()({failIfMajorPerformanceCaveat:a},sh);try{var u=n.getContext("webgl",o);if(u){var p=u.getExtension("WEBGL_debug_renderer_info");h.webGL=!0,h.performance=a,p!=null&&p.UNMASKED_VENDOR_WEBGL&&(h.vendor=u.getParameter(p==null?void 0:p.UNMASKED_VENDOR_WEBGL)),p!=null&&p.UNMASKED_RENDERER_WEBGL&&(h.renderer=u.getParameter(p==null?void 0:p.UNMASKED_RENDERER_WEBGL)),i=!0;var T=u.getExtension("WEBGL_lose_context");T&&T.loseContext()}}catch(L){}return i}function fr(){return typeof navigator>"u"?0:navigator.hardwareConcurrency||0}function vt(){return typeof window!="object"||typeof document!="object"||typeof document.createElement!="function"}function ln(){var n,h,a;if(!vt())return((n=window)==null?void 0:n.ManagedMediaSource)||((h=window)==null?void 0:h.MediaSource)||((a=window)==null?void 0:a.WebKitMediaSource)}function rs(){var n,h,a;if(!vt())return((n=window)==null?void 0:n.ManagedSourceBuffer)||((h=window)==null?void 0:h.SourceBuffer)||((a=window)==null?void 0:a.WebKitSourceBuffer)}var lh={av1:['video/mp4; codecs="av01.0.08M.08,mp4a.40.2"'],hevc:['video/mp4; codecs="hev1.1.6.L120.90,mp4a.40.2"','video/mp4; codecs="hvc1.1.6.L120.90,mp4a.40.2"'],h264:['video/mp4; codecs="avc1.4D4028,mp4a.40.2"'],opus:['video/mp4; codecs="opus"'],mp3:['video/mp4; codecs="mp3"'],aac:['video/mp4; codecs="mp4a.40.2"']},uh={av1:['video/mp4; codecs="av01.0.08M.10"'],hevc:['video/mp4; codecs="hev1.2.2.L120.90"','video/mp4; codecs="hvc1.2.2.L120.90"'],h264:['video/mp4; codecs="avc1.6e0028"']},ch={av1:['video/mp4; codecs="av01.0.12M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L150.90"','video/mp4; codecs="hvc1.1.6.L150.90"'],h264:['video/mp4; codecs="avc1.4D4033"']},dh={av1:['video/mp4; codecs="av01.0.12M.10"'],hevc:['video/mp4; codecs="hev1.2.2.L150.90"','video/mp4; codecs="hvc1.2.2.L150.90"'],h264:['video/mp4; codecs="avc1.6e0028"']},hh={mp4:["video/mp4","video/quicktime"],flv:["video/x-flv"],ts:["video/mp2t"],matroska:["video/x-matroska","video/webm"],hls:["application/vnd.apple.mpegURL","application/x-mpegURL"],hls_ts:["application/vnd.apple.mpegURL","application/x-mpegURL"],hls_fmp4:["application/vnd.apple.mpegURL","application/x-mpegURL"],aac:["audio/aac"],mp3:["audio/mpeg","audio/mp3"]},Pt=function(){function n(){}return n.isMSEAvailable=function(){if(n.bt!==void 0)return n.bt;if(!rt.a)return n.bt=!1,!1;var h=ln(),a=rs();if(n.gt=!!(h&&a&&a.prototype&&typeof a.prototype.appendBuffer=="function"&&typeof a.prototype.remove=="function"),h&&ee.mobile&&n.gt)try{var i=new h,o=document.createElement("video");o.src=URL.createObjectURL(i),URL.revokeObjectURL(o.src),n.bt=!0}catch(u){n.bt=!1}else n.bt=n.gt;return n.bt},n.isMSECodecCapabilityNormal=function(){return n.isMSEAvailable()&&n.TYPE_SUPPORTED.h264},n.isSupported=function(h){return h===void 0&&(h=v.h264),n.isMSECodecSupported(h)&&n.isMSEAvailable()},n.isMSECodecSupported=function(h,a,i){if(h===void 0&&(h=v.h264),a===void 0&&(a=O.FHD),i===void 0&&(i=!1),ee.msedge&&ee.platform==="windows"||ee.msie)return n.isMSEAvailable()&&h===v.h264;if(n.kt(h,a)===!1)return!1;var o=n._t(h,a,i);return!!o&&o.reduce(function(u,p){return u||n.isMSECodecStrSupported(p)},!1)},n.isVideoCodecSupported=function(h,a,i){if(h===void 0&&(h=v.h264),a===void 0&&(a=O.FHD),i===void 0&&(i=!1),ee.msedge&&ee.platform==="windows"||ee.msie)return h===v.h264;if(n.kt(h,a)===!1)return!1;var o=n._t(h,a,i);if(!o)return!1;var u=n.Et();return o.reduce(function(p,T){return p||!(!u||!u.canPlayType(T))},!0)},n.isVideoBoxSupported=function(h){if(h===void 0&&(h=y.mp4),h===y.unknown)return!0;var a=hh[h];if(!a)return!1;var i=n.Et();return a.reduce(function(o,u){return o||!(!i||!i.canPlayType(u))},!1)},n.isVideoCodecStrSupportedInMp4=function(h,a){a===void 0&&(a="");try{var i=n.Et();return!(!i||!i.canPlayType((a||"video")+'/mp4;codecs="'+h+'"'))}catch(o){}return!1},n.isWebRTCSupported=function(){return"RTCPeerConnection"in window&&"RTCRtpTransceiver"in window},n.isMSECodecStrSupportedInMp4=function(h,a){var i;return a===void 0&&(a=""),!((i=ln())==null||!i.isTypeSupported((a||"video")+'/mp4;codecs="'+h+'"'))},n.isMSECodecStrSupported=function(h){var a=ln();return!(!a||typeof a.isTypeSupported!="function"||!a.isTypeSupported(h))},n.isChangeTypeSupported=function(){if(n.Rt===void 0){var h=rs();n.Rt=!(!h||h.prototype.changeType===void 0)}return n.Rt},n.getVideoCodecCompatibilityByCodec=function(h,a,i){a===void 0&&(a=O.FHD),i===void 0&&(i=!1);var o=E.unsupported,u=!0;h===v.h264?o=a===O.UHD_4K?(i?n.TYPE_SUPPORTED.h264Hdr4k:n.TYPE_SUPPORTED.h2644k)?E.buildin:E.unsupported:(i?n.TYPE_SUPPORTED.h264Hdr:n.TYPE_SUPPORTED.h264)?E.buildin:E.unsupported:h===v.av1?(o=a===O.UHD_4K?(i?n.TYPE_SUPPORTED.av1Hdr4k:n.TYPE_SUPPORTED.av14k)?E.buildin:E.unsupported:(i?n.TYPE_SUPPORTED.av1Hdr:n.TYPE_SUPPORTED.av1)?E.buildin:E.unsupported,u=fr()>=2):h===v.hevc?(o=a===O.UHD_4K?(i?n.TYPE_SUPPORTED.hevcHdr4k:n.TYPE_SUPPORTED.hevc4k)?E.buildin:E.unsupported:(i?n.TYPE_SUPPORTED.hevcHdr:n.TYPE_SUPPORTED.hevc)?E.buildin:E.unsupported)===E.buildin?(ee.msedge&&ee.platform==="windows"&&(o=E.unsupported),u=!!(fr()>=2||ee.safari)):u=n.wasmSmooth:h!==v.kvc3&&h!==v.kvc4&&h!==v.kvc5&&h!==v.kvc6&&h!==v.vvc&&h!==v.kvc30&&h!==v.bvc2||(o=typeof WebAssembly<"u"?E.wasm:E.unsupported,u=n.wasmSmooth);var p=!1;return o===E.buildin&&(p=n.isChangeTypeSupported(),h===v.hevc&&n.kt(h,a)===!1&&(o=E.wasm)),{decoder:o,smooth:o!==E.unsupported&&u,mix:p}},n.getPlayTestDefinition=function(h){if(typeof h.width=="number"&&typeof h.height=="number"){if((h==null?void 0:h.width)>1920||(h==null?void 0:h.height)>1920)return O.UHD_4K}else if(h.qualityType.toLowerCase().indexOf("4k")!==-1)return O.UHD_4K;return O.FHD},n._t=function(h,a,i){a===void 0&&(a=O.FHD),i===void 0&&(i=!1),h===v.unknown&&(h=v.h264);var o=i?uh:lh,u=i?dh:ch;return a===O.UHD_4K&&u[h]||o[h]},n.kt=function(h,a){if(a===void 0&&(a=O.FHD),h===v.hevc&&n.playHEVCTest&&(a===O.UHD_4K&&n.playHEVCTest[a]===!1||a!==O.UHD_4K&&n.playHEVCTest[O.FHD]===!1))return!1},n.Et=function(){return rn||vt()||(rn=document.createElement("video")),rn},n.Dt=function(){try{return typeof WebAssembly<"u"&&typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(h){return!1}},n.Tt=function(){return typeof WebAssembly<"u"&&WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))},f()(n,null,[{key:"isSupportSimd",get:function(){return n.St===void 0&&(n.St=n.Tt()),n.St}},{key:"isSupportThreads",get:function(){return n.Ot===void 0&&(n.Ot=n.Dt()),n.Ot}},{key:"wasmSmooth",get:function(){if(n.Ct===void 0){var h=fr();n.Ct=!!(n.isSupportHW&&n.isSupportThreads&&h&&h>=6)}return n.Ct}},{key:"isSupportHW",get:function(){return!!sn().performance}},{key:"playHEVCTest",get:function(){return this.Lt},set:function(h){this.Lt=h}}])}();at=Pt,Pt.Rt=void 0,Pt.bt=void 0,Pt.gt=void 0,Pt.St=void 0,Pt.Ot=void 0,Pt.Ct=void 0,Pt.Lt=void 0,Pt.TYPE_SUPPORTED={mpeg:at.isMSECodecStrSupported("audio/mpeg"),mp3:at.isMSECodecSupported(v.mp3),opus:at.isMSECodecSupported(v.opus),aac:at.isMSECodecSupported(v.aac),hevc:at.isMSECodecSupported(v.hevc),hevc4k:at.isMSECodecSupported(v.hevc,O.UHD_4K),hevcHdr:at.isMSECodecSupported(v.hevc,O.FHD,!0),hevcHdr4k:at.isMSECodecSupported(v.hevc,O.UHD_4K,!0),av1:at.isMSECodecSupported(v.av1),av14k:at.isMSECodecSupported(v.av1,O.UHD_4K),av1Hdr:at.isMSECodecSupported(v.av1,O.FHD,!0),av1Hdr4k:at.isMSECodecSupported(v.av1,O.UHD_4K,!0),h264:at.isMSECodecSupported(v.h264),h2644k:at.isMSECodecSupported(v.h264,O.UHD_4K),h264Hdr:at.isMSECodecSupported(v.h264,O.FHD,!0),h264Hdr4k:at.isMSECodecSupported(v.h264,O.UHD_4K,!0)};var me=Pt,ns="fallback-swap-to-264",fh=function(n){function h(){return n.apply(this,arguments)||this}return R()(h,n),h.prototype.run=function(a){var i;if(this.getAvailable()&&a.type===Fe.MEDIA_ERROR&&(a.details===be.VIDEO_ERROR||a.details===be.VIDEO_ERROR_3||a.details===be.VIDEO_ERROR_4||a.details===be.VIDEO_NO_SIZE)&&this.ut.canCodecFallback&&this.ut.video instanceof HTMLVideoElement&&(this.ut.stat.coreType===H.mse||this.ut.stat.coreType===H.native&&((i=this.ut.video)==null||!i.videoWidth))&&this.ut.stat.codecType!==v.h264&&this.ut.stat.decoder===E.buildin){var o="metadata video size: "+this.ut.video.videoWidth+". fallback 264";this.J.i(ns,"run"),this.ut.reProcessSrc(v.h264,this.ut.stat.native);var u=this.vt({type:w.FALLBACK,message:o,fallback:Ce.SWAP_264});return me.playHEVCTest===void 0&&(this.J.i(ns,"play hevc test start"),this.ut.hevcTest.start()),u}},h}(an),Oi=r(6),ei="ios-compatible",Ah=function(n){function h(i,o){var u;return(u=n.call(this)||this).ut=void 0,u.J=void 0,u.xt=void 0,u.Nt=!1,u.It=void 0,u.Ft=function(){var p=u.ut.video;u.It=setTimeout(function(){u.J.i(ei,"fix play stuck",p==null?void 0:p.currentTime),p&&u.xt((p==null?void 0:p.currentTime)+.001)},1e3)},u.Bt=function(){u.It&&(clearTimeout(u.It),u.It=void 0)},u.ut=i,u.J=i.logger,u.xt=o,u.J.i(ei,"constructor"),u}R()(h,n);var a=h.prototype;return a.onLoad=function(){this.jt()},a.destroy=function(){this.J.i(ei,"destroy"),this.jt()},a.onVisibilityChange=function(i){this.J.i(ei,"onVisibilityChange",i.hidden),!i.hidden&&ee.ios&&(this.J.i(ei,"ios hidden false. play stuck detector on."),this.Nt=!0)},a.onPlay=function(){this.Nt&&(this.J.i(ei,"on play. start detector timer."),this.Nt=!1,this.Ft())},a.onTimeupdate=function(){this.It&&this.jt()},a.getName=function(){return ei},a.jt=function(){this.J.i(ei,"reset"),this.Nt=!1,this.Bt()},h}(on),_t=function(n){return n.METADATA="metadata",n.MEDIA_INFO="mediaInfo",n.HEARTBEAT="heartbeat",n.DOWNLOAD="download",n.REALTIME_BEACON="realtimeBeacon",n.DISCONTINUITY="discontinuity",n.KEY_FRAME="keyFrame",n.PRIV_NAL="privNal",n.SEI="sei",n.AAC_PRIV="aacPriv",n}({}),ph=function(n){function h(){return n.apply(this,arguments)||this}return R()(h,n),h.prototype.run=function(a){if(this.getAvailable()&&(this.ut.stat.coreType===H.mse&&a.type===Fe.NETWORK_ERROR&&a.details!==be.DEC_LIB_LOAD_ERROR&&a.details!==be.KEY_SYSTEM_LICENSE_REQUEST_FAILED&&!this.ut.stat.multipart||this.ut.stat.coreType===H.native&&a.details!==be.KEY_SYSTEM_UNSUPPORTED)){var i=this.ut.lctx.current;if(i&&i.urlId<i.url.length-1)return this.J.i("fallback-backup","run"),i.urlId++,this.vt({type:w.BACKUP,message:"trans error. use backup url.",fallback:Ce.USE_BACKUP})}},h}(an),vh=function(){function n(){var a=this;this.Ut=void 0,this.B=void 0,this.Pt=void 0,this.it=function(){a.Vt()},this.Ht=function(){a.B&&a.B.readyState>=2&&a.Vt()},this.Vt=function(){a.B&&a.Pt&&a.Pt(a.B.status),a.stop()}}var h=n.prototype;return h.start=function(a,i){this.Pt=i,this.B&&this.stop();var o=this.B=new XMLHttpRequest;o.open("GET",a,!0),o.onreadystatechange=this.Ht,o.onerror=this.it,o.onload=this.it,o.send(),this.Ut=setTimeout(this.Vt,1e3)},h.stop=function(){this.Ut&&(clearTimeout(this.Ut),this.Ut=void 0),this.B&&(this.B.onreadystatechange=null,this.B.onload=null,this.B.onerror=null,this.B.abort(),this.B=void 0),this.Pt=void 0},n}(),_h={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function os(n){var h={};return(n||"").split(/[ ,]+/).forEach(function(a){a.indexOf("avc1")!==0&&a.indexOf("hev1")!==0&&a.indexOf("av01")!==0&&a.indexOf("kvc")!==0||(h.video=a),a.indexOf("mp4a")===0&&(h.audio=a)}),h}function mh(n,h){var a=[].concat(n.split(/[ ,]+/));["video","audio"].forEach(function(i){var o=a.filter(function(p){return function(T,L){var V=_h[L];return!!V&&V[T.slice(0,4)]===!0}(p,i)});if(o.length){var u=o.filter(function(p){return p.lastIndexOf("avc1",0)===0||p.lastIndexOf("av01",0)===0||p.lastIndexOf("hev1",0)===0||p.lastIndexOf("hvc1",0)===0||p.lastIndexOf("mp4a",0)===0});h[i+"Codec"]=u.length>0?u[0]:o[0],a=a.filter(function(p){return o.indexOf(p)===-1})}}),h.codec=a.join(",")}function as(n){return n.indexOf("avc1")===0?v.h264:n.indexOf("hev1")===0||n.indexOf("hvc1")===0?v.hevc:n.indexOf("av01")===0?v.av1:v.unknown}var jt=1e3;function ss(n,h,a){return a===void 0?{width:n,height:h}:a.width>a.height?{width:Math.round(a.width/a.height*n),height:h}:a.width<a.height?{width:n,height:Math.round(h*a.height/a.width)}:{width:n,height:h}}var gh=function(n){function h(i){var o;return(o=n.call(this)||this).J=void 0,o.Wt=void 0,o.Gt=void 0,o.J=i,o}R()(h,n);var a=h.prototype;return a.copyImageData=function(i,o,u,p){var T;this.Wt||(this.Wt=ts());var L={willReadFrequently:!0};p&&(L.colorSpace=p),this.Gt||(this.Gt=this.Wt.getContext("2d",L));var V,W,$=0,te=0,Te=typeof window<"u"&&i instanceof HTMLVideoElement;if(Te)$=i.videoWidth,te=i.videoHeight;else if(u===90||u===270){var ie=ss(i.height,i.width,o);$=ie.height,te=ie.width}else{var Le=ss(i.width,i.height,o);$=Le.width,te=Le.height}return this.Wt.width=$,this.Wt.height=te,Te?(V=this.Gt)==null||V.drawImage(i,0,0):(W=this.Gt)==null||W.drawImage(i,0,0,i.width,i.height,0,0,this.Wt.width,this.Wt.height),(T=this.Gt)==null?void 0:T.getImageData(0,0,$,te,L)},a.destroy=function(){this.J.i("image-data-copier","destrpy"),this.Wt=void 0,this.Gt=void 0},h}(S),Kt=function(n){return n[n.NONE=0]="NONE",n[n.WAITING=1]="WAITING",n[n.SEEK=2]="SEEK",n[n.SELECT_BITRATE=3]="SELECT_BITRATE",n[n.INIT=4]="INIT",n[n.LOADING=5]="LOADING",n}({}),Ze="kernel-base",Je="kernel-native",yh=function(n){function h(i){var o;return(o=n.call(this,i)||this).Qt=void 0,o.Yt=!1,o.F.push(o.ut.fallback.register(Ce.USE_BACKUP,new ph(i).setRetryFunc(o.Jt.bind(o)))),o}R()(h,n);var a=h.prototype;return a.Jt=function(i){this.Zt(ue.retry)},a.load=function(i){var o;this.J.i(Je,"load",this.ut.stat.startFromSec);var u=this.ut.lctx.levels;if(u.length||this.emit(q.ERROR,le(Fe.OTHER_ERROR,be.MANIFEST_PARSING_ERROR,"manifest parse error. core: native")),this.ut.stat.drm)this.emit(q.ERROR,le(Fe.KEY_SYSTEM_ERROR,be.KEY_SYSTEM_UNSUPPORTED,"DRM unsupported."));else{var p=this.ut.lctx.default,T=this.ut.lctx.startIdx;typeof T=="number"&&T>=0&&T<u.length&&(p=T,this.J.i(Je,"set level from level startIdx.")),this.J.i(Je,"level: "+p+" "+((o=u[p])==null?void 0:o.qualityType)),this.ut.lctx.currentIdx=this.ut.lctx.nextIdx=p,this.ut.lctx.abr=!1,this.emit(q.MANIFEST_PARSED,{levels:[],currentLevel:0}),this.Zt(i)}},a.onAbrLevelsUpdated=function(){},a.refresh=function(){var i,o=this;this.ut.stat.startFromSec=this.zt.currentTime,this.Zt(ue.retry),(i=this.zt.play())==null||i.catch(function(u){return o.J.i(Je,"refresh. call play() fail.",u)})},a.stopLoad=function(){this.emit(q.STOP_LOAD),this.Kt()},a.setCurrentLevel=function(i){var o=this;this.J.i(Je,"set current level: "+i+" @ "+this.zt.currentTime);var u=this.ut;if(u.lctx.levels.length){if(i>=0&&i<u.lctx.levels.length&&u.lctx.currentIdx!==i){u.lctx.currentIdx=u.lctx.nextIdx=i;var p=u.lctx.current;if(p){var T;return this.qt=Kt.SELECT_BITRATE,u.stat.startFromSec=this.zt.currentTime,this.Xt++,this.emit(q.LEVEL_SWITCHING,{time:u.currentTime,bitrate:p.bitrate,level:i,smooth:!1,auto:!1,id:this.Xt}),this.$t(u.lctx.currentIdx),!this.zt.paused&&((T=this.zt.play())==null||T.catch(function(L){return o.J.i(Je,"set current level, call play() fail.",L)})),void this.emit(q.LEVEL_SWITCHED,{time:u.currentTime,bitrate:p.bitrate,level:i,smooth:!1,auto:!1,id:this.Xt})}}this.emit(q.LEVEL_SWITCH_FAILED)}else u.lctx.currentIdx=u.lctx.nextIdx=i},a.setNextLevel=function(i){this.setCurrentLevel(i)},a.liveEnd=function(){},a.destroy=function(){this.J.i(Je,"destroy"),this.Qt&&(this.Qt.stop(),this.Qt=void 0),n.prototype.destroy.call(this),this.zt.src=""},a.ti=function(){this.ii||this.zt.src||this.load(),n.prototype.ti.call(this)},a.ei=function(){var i=this.ut,o=i.lctx.current;o&&this.qt===Kt.SELECT_BITRATE&&this.emit(q.LEVEL_SWITCH_PLAYING,{time:i.currentTime,bitrate:o.bitrate,level:i.lctx.currentIdx,smooth:!1,auto:!1,id:this.Xt}),this.qt!==Kt.NONE&&(this.qt=Kt.NONE),n.prototype.ei.call(this)},a.ni=function(){var i=this.ut;n.prototype.ni.call(this),this.Yt&&(this.J.i(Je,"timeupdate start from: "+i.stat.startFromSec),this.ri(),this.Yt=!1)},a.Ai=function(){this.J.i(Je,"video waiting"),this.qt=this.qt||Kt.WAITING;var i=this.ut.bufferedSec,o=!this.zt.ended&&!this.zt.seeking&&this.qt===Kt.WAITING;this.emit(q.WAITING,{block:o,bufferedSec:i})},a.oi=function(){var i;(ee.android||this.ut.stat.isLive===void 0||((i=this.si)==null?void 0:i.width)===0)&&this.si&&this.zt.duration>0&&(this.si.isLive=this.ut.stat.isLive=!isFinite(this.zt.duration),this.zt instanceof HTMLVideoElement&&(this.si.width=this.zt.videoWidth,this.si.height=this.zt.videoHeight),this.emit(q.MEDIA_INFO,this.si)),this.ui()&&this.zt.duration>0&&(this.J.i(Je,"check video dec failed. on android wechat hls duration change."),this.ai()),n.prototype.oi.call(this)},a.hi=function(){if(this.J.i(Je,"video loadeddata. duration: "+this.zt.duration+" box: "+this.ut.stat.box),!(!this.ui()&&this.zt instanceof HTMLVideoElement&&(this.J.i(Je,"check video dec failed. on video loaded data."),this.ai()))){this.ut.stat.isLive===void 0&&this.zt.duration>0&&(this.ut.stat.isLive=!isFinite(this.zt.duration)),this.si={videoDecoder:E.buildin},this.zt instanceof HTMLVideoElement&&(this.J.i(Je,"video loadeddata. width: "+this.zt.videoWidth+" height: "+this.zt.videoHeight),this.si.width=this.zt.videoWidth,this.si.height=this.zt.videoHeight);var i=this.ut,o=i.lctx.current;if(o&&o.codec){var u=os(o.codec);this.si.audioCodec=u.audio,this.si.videoCodec=u.video,u.video&&(i.stat.codecType=as(u.video))}this.si.videoCodecType=i.stat.codecType,ee.android?i.stat.startFromSec&&(this.Yt=!0):this.ri(),this.emit(q.MEDIA_INFO,this.si)}},a.ci=function(){this.J.i(Je,"seeking "+this.zt.currentTime);var i=this.zt.currentTime;this.fi?this.fi=!1:(this.emit(q.SEEKING),this.ut.isTimeinBuffered(i)||this.emit(q.SEEK_WITH_LOAD))},a.di=function(i){var o,u=this;this.J.i(Je,"video error",i);var p=((o=this.zt.error)==null?void 0:o.code)||0,T=ae(oe[p]||be.VIDEO_ERROR,"video error");if(p===4&&this.ut.canCodecFallback)this.emit(q.ERROR,le(Fe.MEDIA_ERROR,T,"buildin "+this.ut.stat.codecType+" dec error. video error: "+p));else{var L="video error";this.zt&&this.zt.error&&(L+=" code:"+p+" message:"+this.zt.error.message);var V=le(Fe.MEDIA_ERROR,(p?oe[p]:be.VIDEO_ERROR)||be.VIDEO_ERROR,L,{url:this.zt.src});p===2||p===4?(this.Qt||(this.Qt=new vh),this.J.i(Je,"video error start detect status code."),this.Qt.start(this.zt.src,function(W){u.J.i(Je,"video error check http status code:",W),(p===2||p===4&&W>0)&&(W<200||W>299)?u.emit(q.ERROR,le(Fe.NETWORK_ERROR,be.LOAD_ERROR,L,{statusCode:W,url:u.zt.src})):(W===0&&(V.statusCode=0),u.emit(q.ERROR,V))})):this.emit(q.ERROR,V)}},a.Zt=function(i){this.J.i(Je,"_load type: "+i),this.si=void 0,this.ii=void 0,this.ut.isLiveShift?this.emit(q.ERROR,le(Fe.OTHER_ERROR,be.UNSUPPORTED,"unsupported. core: "+this.type+" liveShift: "+this.ut.stat.liveShiftType)):(this.qt=Kt.LOADING,n.prototype.Zt.call(this,i),this.emit(q.LOAD,{type:i}),this.$t(this.ut.lctx.currentIdx),this.li())},a.$t=function(i){var o=this.ut,u=o.lctx.current;if(u){var p;this.J.i(Je,"level",i);var T,L=u.currentUrl;this.emit(q.NEW_SOURCE,{sync:o.stat.startFromSec||0}),(p=this.ut.config.preprocessUrl)!=null&&p.stream&&(this.J.d(Je,"preprocessUrl stream"),L=(T=this.ut.config.preprocessUrl)==null?void 0:T.stream(L)),this.J.i(Je,"play: "+L),this.zt.src=L}},a.ri=function(){var i=this.ut;i.stat.startFromSec>0&&(this.J.i(Je,"start from: "+i.stat.startFromSec),this.zt.currentTime=i.stat.startFromSec,i.stat.startFromSec=0)},a.ai=function(){return this.J.i(Je,"check video dec failed."),!!(this.zt instanceof HTMLVideoElement&&!this.zt.videoWidth&&this.ut.canCodecFallback)&&(this.emit(q.ERROR,le(Fe.MEDIA_ERROR,be.VIDEO_NO_SIZE,"buildin "+this.ut.stat.codecType+" dec no width.")),!0)},a.ui=function(){return ee.android&&(ee.xweb||ee.x5)&&fe(this.ut.stat.box)},f()(h,[{key:"type",get:function(){return H.native}}])}(function(n){function h(i){var o;if((o=n.call(this)||this).ut=void 0,o.J=void 0,o.zt=void 0,o.ii=void 0,o.pi=void 0,o.qt=Kt.INIT,o.si=void 0,o.Xt=0,o.mi=[],o.yi=void 0,o.Mi=void 0,o.fi=!1,o.wi=void 0,!i.video)throw new Error("video is null");return o.ut=i,o.J=i.logger,o.zt=i.video,o.Mi={loadedmetadata:o.bi.bind(o),loadeddata:o.hi.bind(o),canplay:o.ei.bind(o),seeking:o.ci.bind(o),seeked:o.gi.bind(o),waiting:o.Ai.bind(o),playing:o.ki.bind(o),pause:o._i.bind(o),play:o.ti.bind(o),error:o.di.bind(o),ended:o.Ei.bind(o),ratechange:o.Ri.bind(o),durationchange:o.oi.bind(o),timeupdate:o.ni.bind(o),progress:o.Di.bind(o),emptied:o.Ti.bind(o),resize:o.Si.bind(o)},o.Oi(),o}R()(h,n);var a=h.prototype;return a.destroy=function(){this.J.i(Ze,"destroy"),this.fi=!1,this.Kt(),this.Ci(),n.prototype.destroy.call(this)},a.getTrackBufInfo=function(){},a.load=function(){this.zt.load()},a.resume=function(){var i,o=this;this.zt.paused&&((i=this.zt.play())==null||i.catch(function(u){return o.J.i(Ze,"resume, call play() fail.",u)}))},a.refresh=function(){},a.stopLoad=function(){},a.Li=function(){var i=this.si&&this.si.fps?this.si.fps:30;return this.zt.duration&&!this.zt.ended?this.zt.currentTime+1/i:-1},a.xi=function(){var i=this.si&&this.si.fps?this.si.fps:30;return this.zt.duration&&this.zt.currentTime-1/i>=0?this.zt.currentTime-1/i:-1},a.Oi=function(){if(this.zt)for(var i in this.Mi)this.zt.addEventListener(i,this.Mi[i])},a.Ci=function(){if(this.zt)for(var i in this.Mi)this.zt.removeEventListener(i,this.Mi[i])},a.bi=function(){this.J.i(Ze,"loadedmetadata"),this.emit(q.LOADEDMETADATA)},a.hi=function(){this.J.i(Ze,"loadeddata"),this.emit(q.LOADEDDATA)},a.ei=function(){this.J.i(Ze,"canplay "+!!this.qt),this.emit(q.CANPLAY)},a.ci=function(){this.J.i(Ze,"seeking "+this.zt.currentTime),this.emit(q.SEEKING)},a.gi=function(){this.J.i(Ze,"seeked"),this.emit(q.SEEKED)},a.Ai=function(){this.J.i(Ze,"video waiting")},a.ki=function(){this.J.i(Ze,"playing"),this.ii||(this.qt=Kt.NONE,this.li(),this.emit(q.PLAYING))},a._i=function(){this.J.i(Ze,"pause. seeking: "+this.zt.seeking),this.zt.ended||this.emit(q.PAUSE)},a.ti=function(){this.J.i(Ze,"play",this.ii),this.emit(q.PLAY),ee.safari&&this.zt.currentTime>=this.zt.duration&&this.zt.loop&&(this.J.i(Ze,"safari loop fix. seek 0. loop: "+this.zt.loop+" "+this.zt.currentTime+"/"+this.zt.duration+"."),this.zt.currentTime=0)},a.di=function(i){this.J.i(Ze,"error",i)},a.Ei=function(){this.J.i(Ze,"ended"),this.fi=!1,this.emit(q.ENDED),this.Kt()},a.Ri=function(){this.J.i(Ze,"ratechange "+this.zt.playbackRate),this.emit(q.RATE_CHANGE)},a.oi=function(){this.J.i(Ze,"durationchange "+this.zt.duration),this.emit(q.DURATION_CHANGE)},a.ni=function(){this.emit(q.TIMEUPDATE)},a.Di=function(){this.emit(q.PROGRESS)},a.Ti=function(){this.J.i(Ze,"video emptied")},a.Si=function(){this.J.i(Ze,"video resize")},a.Ni=function(){this.emit(q.HEARTBEAT)},a.li=function(){this.pi||(this.pi=setInterval(this.Ni.bind(this),1e3))},a.Kt=function(){this.pi&&(clearInterval(this.pi),this.pi=void 0)},a.Zt=function(i){this.fi=!1},a.emit=function(i,o){if(i===q.ERROR){var u=o;u.fatal&&(this.ii=u),this.J.i(Ze,"error",u)}return this.ut.evt.emit(i,o)},a.internalSeek=function(i){this.fi=!0;try{this.zt.currentTime=i}catch(o){this.J.i(Ze,"internal seek err.",o)}},a.screenshot=function(i){var o=1e3*this.zt.currentTime;if(this.zt instanceof HTMLVideoElement&&this.zt.videoWidth){this.wi||(this.wi=new gh(this.J),this.F.push(this.wi));var u=this.wi.copyImageData(this.zt,void 0,0,i==null?void 0:i.colorSpace);u&&this.emit(q.SCREENSHOT,{pts:o,id:i==null?void 0:i.id,image:u})}else this.emit(q.SCREENSHOT,{pts:o,id:i==null?void 0:i.id,errorCode:be.SCREENSHOT_CREATE_IMG_ERROR,errorMessage:"no video"})},f()(h,[{key:"type",get:function(){return H.unknown}}])}(S)),ls=function(){function n(){this.timeout=6048e5}var h=n.prototype;return h.write=function(a,i){if(n.available)try{return localStorage.setItem(a,JSON.stringify({value:i,time:Date.now()})),!0}catch(o){}return!1},h.read=function(a,i){if(i===void 0&&(i=!0),n.available)try{var o=localStorage.getItem(a);if(o){var u=JSON.parse(o),p=u.value,T=u.time,L=T===void 0?0:T;if(!i||Date.now()-L<(typeof i=="number"?i:this.timeout))return p}}catch(V){}},f()(n,null,[{key:"available",get:function(){if(n.A===void 0)try{localStorage.setItem("alg","test"),n.A=!0}catch(a){n.A=!1}return n.A}}])}();ls.A=void 0;var un=ls,cn="kwai-kernel-id",dn=function(){function n(){}return n.next=function(){if(un.available){var h=n.Ii.read(cn,!1),a=n._;return typeof h=="number"?(a=this.getNextId(h),this.Ii.write(cn,a)):(a=this.getNextId(a),this.Ii.write(cn,a)),n._=a,a}return n._=n.getNextId(n._),n._},n.getNextId=function(h){return++h>n.MAX_ID?0:h},f()(n,null,[{key:"MAX_ID",get:function(){return 999}}])}();dn._=0,dn.Ii=new un;var us="sei-time",bh=function(n){function h(a){var i;return(i=n.call(this)||this).ut=void 0,i.Fi=0,i.J=void 0,i.Bi={idx:0,data:[],name:"sei"},i.ji={idx:0,data:[],name:"aacPriv"},i.Ui={idx:0,data:[],name:"privNal"},i.Pi=function(o){o.segments.forEach(function(u){u.type===G.VIDEO?(u.sei&&i.Vi(u.sei,i.Bi),u.privNal&&i.Vi(u.privNal,i.Ui)):u.type===G.AUDIO&&u.aacPriv&&i.Vi(u.aacPriv,i.ji)}),i.Hi()},i.Wi=function(o){o.sei&&i.Vi(o.sei,i.Bi),i.Hi()},i.Gi=function(){var o;if((o=i.ut.video)==null||!o.seeking){var u=1e3*i.ut.currentTime,p=i.Qi(u,i.Bi);p==null||p.forEach(function(V){i.ut.evt.emit(q.SEI,V)});var T=i.Qi(u,i.ji);T==null||T.forEach(function(V){i.ut.evt.emit(q.AAC_PRIV,V)});var L=i.Qi(u,i.Ui);L==null||L.forEach(function(V){i.ut.evt.emit(q.PRIV_NAL,V)})}},i.Qi=function(o,u){if(u.data.length&&u.idx<u.data.length){for(var p=[],T=0,L=u.idx;L<u.data.length;L++){var V;if(!(o>=(((V=u.data[L])==null?void 0:V.time)||0)))break;p.push(u.data[L]),T=L}if(p.length)return u.idx=T+1,p}},i.Yi=function(){i.J.i(us,"seek with load. remove all sei"),i.Bi.data.splice(0),i.Bi.idx=0,i.ji.data.splice(0),i.ji.idx=0,i.Ui.data.splice(0),i.Ui.idx=0,i.Fi=0},i.Ji=function(){var o=1e3*i.ut.currentTime;i.Zi(o,i.Bi),i.Zi(o,i.ji),i.Zi(o,i.Ui)},i.Zi=function(o,u){for(var p=0;p<u.data.length;p++)if(u.data[p].time>=o){u.idx=p;break}},i.Vi=function(o,u){o.forEach(function(p){p&&typeof p.streamTimestamp=="number"&&(p.time=i.ut.streamTime.getLocalTime(p.streamTimestamp/1e3),typeof p.time=="number"&&(p.time=Math.round(1e3*p.time),u.data.push(p)))}),u.data.sort(function(p,T){return p.time-T.time})},i.Hi=function(){var o=i.ut.video;if(i.Fi>20&&o&&o.buffered.length){var u=1e3*o.buffered.start(0);i.zi(u,i.Bi),i.zi(u,i.ji),i.zi(u,i.Ui),i.Fi=0}i.Fi++},i.zi=function(o,u){if(u.data.length&&o>u.data[0].time){for(var p=0;p<Math.min(u.idx,u.data.length);p++)if(u.data[p].time>=o){u.data.splice(0,p),u.idx=Math.max(0,u.idx-p),i.J.i(us,"remove "+p+" "+u.name+" info @"+o+". remain "+u.data.length);break}}},i.ut=a,i.J=a.logger,i.F.push(i.ut.evt.on(q.PARSING_DATA,i.Pi),i.ut.evt.on(q.RAW_DATA,i.Wi),i.ut.evt.on(q.TIMEUPDATE,i.Gi),i.ut.evt.on(q.SEEK_WITH_LOAD,i.Yi),i.ut.evt.on(q.SEEKING,i.Ji)),i}return R()(h,n),f()(h,[{key:"seiLength",get:function(){return this.Bi.data.length}},{key:"seiIdx",get:function(){return this.Bi.idx}},{key:"aacPrivLength",get:function(){return this.ji.data.length}},{key:"aacPrivIdx",get:function(){return this.ji.idx}},{key:"privNalLength",get:function(){return this.Ui.data.length}},{key:"privNalIdx",get:function(){return this.Ui.idx}}])}(S),Eh={search:function(n,h){for(var a=0,i=n.length-1,o=null,u=null;a<=i;){var p=h(u=n[o=(a+i)/2|0]);if(p>0)a=o+1;else{if(!(p<0))return u;i=o-1}}return null},searchIndex:function(n,h){for(var a=0,i=n.length-1,o=null;a<=i;){var u=h(n[o=(a+i)/2|0]);if(u>0)a=o+1;else{if(!(u<0))return o;i=o-1}}return-1}},ai="stream-time",wh=function(n){function h(i){var o;return(o=n.call(this)||this).J=void 0,o.ut=void 0,o.Ki=[],o.qi=void 0,o.Xi=function(u){u.expired||u.segments.forEach(function(p){var T;p.type===G.VIDEO&&p.keyTime&&(p.keyTime.forEach(function(L){L.key&&o.ut.evt.emit(q.KEY_FRAME,{pts:L.pts,cts:L.cts})}),(T=o.Ki).push.apply(T,p.keyTime.map(function(L){return l()({frag:u.frag},L)})),o.Ki.sort(function(L,V){return L.pts-V.pts})),p.type===G.AUDIO&&p.originFirstDTS&&(o.qi=p.originFirstDTS-p.startDTS)})},o.Wi=function(u){var p;u.keyTime&&!u.expired&&(p=o.Ki).push.apply(p,u.keyTime.map(function(T){return l()({frag:u.frag},T)}))},o.Yi=function(){var u,p=((u=o.ut.video)==null?void 0:u.currentTime)||0,T=o.ut.lctx.current,L=0;if(o.J.i(ai,"on seek with load. current time: "+o.ut.currentTime),o.ut.stat.multipart&&Object.prototype.hasOwnProperty.call(T,"fragments")){var V=function(te,Te){return Te?Eh.search(Te,function(ie){return te<ie.start?-1:te>ie.start+ie.duration?1:0}):null}(p,T.fragments);if(!V)return o.J.i(ai,"no frag. clear video key time."),void o.Ki.splice(0,o.Ki.length);for(var W=o.Ki.length-1;W>=0;W--){var $;if((($=o.Ki[W].frag)==null?void 0:$.sn)===V.sn||o.Ki[W].originPTS<p){L=W;break}}}o.J.i(ai,"clear video key time. st: "+L),o.Ki.splice(L,o.Ki.length-L)},i.logger.i(ai,"constructor"),o.ut=i,o.J=i.logger,o.F.push(o.ut.evt.on(q.PARSING_DATA,o.Xi),o.ut.evt.on(q.RAW_DATA,o.Wi),o.ut.evt.on(q.SEEK_WITH_LOAD,o.Yi)),o}R()(h,n);var a=h.prototype;return a.reset=function(){this.J.i(ai,"reset"),this.qi=void 0,this.Ki=[]},a.getLocalTime=function(i){if(!(i<0)){if(this.Ki.length){var o=this.$i(i,this.Ki);if(o)return i-o.originPTS+o.pts}return typeof this.qi=="number"?i-this.qi:void 0}},a.getStreamTime=function(i){if(!(i<0)){if(this.Ki.length){var o,u=this.te(i,this.Ki);if(u)return this.J.i(ai,"get stream time by video. local: "+i+" pts: "+u.info.pts+" originPTS: "+u.info.originPTS+" sn: "+((o=u.info.frag)==null?void 0:o.sn)+" key: "+this.Ki.length),i-u.info.pts+u.info.originPTS}return this.J.i(ai,"get local time by audio. local: "+i+" offset: "+this.qi),typeof this.qi=="number"?i+this.qi:void 0}},a.getKeyFrameTime=function(i,o){if(o===void 0&&(o=0),this.Ki.length){var u=this.te(i,this.Ki);return u?this.Ki[u.idx+o]:void 0}},a.te=function(i,o){if(o){for(var u=o.length-1;u>=0;u--)if(o[u].pts<=i)return{info:o[u],idx:u}}},a.$i=function(i,o){if(o){for(var u=o.length-1;u>=0;u--)if(o[u].originPTS<=i)return o[u]}},f()(h,[{key:"localTimeOffset",get:function(){return this.qi},set:function(i){this.qi=i}}])}(S),Th="playback-rate";function cs(n,h,a,i,o){a===void 0&&(a=3),h=Math.round(h),!i||i.startDelay===h||h<=0||(i.startDelay=typeof o=="number"?o:h,i.rule=[{rate:1.5,lower:h+2*a+1,upper:Number.MAX_SAFE_INTEGER},{rate:1.25,lower:h+a+1,upper:h+2*a},{rate:1.1,lower:h+1,upper:h+a},{rate:1,lower:0,upper:h}],n.i(Th,"update auto playbackRate delay: "+h+", step: "+a+" startDelay: "+o,JSON.stringify(i)))}var st=function(n){return n.SERIES_12="15_pro_max/15_plus/14_pro_max",n.SERIES_11="15_pro/15/14_pro",n.SERIES_10="14_plus/13_pro_max/12_pro_max",n.SERIES_9="14/13/13_pro/12/12_pro",n.SERIES_8="se_3/se_2/8/7/6s/6",n.SERIES_7="13_mini/12/11_pro/xs/x",n.SERIES_6="11_pro_max/xs_max",n.SERIES_5="11/xr",n.SERIES_4="8_plus/7_plus/6s_plus/6_plus",n.SERIES_3="se/5c/5s/5",n.SERIES_2="4s/4",n.SERIES_1="3gs/3g/1",n}({}),Rh={"430_932_3":st.SERIES_12,"393_852_3":st.SERIES_11,"428_926_3":st.SERIES_10,"390_844_3":st.SERIES_9,"375_667_2":st.SERIES_8,"375_812_3":st.SERIES_7,"414_896_3":st.SERIES_6,"414_896_2":st.SERIES_5,"414_736_3":st.SERIES_4,"320_568_2":st.SERIES_3,"320_480_2":st.SERIES_2,"320_480_1":st.SERIES_1};function ds(){if(ee.iphone&&typeof window<"u"&&window.screen){var n=window.screen.width+"_"+window.screen.height+"_"+window.devicePixelRatio;return Rh[n]||"unknown"}return"unknown"}var Ar,hs=function(){function n(){this.I=[]}var h=n.prototype;return h.append=function(a){this.I.push(a)},h.clear=function(){this.I=[]},h.getLastMseError=function(){for(var a=this.I.length-1;a>=0;a--){var i=this.I[a];if(i&&i.core===H.mse){var o=i.errorData;return o&&(o.code=ae(o.details,o.reason,o.statusCode)),o}}},h.ie=function(a){return a.map(function(i){var o={message:i.message,pos:i.pos,ts:i.ts};return i.code!==void 0&&(o.code=i.code),i.core!==void 0&&(o.core=i.core),i.count!==void 0&&(o.count=i.count),i.fallback!==void 0&&(o.fallback=i.fallback),o})},f()(n,[{key:"hasData",get:function(){return!!this.I.length}},{key:"retryCount",get:function(){return this.I.reduce(function(a,i){return(typeof i.count=="number"&&i.count>0?i.count:1)+a},0)}},{key:"mergedBeacon",get:function(){var a=[];return this.I.forEach(function(i){var o;if(a.length&&i.type===w.LOADER&&((o=a[a.length-1])==null?void 0:o.type)===w.LOADER){var u=a[a.length-1].count;a[a.length-1].count=u?u+1:2}else a.push(l()({},i))}),this.ie(a.slice(-10))}},{key:"beacon",get:function(){return this.ie(this.I.slice(-10))}}])}(),Sh=function(){function n(){this.coreType=H.unknown,this.native=!1,this.codecType=v.unknown,this.gopRemux=!1,this.audioCodec="",this.recoverSwapRemux=!1,this.recoverSwapAudioCodec=!1,this.box=void 0,this.isLive=void 0,this.autoLazyLoad=!0,this.lazyLoadRecoverDuration=12.8,this.lazyLoadMaxDuration=16,this.firstFrameLoaded=!1,this.startFromSec=-1,this.webWorker=!0,this.muxWorker=void 0,this.isNetworkInUse=!1,this.srcType=k.OTHERS,this.videoPlaybackQuality=void 0,this.drm=void 0,this.mixContainerInput=void 0,this.mixCodecInput=void 0,this.mixCodecAvailable=void 0,this.srcMeta=void 0,this.multipart=void 0,this.demuxerType=void 0,this.retryInfo=new hs,this.mainThreadRendering=void 0,this.stereoType=void 0,this.decoder=E.buildin,this.wasmDecoder=void 0,this.wasmSimd=void 0,this.wasmThreads=void 0,this.wasmThreadsEnabled=void 0,this.wasmLibHitCache=void 0,this.isKwaiSlice=void 0,this.autoPlaybackRateConf=void 0,this.preferNativeLoader=void 0,this.avSeparated=!1,this.mms=!1,this.hevcFallbackWasm=!1,this.frameBufLen=0,this.flvAbrNotAligned=!1,this.seekingId=1,this.liveShiftKwai2Params={paramName:"offset",time:0},this.liveStartTime=0,this.liveShiftOffset=void 0,this.liveShiftOffsetAligned=void 0,this.ee=!1,this.ne=he.NONE}return n.prototype.reset=function(){this.coreType=H.unknown,this.codecType=v.unknown,this.audioCodec="",this.recoverSwapRemux=!1,this.recoverSwapAudioCodec=!1,this.box=y.unknown,this.autoLazyLoad=!0,this.firstFrameLoaded=!1,this.isNetworkInUse=!1,this.srcType=k.OTHERS,this.retryInfo.clear(),this.decoder=E.buildin,this.lazyLoadMaxDuration=16,this.lazyLoadRecoverDuration=.8*this.lazyLoadMaxDuration,this.isKwaiSlice=!1,this.avSeparated=!1,this.mms=!1,this.hevcFallbackWasm=!1,this.frameBufLen=0,this.flvAbrNotAligned=!1,this.seekingId=1,this.liveShiftKwai2Params={paramName:"offset",time:0},this.liveStartTime=0,this.liveShiftOffset=void 0,this.ee=!1,this.ne=he.NONE,this.drm=this.videoPlaybackQuality=this.mixContainerInput=this.mixCodecInput=this.mixCodecAvailable=this.multipart=this.stereoType=this.mainThreadRendering=this.wasmDecoder=this.wasmSimd=this.wasmThreads=this.wasmLibHitCache=void 0},f()(n,[{key:"liveShiftActive",get:function(){return this.liveShiftType!==he.NONE&&this.ee},set:function(h){this.ee=h}},{key:"liveShiftType",get:function(){return this.isLive&&(this.ne!==he.KWAI&&this.ne!==he.KWAI2||!ee.mobile)&&fe(this.box)?this.ne:he.NONE},set:function(h){this.ne=h}}])}(),Lh=function(){function n(){this.re=0,this.Ae=0,this.se=0,this.ue=0,this.ae=0}var h=n.prototype;return h.reset=function(){this.se=performance.now(),this.re=this.Ae=this.ue=this.ae=0},h.getFPS=function(a){if(a){var i,o=performance.now(),u=a.totalVideoFrames,p=a.droppedVideoFrames;if(u){u<this.Ae&&(this.Ae=0,this.re=0);var T=o-this.se,L=p-this.re,V=u-this.Ae,W=0,$=0;this.se&&(W=parseFloat((1e3*L/T).toFixed(2)),$=parseFloat((1e3*V/T).toFixed(2))),this.ue=this.ue+=V,this.ae=this.ae+=L,this.se=o,this.re=p,this.Ae=u,i={decoded:this.ue,dropped:this.ae,decodedFPS:$,droppedFPS:W}}return this.se=o,i}},n}(),kh=function(){function n(){this._$evt=new A.EventEmitter}var h=n.prototype;return h.on=function(a,i){var o=this;return this._$evt.on(a,i),{destroy:function(){return o._$evt.off(a,i)}}},h.prependListener=function(a,i){var o=this;return this._$evt.prependListener(a,i),{destroy:function(){return o._$evt.off(a,i)}}},h.removeAllListeners=function(a){this._$evt.removeAllListeners(a)},h.off=function(a,i){this._$evt.off(a,i)},h.listeners=function(a){return this._$evt.listeners(a)},h.emit=function(a,i){return this._$evt.emit(a,i)},h.listenerCount=function(a){return this._$evt.listenerCount(a)},n}(),fs="level-ctx",As=function(){function n(a,i){this.J=void 0,this.he=void 0,this.ce=void 0,this.fe=!1,this.ve=-1,this.de=0,this.le=0,this.pe=[],this.me=0,this.ye=[],this.Me=0,this.we=[],this.be=[],this.ge=void 0,this.ke=void 0,a.i(fs,"constructor abr:"+i),this.J=a,this.fe=i}var h=n.prototype;return h.getLevel=function(a){return a===void 0&&(a=P.MAIN),a===P.MAIN?this.pe[this.de]:a===P.AUDIO?this.ye[this.me]:a===P.SUBTITLE?this.we[this.Me]:void 0},h.setLevelIdx=function(a,i){i===void 0&&(i=P.MAIN),i===P.MAIN?this.currentIdx=a:i===P.AUDIO?this.audioIdx=a:i===P.SUBTITLE&&(this.subtitleIdx=a)},h.getLevelIdx=function(a){return a===void 0&&(a=P.MAIN),a===P.MAIN?this.de:a===P.AUDIO?this.me:a===P.SUBTITLE?this.Me:-1},h.setNextIdx=function(a,i){i===void 0&&(i=P.MAIN),i===P.MAIN&&(this.nextIdx=a)},h.getNextIdx=function(a){return a===void 0&&(a=P.MAIN),a===P.MAIN?this.le:-1},h.clearFrag=function(){this.J.i(fs,"clear"),[this.pe,this.ye,this.we].forEach(function(a){a.forEach(function(i){var o=i;o.fragments&&o.clear()})})},h.verifyLevelIdx=function(a){return this.pe.length>0&&a<this.pe.length&&a>=-1},h.verifyAudioTrackIdx=function(a){return this.ye.length>0&&a<this.ye.length&&a>=0},h.verifySubtitleTracksIdx=function(a){return this.we.length>0&&a<this.we.length&&a>=0},h.abrIndexToOrign=function(a){var i=this.be[a];return i?i.index:0},h.orignIndexToAbr=function(a){var i=0;return this.be.forEach(function(o,u){o.index!==a||(i=u)}),i},h._e=function(){var a=this,i=this.ke;this.ge=0,this.be=[],this.pe.forEach(function(o,u){o.default&&!i&&(a.ge=u),o.enableAdaptive&&(!i||i&&i.indexOf(u)!==-1)&&a.be.push(o)}),this.be.sort(function(o,u){return o.bitrate-u.bitrate})},f()(n,[{key:"hasAudio",get:function(){return this.he},set:function(a){this.he=a}},{key:"hasVideo",get:function(){return this.ce},set:function(a){this.ce=a}},{key:"abr",get:function(){return this.fe},set:function(a){this.fe=a}},{key:"startIdx",get:function(){return this.ve},set:function(a){this.ve=a}},{key:"currentIdx",get:function(){return this.de},set:function(a){a>=0&&(this.de=a)}},{key:"nextIdx",get:function(){return this.le},set:function(a){a>=0&&(this.le=a)}},{key:"levels",get:function(){return this.pe},set:function(a){this.pe=a,this._e()}},{key:"current",get:function(){return this.pe[this.de]}},{key:"currentUrl",get:function(){var a=this.pe[this.de];return(a==null?void 0:a.currentUrl)||""}},{key:"audioIdx",get:function(){return this.me},set:function(a){a>=0&&(this.me=a)}},{key:"audioTracks",get:function(){return this.ye},set:function(a){this.ye=a}},{key:"audio",get:function(){return this.ye[this.me]}},{key:"subtitleIdx",get:function(){return this.Me},set:function(a){a>=0&&(this.Me=a)}},{key:"subtitleTracks",get:function(){return this.we},set:function(a){this.we=a}},{key:"subtitle",get:function(){return this.we[this.Me]}},{key:"abrLevels",get:function(){return this.be}},{key:"availableList",set:function(a){this.ke=a,this._e()}},{key:"default",get:function(){return this.ge||0},set:function(a){this.ge=a}},{key:"abrDefault",get:function(){var a=0;return this.be.forEach(function(i,o){i.default&&(a=o)}),a}}])}(),Ih=0,Ut="loader",ps=function(){function n(a){var i=this;this.J=void 0,this.j=void 0,this.Ee=void 0,this.U=null,this.Re=void 0,this.De=void 0,this.Te=void 0,this.Se=0,this.Oe=!1,this.Ce=!1,this.Le=void 0,this.xe=void 0,this.Ne=void 0,this.Ie=void 0,this.Fe=0,this.Be=0,this.je=function(){var o;i.Oe=!0,i.Ce=!1;var u=i.Te,p=i.j;(o=i.U)!=null&&o.onLoad&&i.U.onLoad(p,u),u.code=0,u.tfirst=0,u.loaded=0,i.Ue(),i.Ee=new(i.Pe())(i.J),u.type=i.Ee instanceof Ie?N.FETCH:N.XHR,i.Ee&&(u.id=i.Ee.tag+"-"+i.Be,i.Re.connectionTimeout&&(i.Le=setTimeout(function(){return i.Ve(D.LOADER_CONNECT_TIMEOUT)},i.Re.connectionTimeout)),i.He(p),u.tsload=Date.now(),u.tstart=performance.now(),i.J.i(Ut,"["+i.Be+"]load: "+i.Ee.tag+" "+p.url+" progress: "+p.progress+" type: "+p.type+" responseType: "+p.responseType+" range: "+p.range),i.Ee.load(p,i.De))},this.We=function(o,u){i.Ge();var p=i.Te;i.Qe(o,p),i.Ye(),p.code=u,p.tfirst=Math.max(p.trequest,performance.now()),i.J.i(Ut,"["+i.Be+"]connect code: "+u+" len: "+p.contentLength+" totalLength: "+p.contentTotalLength),i.U&&i.U.onConnect&&i.U.onConnect(o,p),typeof o.rangeStart=="number"&&o.rangeStart>0&&p.code!==206&&i.U&&i.U.onError&&setTimeout(function(){i.H(new Error("range error. "+o.range+" statu code:"+p.code))},0)},this.W=function(o,u){try{var p=i.Te;if(i.Fe=performance.now(),!o.breakpointContinuation&&p.output>p.loaded){if(p.loaded+u.byteLength-p.output>0){var T=u.slice(p.output-p.loaded);i.Je(i.j,T,p)}p.loaded+=u.byteLength}else p.loaded+=u.byteLength,i.Je(i.j,u,p)}catch(L){i.J.i(Ut,"handling data error. ",L),i.H(new Error(D.HANDLING_DATA_ERROR+". "+L))}},this.H=function(o){i.Ze(),i.ze();var u,p=i.Te,T=i.Re,L=i.j,V=p.type===N.FETCH&&L.monkeyPatched&&L.preferNative===void 0;i.Oe=!1,i.J.i(Ut,"["+i.Be+"]error: "+o.name+" "+(o==null?void 0:o.message)+" code: "+p.code+" retry: "+p.retry+"/"+T.maxRetry+" "+(V?"monkeyPatchedFetch":"")),i.j.breakpointContinuation&&p.code===416||V&&i.Te.output===p.loaded&&p.loaded>0?(u=i.U)!=null&&u.onEnd&&i.U.onEnd(i.j,null,p):(p.fatal=!T.maxRetry||p.retry>=T.maxRetry||!T.maxRetry,p.errName=o.name,p.errMessage=o.name+": "+o.message+". status: "+p.code,V&&(o.name===U.FETCH_READ_ERROR_NAME&&!i.Te.loaded||o.message===D.LOADER_TRANS_TIMEOUT&&!i.Te.loaded||o.message===D.LOADER_CONNECT_TIMEOUT||!i.Te.code)&&(i.j.preferNative=!0,i.J.i(Ut,"monkey patched fetch error. switch to native fetch.")),i.U&&i.U.onError&&i.U.onError(i.j,p),p.fatal||(T.breakpointContinuation&&i.Te.contentTotalLength&&(i.J.i(Ut,"["+i.Be+"]breakpointContinuation. "+i.Te.loaded+" / "+i.Te.contentTotalLength),i.Te.output&&i.Te.loaded>0?(i.Ie?i.j.rangeStart=i.Ie+i.Te.output:i.j.rangeStart=i.Te.output,i.j.breakpointContinuation=!0):(i.j.rangeStart=i.Ie,i.j.breakpointContinuation=!1)),p.retry++,i.U&&(i.Se?(i.Ne=setTimeout(i.je,i.Se),i.Se=2*i.Se):i.je())))},this.Ve=function(o){i.Oe=!1,i.Ke();var u=new Error(o);i.H(u)},this.J=a,this.Be=Ih+=1,this.J.i(Ut,"["+this.Be+"]constructor"),this.Ee=null,this.Re={connectionTimeout:0,transmissionTimeout:0,maxRetry:0,retryDelay:0},this.De={onConnect:this.We,onProgress:this.W,onEnd:this.it.bind(this),onError:this.H}}var h=n.prototype;return h.Pe=function(){return n.qe!==void 0||(n.qe=se,ee.msie||ee.msedge?se.isSupportChunk()?n.qe=se:Ie.isSupported()&&(n.qe=Ie):Ie.isSupported()?n.qe=Ie:se.isSupportChunk()&&(n.qe=se)),n.qe},h.load=function(a,i,o){this.Xe(a,i,o),this.je()},h.destroy=function(){this.Ee&&this.J.i(Ut,"["+this.Be+"]destroy."),this.Ze(),this.Ke(!1),this.ze(),this.U=null},h.abort=function(){this.J.i(Ut,"["+this.Be+"]abort"),this.Ze(),this.Ke()},h.Xe=function(a,i,o){this.j=a,this.Ie=a.rangeStart,this.U=i,this.Re=o||this.Re,this.Te={id:"",type:N.UNKNOWN,trequest:performance.now(),retry:0,loaded:0,code:0,output:0,tfirst:0,tload:0,total:0,tsload:0,tstart:0,fatal:!1,errName:"",errMessage:""},this.Re.retryDelay&&(this.Se=this.Re.retryDelay)},h.ze=function(){this.Ee&&(this.Ee.destroy(),this.Ee=null)},h.Ke=function(a){a===void 0&&(a=!0),a&&this.U&&this.U.onAbort&&!this.Ce&&this.Oe&&this.U.onAbort(this.j,this.Te),this.Ce=!0,this.Ee&&this.Ee.abort()},h.Ze=function(){this.Ge(),this.Ue(),this.$e()},h.Je=function(a,i,o){this.Te.output+=i.byteLength,this.U&&this.U.onProgress&&this.U.onProgress(a,i,o)},h.it=function(a,i){this.Ze();var o=this.Te;this.Qe(a,o),o.total=i?o.loaded=typeof i=="string"?i.length||0:i.byteLength||0:o.loaded,o.tload=Math.max(o.tfirst,performance.now()),this.Oe=!1,o.output=0,this.J.i(Ut,"["+this.Be+"]end size: "+o.total+" duration: "+o.trequest+"-"+o.tload),this.U&&this.U.onEnd(a,i,o)},h.Ye=function(){var a=this;this.$e(),this.Fe=performance.now();var i=this.Re.transmissionTimeout||0;i&&(this.xe=setInterval(function(){performance.now()-a.Fe>i&&a.Ve(D.LOADER_TRANS_TIMEOUT)},1e3))},h.$e=function(){this.xe&&(clearInterval(this.xe),this.xe=void 0)},h.Ge=function(){this.Le&&(clearTimeout(this.Le),this.Le=void 0)},h.Ue=function(){this.Ne&&(clearTimeout(this.Ne),this.Ne=void 0)},h.He=function(a){if(a.rangeEnd||a.rangeStart)if(a.rangeType&&a.rangeType!==I.STANDARD&&typeof a.url=="string"){var i=new Lt.a(a.url,!0);a.rangeEnd?(i.query.start=(a.rangeStart||0).toString(),i.query.end=(a.rangeEnd-1).toString()):a.rangeStart&&(i.query.start=a.rangeStart.toString()),a.url=i.toString()}else a.rangeEnd?a.range="bytes="+(a.rangeStart||0)+"-"+(a.rangeEnd-1):a.rangeStart&&(a.range="bytes="+a.rangeStart+"-")},h.Qe=function(a,i){if(!i.contentTotalLength||!i.contentLength){var o=a.responseHeader;if(o){if(a.range||typeof a.rangeStart=="number"){var u=o["content-range"];u&&(i.contentTotalLength=parseInt((Array.isArray(u)?u[0]||"0":u).split("/")[1]||"0")||0)}var p=o["content-length"];p&&(i.contentLength=parseInt(Array.isArray(p)?p[0]||"0":p)||0)}}},f()(n,[{key:"context",get:function(){return this.j}},{key:"config",get:function(){return this.Re}}])}();ps.qe=void 0;var zt={local:0,server:0},pr="live-time",kt=function(n){function h(i){var o;return(o=n.call(this)||this).J=void 0,o.tn={abst:0,originDTS:0},o.en=void 0,o.nn=void 0,h.J=o.J=i,i.i(pr,"constructor"),h.rn={onError:h.An,onEnd:h.un},h.an={connectionTimeout:5e3},o}R()(h,n),h.load=function(i,o){h.hn();var u={url:"https://ntp.nc.gifshow.com/",responseType:"text",progress:!1,preferNative:o};(h.Ee=new ps(i)).load(u,h.rn,h.an)};var a=h.prototype;return a.ntpSync=function(i){this.J.i(pr,"sync. state:",h.cn);var o=performance.now();(h.cn==="suspend"||o-h.fn>18e5)&&(this.J.i(pr,"sync start."),h.fn=o,h.cn="loading",h.load(this.J,i))},a.onPrivNal=function(i){var o=this;i.info.forEach(function(u){typeof u.abst=="number"&&typeof i.streamTimestamp=="number"&&(o.tn.abst=u.abst/1e3,o.tn.originDTS=i.streamTimestamp/1e3)})},a.onParsing=function(i){var o=this;i.segments.forEach(function(u){u.type===G.VIDEO?o.en={dts:u.startDTS,originDTS:u.originFirstDTS,parseTime:u.firstParseTime}:u.type===G.AUDIO&&(o.nn={dts:u.startDTS,originDTS:u.originFirstDTS,parseTime:u.firstParseTime})})},a.destroy=function(){h.hn()},a.getDisplayDelay=function(i){return this.vn(i,this.en)},a.getAudioRenderDelay=function(i){return this.vn(i,this.nn)},a.getRecDelay=function(){var i=this.en;if(this.serverNowMs&&i!=null&&i.parseTime){var o=this.tn,u=this.serverMs(1e3*i.parseTime+h.dn);if(u&&o.originDTS&&o.abst)return Math.round(u-1e3*(i.originDTS-o.originDTS+o.abst))}return 0},a.serverMs=function(i){return zt.server?i-zt.local+zt.server:null},a.vn=function(i,o){var u=this.serverNowMs,p=this.tn;return u&&o&&p.abst&&p.originDTS?Math.round(1e3*(o.dts-i-(o.originDTS-p.originDTS+p.abst))+u):0},h.hn=function(){h.Ee&&h.Ee.destroy()},f()(h,[{key:"syncState",get:function(){return h.cn}},{key:"time",get:function(){return l()({},zt)}},{key:"now",get:function(){return this.serverNowMs||Date.now()}},{key:"serverNowMs",get:function(){return zt.server?performance.now()-zt.local+zt.server:null}}],[{key:"workerTimeOffset",set:function(i){h.dn=i}}])}(S);Ar=kt,kt.dn=0,kt.Ee=void 0,kt.rn=void 0,kt.an=void 0,kt.cn="suspend",kt.J=void 0,kt.fn=void 0,kt.An=function(){Ar.J.i(pr,"ntp sync load error."),Ar.hn()},kt.un=function(n,h){if(Ar.hn(),typeof h=="string"){zt.local=performance.now();var a=h.split(",");a.length>1&&(zt.server=1e3*parseFloat(a[0])+parseInt(a[1],10)/1e3/2)}};var vs=kt,_s=function(){function n(){this.ln=0,this.pn=[],this.mn=[],this.yn={},this.Mn={},this.wn=void 0,this.bn=0,this.gn=0,this.kn=0,this._n=0,this.En=0,this.Rn=0,this.Dn=0}var h=n.prototype;return h.onStreamOpen=function(a,i,o,u){if(this.pn.length>10){var p=this.pn.shift();if(p){this.yn[p.vCodecType]=(this.yn[p.vCodecType]||0)+p.traffic;var T=p.qualityType||"unknown";this.Mn[T]=(this.Mn[T]||0)+p.traffic}}var L=this.wn?this.wn.index+1:0;this.wn={index:L,startPos:a,url:i,bitrate:o,qualityType:u,traffic:0,loadTimeCost:0,keyFrame:0,videoDataRate:0,audioDataRate:0,speed:0,vCodecType:v.unknown,segments:[]},this.pn.push(this.wn)},h.onMediaInfo=function(a){var i=this.pn[this.pn.length-1];i&&(a.videoCodecType&&(i.vCodecType=a.videoCodecType),i.mediaInfo=l()({},a))},h.setRTCStats=function(a){var i=this.wn;i&&(i.traffic=a.totalReceive,i.audioDataRate=a.audioDataRate,i.videoDataRate=a.videoDataRate,i.speed=a.speed,i.keyFrame=a.key,this.ln=i.traffic)},h.onDataReceive=function(a){this.ln+=a.byteLength;var i=this.mn;i.length>200&&i.pop(),i.unshift(a);var o=this.wn;o&&(o.traffic+=a.byteLength,o.loadTimeCost+=a.timeCost,o.speed=Math.round(o.traffic/o.loadTimeCost*1e3)||0)},h.onParsing=function(a){var i=this;a.segments.forEach(function(o){if(i.Tn(o.type,1e3*(o.endDTS-o.startDTS),o.payload.byteLength),o.type===G.VIDEO){var u=o.endDTS-o.startDTS;isNaN(u)||(i.kn+=Math.round(1e3*u)),o.fillDuration&&(i.En+=Math.round(1e3*o.fillDuration)),o.droppedDuration&&(i.Dn+=Math.round(1e3*o.droppedDuration))}if(o.type===G.AUDIO){var p=o.endDTS-o.startDTS;isNaN(p)||(i.gn+=Math.round(1e3*p)),o.fillDuration&&(i._n+=Math.round(1e3*o.fillDuration)),o.droppedDuration&&(i.Rn+=Math.round(1e3*o.droppedDuration))}})},h.onRaw=function(a){if(a.samples.length){var i=a.samples.reduce(function(u,p){return p.yuv?u+p.yuv.y.bytes.length+p.yuv.u.bytes.length+p.yuv.v.bytes.length:u+p.units.reduce(function(T,L){return T+L.data.byteLength},0)},0),o=a.samples[a.samples.length-1].dts-a.samples[0].dts+(a.samples[a.samples.length-1].duration||0);this.Tn(G.VIDEO,o/90,i)}},h.downloadInfoByRange=function(a){a===void 0&&(a=1e3);var i={size:0,timeCost:0};if(this.mn.length)for(var o=performance.now(),u=0;u<this.mn.length;u++){var p=this.mn[u];if(!(p&&p.ts>o-a))break;i.size+=p.byteLength,i.timeCost+=p.timeCost}return i},h.Tn=function(a,i,o){var u=this.pn[this.pn.length-1];if(u){var p=u.segments;p.push({type:a,duration:i,byteLength:o}),p.length>200&&p.shift();for(var T=0,L=0,V=0;V<p.length;V++){var W=p[V];W&&W.type===a&&(L+=W.byteLength,T+=W.duration)}T>0&&(a===G.VIDEO?u.videoDataRate=Math.round(8*L/T):a===G.AUDIO&&(u.audioDataRate=Math.round(8*L/T)))}},f()(n,[{key:"smoothedDownloadSpeed",get:function(){var a=this.mn,i=a[0];return i&&!i.progress?i.byteLength/i.timeCost*1e3:1e3*a.reduceRight(function(o,u){var p=u.byteLength/u.timeCost;return o>0?p*(1-.9)+.9*o:p},0)}},{key:"trafficGroupedByVCodecType",get:function(){var a=l()({},this.yn);return a.total=this.ln,this.pn.forEach(function(i){a[i.vCodecType]=(a[i.vCodecType]||0)+i.traffic}),a}},{key:"trafficGroupedByLevel",get:function(){var a=l()({},this.Mn);return a.total=this.ln,this.pn.forEach(function(i){var o=i.qualityType||"unknown";a[o]=(a[o]||0)+i.traffic}),a}},{key:"traffic",get:function(){return this.ln}},{key:"speed",get:function(){var a=this.wn,i=this.downloadInfoByRange();return this.mn.length?i.timeCost?Math.round(i.size/i.timeCost*1e3):0:(a==null?void 0:a.speed)||0}},{key:"currentLoad",get:function(){return this.wn}},{key:"streams",get:function(){return this.pn}},{key:"contentLen",get:function(){return this.bn},set:function(a){this.bn=a}},{key:"muxA",get:function(){return this.gn}},{key:"muxV",get:function(){return this.kn}},{key:"fillA",get:function(){return this._n}},{key:"fillV",get:function(){return this.En}},{key:"droppedA",get:function(){return this.Rn}},{key:"droppedV",get:function(){return this.Dn}}])}(),vr=r(5),xh=function(n){return n.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",n}({});!vt()&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.navigator.requestMediaKeySystemAccess.bind(window.navigator);function ms(n){return!n.drmSchemaId||n.drmSchemaId===xh.WIDEVINE}var Ch=new RegExp('codecs="((/w|.)+)"'),hn=[{k:"video/mp4",v:y.mp4},{k:"video/quicktime",v:y.mp4},{k:"video/x-flv",v:y.flv},{k:"video/webm",v:y.matroska},{k:"video/x-matroska",v:y.matroska},{k:"video/mp2t",v:y.ts},{k:"audio/x-matroska",v:y.matroska},{k:"audio/mp4",v:y.mp4},{k:"audio/mpeg",v:y.mp3},{k:"audio/aac",v:y.aac},{k:"application/vnd.apple.mpegurl",v:y.hls},{k:"application/x-mpegurl",v:y.hls},{k:"audio/wave",v:y.wav},{k:"audio/wav",v:y.wav},{k:"audio/x-wav",v:y.wav},{k:"audio/x-pn-wav",v:y.wav}];function gs(n){for(var h={type:n,box:y.unknown,vCodec:v.unknown},a=0;a<hn.length;a++)if(n.toLocaleLowerCase().indexOf(hn[a].k)===0){h.box=hn[a].v;var i=n.match(Ch);i&&i.length>2&&i[1].split(",").forEach(function(o){o.indexOf("avc1")===0?h.vCodec=v.h264:o.indexOf("av01")===0?h.vCodec=v.av1:o.indexOf("hev1")!==0&&o.indexOf("hvc1")!==0||(h.vCodec=v.hevc)});break}return h}var Mi=function(){function n(h){this.url=[],this.urlId=0,this.bitrate=0,this.maxBitrate=0,this.qualityType="",this.qualityLabel="",this.id=0,this.codec="",this.audioCodec="",this.videoCodec="",this.hidden=!1,this.enableAdaptive=!0,this.default=!1,this.width=void 0,this.height=void 0,this.index=0,this.drmSchemaId="",this.drmToken="",this.hdr=void 0,this.vCodecType=v.unknown,this.meta=void 0,this.fileName=void 0,this.fileSize=void 0,this.dropVideo=[],this.url=[h],this.urlId=0}return n.prototype.getKLevel=function(){return{width:this.width,height:this.height,qualityLabel:this.qualityLabel,qualityType:this.qualityType,bitrate:this.bitrate,maxBitrate:this.maxBitrate}},f()(n,[{key:"currentUrl",get:function(){return this.url[this.urlId]||""}}])}(),ys=function(){function n(){}return n.verify=function(h){return!!(h&&Object.prototype.hasOwnProperty.call(h,"version")&&Object.prototype.hasOwnProperty.call(h,"adaptationSet")&&Object.prototype.hasOwnProperty.call(h.adaptationSet,"representation")&&Array.isArray(h.adaptationSet.representation)&&h.adaptationSet.representation.length>0)&&h.adaptationSet.representation.reduce(function(a,i){return!!(a&&i.url&&i.bitrate&&i.qualityType)},!0)},n.parse=function(h){var a,i=[];return n.verify(h)&&h.adaptationSet.representation.forEach(function(o,u){var p=new Mi(o.url);p.id=o.id||u,p.maxBitrate=o.bitrate||0,p.bitrate=o.averageBitrate||p.maxBitrate,p.qualityType=o.qualityType||"",p.qualityLabel=o.name||"",p.codec=o.codec||"",p.hidden=o.hidden||!1,p.enableAdaptive=o.enableAdaptive===void 0||!!o.enableAdaptive,p.default=o.defaultSelect||!1,p.index=u,i.push(p),p.default&&a===void 0&&(a=u)}),{levels:i,def:a||0,srcType:k.KWAI_FLV_ABR}},n}(),Dh=function(){return f()(function(n,h){this.Sn=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=void 0,this.baseuri=n,this.reluri=h},[{key:"uri",get:function(){return!this.Sn&&this.reluri&&(this.Sn=Object(vr.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this.Sn}}])}(),bs=function(n){return n.AUDIO="audio",n.VIDEO="video",n}({}),Es=function(){function n(){var a;this.On="",this.Cn=null,this.Ln=null,this.xn=((a={})[bs.AUDIO]=!1,a[bs.VIDEO]=!1,a),this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.sn=0,this.levelkey=void 0,this.level=0,this.start=0,this.cc=0,this.maxStartPTS=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.deltaPTS=void 0,this.dropped=0,this.type=void 0,this.loader=void 0,this.title=null,this.urlId=0,this.data=void 0}var h=n.prototype;return h.setByteRange=function(a,i){var o=a.split("@",2),u=[];o.length===1?u[0]=i?i.byteRangeEndOffset:0:u[0]=parseInt(o[1],10),u[1]=parseInt(o[0],10)+u[0],this.Cn=u},h.addElementaryStream=function(a){this.xn[a]=!0},h.hasElementaryStream=function(a){return this.xn[a]===!0},h.createInitializationVector=function(a){for(var i=new Uint8Array(16),o=12;o<16;o++)i[o]=a>>8*(15-o)&255;return i},h.setDecryptDataFromLevelKey=function(a,i){var o=a;return a&&a.method&&a.uri&&!a.iv&&((o=new Dh(a.baseuri,a.reluri)).method=a.method,o.iv=this.createInitializationVector(i)),o},f()(n,[{key:"url",get:function(){return!this.On&&this.relurl&&(this.On=Object(vr.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this.On},set:function(a){this.On=a}},{key:"byteRange",get:function(){return this.Cn?this.Cn:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this.Ln)return null;if(!this.Ln&&this.levelkey){var a=this.sn;typeof a!="number"&&(a=0),this.Ln=this.setDecryptDataFromLevelKey(this.levelkey,a)}return this.Ln}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Number.isFinite(this.programDateTime))return null;var a=Number.isFinite(this.duration)?this.duration:0;return this.programDateTime+1e3*a}},{key:"encrypted",get:function(){return!(!this.decryptdata||this.decryptdata.uri===null||this.decryptdata.key!==null)}}])}(),_r=function(n){function h(i){var o;return(o=n.call(this,i)||this).startSN=0,o.endSN=0,o.fragments=[],o.initSegment=null,o.live=!0,o.needSidxRanges=!1,o.startTimeOffset=null,o.targetduration=0,o.totalduration=0,o.type=null,o.version=null,o.ptsKnown=!1,o.m3u8Slice=void 0,o.audioGroupIds=void 0,o.attrs=void 0,o.averagetargetduration=void 0,o.name=void 0,o.lang=void 0,o.groupId="",o.instreamId="",o.autoselect=void 0,o.forced=void 0,o.size=0,o.partOfData=!1,o.http416=0,o}R()(h,n);var a=h.prototype;return a.clear=function(){this.fragments=[],this.startSN=0,this.endSN=0,this.initSegment=null,this.m3u8Slice=void 0,this.live=!0,this.needSidxRanges=!1,this.startTimeOffset=0},a.mergeFrom=function(i,o){if(o===void 0&&(o=!1),i.fragments.length){var u=this.endSN;if(this.endSN=i.endSN,i.partOfData||(i.initSegment&&!this.initSegment&&(this.initSegment=i.initSegment),this.live=i.live,this.needSidxRanges=i.needSidxRanges,this.targetduration=i.targetduration,this.ptsKnown=i.ptsKnown,this.averagetargetduration=i.averagetargetduration,this.hasFrag||(this.m3u8Slice=i.m3u8Slice,this.audioGroupIds=i.audioGroupIds,this.attrs=i.attrs,this.name=i.name,this.lang=i.lang,this.groupId=i.groupId,this.instreamId=i.instreamId,this.autoselect=i.autoselect,this.forced=i.forced)),o&&this.fragments.length){for(var p,T=i.fragments.length,L=0;L<i.fragments.length;L++){var V=i.fragments[L].sn;if(typeof V=="number"&&V>u){T=L;break}}if(this.fragments.length&&i.fragments.splice(0,T),i.partOfData){var W=this.fragments[this.fragments.length-1],$=W.endPTS,te=W.cc;$&&i.fragments.forEach(function(Te){Te.start=Te.startPTS=$,Te.endPTS=Te.startPTS+Te.duration,$=Te.endPTS,Te.cc=te+Te.cc})}(p=this.fragments).push.apply(p,i.fragments),this.totalduration=this.fragments.reduce(function(Te,ie){return Te+ie.duration},0),i.partOfData?this.size+=i.size:this.size=i.size}else this.startSN=i.startSN,this.fragments=i.fragments,this.totalduration=i.totalduration,this.size=i.size}},a.getTimeInfoAfter=function(i){i===void 0&&(i=0);var o,u,p=[],T=[];return this.fragments.forEach(function(L){typeof L.sn=="number"&&(L.sn>=i&&typeof u=="number"&&u!==L.cc&&(o?o.push({sn:L.sn,start:L.start}):o=[{sn:L.sn,start:L.start}]),u=L.cc,L.sn>=i&&(p.push(L.start),typeof L.programDateTime=="number"&&T.push(L.programDateTime)))}),{live:this.live,startSn:this.startSN,endSn:this.endSN,duration:this.totalduration,times:p,utcs:T,discontinuity:o,targetduration:this.targetduration}},f()(h,[{key:"timeInfo",get:function(){return this.getTimeInfoAfter()}},{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||typeof this.fragments[0].programDateTime!="number"||!Number.isFinite(this.fragments[0].programDateTime))}},{key:"hasFrag",get:function(){return this.fragments.length>0}}])}(Mi),ws=function(){function n(){}return n.verify=function(h){return!!(h&&Object.prototype.hasOwnProperty.call(h,"segments")&&Array.isArray(h.segments)&&h.segments.length>0)&&(h.segments.forEach(function(a){if(!a.url||!a.duration||!a.time)return!1}),!0)},n.parse=function(h,a){a===void 0&&(a="");var i=[],o={levels:i,withCredentials:!1,hasVideo:!0,hasAudio:!0};if(n.verify(h)){var u=new _r("");i.push(u);var p=h;o.withCredentials=!!p.withCredentials,p.hasAudio!==void 0&&(o.hasAudio=!!p.hasAudio),p.hasVideo!==void 0&&(o.hasVideo=!!p.hasVideo);var T=0,L=0,V=0,W=0,$=0;p.segments.forEach(function(te,Te){var ie=new Es;ie.sn=Te,typeof te.startUtcTime=="string"?ie.programDateTime=parseInt(te.startUtcTime):typeof te.startUtcTime=="number"&&(ie.programDateTime=te.startUtcTime),typeof te.duration=="string"?ie.duration=(parseFloat(te.duration)||0)/1e3:ie.duration=(te.duration||0)/1e3,ie.start=T,ie.baseurl=a,ie.relurl=te.url,te.filesize&&($+=te.filesize),ie.duration>W&&(W=ie.duration),T+=ie.duration,Te>0&&V!==te.periodId&&(ie.tagList.push(["DIS"]),L++),ie.cc=L,V=te.periodId,u.fragments.push(ie)}),u.bitrate=8*$/1024/u.totalduration,u.live=!1,u.type=P.MAIN,u.startSN=0,u.endSN=u.fragments.length-1,u.totalduration=T,u.targetduration=W,u.averagetargetduration=T/u.fragments.length}return o},n}(),Ts=function(){function n(){}return n.verify=function(h){return!!(h&&h.adaptationSet&&h.adaptationSet.representation&&h.adaptationSet.representation.length)&&h.adaptationSet.representation.reduce(function(a,i){return!!(i.url&&i.bandwidth&&a)},!0)},n.parse=function(h){var a=[];return n.verify(h)&&h.adaptationSet.representation.forEach(function(i){if(i&&(i.url||i.m3u8)){var o=new _r(i.baseUrl?Object(vr.buildAbsoluteURL)(i.baseUrl,i.url,{alwaysNormalize:!0}):i.url);o.bitrate=Math.floor(i.bandwidth/1e3),o.maxBitrate=Math.floor(i.bandwidth/1e3),o.qualityType=i.qualityType||"",o.qualityLabel=i.qualityLabel||"",i.width&&i.height&&(o.width=i.width,o.height=i.height),mh(i.codecs||"",o),o.audioCodec="",o.m3u8Slice=i.m3u8||i.m3u8Slice,o.totalduration=i.duration,i.backupUrl&&i.backupUrl.length&&(o.url=o.url.concat(i.backupUrl)),o.default=i.defaultSelect||!1,o.urlId=0,a.push(o)}}),{levels:a,def:0}},n}(),Oh=function(n){return n[n.LongVideo=1]="LongVideo",n[n.ShortVideo=2]="ShortVideo",n[n.LiveGame=3]="LiveGame",n[n.LiveShow=4]="LiveShow",n[n.LivePlayBack=5]="LivePlayBack",n}({}),Mh={1:y.hls_ts,2:y.mp4,3:y.flv,4:y.hls_fmp4},Rs={avc:v.h264,hevc:v.hevc,av1:v.av1,kvc3:v.kvc3,kvc4:v.kvc4,kvc5:v.kvc5,kvc6:v.kvc6,kvc30:v.kvc30};function Ss(n){var h=y.unknown;if(n&&n.length<2048)for(var a=n.split(`
`),i=0;i<a.length;i++){var o=a[i].trim();o&&o.indexOf("#")!==0&&(h=it(o))}return h===y.ts?y.hls_ts:h===y.mp4?y.hls_fmp4:y.unknown}var fn,Ls=function(){function n(){}return n.verify=function(h){return!!(h&&h.adaptationSet&&h.adaptationSet.length)&&h.adaptationSet.reduce(function(a,i){return!!(a&&i.representation&&i.representation.length)},!0)},n.parse=function(h,a){a===void 0&&(a=!1);var i,o,u,p,T,L,V,W,$,te=[],Te=!1,ie=0,Le=[],ke={};if(n.verify(h)){var _e=h;L=Mh[_e.mediaType],V=_e.stereoType===1?Q.V360:Q.Normal,_e.businessType!==void 0&&(W=_e.businessType>=3&&_e.businessType<=5),_e.businessType===Oh.LivePlayBack&&($=!0),_e.version&&(ke.version=_e.version),_e.videoId&&(ke.videoId=_e.videoId),_e.videoBaseFeature&&(ke.videoBaseFeature=_e.videoBaseFeature),_e.videoAestheticFeature&&(ke.videoAestheticFeature=_e.videoAestheticFeature),_e.videoFeature&&(ke.videoFeature=_e.videoFeature),typeof _e.programStartTime=="number"&&(ke.programStartTime=_e.programStartTime),_e.adaptationSet.forEach(function(et){var Vt=et.duration/1e3;W===void 0&&Vt&&(W=!1),!ie&&Vt&&(ie=Vt);var Xh=et.drmSchemaId,ef=et.drmToken;et.drmSchemaId&&(Te=!0);var wt=P.MAIN;if(et.mimeType&&(et.mimeType.indexOf("video")!==-1?ke.videoMimeType=et.mimeType:et.mimeType.indexOf("audio")!==-1?(ke.audioMimeType=et.mimeType,wt=P.AUDIO):et.mimeType==="text/vtt"?(ke.subtitleMimeType=et.mimeType,wt=P.SUBTITLE):wt=void 0),wt){wt===P.MAIN?ke.videoDuration=et.duration:wt===P.AUDIO&&(ke.audioDuration=et.duration);var En=et.representation.map(function(De,Pi){var xe;if(!L&&De.m3u8Slice&&(L=Ss(De.m3u8Slice)),L||(L=it(De.url)),fe(L)?((xe=new _r(De.url)).lang=et.language||"",xe.default=!!De.defaultSelect,xe.id=De.id||Pi,xe.m3u8Slice=De.m3u8Slice,xe.totalduration=Vt||ie):xe=new Mi(De.url),typeof De.fileSize=="number"&&(xe.fileSize=De.fileSize),xe.vCodecType=v.unknown,xe.hdr=De.hdrType||0,xe.maxBitrate=De.maxBitrate||0,xe.bitrate=De.avgBitrate||xe.maxBitrate,xe.qualityType=De.qualityType||"",xe.qualityLabel=De.qualityLabel||"",xe.codec=De.codecs||"",xe.codec){var tf=os(xe.codec);xe.videoCodec=tf.video||"",xe.vCodecType=as(xe.videoCodec)}return De.videoCodec&&Rs[De.videoCodec]&&(xe.vCodecType=Rs[De.videoCodec]||v.unknown),Le.push(xe.vCodecType),_e.adaptationSet.length===1&&(xe.audioCodec=""),De.width&&De.height&&(xe.width=De.width,xe.height=De.height),xe.hidden=De.hidden||!1,xe.enableAdaptive=De.disableAdaptive===void 0||!De.disableAdaptive,xe.default=De.defaultSelect||!1,xe.index=Pi,xe.drmSchemaId=De.drmSchemaId||Xh,xe.drmToken=De.drmToken||ef,xe.drmSchemaId&&(Te=!0),De.backupUrl&&De.backupUrl.length&&(xe.url=xe.url.concat(De.backupUrl)),xe.urlId=0,xe.default&&u===void 0&&(wt===P.MAIN?u=Pi:wt===P.AUDIO?p=Pi:wt===P.SUBTITLE&&(T=Pi)),(De.comment||De.kvqScore)&&(xe.meta={comment:De.comment,kvqScore:De.kvqScore}),xe});wt===P.MAIN?te=te.concat(En):wt===P.AUDIO?(i||(i=[]),i=i.concat(En)):wt===P.SUBTITLE&&(o||(o=[]),o=o.concat(En))}})}if(o&&n.processingSubtitleType(o,ie),a)return[{codecType:Le.length===1?Le[0]:v.unknown,mediaLevels:{levels:te,def:u||0,audioTracks:i,defAudio:p||0,subtitleTracks:o,defSubtitle:T||0,drm:Te,box:L,stereoType:V,isLive:W,meta:ke}}];var Ue={};te.forEach(function(et){var Vt=Ue[et.vCodecType];Vt||(Ue[et.vCodecType]=Vt={def:0,levels:[]}),et.default&&(Vt.def=Vt.levels.length),Vt.levels.push(et)});var Xe=Object.keys(Ue).length,ut=[];for(var Ni in Ue){var Ht=Ue[Ni];if(Ht){var bn=Ht.levels[0];if(Xe>1&&bn&&bn.m3u8Slice){var Ys=Ss(bn.m3u8Slice);fe(Ys)&&(L=Ys)}ut.push({codecType:Ni,mediaLevels:{levels:Ht.levels,def:Ht.def,audioTracks:i,defAudio:p||0,subtitleTracks:o,defSubtitle:T||0,drm:Te,box:L,stereoType:V,isLive:W,isLiveShift:$,meta:ke}})}}return ut},n.processingSubtitleType=function(h,a){h.forEach(function(i,o){if(it(i.currentUrl)===y.hls){i.live=!1,i.index=o,i.totalduration=a,i.targetduration=a,i.endSN=1;var u=new Es;u.type=P.SUBTITLE,u.start=0,u.sn=1,u.level=o,u.cc=0,u.url=i.currentUrl,u.duration=a,i.fragments=[u]}})},n.getAdaptationIdxByType=function(h,a){for(var i=0;i<h.adaptationSet.length;i++){var o=h.adaptationSet[i];if(o){var u;if(o.mimeType===void 0)return a==="video"?0:-1;if(((u=o.mimeType)==null?void 0:u.indexOf(a))===0)return i}}return-1},n}(),ks=new RegExp("^((http|https)://)|blob:"),Nh=[y.matroska,y.mp3,y.aac],Ph=[y.flv,y.raw,y.webrtc,y.ivf],Uh=[y.mp4,y.flv,y.hls,y.raw,y.hls_fmp4,y.hls_ts,y.ts,y.ivf],Is=Object.values(v),Ne="media-src",xs=function(){function n(){}return n.verifyMix=function(h){var a=0;for(var i in h)Is.indexOf(i)!==-1&&a++;return a>0},n.isSrcEmpty=function(h){try{if(typeof h=="string"){if(!(h=h.trim()))return!0;if(!ks.test(h))return Object.keys(JSON.parse(h)).length===0}else if(!(h instanceof Blob))return!h||Object.keys(h).length===0}catch(a){}return!1},n.filteringLevels=function(h,a,i){i===void 0&&(i=!1),h.i(Ne,"filteringLevels. input: "+a.levels.length+". mse: "+me.isMSEAvailable()+" mixCodec: "+i);var o=ee.chrome||ee.firefox;a.levels.forEach(function(T){o&&T.audioCodec&&T.audioCodec.indexOf("mp4a.40.34")!==-1&&(T.audioCodec="")});var u=me.isMSEAvailable()?me.isMSECodecStrSupportedInMp4:me.isVideoCodecStrSupportedInMp4,p=me.isMSEAvailable()?me.isMSECodecSupported:me.isVideoCodecSupported;return a.levels=a.levels.filter(function(T){var L=!T.audioCodec||u(T.audioCodec,"audio"),V=typeof T.hdr=="number"&&T.hdr>0,W=!0;(i||T.vCodecType===v.av1||ee.mobile)&&((W=T.videoCodec?u(T.videoCodec):T.vCodecType===v.unknown||p(T.vCodecType,me.getPlayTestDefinition(T),V))||h.i(Ne,"filteringLevels. "+T.qualityType+" v unsupported. codec: "+T.vCodecType+" hdr: "+V),T.qualityType.toLocaleLowerCase().indexOf("4k")>=0&&(ee.mobile&&(W=!1),W||h.i(Ne,"filteringLevels. "+T.qualityType+" v unsupported. mobile: "+ee.mobile)));var $=ms(T);return $||h.i(Ne,"filteringLevels. "+T.qualityType+" v unsupported. drm: "+T.drmSchemaId),L&&W&&$}),a.audioTracks&&(a.audioTracks=a.audioTracks.filter(function(T){var L=!T.audioCodec||u(T.audioCodec,"audio");L||h.i(Ne,"filteringLevels. "+T.qualityType+" a unsupported. codec: "+T.audioCodec);var V=ms(T);return V||h.i(Ne,"filteringLevels. "+T.qualityType+" a unsupported. drm: "+T.drmSchemaId),L&&V}),a.audioTracks.forEach(function(T){o&&T.audioCodec&&T.audioCodec.indexOf("mp4a.40.34")!==-1&&(T.audioCodec="")})),n.initLevelsDefault(h,a),a},n.initLevelsDefault=function(h,a){return h.i(Ne,"init level default"),a.def=-1,a.levels.forEach(function(i,o){i.index=o,i.default&&(a.def=o)}),a.def<0&&(a.def=a.levels.reduce(function(i,o,u){return o.bitrate<a.levels[i].bitrate?u:i},0),h.i(Ne,"no default main level, select lowest bit rate idx: "+a.def)),h.i(Ne,"audio level default: "+a.def),a.audioTracks&&a.audioTracks.length&&(a.defAudio=void 0,a.audioTracks.forEach(function(i,o){i.index=o,i.default&&(a.defAudio=o)}),a.defAudio===void 0&&(a.defAudio=0),h.i(Ne,"audio level default: "+a.defAudio)),a.subtitleTracks&&a.subtitleTracks.length&&(a.subtitleTracks.forEach(function(i,o){i.index=o,i.default&&(a.defSubtitle=o)}),a.defSubtitle===void 0&&(a.defSubtitle=0),h.i(Ne,"subtitle level default: "+a.defSubtitle)),a},n.preParse=function(h,a,i,o,u){if(u===void 0&&(u=""),h.i(Ne,"pre parse. native: "+i+", codecType: "+o+", baseUrl: "+u),typeof a=="string"){var p=this.Nn(h,a);if(!p)return[{src:a,box:y.unknown,srcType:k.OTHERS}];a=p}else a instanceof Blob||(a=JSON.parse(JSON.stringify(a)));if(Array.isArray(a)){h.i(Ne,"input mix container.",a.length);var T=[],L=[];a.forEach(function($){if($!=null&&$.src){var te={info:n.In(h,$.src,i,o,u),priority:0,mime:void 0};T.push(te.info.box),$.type&&(te.mime=gs($.type)),L.push(te)}});for(var V=0;V<L.length;V++){var W=L[V];if(W.info&&W.info.src){if(W.mime&&(W.mime.box!==y.unknown&&(W.info.box=W.mime.box),W.mime.vCodec!==v.unknown&&(W.info.codecType=W.mime.vCodec)),i!==void 0&&i!==W.info.nativeFirst||W.priority++,W.info.nativeFirst)W.priority+=W.info.box===y.unknown?1:me.isVideoBoxSupported(W.info.box)?2:-100,W.priority+=W.info.codecType===v.unknown?1:o&&o===W.info.codecType||me.isVideoCodecSupported(W.info.codecType)?2:-100;else{if(!me.isMSEAvailable())continue;W.priority+=W.info.box===y.unknown?1:Uh.indexOf(W.info.box)>=0?2:-100,W.priority+=W.info.codecType===v.unknown?1:o&&o===W.info.codecType||me.isMSECodecSupported(W.info.codecType)?2:-100}h.i(Ne,"input mix container. media desc "+V+". box: "+W.info.box+" codec: "+W.info.codecType+" priority: "+W.priority)}}return L.sort(function($,te){return te.priority-$.priority}).filter(function($){return $.priority>0}).map(function($){return $.info})}return[n.In(h,a,i,o,u)]},n.In=function(h,a,i,o,u){if(u===void 0&&(u=""),h.i(Ne,"parse media desc. native: "+i+" codecType: "+o),typeof a=="string"){var p=this.Nn(h,a);if(!p)return{src:a,box:y.unknown,srcType:k.OTHERS};a=p}var T,L=me.isMSEAvailable();if(n.verifyMix(a)){h.i(Ne,"input mix codec.",Object.keys(a));var V=a,W=[];for(var $ in V){var te=$;if(Is.indexOf(te)!==-1){var Te=V[te];if(typeof Te=="string"&&(Te=Te.trim()),!Te){h.i(Ne,$+" src is empty.");continue}var ie=this.Fn(h,Te,u,te,!0),Le=Array.isArray(ie)?this.Bn(ie,te)||ie[0]:ie;if(!Le)continue;Le.codecType=te,W.push(Le)}}T=this.jn(h,W,i,o)}else{var ke=this.Fn(h,a,u);Array.isArray(ke)?ke.length>1?(h.i(Ne,"input aas v2 mix codec."),T=this.jn(h,ke,i,o)):ke.length===1&&((T=ke[0]).nativeFirst=this.Un(h,T.box,L,i)):(T=ke).nativeFirst=this.Un(h,T.box,L,i)}return T||(T={src:a,box:y.unknown,srcType:k.OTHERS}),T},n.jn=function(h,a,i,o){var u,p,T=this,L={},V={},W=[],$=me.isMSEAvailable();a.forEach(function(_e){var Ue=_e.codecType;if(Ue)if(_e.nativeFirst=T.Un(h,_e.box,$,i),W.push(Ue),$&&!_e.nativeFirst){var Xe=me.getVideoCodecCompatibilityByCodec(Ue);V[Ue]=Xe.decoder,Ue===v.h264&&(Xe.decoder=E.buildin,Xe.smooth=!0),Xe.smooth&&Xe.decoder===E.buildin&&_e.mediaLevels&&(_e.compatibility=Xe,L[Ue]=_e)}else{var ut=me.isVideoCodecSupported(Ue);V[Ue]=ut?E.buildin:E.unsupported,(Ue===v.h264||ut)&&(_e.compatibility={decoder:E.buildin,smooth:!0,mix:!1},L[Ue]=_e)}});var te,Te,ie=(u=L[v.hevc])!=null&&u.mediaLevels&&L[v.hevc].mediaLevels.levels.length?L[v.hevc]:void 0,Le=(p=L[v.av1])!=null&&p.mediaLevels&&L[v.av1].mediaLevels.levels.length?L[v.av1]:void 0,ke=L[v.h264];return h.i(Ne,"input vcodec. hevc: "+!!ie+" av1: "+!!Le+" h264: "+!!ke),o&&L[o]&&(te=L[o],h.i(Ne,"selected the specified codec: "+o)),te||((te=Le||ie||ke)&&(te.nativeFirst=this.Un(h,te.box,$,i)),h.i(Ne,"selected src: "+((Te=te)==null?void 0:Te.codecType),te)),te&&(W.length&&(te.mixCodecInput=W),te.mixCodecAvailable=V),te},n.Bn=function(h,a){for(var i=0;i<h.length;i++)if(h[i].codecType===a)return h[i]},n.Un=function(h,a,i,o){if(!i||Nh.indexOf(a)!==-1)return h.i(Ne,"get native first true. box: "+a+" mse: "+i),!0;if(Ph.indexOf(a)!==-1||!me.isVideoBoxSupported(a))return h.i(Ne,"get native first false. box: "+a),!1;if(!ee.mobile){if(o){var u=me.isVideoBoxSupported(a),p=!!u;return h.i(Ne,"get native first pc "+p+". box: "+a+" nativeFirstParams: true video box supported: "+u),p}if(o===void 0){var T=me.isMSEAvailable(),L=!T;return h.i(Ne,"get native first pc "+L+". box: "+a+" nativeFirstParams: undefined mse supported: "+T),L}return h.i(Ne,"get native first pc false. nativeFirstParams: false"),!1}if(a===y.mp4||a===y.hls||a===y.hls_ts||a===y.ts){if(o===void 0||o){var V=me.isVideoBoxSupported(a),W=!!V;return h.i(Ne,"get native first mobile "+W+". box: "+a+" nativeFirstParams: "+o+" video box supported: "+V),W}return h.i(Ne,"get native first mobile false. nativeFirstParams: "+o),!1}if(a===y.hls_fmp4){if(o===void 0||o){var $=me.isVideoBoxSupported(a),te=!(!$||!ee.x5&&!ee.xweb);return h.i(Ne,"get native first mobile "+te+". box: "+a+" nativeFirstParams: "+o+" video box supported: "+$+" x5: "+ee.x5+" xweb: "+ee.xweb),te}return h.i(Ne,"get native first mobile false. nativeFirstParams: "+o),!1}},n.Fn=function(h,a,i,o,u){var p=this;i===void 0&&(i=""),o===void 0&&(o=v.unknown),u===void 0&&(u=!1);var T={src:a,box:y.unknown,srcType:k.OTHERS};if(typeof a=="string"){var L=new Mi(a);L.vCodecType=o,T.box=it(a),T.mediaLevels={levels:[L],def:0},T.isLive=this.Pn(T.box)}else if(a instanceof Blob){var V="unknow";a instanceof File?(T.box=it(a.name),V=a.name):T.box=gs(a.type).box;var W=fe(T.box)?new _r(URL.createObjectURL(a)):new Mi(URL.createObjectURL(a));W.vCodecType=o,W.fileName=V,T.mediaLevels={levels:[W],def:0},T.srcType=k.FILE,T.isLive=!1}else{if(Ls.verify(a)){var $=Ls.parse(a);return h.i(Ne,"kwai manifest"),$.map(function(ie){var Le,ke;h.i(Ne,"kwai manifest codec: "+ie.codecType+" meta:",ie.mediaLevels.meta),n.Vn(ie.mediaLevels.levels,o);var _e={meta:ie.mediaLevels.meta,mediaLevels:n.filteringLevels(h,ie.mediaLevels,u||$.length>1),src:a,box:ie.mediaLevels.box||it(((Le=ie.mediaLevels.levels[0])==null?void 0:Le.url[0])||""),srcType:k.KWAI,isLive:p.Pn(T.box),isLiveShift:ie.mediaLevels.isLiveShift,codecType:ie.codecType};return typeof((ke=_e.mediaLevels)==null?void 0:ke.isLive)=="boolean"&&(_e.isLive=_e.mediaLevels.isLive),fe(_e.box)&&(_e.multipart=!0),_e})}if(ys.verify(a)){h.i(Ne,"flv abr manifest",o);var te=ys.parse(a);n.Vn(te.levels,o),T.mediaLevels=n.filteringLevels(h,te,u),T.box=y.flv,T.isLive=!0,T.srcType=k.KWAI_FLV_ABR}else if(ws.verify(a)){h.i(Ne,"flv multipart");var Te=ws.parse(a,i);T.mediaLevels=l()({def:0},Te),n.Vn(T.mediaLevels.levels,o),T.box=y.flv,T.isLive=!1,T.multipart=!0,T.srcType=k.KWAI_FLV_MP}else Ts.verify(a)&&(T.mediaLevels=n.filteringLevels(h,Ts.parse(a),u),T.box=y.hls,T.srcType=k.KWAI)}return fe(T.box)&&(T.multipart=!0),T},n.Vn=function(h,a){a===void 0&&(a=v.unknown),h.forEach(function(i){i.vCodecType===v.unknown&&a!==v.unknown&&(i.vCodecType=a)})},n.Pn=function(h){var a;return[y.flv,y.hls,y.unknown,y.ivf,y.yuv].indexOf(h)===-1&&(a=!1),h===y.webrtc&&(a=!0),a},n.Nn=function(h,a){var i=a.trim();if(i){if(!ks.test(i)){try{i=JSON.parse(i)}catch(o){h.i(Ne,"formatStrData error",o)}typeof i=="string"&&(i=Object(vr.buildAbsoluteURL)(location.href,i,{alwaysNormalize:!0}))}return i}},n}(),Fh=((fn={})[O.FHD]="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAA1Btb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAADmAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACenRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAADmAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAHgAAABDgAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAA5gAAXcAAAEAAAAAAfJtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAEk+AABJPgFXEAAAAAAAhaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAAAAAAGpbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABaXN0YmwAAAEFc3RzZAAAAAAAAAABAAAA9Wh2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAHgAQ4AEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAB7aHZjQwEBYAAAAJAAAAAAAHjwAPz9+PgAAA8DoAABABhAAQwB//8BYAAAAwCQAAADAAADAHiVmAmhAAEALkIBAQFgAAADAJAAAAMAAAMAeKADwIAQ5ZZWaSTK8BagIIBAgAAAAwCAAAADAISiAAEAB0QBwXK0YkAAAAAQcGFzcAAAAAEAAAABAAAAFGJ0cnQAAAAAAAAV+AAAFfgAAAAYc3R0cwAAAAAAAAABAAAAAQAST4AAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAACvwAAAAEAAAAUc3RjbwAAAAAAAAABAAADfAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNjAuMTYuMTAwAAAACGZyZWUAAALHbWRhdAAAABhAAQwB//8BYAAAAwCQAAADAAADAHiVmAkAAAAuQgEBAWAAAAMAkAAAAwAAAwB4oAPAgBDlllZpJMrwFqAggECAAAADAIAAAAMAhAAAAAdEAcFytGJAAAACYigBrxMImujggedddccbbbbbbuZo4//8Qs/H9kAtWJjtrvgCQAzQ8gAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwFbpe9yuAXAHyJgAAADAAADAAADAAADAAADAAADAAADAAADAAFJkwKEKkAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAZEhwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwPuAAADAAADAAADAAADAAADAAADAAADAAADAAADAAAHpAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwABzQAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAUMAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwBsQAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwGHAAADAAADAAADAAADAAADAAADAAADAAADAAADAtoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAWMAAADAAADAAADAAADAAADAAADAAADAAADAAAJCAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAADygAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAABawAAADAAADAAADAAADAAADAAADAAADAAADAAAhYAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAALeAFwEAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAUUA=",fn[O.UHD_4K]="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAA1Ftb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAADmAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACe3RyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAADmAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAPAAAACHAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAA5gAAXcAAAEAAAAAAfNtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAEk+AABJPgFXEAAAAAAAhaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAAAAAAGqbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABanN0YmwAAAEGc3RzZAAAAAAAAAABAAAA9mh2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAPAAhwAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAB8aHZjQwEBYAAAAJAAAAAAAJbwAPz9+PgAAA8DoAABABhAAQwB//8BYAAAAwCQAAADAAADAJaVmAmhAAEAL0IBAQFgAAADAJAAAAMAAAMAlqAB4CACHFllZpJMrwFqAggECAAAAwAIAAADAAhAogABAAdEAcFytGJAAAAAEHBhc3AAAAABAAAAAQAAABRidHJ0AAAAAAAAQGgAAEBoAAAAGHN0dHMAAAAAAAAAAQAAAAEAEk+AAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAABRzdHN6AAAAAAAACA0AAAABAAAAFHN0Y28AAAAAAAAAAQAAA30AAABidWR0YQAAAFptZXRhAAAAAAAAACFoZGxyAAAAAAAAAABtZGlyYXBwbAAAAAAAAAAAAAAAAC1pbHN0AAAAJal0b28AAAAdZGF0YQAAAAEAAAAATGF2ZjYwLjE2LjEwMAAAAAhmcmVlAAAIFW1kYXQAAAAYQAEMAf//AWAAAAMAkAAAAwAAAwCWlZgJAAAAL0IBAQFgAAADAJAAAAMAAAMAlqAB4CACHFllZpJMrwFqAggECAAAAwAIAAADAAhAAAAAB0QBwXK0YkAAAAevKAGvEwRHlP3jty4cOG7Zs2bNmzZs2bNWrVq1atWrVq1atWvmaOP//ELPx/ZALViY7a74AkAM0PIAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAX8Cl73K4BcAfImAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAIWAkwKEKkAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMDMocAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMCkgAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAABgwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAasAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAFZAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAg4AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMCJgAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAABFQAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAkIAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAAPqAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAHJAAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAACugAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAABDQAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAX8AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAIqAAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAADAAC2gAAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAAAwAA54AAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAASkAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAXUAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAdMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAhYAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAmoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAq4AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAvoAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA04AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA5IAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA84AAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAA+oAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABCwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABEwAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMABHQAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAAAMAgIA=",fn),Cs="kwai-kernel-hevc",Ft="playback-hevc-test",Ds=function(){function n(a){var i=this;this.J=void 0,this.Ii=new un,this.Hn=void 0,this.Wn=[O.FHD,O.UHD_4K],this.Gn=0,this.Qn=void 0,this.Yn=function(){var o,u;i.J.i(Ft,"on video event. "+((o=n.Jn)==null?void 0:o.videoWidth)+" "+((u=n.Jn)==null?void 0:u.error)),i.Qn?(i.Qn[i.Wn[i.Gn]]=!!n.Jn&&n.Jn.videoWidth>0&&!n.Jn.error,i.Gn++,i.Gn<i.Wn.length?(i.Zn(),i.zn(i.Wn[i.Gn])):i.Kn()):i.Kn()},this.J=a}var h=n.prototype;return h.init=function(a){if(this.J.i(Ft,"init"),a>0){var i=this.Ii.read(Cs,a);this.J.i(Ft,"load from ls",i);try{i!==void 0&&Object.prototype.hasOwnProperty.call(i,O.FHD)&&Object.prototype.hasOwnProperty.call(i,O.UHD_4K)&&(me.playHEVCTest=i,this.Qn=me.playHEVCTest)}catch(o){this.J.i(Ft,"load ls error")}}},h.start=function(){var a;this.J.i(Ft,"start");var i=this.Qn!==void 0||n.Jn;this.J.i(Ft,"start. tested: "+i),i||(a=n.Jn)!=null&&a.src||this.qn()},h.destroy=function(){this.Ze(),this.Zn()},h.Kn=function(){this.J.i(Ft,"complete result:",this.Qn,performance.now()),this.Ze(),this.Zn(),me.playHEVCTest=this.Qn,this.Ii.write(Cs,this.Qn)},h.qn=function(){var a;this.J.i(Ft,"start video test"),vt()?this.Kn():(this.Xn(),this.Qn=((a={})[O.FHD]=!1,a[O.UHD_4K]=!1,a),this.Gn=0,this.zn(this.Wn[0]))},h.zn=function(a){this.J.i(Ft,"test: "+a),n.Jn||(n.Jn=document.createElement("video")),n.Jn.preload="metadata",n.Jn.addEventListener("error",this.Yn),n.Jn.addEventListener("loadeddata",this.Yn),n.Jn.addEventListener("loadedmetadata",this.Yn),n.Jn.src=Fh[a],n.Jn.play().catch(function(){})},h.Zn=function(){n.Jn&&(n.Jn.removeEventListener("error",this.Yn),n.Jn.removeEventListener("loadeddata",this.Yn),n.Jn.removeEventListener("loadedmetadata",this.Yn),n.Jn.src="")},h.Xn=function(){var a=this;this.Ze(),this.Hn=setTimeout(function(){a.J.i(Ft,"timeout"),a.Kn()},1e3)},h.Ze=function(){this.Hn&&(clearTimeout(this.Hn),this.Hn=void 0)},n}();Ds.Jn=void 0;var Bh=Ds,Hh=r(9),Vh=r.n(Hh),$e="av-ctx",Os=function(n){function h(i,o){var u;return(u=n.call(this)||this).video=void 0,u.mse=void 0,u.stat=new Sh,u.loadRec=void 0,u.lctx=void 0,u.$n=[],u.tr=0,u.ir=0,u.er=void 0,u.Re=void 0,u.nr=!1,u.rr=!1,u.Ar=void 0,u.sr=void 0,u.ur=new Lh,u.ar=void 0,u.hr=void 0,u._=void 0,u.J=void 0,u.ot=void 0,u.cr=void 0,u.vr=void 0,u.dr=void 0,u._=dn.next(),u.J=new Oi.Logger().setName("kwai-k").setId(u._),u.ot=new kh,u.video=o,u.sr=new vs(u.J),u.hr=new Bh(u.J),u.lctx=new As(u.J,!0),u.cr=new oh(u),u.vr=new wh(u),u.dr=new bh(u),u.lr(de.processConfig(i)),u.sr&&u.F.push(u.sr),u.F.push(u.hr,u.cr,u.vr,u.dr),u}R()(h,n);var a=h.prototype;return a.destroy=function(){var i;this.logger.i($e,"destroy"),(i=this.stat.muxWorker)==null||i.terminate(),this.pr(),this.mr(),this.ot.removeAllListeners(),n.prototype.destroy.call(this)},a.updateVideoPlaybackQuality=function(i,o){this.stat.videoPlaybackQuality?(this.stat.videoPlaybackQuality.droppedVideoFrames=o,this.stat.videoPlaybackQuality.totalVideoFrames=i):this.stat.videoPlaybackQuality={corruptedVideoFrames:0,creationTime:0,droppedVideoFrames:o,totalVideoFrames:i}},a.isTimeinBuffered=function(i){if(this.video){for(var o=this.video.buffered,u=0;u<o.length;u++)if(i>=o.start(u)&&i<o.end(u))return!0}return!1},a.currentBuffer=function(i){if(this.video)for(var o=this.video.buffered,u=0;u<o.length;u++){var p=o.start(u),T=o.end(u);if(p<=i&&i<T)return{start:p,end:T}}},a.nextBuffer=function(i){if(this.video)for(var o=this.video.buffered,u=0;u<o.length;u++){var p=o.start(u),T=o.end(u);if(p>i)return{start:p,end:T}}},a.getLiveShiftKwai2OffsetUTC=function(i){return this.stat.liveStartTime+i},a.getLiveShiftKwai2Duration=function(){return(this.sr.now-this.stat.liveStartTime)/1e3},a.getKwai2LiveShiftReloadInterval=function(){var i=this.lctx.current;if(i){if(i.fragments.length>1&&typeof this.stat.liveShiftOffset=="number"){var o=i.fragments[i.fragments.length-2];return Math.max((i.averagetargetduration||i.targetduration)*jt,(this.stat.liveShiftOffsetAligned||this.stat.liveShiftOffset)+o.start*jt-this.currentTime*jt)/this.playbackRate}return(i.averagetargetduration||i.targetduration)*jt/this.playbackRate}return 1e4/this.playbackRate},a.getKwai2LiveShiftUrl=function(i){var o=this.lctx.current,u=Lt()(i,!0),p=this.stat.liveShiftKwai2Params;if(this.sr){if(p.paramName==="seqId"){var T=o.fragments[o.fragments.length-1],L=p.seqId||(T==null?void 0:T.sn);if(typeof L=="number")return u.query.seqID=L.toString(),u.toString()}return p.time=Math.round(this.getLiveShiftKwai2OffsetUTC(this.stat.liveShiftOffset||0)),u.query.startTime=p.time.toString(),u.toString()}return u.toString()},a.getLiveDelay=function(){var i=this.stat,o=this.Re,u=10;if(i.multipart){var p=this.lctx.current;u=(p==null?void 0:p.averagetargetduration)||(p==null?void 0:p.targetduration)||u}return i.box===y.flv?-this.Re.defaultSpts:fe(i.box)?this.isLiveShift?o.liveShiftDelaySec*jt:u*jt*(o.liveDelayFragNum||1):-this.Re.defaultSpts},a.initLiveShiftKwai2StartSec=function(){if(this.isLiveShiftKwai2){var i=this.stat.startFromSec>=0?this.stat.startFromSec:this.liveLocalTime;this.J.i($e,"init liveshift kwai2 start from sec: "+i+" startFromSec: "+this.stat.startFromSec+" live: "+this.liveLocalTime+" duration: "+this.getLiveShiftKwai2Duration()),i>0&&(this.stat.startFromSec=i,this.stat.liveShiftOffset=1e3*i,this.stat.liveShiftOffsetAligned=void 0,this.updateLiveShiftStatuByTime(i))}},a.getRemuxConfig=function(){var i=this.Re,o={isLive:this.stat.isLive,logLevel:i.logLevel,enableSoftwareAES:i.enableSoftwareAES,gopRemux:this.stat.gopRemux,preferDecoder:i.preferDecoder,streamingMux:this.streamingMux,ensureVideo:i.ensureVideo,maxAudioFramesDrift:i.maxAudioFramesDrift,forceKeyFrameOnDiscontinuity:i.forceKeyFrameOnDiscontinuity,wasmDecoderEnabled:i.wasmDecoderEnabled,enableAacPriv:i.enableAacPriv,audioEnabled:i.audioEnabled,videoEnabled:i.videoEnabled,mseDecErrSkip:i.mseDecErrSkip,adjustFragTime:i.adjustFragTime};return this.video instanceof HTMLAudioElement&&(this.J.i($e,"HTMLAudioElement. set videoEnabled false."),o.videoEnabled=!1),o.preferDecoder=void 0,o},a.getDecConfig=function(){var i=this.Re;return{logLevel:i.logLevel,videoDropFramePolicy:i.videoDropFramePolicy,videoFrameBufferSize:i.videoFrameBufferSize,videoDecBlockPolicy:i.videoDecBlockPolicy,maxVideoDecThreads:i.maxVideoDecThreads,mainThreadRendering:i.mainThreadRendering,mainThreadDecoding:i.mainThreadDecoding,preferCanvasType:i.preferCanvasType,preferCanvasColorSpace:i.preferCanvasColorSpace}},a.setSrc=function(i,o){this.logger.i($e,"set src",i),i&&(this.jt(),this.resetStreamingEnabled(),this.ar=void 0,this.loadRec=new _s),this.yr(i,o)},a.reProcessSrc=function(i,o){this.logger.i($e,"reprocess src. codecType: "+i+" native: "+o+", has origin src: "+!!this.er),this.er&&this.Mr(this.er,i,o)},a.updateLiveShiftStatuByTime=function(i){var o;if(this.isLiveShift&&(i===void 0&&(i=(o=this.video)==null?void 0:o.currentTime),this.lctx.current&&typeof i=="number"&&Number.isFinite(i))){var u=this.liveLocalTime;u>0&&(this.stat.liveShiftActive=!!(u&&i<u-5),this.J.i($e,"update live shift statu by time. type: "+this.stat.liveShiftType+" "+this.stat.liveShiftActive+", time: "+i+" ed: "+u))}},a.resetStreamingEnabled=function(){var i=this.Re;this.nr=this.rr=!(!i.streamingMux||!de.isStreamingSupported()||ee.msie||ee.safari&&(this.stat.isLive===!1||this.stat.multipart)||ee.msedge&&ee.version.major<88&&(this.stat.isLive===!1||this.stat.multipart)),this.logger.i($e,"resetStreamingEnabled: "+this.nr)},a.resetGopRemux=function(){this.stat.multipart&&!this.nr?this.stat.gopRemux=!1:this.stat.gopRemux=!!(ee.safari||ee.opera&&ee.version.major<37),this.logger.i($e,"resetGopRemux: "+this.stat.gopRemux)},a.hasNextMediaDesc=function(){return this.tr+1<this.$n.length},a.nextMediaDesc=function(){if(this.hasNextMediaDesc()){this.tr++;var i=this.$n[this.tr];if(i)return this.J.i($e,"next media desc."),this.wr(i),!0}return!1},a.lr=function(i){if(this.Re=i,!i.logLevel){var o=Oi.Logger.loadLogLevel("kwai-kernel-log");i.logLevel=o||Oi.DEFAULT_LOG_LEVEL}var u;if(i.logger&&this.J.setOutput(i.logger),this.J.setLevel(i.logLevel),this.J.getLevel()!==Oi.LogLevel.NONE&&(u=h.version,ee.msie||console.log("%c kwai-player-kernel %c "+u+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")),this.logger.i($e,"logger init."),this.logger.i($e,"set config"),this.hr.init(this.Re.playbackAbilityCacheTimeout),this.resetStreamingEnabled(),this.logger.i($e,"browser",JSON.stringify(ee)),vt()||this.logger.i($e,"ua",navigator.userAgent),this.jt(),this.ar=void 0,this.stat.startFromSec=i.startFromSec>=0?i.startFromSec:typeof i.startFrom=="number"&&i.startFrom>=0?i.startFrom/1e3:-1,this.stat.webWorker=i.webWorker&&!!rt.a,typeof i.preferNativeLoader=="boolean"&&(this.stat.preferNativeLoader=i.preferNativeLoader),this.Re.autoPlaybackRateConf)this.logger.i($e,"use config.autoPlaybackRateConf",this.Re.autoPlaybackRateConf),this.stat.autoPlaybackRateConf=this.Re.autoPlaybackRateConf;else{var p=-Math.floor(this.Re.defaultSpts/jt);this.stat.autoPlaybackRateConf=function(T,L,V){V===void 0&&(V=3);var W={startDelay:0,interval:.6,rule:[]};return cs(T,L,V,W),W}(this.J,p),this.logger.i($e,"use default autoPlaybackRateConf",this.stat.autoPlaybackRateConf),this.J.i($e,"get by delay: "+p)}try{this.stat.webWorker&&(this.stat.muxWorker=Vh()(3)),vs.workerTimeOffset=performance.now(),this.logger.i($e,"init mux worker")}catch(T){}i.lazyLoadMaxDuration>0&&i.lazyLoadRecoverDuration>0&&i.lazyLoadMaxDuration>=i.lazyLoadRecoverDuration&&(this.stat.lazyLoadMaxDuration=i.lazyLoadMaxDuration,this.stat.lazyLoadRecoverDuration=i.lazyLoadRecoverDuration),this.loadRec=new _s,i.src&&this.yr(i.src)},a.jt=function(){this.logger.i($e,"reset stat");var i=this.Re,o=this.stat;this.rr=this.nr;var u=o.preferNativeLoader;o.reset(),this.resetGopRemux(),this.vr.reset(),this.cr.reset(),o.isLive=i.isLive,o.native=i.nativeFirst,o.liveShiftType=this.Re.liveShiftType,o.preferNativeLoader=u,this.stat=o},a.yr=function(i,o){this.tr=0,this.ir=Date.now(),this.Mr(i,o)},a.Mr=function(i,o,u){this.J.i($e,"process src. codec: "+o+" native: "+u),i&&(this.er=i);var p=this.config;this.$n=xs.preParse(this.J,i,typeof u=="boolean"?u:p.nativeFirst,o,p.baseURL);var T=this.$n[this.tr];T&&this.wr(T)},a.wr=function(i){var o,u,p,T,L,V,W=this.config,$=this.stat;(o=this.Ar)==null||o.reset(),this.stat.srcType===k.FILE&&this.pr();var te,Te,ie=this.lctx=new As(this.J,W.adaptive);if($.codecType=i.codecType?i.codecType:v.unknown,$.box=W.box||i.box||y.unknown,$.srcType=i.srcType,$.mixContainerInput=i.mixContainerInput,$.mixCodecInput=i.mixCodecInput,$.mixCodecAvailable=i.mixCodecAvailable,$.multipart=i.multipart,$.stereoType=(u=i.mediaLevels)==null?void 0:u.stereoType,(p=i.mediaLevels)!=null&&p.meta&&($.srcMeta=(te=i.mediaLevels)==null?void 0:te.meta,this.liveTime&&typeof i.mediaLevels.meta.programStartTime=="number"&&(this.stat.liveStartTime=i.mediaLevels.meta.programStartTime)),W.liveDelayFragNum&&W.liveDelayFragNum>0&&$.multipart&&!W.autoPlaybackRateConf){var Le=this.getLiveDelay();cs(this.J,Le/1e3,10,$.autoPlaybackRateConf),this.J.i($e,"update by delay: "+Le+".",W)}i.nativeFirst!==void 0&&($.native=i.nativeFirst),typeof i.isLive=="boolean"&&($.isLive=i.isLive),i.isLiveShift===!0&&($.liveShiftType=he.KWAI2),typeof((T=i.mediaLevels)==null?void 0:T.isLive)=="boolean"&&($.isLive=i.mediaLevels.isLive),ie.hasAudio=(L=i.mediaLevels)==null?void 0:L.hasAudio,ie.hasVideo=(V=i.mediaLevels)==null?void 0:V.hasVideo,!i.mediaLevels||i.srcType===k.OTHERS&&fe($.box)&&!$.native||(this.J.i($e,"src. get levels from src."),$.drm=i.mediaLevels.drm,this.lctx.levels=i.mediaLevels.levels,this.lctx.default=this.lctx.currentIdx=i.mediaLevels.def,i.mediaLevels.audioTracks&&(this.lctx.audioTracks=i.mediaLevels.audioTracks,this.lctx.audioIdx=i.mediaLevels.defAudio||0),i.mediaLevels.subtitleTracks&&(this.lctx.subtitleTracks=i.mediaLevels.subtitleTracks,this.lctx.subtitleIdx=i.mediaLevels.defSubtitle||0)),this.lctx.default=function(ke){if(!ee.mobile||ke.levels.length<=1||ke.levels[0].vCodecType!==v.hevc)return ke.default;var _e,Ue;if(ke.levels.forEach(function(ut,Ni){if(ut.width&&ut.height){var Ht=Math.min(ut.width,ut.height);Ht>720?Ue=Ue&&Ht>Ue.minWH?Ue:{idx:Ni,minWH:Ht}:_e=_e&&_e.minWH>Ht?_e:{idx:Ni,minWH:Ht}}}),!_e||!Ue)return ke.default;if(ee.android)return parseFloat(ee.platformVersion||"")>=10?Ue.idx:_e.idx;if(ee.iphone){var Xe=ds();return Xe==="unknown"?typeof window<"u"&&window.screen&&(window.screen.width>400||window.devicePixelRatio>2)?Ue.idx:_e.idx:[st.SERIES_1,st.SERIES_2,st.SERIES_3,st.SERIES_4,st.SERIES_8].indexOf(Xe)===-1?Ue.idx:_e.idx}return ke.default}(this.lctx),this.config.ntp&&this.stat.isLive!==!1&&this.stat.box===y.flv&&((Te=this.sr)==null||Te.ntpSync(this.stat.preferNativeLoader)),this.resetStreamingEnabled(),this.resetGopRemux(),this.logger.i($e,"use media desc complete. box: "+$.box+" live: "+$.isLive+" native: "+$.native+" mobile: "+!!ee.mobile+" gopRemux: "+$.gopRemux+" streamingMux: "+this.streamingMux+" liveShift: "+$.liveShiftType+" mixCodec: "+$.mixCodecInput+" levelCnt: "+ie.levels.length+" hasVideo: "+ie.hasVideo+" hasAudio: "+ie.hasAudio)},a.pr=function(){this.lctx&&this.lctx.levels.forEach(function(i){i.url.forEach(function(o){o.indexOf("blob:")===0&&URL.revokeObjectURL(o)})})},a.mr=function(){this.Ar&&(this.Ar.destroy(),this.Ar=void 0)},f()(h,[{key:"isLiveShiftKwai2",get:function(){return this.stat.liveShiftType===he.KWAI2}},{key:"isLiveShift",get:function(){return this.stat.liveShiftType!==he.NONE}},{key:"logger",get:function(){return this.J}},{key:"id",get:function(){return this._}},{key:"live",get:function(){return!(!this.stat.isLive||this.stat.liveShiftActive)}},{key:"isDownloadInterruptible",get:function(){return!(this.live&&this.stat.multipart===!1)}},{key:"liveLocalTime",get:function(){var i=this.lctx.current;if(this.isLiveShift){var o,u,p=Number.isFinite((o=this.video)==null?void 0:o.duration)?(u=this.video)==null?void 0:u.duration:this.isLiveShiftKwai2?this.getLiveShiftKwai2Duration():(i==null?void 0:i.totalduration)||0;if(p)return p-(this.getLiveDelay()/jt+.1)}else if(i&&i.totalduration)return i.totalduration-(this.getLiveDelay()/jt+.1);return 0}},{key:"yuvParams",get:function(){return this.ar}},{key:"canCodecFallback",get:function(){return!(!this.stat.mixCodecInput||this.stat.codecType===v.h264||this.stat.mixCodecInput.indexOf(v.h264)===-1||this.stat.decoder!==E.buildin)}},{key:"fps",get:function(){return this.ur}},{key:"liveTime",get:function(){return this.sr}},{key:"cOutput",get:function(){if(rt.a)return this.Ar||(this.Ar=new rt.a(this.J,this.Re)),this.Ar}},{key:"isAbrAvailable",get:function(){return this.Re.adaptive&&this.lctx.levels.length>1&&!this.isSwitchLevelByReload&&!this.isLiveShift}},{key:"isSwitchLevelByReload",get:function(){return!(this.stat.box===y.flv&&this.stat.isLive!==!1&&!ee.firefox&&this.Re.videoEnabled!==!1||fe(this.stat.box))}},{key:"mediaBufferedSec",get:function(){return this.video&&this.video.buffered&&this.video.buffered.length?{start:this.video.buffered.start(0),end:this.video.buffered.end(this.video.buffered.length-1)}:{start:0,end:0}}},{key:"bufferedSt",get:function(){return this.video&&this.video.buffered.length?this.video.buffered.start(0):-1}},{key:"bufferedEnd",get:function(){return this.video&&this.video.buffered.length?this.video.buffered.end(this.video.buffered.length-1):0}},{key:"bufferedSec",get:function(){return this.video&&this.video.buffered.length>0?Math.max(0,this.video.buffered.end(this.video.buffered.length-1)-this.video.currentTime):0}},{key:"bufferSliceNum",get:function(){return this.video?this.video.buffered.length:0}},{key:"currentTime",get:function(){return this.video?this.video.currentTime:0}},{key:"playbackRate",get:function(){return this.video?this.video.playbackRate:1}},{key:"config",get:function(){return this.Re}},{key:"src",get:function(){var i;return((i=this.$n[this.tr])==null?void 0:i.src)||""}},{key:"srcUpdateTime",get:function(){return this.ir}},{key:"originSrc",get:function(){return this.er}},{key:"videoPlaybackQuality",get:function(){return this.stat.videoPlaybackQuality?this.stat.videoPlaybackQuality:this.video instanceof HTMLVideoElement?this.video.getVideoPlaybackQuality!==void 0?this.video.getVideoPlaybackQuality():{corruptedVideoFrames:0,creationTime:0,droppedVideoFrames:this.video.webkitDecodedFrameCount||0,totalVideoFrames:this.video.webkitDroppedFrameCount||0}:void 0}},{key:"demuxerType",get:function(){return this.stat.demuxerType},set:function(i){this.logger.i($e,"set demuxer type",i);var o=this.stat;if(i!==o.demuxerType){var u=o.box===void 0||o.box===y.unknown;i===Ge.RAW?(o.box=y.raw,o.isLive=!1):i===Ge.FLV?(o.box=y.flv,o.multipart&&(o.isLive=!1)):i===Ge.MP4||i===Ge.FMP4?(u&&(o.box=y.mp4),o.multipart||(o.isLive=!1)):i===Ge.TS?u&&(o.box=y.ts):i===Ge.IVF&&(o.box=y.ivf,o.isLive=!1),o.demuxerType=i,this.resetGopRemux()}}},{key:"streamingMuxEnabled",get:function(){return this.nr&&!(this.src instanceof Blob)},set:function(i){this.nr=i}},{key:"streamingMux",get:function(){return this.stat.box===y.flv&&this.stat.isLive!==!1||this.streamingMuxEnabled&&this.rr},set:function(i){this.rr=i}},{key:"hevcTest",get:function(){return this.hr}},{key:"evt",get:function(){return this.ot}},{key:"fallback",get:function(){return this.cr}},{key:"streamTime",get:function(){return this.vr}}],[{key:"packName",get:function(){return"mini_es"}},{key:"version",get:function(){return"3.3.37"}},{key:"buildTime",get:function(){return"Mon Jan 20 2025 18:07:08 GMT+0800 (中国标准时间)"}}])}(S);Os.instanceCount=0;var yt=Os,It=function(n){return n.NORMEL="normal",n.SEEK="seek",n.END="end",n.LEVEL_SWITCH="levelSwitch",n.FIRST_FRAME="firstFrame",n.LOAD="load",n.BACKUP="backup",n}({}),je=function(n){return n.START="start",n.MANIFEST="manifest",n.LEVEL="level",n.STREAM_CONNECTED="streamConnected",n.DATA="data",n.DEMUX="demux",n.SEGMENT="segment",n.CANPLAY="canplay",n.LOADEDMETADATA="loadedmetadata",n.LOADEDDATA="loadeddata",n.SEEKED="seeked",n}(je||{}),Ms=[{event:je.START,detailName:"first-loader-open"},{event:je.MANIFEST,detailName:"manifest-duration"},{event:je.LEVEL,detailName:"level-duration"},{event:je.STREAM_CONNECTED,detailName:"stream-connected-duration"},{event:je.DATA,detailName:"first-package-duration"},{event:je.DEMUX,detailName:"first-remux-duration"},{event:je.SEGMENT,detailName:"first-segment-duration"},{event:je.LOADEDMETADATA,detailName:"first-meta-duration"},{event:[je.LOADEDDATA,je.CANPLAY,je.SEEKED],detailName:"first-frame-duration"}],An="first-frame",Gh=function(){function n(a){this.br=0,this.gr=0,this.C=void 0,this.kr=0,this._r=0,this.Er={},this.ut=void 0,this.J=void 0,this.C=Ms.slice(0),this.ut=a,this.J=a.logger}var h=n.prototype;return h.start=function(){this.J.i(An,"start"),this.br=0,this.kr=performance.now(),this.gr=0,this.C=Ms.slice(0),this._r=0,this.Er={},this.process(je.START,this.kr)},h.process=function(a,i){var o;if(i===void 0&&(i=0),this.J.i(An,"process type: "+a+" "+i+" complete: "+this.br),this.br)return!1;var u=this.C,p=-1;i=i||performance.now();for(var T=0;T<u.length;T++){var L=u[T];if(Array.isArray(L.event)){if(L.event.indexOf(a)!==-1){p=T;break}}else if(L.event===a){p=T;break}}if(p===-1)return!1;var V=u.splice(0,p+1).pop(),W=((o=this.ut.mse)==null?void 0:o.readyState)==="closed";if((u.length===0||W&&a===je.SEGMENT)&&(this.gr=i-this.kr,this.br=Date.now(),this.J.i(An,"complete "+this.gr+" "+this.br)),V){var $=Math.round(i-this._r);this._r===0&&($=Date.now()),this._r=i,this.Er[V.detailName]=$}return!!this.br},h.onDownloadError=function(){this.Er.download_retry?this.Er.download_retry++:this.Er.download_retry=1},h.onRetry=function(){this.Er.retry?this.Er.retry++:this.Er.retry=1},f()(n,[{key:"complete",get:function(){return this.br}},{key:"duration",get:function(){return this.gr}},{key:"details",get:function(){return this.Er}}])}(),Ns=[/headless/,/spider/,/[a-z0-9]+bot[^a-z0-9]/],Bt=function(n){return n.none="",n.probably="probably",n.maybe="maybe",n}(Bt||{}),Ps=function(){if(vt())return Bt.none;if(navigator.webdriver)return Bt.probably;for(var n=navigator.userAgent.toLowerCase(),h=0;h<Ns.length;h++)if(Ns[h].test(n))return Bt.probably;if(window.innerWidth<=0&&window.innerHeight<=0)return Bt.probably;if(me.isMSEAvailable()&&!me.isMSECodecCapabilityNormal())return Bt.maybe;try{var a=document.createElement("canvas");a.width=4,a.width=4;var i=a.getContext("2d");if(i){i.fillStyle="#FFFFFF",i==null||i.fillRect(0,0,a.width,a.height);for(var o=i.getImageData(0,0,a.width,a.height).data,u=0;u<o.length;u++)if(o[u]!==0)return Bt.none;return Bt.maybe}}catch(p){return Bt.probably}return Bt.none}(),pn,bt={};try{var Us;(Us=navigator.userAgentData)==null||Us.getHighEntropyValues(["architecture","bitness","model","platform","platformVersion"]).then(function(n){l()(bt,n)})}catch(n){}var Wh=new Uint8Array(16);function jh(){if(!pn&&!(pn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pn(Wh)}for(var Kh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,zh=function(n){return typeof n=="string"&&Kh.test(n)},lt=[],vn=0;vn<256;++vn)lt.push((vn+256).toString(16).substr(1));var Jh=function(n){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=(lt[n[h+0]]+lt[n[h+1]]+lt[n[h+2]]+lt[n[h+3]]+"-"+lt[n[h+4]]+lt[n[h+5]]+"-"+lt[n[h+6]]+lt[n[h+7]]+"-"+lt[n[h+8]]+lt[n[h+9]]+"-"+lt[n[h+10]]+lt[n[h+11]]+lt[n[h+12]]+lt[n[h+13]]+lt[n[h+14]]+lt[n[h+15]]).toLowerCase();if(!zh(a))throw TypeError("Stringified UUID is invalid");return a},_n,$h=function(n,h,a){var i=(n=n||{}).random||(n.rng||jh)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,h){a=a||0;for(var o=0;o<16;++o)h[a+o]=i[o];return h}return Jh(i)},qh=new Date().getTimezoneOffset()/-60;function mn(){return _n||(_n={support_mse:me.isMSEAvailable()?1:0,support_aac_mse:me.TYPE_SUPPORTED.aac?1:0,support_aac:me.isVideoCodecSupported(v.aac)?1:0,support_h264_mse:me.TYPE_SUPPORTED.h264?1:0,support_h264:me.isVideoCodecSupported(v.h264)?1:0,support_h265_mse:me.TYPE_SUPPORTED.hevc?1:0,support_h265:me.isVideoCodecSupported(v.hevc)?1:0,support_av1_mse:me.TYPE_SUPPORTED.av1?1:0,support_simd:me.isSupportSimd?1:0,support_thread:me.isSupportThreads?1:0,support_hw:me.isSupportHW?1:0,support_change_type:me.isChangeTypeSupported()?1:0,support_streaming:de.isStreamingSupported()?1:0,hardware_concurrency:fr()||0,wasm_dec_smooth:me.wasmSmooth?1:0}),_n}function Fs(n,h){var a,i;return typeof navigator<"u"&&(navigator.webdriver&&(a=navigator.webdriver?1:0),navigator.onLine!==void 0&&(i=navigator.onLine?1:0)),{session_id:h.sessionId,kernel_version:yt.version,pack_name:yt.packName,creation_time:h.creationTime,time_zone:qh,src_update_time:n.srcUpdateTime,load_start_time:h.loadStartTime,instance_count:yt.instanceCount,webdriver:a,on_line:i}}function Bs(){var n={};if(typeof navigator<"u"){navigator.onLine!==void 0&&(n.network_on_line=navigator.onLine?1:0);var h=navigator.connection||navigator.mozConnection||navigator.webkitConnection;(h==null?void 0:h.rtt)!==void 0&&(n.network_rtt=h.rtt),(h==null?void 0:h.rtt)!==void 0&&(n.network_downlink=h.downlink),(h==null?void 0:h.effectiveType)!==void 0&&(n.network_effective_type=h.effectiveType),(h==null?void 0:h.saveData)!==void 0&&(n.network_save_data=h.saveData?1:0)}return n}function Hs(n,h){var a,i,o,u=(a=n.video)==null?void 0:a.duration,p=n.lctx.current,T=(p==null?void 0:p.currentUrl)||"",L=l()({play_url:(p==null?void 0:p.fileName)||T,url_id:(p==null?void 0:p.urlId)||0,stream_host:T?new Lt.a(T).host:"",reuse:h.reuse,metadata_time:h.metadataTime,play_start_time:h.playStartTime,playing_start_time:h.playingStartTime,stream_duration:Math.round(1e3*(u&&Number.isFinite(u)?u:0)),max_bitrate:(p==null?void 0:p.maxBitrate)||0,codec:h.codecs,play_pos:h.playPos||0,v_data_rate:Math.round(((i=n.loadRec.currentLoad)==null?void 0:i.videoDataRate)||0),a_data_rate:Math.round(((o=n.loadRec.currentLoad)==null?void 0:o.audioDataRate)||0),drm:n.stat.drm?1:0,adaptive_multi_rate:n.lctx.abr?1:0,use_backup:h.useBackup,play_to_end:h.playToEnd,v_decoder:n.stat.decoder,video_codec_type:n.stat.codecType||v.unknown,start_codec:h.startCodec,demuxer:n.stat.demuxerType||Ge.UNKNOWN,core_type:n.stat.coreType,mms:n.stat.mms?1:0,box:n.stat.box,kwai_slice:n.stat.isKwaiSlice?1:0,monkey_patched_fetch:h.monkeyPatchedFetch},Fs(n,h),Bs(),function($){var te=$.video;return te?{elem_crossorigin:te.crossOrigin,elem_autoplay:te.autoplay?1:0,elem_loop:te.loop?1:0,elem_volume:te.volume,elem_muted:te.muted?1:0,elem_preload:te.preload,elem_controls:te.controls?1:0,elem_ready_state:te.readyState,elem_network_state:te.networkState,elem_playback_rate:te.playbackRate,elem_paused:te.paused?1:0,elem_ended:te.ended?1:0,elem_seeking:te.seeking?1:0,elem_tag_name:te.tagName}:{}}(n));n.stat.flvAbrNotAligned&&(L.flv_abr_not_aligned=1),typeof me.playHEVCTest=="boolean"&&(L.play_hevc_test=me.playHEVCTest?1:0),n.stat.isLive!==void 0&&(L.live=n.stat.isLive?1:0),L.live_shift_type=n.stat.liveShiftType;var V=eh((p==null?void 0:p.fileName)||T);n.stat.box===y.flv&&n.stat.isLive!==!1&&(L.stream_id=V.streamID),h.httpHeader&&(L.response_header=B(h.httpHeader)),p!=null&&p.bitrate&&(L.bitrate=Math.round(p.bitrate)),p!=null&&p.qualityType&&(L.quality_type=p.qualityType),p!=null&&p.qualityLabel&&(L.quality_label=p.qualityLabel),h.startQualityType&&(L.start_quality_type=h.startQualityType),V.transcodingTpl&&(L.transcoding_template=V.transcodingTpl),V.filename&&(L.filename=V.filename),typeof navigator<"u"&&navigator.deviceMemory&&(L.device_memory=navigator.deviceMemory);var W=sn();return W.renderer&&(L.gpu_renderer=W.renderer),Ps&&(L.bot=Ps),h.canvasCtxType&&(L.canvas_ctx=h.canvasCtxType),n.stat.wasmDecoder&&(L.wasm_dec=n.stat.wasmDecoder,L.wasm_dec_simd=n.stat.wasmSimd?1:0,L.wasm_dec_threads=n.stat.wasmThreads||0),L}function Vs(n){var h={};if(n.metadata)for(var a in n.metadata){if(Object.keys(h).length>50)break;var i=n.metadata[a];typeof i=="string"?h[a]=i.substring(0,50):typeof i!="number"&&typeof i!="boolean"||(h[a]=i)}return h}function gn(){var n={};return bt&&(bt.architecture&&(n.architecture=bt.architecture),bt.bitness&&(n.bitness=bt.bitness),bt.model&&(n.model=bt.model),bt.platform&&(n.platform=bt.platform),bt.platformVersion&&(n.platform_version=bt.platformVersion)),n}function yn(){var n={};return ee.platformVersion&&(n.platform=ee.platform||"",n.platform_version=ee.platformVersion||0),ee.iphone?n.model=ds():ee.model&&(n.model=ee.model),ee.version&&(n.browser_name=ee.name||"",n.browser_major=ee.version.major||0),n}function Gs(){var n,h,a,i={};return vt()||((n=window.screen)!=null&&n.width&&(i.screen_w=window.screen.width),(h=window.screen)!=null&&h.height&&(i.screen_h=window.screen.height),(a=window.screen)!=null&&a.colorDepth&&(i.screen_color_depth=window.screen.colorDepth),i.device_pixel_ratio=window.devicePixelRatio||1),i}function Ws(n){var h={};return n&&(n.fps&&(h.fps=Math.round(1e3*n.fps)/1e3),n.width&&(h.width=n.width),n.height&&(h.height=n.height),n.codedWidth&&(h.coded_width=n.codedWidth),n.codedHeight&&(h.coded_height=n.codedHeight),n.sar&&n.sar.width!==n.sar.height&&(h.sar=n.sar),n.enhancedFlv&&(h.enhanced_flv=n.enhancedFlv?1:0)),h}function js(n){var h={src_type:n.stat.srcType};return n.stat.stereoType&&(h.stereo_type=n.stat.stereoType),n.stat.mixCodecInput&&n.stat.mixCodecInput.length&&(h.mix_codec_input=n.stat.mixCodecInput),n.stat.mixContainerInput&&n.stat.mixContainerInput.length&&(h.mix_container_input=n.stat.mixContainerInput),n.stat.mixCodecAvailable&&(h.mix_codec_available=n.stat.mixCodecAvailable),h}function Ks(n){var h={};return n.stat.srcMeta&&(h.src_meta=n.stat.srcMeta),h}function zs(n){var h,a,i,o={};return(h=n.lctx.current)!=null&&h.meta&&(o.current_level_meta=n.lctx.current.meta,n.lctx.current.meta.comment&&n.lctx.current.meta.comment.split("/").forEach(function(u){u.indexOf("tt=")===0&&(o.transcoding_template=u.substring(3)),u.indexOf("ttExplain=")===0&&(o.transcoding_template_explain=u.substring(10))})),(a=n.lctx.current)!=null&&a.fileSize&&(o.filesize=(i=n.lctx.current)==null?void 0:i.fileSize),o}function Js(n){var h=performance.now();return{play:Math.round(n.playDuration+(n.playStartMS?h-n.playStartMS:0)),actualPlay:Math.round(n.actualPlayDuration+(n.actualPlayStartMS?h-n.actualPlayStartMS:0)),pause:Math.round(n.pauseDuration+(n.pauseStartMS?h-n.pauseStartMS:0)),buffer:Math.round(n.bufferTime+(n.bufferingStartMS?h-n.bufferingStartMS:0))}}function $s(){return document.hidden||document.webkitHidden||document.mozHidden||!0}var Yh=function(){function n(a,i){this.Rr=void 0,this.ut=void 0,this.Dr=void 0,this.Tr=1,this.Sr=0,this.Or=0,this.Cr=!0,this.Lr=void 0,this.Nr=void 0,this.Ir=0,this.Fr=0,this.Br="",this.jr=new hs,this.Rr=a,this.ut=i,this.Tr=1,this.Dr={play:0,actualPlay:0,pause:0,buffer:0,blockCount:0,pauseCnt:0,renderBlockCount:0,seekCnt:0,seekLoadCnt:0,decodedFrames:0,droppedFrames:0,muxDroppedFrames:0,traffic:0,download:0,mseUpdate:0,mseRemove:0,segment:0,muxA:0,muxV:0,fillA:0,fillV:0,droppedA:0,droppedV:0,keyFrame:0,onLineChange:0,visibilityChange:0,heartbeatTimeout:0,loadCnt:0,refreshCnt:0,wasmDecErr:0,videoRemuxSampleCount:0,audioRemuxSampleCount:0,videoRemuxDuration:0,audioRemuxDuration:0},this.Ur()}var h=n.prototype;return h.Pr=function(a,i){var o={};for(var u in i){var p=a[u],T=i[u];typeof p=="number"&&typeof T=="number"&&(o[u]=p-T,i[u]=p)}return o},h.Ur=function(){this.Sr=performance.now(),this.Or=Date.now(),this.Nr=void 0,this.Lr=void 0,this.Fr=0,this.Br=""},h.setFirstScreenDuration=function(a,i,o){this.Nr=Math.round(a),this.Lr=i,this.Cr=!0,this.Ir=o},h.setError=function(a,i){this.Fr=a,this.Br=i},h.build=function(){var a,i=this.Rr,o=this.ut,u=this.ut.stat,p=performance.now(),T=Math.round(p-this.Sr),L=this.Pr(i,this.Dr),V=o.mse?this.Pr((a=o.mse)==null?void 0:a.stat,this.Dr):void 0,W=this.Pr(Js(this.Rr),this.Dr),$=this.Pr(this.ut.loadRec,this.Dr),te=this.ut.loadRec.downloadInfoByRange(T),Te=te.timeCost?Math.round(te.size/te.timeCost*1e3):0,ie={tick_index:this.Tr,tick_start:this.Or,tick_duration:T,error_code:this.Fr,error_message:this.Br,block_cnt:L.blockCount||0,render_block_cnt:L.renderBlockCount||0,decoded_video_frames:L.decodedFrames||0,dropped_video_frames:(L.droppedFrames||0)+(L.muxDroppedFrames||0),segment_cnt:L.segment||0,play_duration:W.play||0,buffer_time:W.buffer||0,actual_play_duration:W.actualPlay||0,played_video_duration:W.play||0,traffic:Math.round((($==null?void 0:$.traffic)||0)/1024),hidden:$s()?1:0,download:L.download,download_speed:Te,seek_cnt:L.seekCnt,seek_load_cnt:L.seekLoadCnt,pause_duration:W.pause,pause_cnt:L.pauseCnt,on_line_change:L.onLineChange,visibility_change:L.visibilityChange,heartbeat_timeout:L.heartbeatTimeout,load_cnt:L.loadCnt,refresh_cnt:L.refreshCnt,media_buffered_a:i.bufferedEndA,media_buffered_v:i.bufferedEndV};return l()(ie,mn(),Hs(o,i),yn(),gn(),function(Le){var ke,_e,Ue,Xe,ut;return Le.mse?(Xe=Le.mse.bufferedByType(G.VIDEO),ut=Le.mse.bufferedByType(G.AUDIO)):Xe=ut=Le.mediaBufferedSec,{a_buf_start:Math.round(1e3*ut.start)||0,a_buf_end:Math.round(1e3*ut.end)||0,a_buf_len:Math.round(1e3*Math.max(0,ut.end-Le.currentTime))||0,a_buf_slices:((ke=Le.mse)==null?void 0:ke.bufferSliceNumByType(G.AUDIO))||Le.bufferSliceNum||0,v_buf_start:Math.round(1e3*Xe.start)||0,v_buf_end:Math.round(1e3*Xe.end)||0,v_buf_len:Math.round(1e3*Math.max(0,Xe.end-Le.currentTime))||0,v_buf_slices:((_e=Le.mse)==null?void 0:_e.bufferSliceNumByType(G.VIDEO))||Le.bufferSliceNum||0,buffer_queue_cnt:((Ue=Le.mse)==null?void 0:Ue.pendingNum())||0}}(o),function(Le){if(Le.stat.isLive&&Le.stat.box===y.flv){var ke,_e,Ue,Xe=(ke=Le.liveTime)==null?void 0:ke.getDisplayDelay(Le.currentTime);if(Xe)return{v_rec_delay:(_e=Le.liveTime)==null?void 0:_e.getRecDelay(),v_render_delay:Xe||0,a_render_delay:((Ue=Le.liveTime)==null?void 0:Ue.getAudioRenderDelay(Le.currentTime))||0}}return{}}(o),zs(o)),this.jr.hasData&&(ie.retry_record=this.jr.beacon,ie.retry_cnt=this.jr.retryCount,this.jr.clear()),L.wasmDecErr&&(ie.wasm_dec_err=L.wasmDecErr),$.muxA&&(ie.mux_a=$.muxA),$.muxV&&(ie.mux_v=$.muxV),$.fillA&&(ie.fill_a=$.fillA),$.fillV&&(ie.fill_v=$.fillV),$.droppedA&&(ie.dropped_a=$.droppedA),$.droppedV&&(ie.dropped_v=$.droppedV),L.muxDroppedFrames&&(ie.mux_dropped_video_frames=L.muxDroppedFrames),u.coreType===H.mse&&(ie.mse_update_cnt=(V==null?void 0:V.mseUpdate)||0,ie.mse_remove_cnt=(V==null?void 0:V.mseRemove)||0,ie.key_frame_cnt=L.keyFrame,u.isLive?(ie.live_shift_type=o.stat.liveShiftType,o.isLiveShift&&(ie.live_shift=o.stat.liveShiftActive?1:0)):(ie.lazyload_min=Math.floor(u.lazyLoadRecoverDuration),ie.lazyload_max=Math.floor(u.lazyLoadMaxDuration)),L.audioRemuxSampleCount&&(ie.a_remux_sample_cnt=L.audioRemuxSampleCount),L.videoRemuxSampleCount&&(ie.v_remux_sample_cnt=L.videoRemuxSampleCount),L.audioRemuxDuration&&(ie.a_remux_duration=Math.floor(1e3*L.audioRemuxDuration)),L.videoRemuxDuration&&(ie.v_remux_duration=Math.floor(1e3*L.videoRemuxDuration))),this.Cr&&(this.Nr===void 0?ie.first_screen_total_duration=0:(ie.first_screen_total_duration=this.Nr,ie.first_screen_details=this.Lr,u.coreType===H.mse&&u.box===y.mp4&&(ie.mp4_moov_size=i.mp4MoovSize,i.mp4FastStart!==void 0&&(ie.mp4_fast_start=i.mp4FastStart?0:1)),this.Lr=void 0,this.Nr=void 0,this.Cr=!1)),typeof this.Ir=="number"&&i.playStartTime&&(ie.click_to_first_frame=this.Ir,this.Ir>0&&(this.Ir=void 0)),this.Tr===1&&l()(ie,mn(),js(this.ut),Gs()),this.Ur(),this.Tr++,ie},n}(),Et="monitor",Qh=function(n){function h(i){var o;return(o=n.call(this)||this).Vr=void 0,o.Hr=void 0,o.Wr=void 0,o.ut=void 0,o.J=void 0,o.Gr=void 0,o.Rr=void 0,o.Qr=void 0,o.Yr=!1,o.Jr=!1,o.Zr=!1,o.zr=!1,o.Kr=function(){o.Rr.onLineChange++},o.qr=function(u){var p;u===void 0&&(u=It.NORMEL);try{var T;p=(T=o.Qr)==null?void 0:T.build()}catch(V){}if(p){var L;u===It.NORMEL&&p.first_screen_total_duration>0?(p.type=It.FIRST_FRAME,p.metadata=Vs(o.data)):(u===It.LOAD&&l()(p,Ks(o.ut)),p.type=u),o.zr&&(l()(p,Ws((L=o.ut.loadRec.currentLoad)==null?void 0:L.mediaInfo)),o.zr=!1),o.ut.stat.isLive||(p.seek_record=o.Rr.seekRecord.slice(0),o.Rr.seekRecord=[]),o.J.i(Et,"realtime beacon",p),o.emit(q.REPORT,{type:_t.REALTIME_BEACON,value:p})}},o.Wr=performance.now(),o.Hr=Date.now(),o.Gr=new Gh(i),o.ut=i,o.J=i.logger,o.Xr(),vt||(window.addEventListener("online",o.Kr),window.addEventListener("offline",o.Kr)),o}R()(h,n);var a=h.prototype;return a.getName=function(){return Et},a.Xr=function(){var i;this.Jr=!1,this.Zr=!1,this.zr=!1,this.Rr=(i={decodedFrames:0,droppedFrames:0,muxDroppedFrames:0,sessionId:$h(),creationTime:0,startTime:0,loadStartTime:0,playStartTime:0,metadataTime:0,playingStartTime:0,playDuration:0,actualPlayDuration:0,pauseDuration:0,pauseCnt:0,bufferTime:0,blockCount:0,renderBlockCount:0,seekCnt:0,seekDuration:0,seekLoadCnt:0,seekLoadDuration:0,seekStartTime:0,unknownTSPacketCount:0,audioNonMonotonous:0,startBitrate:0,smoothBitrate:-1,useBackup:0,aacOverhead:0,errorCode:0,errorMessage:"",download:0,reuse:0,playPos:0,seekRecord:[],codecs:"",firstScreenTotalDuration:0,clickToFirstFrame:0,playToEnd:0,keyFrame:0,onLineChange:0,visibilityChange:0,lastHeartbeatTime:0,heartbeatTimeout:0,loadCnt:0,refreshCnt:0,monkeyPatchedFetch:"",bufferedEndA:0,bufferedEndV:0,wasmDecErr:0,audioRemuxSampleCount:0,videoRemuxSampleCount:0,audioRemuxDuration:0,videoRemuxDuration:0},Ie.isSupported()&&(i.monkeyPatchedFetch=ze(fetch,"fetch")),i),this.Rr.creationTime=this.Hr,this.J.i(Et,"reset",this.Rr.sessionId),this.ut.fps.reset(),this.ut.fps.getFPS(this.ut.videoPlaybackQuality)},a.onRendererInitComplete=function(i){this.J.i(Et,"renderer init complete. type: "+i.type),this.data.canvasCtxType=i.type},a.onLoaderChunkArrival=function(i){this.ut.loadRec.onDataReceive(i),this.$r(je.DATA)},a.onMediaConnected=function(i){i.headers&&(this.Rr.httpHeader=i.headers),this.$r(je.STREAM_CONNECTED)},a.onMediaDemux=function(){this.$r(je.DEMUX,performance.now())},a.onKeyFrame=function(i){this.ut.loadRec.currentLoad&&this.ut.loadRec.currentLoad.keyFrame++,this.data.keyFrame++,i&&this.emit(q.REPORT,{type:_t.KEY_FRAME,value:i})},a.onDecLibLoaded=function(i){this.Rr.decLibLoadDuration=i.duration,this.Rr.decLibCacheHit=i.hitCache},a.onNewSource=function(i){var o=this.Rr,u=this.ut.lctx.current;u?(this.ut.loadRec.onStreamOpen(i.sync,u.currentUrl,u.bitrate,u.qualityType),o.level=this.ut.lctx.currentIdx,o.startQualityType||(o.startQualityType=u.qualityType)):this.ut.loadRec.onStreamOpen(i.sync,"",0,"unknown")},a.onDiscontinuity=function(i){this.emit(q.REPORT,{type:_t.DISCONTINUITY,value:i})},a.onDownload=function(i){var o=this,u=this.Rr;i.error_code&&!this.Gr.complete&&this.Gr.onDownloadError(),u.download++;var p=l()({use_backup:u.useBackup,first_screen:u.firstScreenTotalDuration?1:0},Fs(this.ut,u),yn(),gn(),Bs(),i);i.error_code===1009?setTimeout(function(){o.emit(q.REPORT,{type:_t.DOWNLOAD,value:p})},0):this.emit(q.REPORT,{type:_t.DOWNLOAD,value:p})},a.onHeartbeat=function(){var i,o,u=this.Rr,p=this.ut,T=p.fps.getFPS(this.ut.videoPlaybackQuality),L={},V=p.loadRec,W=performance.now();u.lastHeartbeatTime&&W-u.lastHeartbeatTime>1500&&u.heartbeatTimeout++,u.lastHeartbeatTime=performance.now(),(p.stat.coreType===H.mse||p.stat.coreType===H.rtc)&&(L.totalReceive=V.traffic,L.speed=V.speed,L.videoDataRate=((i=V.currentLoad)==null?void 0:i.videoDataRate)||0,L.audioDataRate=((o=V.currentLoad)==null?void 0:o.audioDataRate)||0),p.mse&&(L.videoBuffered=u.bufferedEndV=Math.round(Math.max(0,1e3*(p.mse.bufferedEndByType(G.VIDEO)-p.currentTime))),L.audioBuffered=u.bufferedEndA=Math.round(Math.max(0,1e3*(p.mse.bufferedEndByType(G.AUDIO)-p.currentTime))),L.fillAudio=V.fillA,L.fillVideo=V.fillV,L.keyFrame=u.keyFrame,p.stat.isLive?(L.isLive=p.stat.isLive,p.stat.liveShiftType&&(L.liveShift=p.stat.liveShiftActive)):(L.lazyloadMin=p.stat.lazyLoadRecoverDuration,L.lazyloadMax=p.stat.lazyLoadMaxDuration)),L.buffered=Math.round(1e3*p.bufferedSec),L.decodedFPS=(T==null?void 0:T.decodedFPS)||0,L.droppedFPS=(T==null?void 0:T.droppedFPS)||0,u.decodedFrames=L.decodedFrames=(T==null?void 0:T.decoded)||0,u.droppedFrames=L.droppedFrames=((T==null?void 0:T.dropped)||0)+u.muxDroppedFrames,p.stat.isLive&&p.stat.box===y.flv&&p.liveTime&&(L.audioRenderDelay=p.liveTime.getAudioRenderDelay(p.currentTime),L.displayDelay=p.liveTime.getDisplayDelay(p.currentTime),L.recDelay=p.liveTime.getRecDelay()),p.stat.decoder===E.wasm&&(L.wasmFrameBufLen=p.stat.frameBufLen),L.playPos=1e3*p.currentTime,this.J.i(Et,"heartbeat",L),this.emit(q.REPORT,{type:_t.HEARTBEAT,value:L})},a.destroy=function(){this.J.i(Et,"destroy"),this.qr(It.END),this.tA(),vt()||(window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Kr)),n.prototype.destroy.call(this)},a.onLoad=function(i){if(this.J.i(Et,"on load: "+i.type),this.Rr.loadCnt++,this.Rr.metadata=void 0,i.type)i.type!==ue.internal&&i.type!==ue.retry||this.Gr.complete||this.Gr.start(),this.Rr.errorCode=0,this.Rr.errorMessage="";else{var o;if((o=this.ut.lctx.current)==null||o.currentUrl,this.Rr.startTime){var u=this.Rr.reuse;this.Xr(),this.Rr.reuse=u+1}this.Rr.startTime=performance.now(),this.Rr.loadStartTime=Date.now(),this.Gr.start(),this.Yr=$s(),this.tA(),this.Qr=new Yh(this.Rr,this.ut),this.qr(It.LOAD)}},a.onStopLoad=function(){this.qr(It.END),this.tA(),this.iA()},a.onManifestParsed=function(i){this.J.i(Et,"on manifest:",i);var o=this.ut.lctx.current;o&&(this.Rr.startBitrate||(this.Rr.startBitrate=o.bitrate)),this.$r(je.MANIFEST)},a.onLevelUpdated=function(i){this.$r(je.LEVEL)},a.onAudioTrackUpdated=function(){},a.onMediaInfo=function(i){var o,u,p,T=this.ut;(i=i||{}).box=T.stat.box,i.tagName=(o=T.video)==null?void 0:o.tagName,T.stat.srcMeta&&(i.srcMeta=T.stat.srcMeta),(u=T.lctx.current)!=null&&u.meta&&(i.currentLevelMeta=(p=T.lctx.current)==null?void 0:p.meta),typeof T.stat.isLive=="boolean"&&(i.isLive=T.stat.isLive),i.liveShiftEnabled=T.isLiveShift,i.liveShiftType=T.stat.liveShiftType,i.packName=yt.packName,T.loadRec.onMediaInfo(i);var L=[];i.videoCodec&&L.push(i.videoCodec),i.audioCodec&&L.push(i.audioCodec),this.Rr.codecs=L.join(","),this.Rr.startCodec||(this.Rr.startCodec=this.Rr.codecs),i.sid=this.Rr.sessionId,i.hardwareAccelerated=me.isSupportHW,i.coreType=T.stat.coreType,!i.streamHost&&T.lctx.currentUrl&&(i.streamHost=new Lt.a(T.lctx.currentUrl).host);var V,W=sn();W.renderer&&(i.gpu=W.renderer),T.loadRec.currentLoad&&(T.loadRec.currentLoad.mediaInfo=i),T.config.ntp&&T.stat.isLive!==!1&&T.stat.box===y.flv&&((V=T.liveTime)==null||V.ntpSync(T.stat.preferNativeLoader)),T.stat.isKwaiSlice&&(i.isKwaiSlice=T.stat.isKwaiSlice);var $=JSON.stringify(i);this.J.i(Et,"mediainfo",$),this.zr=!0,this.emit(q.REPORT,{type:_t.MEDIA_INFO,value:JSON.parse($)})},a.onParsingData=function(i){var o=this.Rr;i.extra&&i.extra.stat&&(o.unknownTSPacketCount=o.unknownTSPacketCount||i.extra.stat.unknownTSPacketCount||0,o.audioNonMonotonous=o.audioNonMonotonous||i.extra.stat.audioNonMonotonous||0,o.aacOverhead=o.aacOverhead||i.extra.stat.aacOverhead||0),i.segments.forEach(function(u){u.type===G.VIDEO?(u.droppedFrames&&(o.muxDroppedFrames+=u.droppedFrames),o.videoRemuxSampleCount+=u.sampleCount,o.videoRemuxDuration+=u.endDTS-u.startDTS):u.type===G.AUDIO&&(o.audioRemuxSampleCount+=u.sampleCount,o.audioRemuxDuration+=u.endDTS-u.startDTS)}),this.$r(je.SEGMENT)},a.onPrivNal=function(i){var o;(o=this.ut.liveTime)==null||o.onPrivNal(i),this.emit(q.REPORT,{type:_t.PRIV_NAL,value:i})},a.onSei=function(i){this.emit(q.REPORT,{type:_t.SEI,value:i})},a.onAacPriv=function(i){this.emit(q.REPORT,{type:_t.AAC_PRIV,value:i})},a.onPlay=function(){this.Rr.playStartTime||(this.Rr.playStartTime=Date.now()),this.eA()},a.onLoadedmetadata=function(){this.$r(je.LOADEDMETADATA),this.Rr.metadataTime||(this.Rr.metadataTime=Date.now())},a.onLoadeddata=function(){this.$r(je.LOADEDDATA),this.iA()},a.onCanplay=function(){this.$r(je.CANPLAY),ee.safari&&this.ut.stat.coreType!==H.mse||this.iA()},a.onPlaying=function(){var i;ee.ios&&((i=this.ut.video)==null?void 0:i.readyState)!==4||(this.Jr||(this.Jr=!0),this.nA(),this.rA(),this.iA())},a.onPause=function(){var i;(i=this.ut.video)!=null&&i.seeking||!this.Jr||(this.AA(),this.oA(),this.Jr=!1)},a.onEnded=function(){this.Rr.playToEnd++,this.Jr=!1,this.AA(),this.rA(),this.iA(),this.qr(It.END),this.tA()},a.onWaiting=function(i){this.Rr.playPos=Math.round(1e3*this.ut.currentTime),this.Jr&&this.Gr.complete&&i.block&&this.sA(i.bufferedSec)},a.onSeeking=function(i){this.Rr.seekRecord.push({from:this.Rr.playPos,to:Math.round(1e3*this.ut.currentTime),time:Date.now()}),this.Rr.seekRecord.length>50&&this.Rr.seekRecord.shift(),this.ut.stat.isLive||i!=null&&i.internal||(this.Rr.seekStartTime=performance.now())},a.onSeekWithLoad=function(){this.Gr.complete&&(this.qr(It.SEEK),this.uA(),this.Zr=!0)},a.onSeeked=function(){if(this.ut.fps.getFPS(this.ut.videoPlaybackQuality),this.Rr.seekStartTime){this.Rr.seekCnt++;var i=Math.round(performance.now()-this.Rr.seekStartTime);this.Rr.seekDuration+=i,this.Rr.seekStartTime=0,this.Zr&&(this.Rr.seekLoadCnt++,this.Rr.seekLoadDuration+=i)}this.Zr=!1,this.Gr.complete||this.ut.stat.coreType===H.mse||!ee.safari&&!ee.msie||this.$r(je.SEEKED)},a.onTimeupdate=function(){var i,o,u=this.ut,p=u.video;if(p){p.loop&&!u.stat.isLive&&u.currentTime===0&&Number.isFinite(p.duration)&&p.duration>0&&p.duration-this.Rr.playPos/1e3<1&&this.Rr.playToEnd++;var T=Math.round(1e3*u.currentTime);ee.msie&&u.stat.coreType!==H.mse&&this.Rr.bufferingStartMS&&this.Rr.playPos!==T&&this.onPlaying(),this.Rr.playPos=T,!ee.ios||typeof this.Rr.bufferingStartMS!="number"||((i=this.ut.video)==null?void 0:i.readyState)!==4||(o=this.ut.video)!=null&&o.paused||this.onPlaying()}},a.onProgress=function(){var i;ee.safari&&this.ut.stat.coreType!==H.mse&&this.Rr.bufferingStartMS&&((i=this.ut.video)==null?void 0:i.readyState)===4&&this.iA()},a.mediaCapabilities=function(i){this.Rr.smoothBitrate=i},a.onLevelSwitching=function(i){i.smooth||(this.qr(It.LEVEL_SWITCH),this.uA())},a.onRetry=function(i){this.ut.stat.retryInfo.append(i),i.type===w.BACKUP&&(this.Rr.useBackup=1),this.Gr.onRetry(),i.type===w.BACKUP&&(this.Qr&&this.Qr.setError(i.code||0,i.message||""),this.qr(It.BACKUP),this.Qr&&this.Qr.setError(0,""))},a.onRefresh=function(){this.Rr.refreshCnt++},a.onMetadata=function(i){this.Rr.metadata||(this.Rr.metadata=i),i.mp4MoovSize&&(this.Rr.mp4MoovSize=i.mp4MoovSize),typeof i.mp4FastStart=="boolean"&&(this.Rr.mp4FastStart=i.mp4FastStart),typeof i.mp4MoovNoPs=="boolean"&&(this.Rr.mp4MoovNoPs=i.mp4MoovNoPs),typeof i.compatible_brands=="string"&&(this.Rr.mp4CompatibleBrands=i.compatible_brands),this.J.i(Et,"metadata",i),this.emit(q.REPORT,{type:_t.METADATA,value:i})},a.onVisibilityChange=function(){this.Rr.visibilityChange++},a.onError=function(i){i.preventFollowUp||(i.fatal?(this.J.i(Et,"error",i),this.Rr.errorCode=i.code,this.Rr.errorMessage=i.reason,this.Qr&&this.Qr.setError(i.code,i.reason),this.AA(),this.rA(),this.iA()):i.details===be.DECODER_DEC_ERROR&&this.Rr.wasmDecErr++)},a.$r=function(i,o){o===void 0&&(o=0),!this.Gr.complete&&this.Gr.process(i,o)&&this.aA()},a.nA=function(){this.Rr.playingStartTime||(this.Rr.playingStartTime=Date.now()),this.Rr.playStartMS=this.Rr.playStartMS||performance.now(),this.Rr.actualPlayStartMS=this.Rr.actualPlayStartMS||performance.now()},a.AA=function(){this.Rr.playStartMS&&(this.Rr.playDuration+=performance.now()-this.Rr.playStartMS),this.Rr.actualPlayStartMS&&(this.Rr.actualPlayDuration+=performance.now()-this.Rr.actualPlayStartMS),this.Rr.playStartMS=void 0,this.Rr.actualPlayStartMS=void 0},a.oA=function(){this.Rr.pauseCnt++,this.Rr.pauseStartMS=this.Rr.pauseStartMS||performance.now()},a.rA=function(){this.Rr.pauseStartMS&&(this.Rr.pauseDuration+=performance.now()-this.Rr.pauseStartMS),this.Rr.pauseStartMS=void 0},a.sA=function(i){this.Rr.bufferingStartMS||(this.Rr.blockCount++,this.Rr.bufferingStartMS=performance.now(),i>.6&&this.Rr.renderBlockCount++),this.Rr.actualPlayStartMS&&(this.Rr.actualPlayDuration+=performance.now()-this.Rr.actualPlayStartMS),this.Rr.actualPlayStartMS=void 0},a.iA=function(){this.Rr.bufferingStartMS&&(this.Rr.bufferTime+=performance.now()-this.Rr.bufferingStartMS,this.Rr.bufferingStartMS=void 0)},a.aA=function(){this.J.i(Et,"first frame"),this.ut.stat.firstFrameLoaded=!0;var i=this.Rr;i.firstScreenTotalDuration=i.firstScreenTotalDuration||Math.round(this.Gr.duration),i.firstScreenDetails=i.firstScreenDetails||this.Gr.details,i.playStartTime&&this.Gr.complete?i.clickToFirstFrame=i.clickToFirstFrame||Math.max(1,this.Gr.complete-i.playStartTime):i.clickToFirstFrame=1,this.Qr&&this.Qr.setFirstScreenDuration(this.Gr.duration,this.Gr.details,i.clickToFirstFrame),this.ut.video&&!this.ut.video.paused&&this.nA()},a.eA=function(){this.Vr===void 0&&(this.Vr=setInterval(this.qr,1e4))},a.tA=function(){this.Vr&&(clearTimeout(this.Vr),this.Vr=void 0)},a.uA=function(){this.tA(),this.eA()},f()(h,[{key:"runningStartTime",get:function(){return this.Wr}},{key:"sid",get:function(){return this.Rr.sessionId}},{key:"snapshot",get:function(){var i=this.ut.loadRec,o=this.ut.stat;return l()({streams:i.streams,live:o.isLive,liveShift:o.liveShiftActive,demuxer:o.demuxerType,decSimd:o.wasmSimd,decThreads:o.wasmThreads,decoderType:o.wasmDecoder},this.Rr)}},{key:"data",get:function(){return this.Rr}},{key:"audienceStat",get:function(){var i,o=this.Rr,u=Js(o),p=this.ut.stat,T=this.ut.loadRec,L={play_duration:u.play,actual_play_duration:u.actualPlay,traffic:Math.round(T.traffic/1024),buffer_time:u.buffer,block_cnt:o.blockCount,render_block_cnt:o.renderBlockCount,click_to_first_frame:o.playStartTime&&o.clickToFirstFrame||0,first_screen_total_duration:Math.round(o.firstScreenTotalDuration)||0,first_screen_details:o.firstScreenDetails||this.Gr.details||null,error_code:o.errorCode||0,error_message:o.errorMessage||"",remux_process_type:(this.ut.streamingMuxEnabled?1:0)+(p.gopRemux?1:0),hidden_start:this.Yr?1:0,current_running_time:Math.round(performance.now()-o.startTime),running_time:Math.round(performance.now()-this.Wr),smooth_bitrate:o.smoothBitrate,start_bitrate:o.startBitrate||0,abr:this.ut.config.adaptive?1:0,pause_cnt:o.pauseCnt,traffic_vcodec:T.trafficGroupedByVCodecType,traffic_level:T.trafficGroupedByLevel,decoded_video_frames:o.decodedFrames,dropped_video_frames:o.droppedFrames+o.muxDroppedFrames,pause_duration:u.pause,seek_cnt:o.seekCnt,seek_duration:o.seekDuration,seek_load_cnt:o.seekLoadCnt,seek_load_duration:o.seekLoadDuration,start_sec:p.isLive?0:Math.round(this.ut.config.startFromSec||0),on_line_change:o.onLineChange,visibility_change:o.visibilityChange,heartbeat_timeout:o.heartbeatTimeout,load_cnt:o.loadCnt,refresh_cnt:o.refreshCnt,media_buffered_v:o.bufferedEndV,media_buffered_a:o.bufferedEndA,remux_worker:this.ut.stat.webWorker?1:0,av_separated:this.ut.stat.avSeparated?1:0};if(p.retryInfo.hasData&&(L.retry_record=p.retryInfo.mergedBeacon,L.retry_cnt=p.retryInfo.retryCount),o.wasmDecErr&&(L.wasm_dec_err=o.wasmDecErr),l()(L,mn(),Hs(this.ut,o),yn(),gn(),Ws((i=this.ut.loadRec.currentLoad)==null?void 0:i.mediaInfo),js(this.ut),Ks(this.ut),zs(this.ut),Gs()),L.metadata=Vs(o),p.coreType===H.mse&&this.ut.mse&&(L.mse_buffer_full=this.ut.mse.stat.mseBufferFull,L.mse_remove=this.ut.mse.stat.mseRemove,L.key_frame_cnt=o.keyFrame,p.box===y.mp4&&(L.mp4_moov_size=o.mp4MoovSize,o.mp4CompatibleBrands!==void 0&&(L.mp4_compatible_brands=o.mp4CompatibleBrands),o.mp4FastStart!==void 0&&(L.mp4_fast_start=o.mp4FastStart?1:0),o.mp4MoovNoPs!==void 0&&(L.mp4_moov_no_ps=o.mp4MoovNoPs?1:0)),L.a_remux_sample_cnt=o.audioRemuxSampleCount,L.v_remux_sample_cnt=o.videoRemuxSampleCount,L.a_remux_duration=Math.floor(1e3*o.audioRemuxDuration),L.v_remux_duration=Math.floor(1e3*o.videoRemuxDuration)),typeof this.ut.config.audioEnabled=="boolean"&&(L.a_enabled=this.ut.config.audioEnabled?1:0),typeof this.ut.config.videoEnabled=="boolean"&&(L.v_enabled=this.ut.config.videoEnabled?1:0),T.muxA&&(L.mux_a=T.muxA),T.muxV&&(L.mux_v=T.muxV),T.fillA&&(L.fill_a=T.fillA),T.fillV&&(L.fill_v=T.fillV),T.droppedA&&(L.dropped_a=T.droppedA),T.droppedV&&(L.dropped_v=T.droppedV),o.muxDroppedFrames&&(L.mux_dropped_video_frames=o.muxDroppedFrames),fe(p.box)&&(L.unknown_ts_packet_count=o.unknownTSPacketCount,L.audio_non_monotonous=o.audioNonMonotonous,L.aac_overhead=o.aacOverhead),typeof o.decLibLoadDuration=="number"&&(L.dec_lib_load_duration=Math.round(o.decLibLoadDuration),L.dec_lib_hit=o.decLibCacheHit||""),this.ut.stat.coreType===H.native){var V=this.ut.stat.retryInfo.getLastMseError();V&&(L.last_error_code=o.errorCode,L.last_error_message=o.errorMessage,L.error_code=V.code,L.error_message=V.reason)}return L}}])}(on),we="kernel",qs=function(n){function h(i,o){var u;return(u=n.call(this)||this).zt=void 0,u.ut=void 0,u.hA=void 0,u.ii=void 0,u.cA=new A.EventEmitter,u.J=void 0,u.fA=!1,u.vA=void 0,u.ot=void 0,u.dA=void 0,u.lA=function(p){var T=u.ut;p.levels=T.lctx.levels.map(function(W){return W.getKLevel()}),p.currentLevel=T.lctx.currentIdx,p.auto=T.lctx.abr,p.levels=T.lctx.levels.map(function(W){return W.getKLevel()});var L=T.lctx.audioTracks;L&&L.length&&(p.audioTrack=T.lctx.audioIdx,p.audioTracks=L.map(function(W){return{lang:W.lang,qualityLabel:W.qualityLabel,qualityType:W.qualityType,bitrate:W.bitrate,groupId:W.groupId}}));var V=T.lctx.subtitleTracks;V&&V.length&&(p.subtitleTrack=T.lctx.subtitleIdx,p.subtitleTracks=V.map(function(W){return{lang:W.lang,name:W.name,groupId:W.groupId}})),p.currentLevel=T.lctx.currentIdx,p.auto=T.lctx.abr,p.isLive=T.stat.isLive,T.stat.stereoType!==void 0&&(p.stereoType=T.stat.stereoType)},u.pA=function(p){u.mA(p)},u.yA=function(p){p.type===ue.retry&&(u.ii=void 0)},u.MA=function(p){p.pos=Math.floor(u.zt.currentTime),p.ts=Math.floor(performance.now())},u.H=function(p){if(u.J.i(we,"on error",p),!p.preventFollowUp){var T=u.ut;if(p.details===be.MANIFEST_PARSING_ERROR)try{xs.isSrcEmpty(u.ut.src)&&(u.J.i(we,"src empty",u.ut.src),p.details=be.SRC_EMPTY),T.src?typeof T.src=="string"?p.reason+="src str:"+T.src.slice(0,1024):T.src instanceof Blob?p.reason+="src: blob":p.reason+="src other:"+JSON.stringify(T.src).slice(0,1024):p.reason+="src:"+T.src}catch(V){p.reason+=V.message}var L=ae(p.details,p.reason,p.statusCode||0);p.code=L,u.ii||(u.ii=p),p.fatal&&u.stopLoad()}},u.wA=function(p){u.J.i(we,"window error:",p.message);try{u.J.i(we,"window error stack:",p.error.stack)}catch(T){}},u.bA=function(){u.ut.evt.emit(q.VISIBILITY_CHANGE,{hidden:document.hidden})},u.zt=i,u.ut=new yt(o||{},u.zt),u.gA(),u.J=u.ut.logger,typeof location<"u"&&u.J.i(we,"href: "+location.href),u.J.i(we,yt.packName+", "+yt.version+" build: "+yt.buildTime+" cors: "+(i==null?void 0:i.crossOrigin)+" autoplay: "+(i==null?void 0:i.autoplay)+" dom: "+i.tagName,o),(!u.ut.config||u.ut.config.audioEnabled===!1&&u.ut.config.videoEnabled===!1)&&setTimeout(function(){u.kA(le(Fe.OTHER_ERROR,be.CONFIG_ERROR,"config data error"))},0),u.hA=new Qh(u.ut),u.ut.config.src&&(u.dA=u._A()),u.vA=new Ah(u.ut,function(p){var T;return(T=u.dA)==null?void 0:T.internalSeek(p)}),u.ot=new rh(u.J,u.ut.evt),u.ot.register(u.vA),u.ot.register(u.hA),u.ot.register(new nh(u.ut,u.cA)),u.F.push(u.ot,u.vA,u.hA),u.J.i(we,"config",u.ut.config),yt.instanceCount++,vt()||(window.addEventListener("error",u.wA),document.addEventListener("visibilitychange",u.bA)),u}R()(h,n),h.isSupport=function(i){if(y.webrtc===(i==null?void 0:i.box))return me.isWebRTCSupported();if(i!=null&&i.nativeFirst)return me.isVideoBoxSupported(i==null?void 0:i.box);var o=me.isSupported();if(o){var u=!0;i&&(u=!(!i.isLive||i.box!==y.flv));var p=!u||de.isStreamingSupported();return o&&!!p}return me.isVideoBoxSupported(i==null?void 0:i.box)},h.videoCodecCapabilities=function(i){return me.getVideoCodecCompatibilityByCodec(i)};var a=h.prototype;return a.on=function(i,o){this.J.i(we,"call on "+i),this.cA.on(i,o)},a.once=function(i,o){this.J.i(we,"call once "+i),this.cA.once(i,o)},a.removeAllListeners=function(i){this.J.i(we,"call removeAllListeners"),this.cA.removeAllListeners(i)},a.off=function(i,o){this.J.i(we,"call off "+i),this.cA.off(i,o)},a.listeners=function(i){return this.cA.listeners(i)},a.emit=function(i,o){return this.cA.emit(i,o)},a.listenerCount=function(i){return this.cA.listenerCount(i)},a.prependListener=function(i,o){this.cA.prependListener(i,o)},a.prependOnceListener=function(i,o){this.cA.prependOnceListener(i,o)},a.load=function(i,o){var u,p=this;if(this.J.i(we,"call kernel load",i,o),this.hA.data.startTime>0&&this.J.i(we,"play summary data:",this.hA.audienceStat),i&&this.ut.setSrc(i),this.ut.src)if(h.isSupport({box:this.ut.stat.box,isLive:this.ut.stat.isLive,nativeFirst:this.ut.stat.native})){var T,L;typeof(o==null?void 0:o.startFromSec)=="number"?this.ut.stat.startFromSec=o.startFromSec:i&&(this.ut.stat.startFromSec=-1),this.ut.stat.multipart&&this.ut.config.resourceBuffer&&th(this.ut.config.resourceBufferSize),i&&((u=this.dA)==null?void 0:u.type)!==((L=this.ut).stat.box===y.webrtc?H.rtc:L.stat.native?H.native:H.mse)&&((T=this.dA)==null||T.destroy(),this.dA=void 0),this.ut.fallback.register(Ce.NEXT_DESC,new ah(this.ut).setRetryFunc(this.EA.bind(this))),this.ut.fallback.register(Ce.SWAP_264,new fh(this.ut).setRetryFunc(this.EA.bind(this))),this.Zt()}else setTimeout(function(){p.kA(le(Fe.OTHER_ERROR,be.UNSUPPORTED,"unsupported: "+p.ut.stat.box+" live: "+p.ut.stat.isLive+" native: "+p.ut.stat.native))},0);else this.kA(le(Fe.OTHER_ERROR,be.SRC_EMPTY,"url empty"))},a.getTimeNow=function(){var i;return((i=this.ut.liveTime)==null?void 0:i.serverNowMs)||null},a.setAvailableAbrLevels=function(i){this.J.i(we,"setAvailableAbrLevels",i),this.ut.lctx.availableList=i.splice(0),this.dA&&"onAbrLevelsUpdated"in this.dA&&this.dA.onAbrLevelsUpdated()},a.preload=function(i,o){this.J.i(we,"call preload")},a.isTimeinBuffered=function(i){return this.ut.stat.box!==y.webrtc&&this.ut.isTimeinBuffered(i)},a.resume=function(){var i,o,u=this;this.J.i(we,"call resume"),(i=this.dA)==null||i.resume(),this.zt.paused&&((o=this.zt.play())==null||o.catch(function(p){return u.J.i(we,"resume, call play() fail.",p)}))},a.destroy=function(){var i;this.J.i(we,"call kernel destroy. play summary data:",this.hA.audienceStat),this.fA&&(yt.instanceCount--,this.fA=!0),performance.removeEventListener&&performance.removeEventListener("resourcetimingbufferfull",Qa),this.ut.fallback.unregisterAndDestroy(Ce.NEXT_DESC),this.ut.fallback.unregisterAndDestroy(Ce.SWAP_264),this.ut.fallback.unregisterAndDestroy(Ce.SWAP_CORE),n.prototype.destroy.call(this),(i=this.dA)==null||i.destroy(),this.ut.destroy(),this.removeAllListeners(),vt()||(window.removeEventListener("error",this.wA),document.removeEventListener("visibilitychange",this.bA))},a.refresh=function(){var i,o;this.J.i(we,"call kernel refresh"),this.hA.onRefresh(),this.ii=void 0,(i=this.ut.cOutput)==null||i.reset(),(o=this.dA)==null||o.refresh()},a.stopLoad=function(){var i;this.J.i(we,"call kernel stopLoad"),(i=this.dA)==null||i.stopLoad()},a.getStreamTime=function(i){var o=this.ut.streamTime.getStreamTime(i/1e3);return o?1e3*o:NaN},a.getAudienceStat=function(){return this.hA.audienceStat},a.getMediaInfo=function(){var i;return l()({},(i=this.ut.loadRec.currentLoad)==null?void 0:i.mediaInfo)},a.experiment=function(i){this.J.i(we,"experiment",i)},a.liveEnd=function(){this.J.i(we,"call liveEnd"),this.dA&&"liveEnd"in this.dA&&this.dA.liveEnd()},a.seekToNextFrame=function(){this.J.i(we,"call seekToNextFrame"),this.dA&&"seekToNextFrame"in this.dA?this.dA.seekToNextFrame():this.RA()},a.seekToPrevFrame=function(){this.J.i(we,"call seekToPrevFrame"),this.dA&&"seekToPrevFrame"in this.dA?this.dA.seekToPrevFrame():this.RA()},a.seekByFrameIndex=function(i){if(this.J.i(we,"call seekByFrameIndex",i),this.dA&&"setCurretVideoFrame"in this.dA)return this.dA.setCurretVideoFrame(i);this.RA()},a.screenshot=function(i){var o;i&&(i=JSON.parse(JSON.stringify(i))),this.J.i(we,"call screenshot",i),(o=this.dA)==null||o.screenshot(i)},a.Zt=function(i){this.ii=void 0,this.dA||(this.dA=this._A()),this.dA&&(this.dA.load(i),this.ut.stat.coreType=this.dA.type)},a._A=function(){var i=this.ut,o=function(u){return u.stat.native?new yh(u):u.stat.box!==y.webrtc&&rt.a||u.stat.box===y.webrtc&&rt.a?new rt.a(u):void 0}(i);if(o)return this.J.i(we,"init av core. type: "+o.type),i.stat.coreType=o.type,o;this.kA(le(Fe.OTHER_ERROR,be.UNSUPPORTED,"init core error. "+i.stat.box+" native: "+i.stat.native+" unsupported."))},a.DA=function(){this.EA(H.native)},a.TA=function(){this.EA(H.mse)},a.EA=function(i){var o,u,p=this,T=this.zt.paused;!this.ut.live&&this.ut.stat.startFromSec<=0&&(this.ut.stat.startFromSec=this.zt.currentTime),(o=this.dA)==null||o.destroy(),this.dA=void 0,i!==void 0&&(this.ut.stat.native=i!==H.mse),this.ut.stat.demuxerType=void 0,this.Zt(ue.retry),T||(u=this.zt.play())==null||u.catch(function(L){return p.J.i(we,"recover, call play() fail.",L)})},a.mA=function(i){var o=this.ut.cOutput;o&&(i===void 0&&(i={enabled:!0,type:o.rendererType,canvas:o.rendererType===x.canvas&&o.canvas?o.canvas:void 0}),this.J.i(we,"video renderer change",i),i.canvas&&this.emit(q.H265_DETECTED,{canvas:i.canvas,message:"",enabled:i.enabled,decoder:E.wasm}))},a.RA=function(){this.kA(le(Fe.MEDIA_ERROR,be.CANNOT_SEEK_BY_FRAME_INDEX,"unsupported",{fatal:!1}))},a.kA=function(i){this.ut.evt.emit(q.ERROR,i)},a.gA=function(){var i=this.ut.evt;i.on(q.ERROR,this.H),i.on(q.MANIFEST_PARSED,this.lA),i.on(q.VIDEO_RENDERER_CHANGE,this.pA),i.on(q.LOAD,this.yA),i.on(q.RETRY,this.MA)},f()(h,[{key:"liveShiftType",get:function(){return this.ut.stat.liveShiftType}},{key:"liveShift",get:function(){return this.ut.stat.liveShiftActive}},{key:"liveShiftDelaySec",get:function(){return this.ut.config.liveShiftDelaySec}},{key:"currentVideoFrame",get:function(){return this.dA&&"getCurrentVideoFrame"in this.dA?this.dA.getCurrentVideoFrame():0},set:function(i){this.J.i(we,"call set currentVideoFrame",i),this.dA&&"setCurretVideoFrame"in this.dA&&this.dA.setCurretVideoFrame(i)}},{key:"totalVideoFrames",get:function(){return this.dA&&"getTotalVideoFrames"in this.dA?this.dA.getTotalVideoFrames():0}},{key:"audioTrack",get:function(){return this.ut.lctx.audioIdx||0},set:function(i){var o;this.J.i(we,"call set audioTrack",i),this.ut.config.audioEnabled===!1&&(this.J.i(we,"set audioTrack failed. conf audio enabled false"),this.emit(q.AUDIO_TRACK_SWITCH_FAILED)),this.dA&&"setAudioTrack"in this.dA&&((o=this.dA)==null||o.setAudioTrack(i))}},{key:"subtitleTrack",get:function(){return this.ut.lctx.subtitleIdx||0},set:function(i){var o;this.J.i(we,"call set subtitleTrack",i),this.dA&&"setSubtitleTrack"in this.dA&&((o=this.dA)==null||o.setSubtitleTrack(i))}},{key:"currentLevel",get:function(){return this.ut.lctx.currentIdx||0},set:function(i){if(this.J.i(we,"call set currentLevel from: "+this.ut.lctx.currentIdx+" to: "+i+" ",this.ut.lctx.abr),this.dA&&"setCurrentLevel"in this.dA)if(i<0&&!this.ut.isAbrAvailable)this.J.i(we,"set currentLevel failed. unsupported auto"),this.emit(q.LEVEL_SWITCH_FAILED);else if(this.ut.config.videoEnabled===!1)this.J.i(we,"set currentLevel failed. conf video enabled false"),this.emit(q.LEVEL_SWITCH_FAILED);else{var o;(o=this.dA)==null||o.setCurrentLevel(i)}else this.J.i(we,"set nextLevel failed. unsupported"),this.emit(q.LEVEL_SWITCH_FAILED)}},{key:"nextLevel",get:function(){return this.ut.lctx.nextIdx||0},set:function(i){if(this.J.i(we,"call set nextLevel from: "+this.ut.lctx.nextIdx+" to "+i),this.dA&&"setNextLevel"in this.dA)if(i<0&&!this.ut.isAbrAvailable)this.J.i(we,"set nextLevel failed. unsupported auto"),this.emit(q.LEVEL_SWITCH_FAILED);else if(this.ut.config.videoEnabled===!1)this.J.i(we,"set nextLevel failed. conf video enabled false"),this.emit(q.LEVEL_SWITCH_FAILED);else{var o;(o=this.dA)==null||o.setNextLevel(i)}else this.J.i(we,"set nextLevel failed. unsupported"),this.emit(q.LEVEL_SWITCH_FAILED)}},{key:"startLevel",get:function(){return this.ut.lctx.startIdx||0},set:function(i){this.J.i(we,"call set startLevel",i),this.ut.lctx.startIdx=i}},{key:"outputLog",get:function(){return this.ut.logger.getOutput()},set:function(i){this.J.i(we,"call set output log",i),this.ut.logger.setOutput(i)}},{key:"autoLevelEnabled",get:function(){return this.ut.lctx.abr}},{key:"monitorData",get:function(){return this.hA&&this.dA?l()(this.hA.snapshot,{trackBufInfo:this.dA.getTrackBufInfo()}):null}},{key:"currentLevelTimeInfo",get:function(){var i=this.ut.lctx.current;if(i&&i.timeInfo)return i.timeInfo}},{key:"instanceId",get:function(){return this.ut.id}}],[{key:"version",get:function(){return yt.version}},{key:"buildTime",get:function(){return yt.buildTime}},{key:"MediaBox",get:function(){return y}},{key:"Events",get:function(){return{REPORT:q.REPORT,ERROR:q.ERROR,LEVEL_SWITCHING:q.LEVEL_SWITCHING,LEVEL_SWITCHED:q.LEVEL_SWITCHED,LEVEL_SWITCH_PLAYING:q.LEVEL_SWITCH_PLAYING,LEVEL_SWITCH_FAILED:q.LEVEL_SWITCH_FAILED,AUDIO_TRACK_SWITCHING:q.AUDIO_TRACK_SWITCHING,AUDIO_TRACK_SWITCHED:q.AUDIO_TRACK_SWITCHED,AUDIO_TRACK_UPDATED:q.AUDIO_TRACK_UPDATED,SUBTITLE_TRACK_SWITCHED:q.SUBTITLE_TRACK_SWITCHED,MANIFEST_PARSED:q.MANIFEST_PARSED,LEVEL_UPDATED:q.LEVEL_UPDATED,LOAD_END:q.LOAD_END,VIDEO_RENDERER_CHANGE:q.VIDEO_RENDERER_CHANGE,SCREENSHOT:q.SCREENSHOT}}},{key:"Reports",get:function(){return l()({},_t)}}])}(S);function Zh(n,h){return vt()?void 0:new qs(n,h)}}]);Ke===void 0&&console.error("esm-webpack-plugin: nothing exported!");const mu=Ke.default;Ke.createKernel,Ke.AbstractDestroyable,Ke.CanvasContextType,Ke.CodecType,Ke.DestroyableList,Ke.Decoder,Ke.DemuxerType,Ke.DownloadStatus,Ke.ErrorDetails,Ke.ErrorTypes,Ke.HttpRangeType;const ht=Ke.KEvents;Ke.LiveShiftType,Ke.LogLevel,Ke.MediaBox,Ke.ReportTypes,Ke.StereoType,Ke.VideoDecBlockPolicy,Ke.VideoDropFramePolicy,Ke.VideoRendererType,Ke.WasmDecoder;const Ct={"kwai-player":"_kwai-player_1ufc0_2","kwai-player-video-interactive":"_kwai-player-video-interactive_1ufc0_11","kwai-player-poster":"_kwai-player-poster_1ufc0_19","kwai-player-video":"_kwai-player-video_1ufc0_11","kwai-player-disable-scroll":"_kwai-player-disable-scroll_1ufc0_52","kwai-player-yoda":"_kwai-player-yoda_1ufc0_56"},Sr="kwai-player-id",Lr=class Jt{static next(){if(qn.available){const e=Jt._ls.read(Sr,!1);let r=Jt._id;return typeof e=="number"?(r=this.getNextId(e),this._ls.write(Sr,r)):(r=this.getNextId(r),this._ls.write(Sr,r)),Jt._id=r,r}else return Jt._id=Jt.getNextId(Jt._id),Jt._id}static get MAX_ID(){return 999}static getNextId(e){return e++,e>Jt.MAX_ID?0:e}};X(Lr,"_id",0),X(Lr,"_ls",new qn);let gu=Lr,kr=class wn{static verify(e){return!!(e&&e.liveStreamId&&(Array.isArray(e.liveAdaptiveManifest)&&e.liveAdaptiveManifest.length||Array.isArray(e.multiResolutionPlayUrls)&&e.multiResolutionPlayUrls.length||Array.isArray(e.playUrls)&&e.playUrls.length||e.hlsPlayUrl))}static parse(e){if(wn.verify(e)){let r;return e.liveAdaptiveManifest&&e.liveAdaptiveManifest.length?r=e.liveAdaptiveManifest[0]:e.multiResolutionPlayUrls&&e.multiResolutionPlayUrls.length&&(r=wn._multiResolution2Manifest(e.multiResolutionPlayUrls)),fi&&e.hlsPlayUrl?r?[{src:r},{src:e.hlsPlayUrl}]:e.hlsPlayUrl:r}}static _multiResolution2Manifest(e){return{version:"1",adaptationSet:{representation:e.map((r,s)=>{var l;return{id:s,url:(l=r.urls[0])==null?void 0:l.url,name:r.name,bitrate:0,qualityType:r.type,defaultSelect:r.defaultSelect}}).filter(r=>r.url)}}}};var Zn=(t=>(t[t.CTOR_ERROR=1e4]="CTOR_ERROR",t))(Zn||{});class yu{static verify(e){return e&&Object.prototype.hasOwnProperty.call(e,"version")&&Object.prototype.hasOwnProperty.call(e,"adaptationSet")&&Object.prototype.hasOwnProperty.call(e.adaptationSet,"representation")&&Array.isArray(e.adaptationSet.representation)&&e.adaptationSet.representation.length>0?e.adaptationSet.representation.reduce((r,s)=>!!(r&&s.url&&s.bitrate&&s.qualityType),!0):!1}}class bu{static verify(e){return e&&e.adaptationSet&&e.adaptationSet.length?e.adaptationSet.reduce((r,s)=>!!(r&&s.representation&&s.representation.length),!0):!1}}const Eu=/\.[^./\\?#]+(?=$|[?#])/i;function wu(t){const e=t.toLocaleLowerCase().match(Eu);return e?e[0]:""}let Tu=class mr{static parse(e){if(typeof e=="string")try{return e=JSON.parse(e),mr._parseManifest(e)}catch(r){return mr._parseUrl(e)}else if(typeof e=="object")return mr._parseManifest(e)}static _parseUrl(e){return wu(e)===".flv"?{isLive:!0,src:{liveStreamId:"",playUrls:[{url:e}]}}:{isLive:!1,src:[{url:e}]}}static _parseManifest(e){return bu.verify(e)?{isLive:!1,src:e}:yu.verify(e)?{isLive:!0,src:{liveStreamId:"",liveAdaptiveManifest:[e]}}:kr.verify(e)?{isLive:!0,src:e}:{isLive:!1}}};const Xn=typeof document>"u"?void 0:document.createElement("video");function Ru(){return!!(Xn!=null&&Xn.requestPictureInPicture)}const eo="fullscreen";class Su{constructor(e,r){X(this,"_evt"),X(this,"_logger"),X(this,"_element"),X(this,"_isFillWindow",!1),X(this,"_originStyle"),X(this,"_isSupportFullscreen",!0),X(this,"_onFullscreenChange",()=>{this._logger.i(eo,"_onFullscreenChange",this.isFull()),this.isFull()||(this._recoverStyle(),document.body.classList.remove(Ct["kwai-player-disable-scroll"])),this._isFillWindow=!1,this._evt.emit("fullChange",{type:Rt.SYSTEM,isFull:this.isFull()})}),this._evt=e,this._logger=r,!(typeof document>"u")&&(this._isSupportFullscreen=typeof this._getExitFullscreenFunc()<"u"&&!(xt.os.name==="iOS"&&xt.device.type==="mobile"),"onfullscreenchange"in document?(document.addEventListener("fullscreenchange",this._onFullscreenChange),document.addEventListener("fullscreenerror",this._onFullscreenChange)):"onwebkitfullscreenchange"in document&&(document.addEventListener("webkitfullscreenchange",this._onFullscreenChange),document.addEventListener("webkitfullscreenerror",this._onFullscreenChange)))}destroy(){document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("fullscreenerror",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenerror",this._onFullscreenChange)}requestFull(e,r){r===Rt.SYSTEM?this.requestFullscreen(e):r===Rt.WINDOW?this.requestFillWindow(e):this._isSupportFullscreen?this.requestFullscreen(e):this.requestFillWindow(e)}exitFull(e){if(e===Rt.SYSTEM)return this.exitFullscreen();if(e===Rt.WINDOW)return this.exitFillWindow();this.isFull(Rt.SYSTEM)?this.exitFullscreen():this.exitFillWindow()}isFull(e){return e===Rt.SYSTEM?this.isFullScreen():e===Rt.WINDOW?this.isFillWindow():this.isFullScreen()||this.isFillWindow()}requestFullscreen(e){this._element=e,this._originStyle||this._saveOriginStyle(e),(xt.os.name==="Mac OS"||xt.browser.name==="IE"||xt.os.name==="iOS"&&xt.device.type!=="mobile")&&(e.style.width="100%",e.style.height="100%",e.style.background="black");const r=e;let s;r.requestFullscreen?s=r.requestFullscreen():r.mozRequestFullscreen?s=r.mozRequestFullscreen():r.mozRequestFullScreen?s=r.mozRequestFullScreen():r.webkitRequestFullscreen?s=r.webkitRequestFullscreen():r.webkitRequestFullScreen?s=r.webkitRequestFullScreen():r.msRequestFullscreen&&(s=r.msRequestFullscreen()),typeof Promise<"u"&&s instanceof Promise&&s.catch(l=>this._logger.e(eo,l))}exitFullscreen(){this._recoverStyle(),this._element=void 0;const e=document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()}isFullScreen(){const e=document;return!!(e.fullscreen||e.fullscreenElement||e.isFullScreen||e.webkitIsFullScreen||e.mozFullScreen||e.msFullscreenElement)}requestFillWindow(e){this._element=e,this._originStyle||this._saveOriginStyle(e),e.style.width="100%",e.style.height="100%",e.style.background="black",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.zIndex="99999",document.body.classList.add(Ct["kwai-player-disable-scroll"]),this._isFillWindow=!0,this._evt.emit("fullChange",{type:"window",isFull:!0})}exitFillWindow(){this._recoverStyle(),this._isFillWindow=!1,this._element&&(this._element.style.zIndex="auto"),this._element=void 0,document.body.classList.remove(Ct["kwai-player-disable-scroll"]),this._evt.emit("fullChange",{type:"window",isFull:!1})}isFillWindow(){return this._isFillWindow}isFullscreenAvailable(e){return e!==Rt.WINDOW&&typeof document<"u"?!!document.body.requestFullscreen||!!document.body.webkitRequestFullscreen||!!document.body.msRequestFullscreen||!!document.body.mozRequestFullscreen:!0}_getExitFullscreenFunc(){const e=document;return e.exitFullscreen||e.webkitCancelFullScreen||e.mozCancelFullScreen||e.msExitFullscreen}_saveOriginStyle(e){this._originStyle={position:e.style.position,background:e.style.background,width:e.style.width,height:e.style.height,left:e.style.left,right:e.style.right}}_recoverStyle(){if(this._element)for(const e in this._originStyle)this._element.style[e]=this._originStyle[e];this._originStyle=void 0}}const to="ControlsPlugin",io="I18nPlugin",ro="LoggerPlugin",no="HotkeyPlugin",oo="PlayInfoPlugin",ao="RotatePlugin",so="PreviewPlugin",lo="MaskPlugin",uo="VRPlugin",co="DanmakuPlugin";var ho=(t=>(t.DARK="dark",t.LIGHT="light",t))(ho||{}),fo=(t=>(t.BOTTOM="bottom",t.PLAY_BAR="playBar",t.NONE="none",t))(fo||{}),Ao=(t=>(t.PLAY_BAR_LEFT="playBarLeft",t.PLAY_BAR_RIGHT="playBarRight",t.CONTEXT_MENU="contextMenu",t))(Ao||{});class Lu{constructor(){X(this,"_callbacks",[])}add(e){this._callbacks.push(e)}remove(e){const r=this._callbacks.findIndex(s=>s===e);r>=0&&this._callbacks.splice(r,1)}call(e){this._callbacks.forEach(r=>r(e))}destroy(){this._callbacks.splice(0,this._callbacks.length)}}let ct=class extends Qn{static isInstanceOfPlugin(e){return typeof e.beforeInstall=="function"&&typeof e.afterInstall=="function"&&typeof e.beforeUninstall=="function"&&typeof e.afterUninstall=="function"&&typeof e.getLabel=="function"}get controlsSoltBtns(){}beforeInstall(e,r){}afterInstall(e,r){}beforeUninstall(e){}afterUninstall(e){}};X(ct,"label"),X(ct,"version"),X(ct,"isSupported");const po=class el extends ct{getLabel(){return el.label}beforeInstall(e,r){}afterInstall(e,r){}};X(po,"label",to);let ku=po;const vo=class tl extends ct{getLabel(){return tl.label}beforeInstall(e,r){}afterInstall(e,r){}};X(vo,"label",io);let Iu=vo;const _o=class il extends ct{getLabel(){return il.label}beforeInstall(e,r){}afterInstall(e,r){}addBizLog(e,r){}appendSummaryField(e,r){}};X(_o,"label",ro);let xu=_o;const mo=class rl extends ct{getLabel(){return rl.label}};X(mo,"label",no);let Cu=mo;const go=class nl extends ct{getLabel(){return nl.label}};X(go,"label",oo);let Du=go;const yo=class ol extends ct{getLabel(){return ol.label}};X(yo,"label",ao);let Ou=yo;const bo=class al extends ct{getLabel(){return al.label}};X(bo,"label",so);let Mu=bo;const Eo=class sl extends ct{getLabel(){return sl.label}};X(Eo,"label",lo);let Nu=Eo;const wo=class ll extends ct{getLabel(){return ll.label}};X(wo,"label",uo);let Pu=wo;const To=class ul extends ct{getLabel(){return ul.label}};X(To,"label",co);let Uu=To;const nt="pluginBase",Ro=class cl{constructor(){X(this,"_instances",[])}static register(e,r="append"){Ye.i(nt,"register",e.label,e.version),e.label||Ye.i(nt,"register plugin label is empty.");const s=this._plugins.findIndex(l=>l.label===e.label);s>=0?(Ye.i(nt,`register plugin label: ${e.label} exists.`),this._plugins.splice(s,1,e)):r==="append"?this._plugins.push(e):this._plugins.unshift(e)}static deregister(e){if(typeof e=="string"){Ye.i(nt,"deregister",e);const r=this._plugins.findIndex(s=>s.label===e);if(r===-1){Ye.i(`${e} plugin unregistered`);return}this._plugins.splice(r,1)}else{Ye.i(nt,"deregister",e.label);const r=this._plugins.indexOf(e);if(r===-1){Ye.i(`${e.label} plugin unregistered`);return}this._plugins.splice(r,1)}}initialize(e){const r=this._instances;for(const s of cl._plugins)try{if(e&&e[s.label]===!1)continue;if(s.isSupported===!1){Ye.i(nt,`initialize ${s.label}, ${s.version}. The current browser does not support this plugin.`);continue}Ye.i(nt,"initialize",s.label,s.version,e);const l=new s;ct.isInstanceOfPlugin(l)?r.push(l):Ye.e(nt,`plugin type error: ${l}`)}catch(l){Ye.e(nt,"plugin initialize error",l)}}beforeInstallPlugins(e,r){for(const s of this._instances){const l=s.getLabel();Ye.i(nt,"beforeInstallPlugins",r,l);try{if(!s.beforeInstall)continue;r&&typeof r[l]=="object"?s.beforeInstall(e,r[l]):s.beforeInstall(e)}catch(d){Ye.e(nt,"beforeInstallPlugins error",d)}}}afterInstallPlugins(e,r){for(const s of this._instances){const l=s.getLabel();Ye.i(nt,"afterInstallPlugins",l,r);try{if(!s.afterInstall)continue;r&&typeof r[l]=="object"?s.afterInstall(e,r[l]):s.afterInstall(e)}catch(d){Ye.e(nt,"afterInstallPlugins error",d)}}}beforeUninstallPlugins(e){for(const r of this._instances)try{if(Ye.i(nt,"beforeUninstallPlugins",r.getLabel()),!r.beforeUninstall)continue;r.beforeUninstall.call(r,e)}catch(s){Ye.e(nt,"plugin beforeUninstall error",s)}}afterUninstallPlugins(e){for(const r of this._instances)try{if(Ye.i(nt,"afterUninstallPlugins",r.getLabel()),!r.afterUninstall)continue;r.afterUninstall.call(r,e)}catch(s){Ye.e(nt,"plugin afterUninstall error",s)}this._instances=[]}getPlugin(e){for(let r=0;r<this._instances.length;r++)if(this._instances[r].getLabel()===e)return this._instances[r]}getAllPlugins(){return this._instances}};X(Ro,"_plugins",[]);let Ir=Ro;const Fu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAC1JREFUWEft0EERAAAAAUH6lxbDZxU4s815PffjAAECBAgQIECAAAECBAgQIDAaPwAh6O5R/QAAAABJRU5ErkJggg==",re="kwai-player",xr=class Tt{constructor(e,r){X(this,"_pluginBase",new Ir),X(this,"_eventHandlers"),X(this,"_evt"),X(this,"_mainDom"),X(this,"_video"),X(this,"_kernel"),X(this,"_error"),X(this,"_config"),X(this,"_src",""),X(this,"_autoplay",!1),X(this,"_preload","none"),X(this,"_poster",""),X(this,"_controls","default"),X(this,"_videoWidth",0),X(this,"_videoHeight",0),X(this,"_kernelLoaded",!1),X(this,"_livePaused",!1),X(this,"_canvas"),X(this,"_mediaInfo"),X(this,"_logger"),X(this,"_isLiveShift",!1),X(this,"_full"),X(this,"_subContainerNumber",0),X(this,"_data"),X(this,"_id"),X(this,"_videoLayer"),X(this,"_videoInteractiveLayer"),X(this,"_posterLayer"),X(this,"_preprocessSrcFunc"),X(this,"_preprocessURL"),X(this,"_kernelStartTimeout",0),X(this,"_instanceId"),X(this,"_yodaDom"),X(this,"_yoda"),X(this,"_kernelType","unknown"),X(this,"_outputLogger"),X(this,"_yodaEnabled",!0),X(this,"_screenshotId",1),X(this,"_screenshotQueue",[]),X(this,"_observer"),X(this,"_objectFit",""),X(this,"requestFullscreen",f=>{if(this._logger.i(re,"requestFullscreen"),!!this._mainDom){if(this._yoda){this._yoda.isFullscreen()||this._yoda.fullScreen("portrait");return}this._full.isFull(f)||this._full.requestFull(this._mainDom,f)}}),X(this,"exitFullscreen",f=>{if(this._logger.i(re,"exitFullscreen"),!!this._mainDom){if(this._yoda){this._yoda.exitFullScreen();return}this._full.isFull(f)&&this._full.exitFull(f)}}),X(this,"_onFullscreenchange",f=>{this.emit(J.FULLSCREEN_CHANGE,f)}),X(this,"_onMutedChange",f=>{this._video&&(this._video.muted=f)}),X(this,"_onVideoLoadstart",()=>{this.emit(J.LOADSTART)}),X(this,"_onVideoProgress",()=>{this.emit(J.PROGRESS)}),X(this,"_onVideoSuspend",()=>{this.emit(J.SUSPEND)}),X(this,"_onVideoAbort",()=>{this.emit(J.ABORT)}),X(this,"_onVideoEmptied",()=>{this.emit(J.EMPTIED)}),X(this,"_onVideoStalled",()=>{this.emit(J.STALLED)}),X(this,"_onVideoLoadedmetadata",()=>{this.emit(J.LOADEDMETADATA)}),X(this,"_onVideoLoadeddata",()=>{this.emit(J.LOADEDDATA)}),X(this,"_onVideoCanplay",()=>{this.emit(J.CANPLAY)}),X(this,"_onVideoCanplaythrough",()=>{this.emit(J.CANPLAYTHROUGH)}),X(this,"_onVideoPlaying",()=>{xt.os.name!=="iOS"&&xt.os.name!=="Android"&&this._hidePosterDom(),this.emit(J.PLAYING)}),X(this,"_onVideoWaiting",()=>{this.emit(J.WAITING)}),X(this,"_onVideoSeeking",()=>{this.emit(J.SEEKING)}),X(this,"_onVideoSeeked",()=>{this.emit(J.SEEKED),this.kernel&&this._updateIsLiveShift(this.kernel.liveShift)}),X(this,"_onVideoEnded",()=>{this.emit(J.ENDED)}),X(this,"_onVideoDurationchange",()=>{this.emit(J.DURATIONCHANGE)}),X(this,"_onVideoTimeupdate",()=>{var f,c;this._posterLayer.style.display!=="none"&&((f=this._video)==null?void 0:f.readyState)===4&&!((c=this._video)!=null&&c.paused)&&this._hidePosterDom(),this.emit(J.TIMEUPDATE)}),X(this,"_onVideoPlay",()=>{this.emit(J.PLAY)}),X(this,"_onVideoPause",()=>{this.emit(J.PAUSE)}),X(this,"_onVideoRatechange",()=>{this.emit(J.RATECHANGE)}),X(this,"_onVideoResize",()=>{this.emit(J.RESIZE)}),X(this,"_onVideoVolumechange",()=>{this.emit(J.VOLUMECHANGE)}),X(this,"_onVideoEnterpictureinpicture",()=>{this.emit(J.ENTER_PICTURE_IN_PICTURE)}),X(this,"_onVideoLeavepictureinpicture",()=>{this.emit(J.LEAVE_PICTURE_IN_PICTURE)});var s;if(this._instanceId=gu.next(),this._logger=new Ln().setLevel(Rr).setName(Yn).setId(this._instanceId),r!=null&&r.logger&&this._logger.setOutput(r.logger),Dl("kwai-player",Tt.packVersion),this._logger.i(re,Tt.packVersion,Tt.version,this._instanceId,e.toString(),r),this._data=r||{},typeof e=="string"?(this._id=e,this._mainDom=document.querySelector(e)):(this._id=`kp_${Math.random()*1e3|0}`,this._mainDom=e),this._evt=new Qn,this._evt.setMaxListeners(30),this._full=new Su(this._evt,this._logger),this._evt.on("fullChange",this._onFullscreenchange),this._eventHandlers={loadstart:this._onVideoLoadstart,progress:this._onVideoProgress,suspend:this._onVideoSuspend,abort:this._onVideoAbort,emptied:this._onVideoEmptied,stalled:this._onVideoStalled,loadedmetadata:this._onVideoLoadedmetadata,loadeddata:this._onVideoLoadeddata,canplay:this._onVideoCanplay,canplaythrough:this._onVideoCanplaythrough,playing:this._onVideoPlaying,waiting:this._onVideoWaiting,seeking:this._onVideoSeeking,seeked:this._onVideoSeeked,ended:this._onVideoEnded,durationchange:this._onVideoDurationchange,timeupdate:this._onVideoTimeupdate,play:this._onVideoPlay,pause:this._onVideoPause,ratechange:this._onVideoRatechange,resize:this._onVideoResize,volumechange:this._onVideoVolumechange,enterpictureinpicture:this._onVideoEnterpictureinpicture,leavepictureinpicture:this._onVideoLeavepictureinpicture},r&&typeof r.controls<"u"&&(this.controls=r.controls),this._videoLayer=document.createElement("div"),this._videoLayer.className=Ct["kwai-player-video"],this._posterLayer=document.createElement("div"),this._posterLayer.className=Ct["kwai-player-poster"],this._posterLayer.dataset.kpRole="poster",this._videoLayer.appendChild(this._posterLayer),this._videoInteractiveLayer=document.createElement("div"),this._videoInteractiveLayer.className=Ct["kwai-player-video-interactive"],this._video=document.createElement("video"),!this._mainDom){this._logger.i(re,`container not found.${e}`),this._setError({code:Zn.CTOR_ERROR,message:`container not found.${e}`});return}this._observer=new MutationObserver(f=>{for(const c of f)c.type==="attributes"&&c.attributeName==="style"&&this._applyObjectFit()});const l={attributes:!0,attributeFilter:["style"]};this._observer.observe(this._mainDom,l),this._applyObjectFit(),this._mainDom.className=this._mainDom.className?`${this._mainDom.className} ${Ct["kwai-player"]}`:Ct["kwai-player"],this._mainDom.setAttribute("role","player"),this._mainDom.appendChild(this._videoLayer),this._mainDom.appendChild(this._videoInteractiveLayer),this._video.controls=!1,this._videoLayer.appendChild(this.video),Tt._yodaClass&&(this._yodaDom=document.createElement("div"),this._yodaDom.className=Ct["kwai-player-yoda"],this._videoLayer.appendChild(this._yodaDom)),this._bindVideo(),this._pluginBase.initialize(r==null?void 0:r.plugins),this._pluginBase.beforeInstallPlugins(this,r==null?void 0:r.plugins),r&&this._parseData(r);const d=((s=this._config)==null?void 0:s.src)||this._src;d&&this._initKernel(!1),this._pluginBase.afterInstallPlugins(this,r==null?void 0:r.plugins),d&&(this._kernelStartTimeout=+setTimeout(()=>{this._clearKernelStartTimer(),this._kernelStart()},0)),this._logger.i(re,"constructor completed.")}static get version(){return"1.1.0"}get version(){return Tt.version}get packVersion(){return Tt.packVersion}get instanceId(){return this._instanceId}get kernelType(){return this._kernelType}get logger(){return this._logger}get outputLogger(){return this._outputLogger}set outputLogger(e){this._logger.i(re,"call set output logger",e),this._outputLogger=e,this._logger.setOutput(e),this._kernel&&(this._kernel.outputLog=e)}get config(){return this._logger.i(re,"call get config",this._config),this._config}set config(e){this._logger.i(re,"call set config",e),this._config=e,this._yoda||(this._initKernel(),this.emit(J.ATTRIBUTE_CHANGE_CONFIG))}get error(){return this._logger.i(re,"call get error",this._error),this._error}get videoId(){var e;return(e=this._data)==null?void 0:e.videoId}set videoId(e){this._data&&(this._data.videoId=e,this.emit(J.ATTRIBUTE_CHANGE_VIDEO_ID))}get previewUrl(){var e;return(e=this._data)==null?void 0:e.previewUrl}set previewUrl(e){this._logger.i(re,"call set previewUrl",e),this._data&&(this._data.previewUrl=e,this.emit(J.ATTRIBUTE_CHANGE_PREVIEW_URL))}get maskUrl(){var e;return(e=this._data)==null?void 0:e.maskUrl}set maskUrl(e){this._logger.i(re,"call set maskUrl",e),this._data&&(this._data.maskUrl=e,this.emit(J.ATTRIBUTE_CHANGE_MASK_URL))}get disableMask(){var e;return(e=this._data)==null?void 0:e.disableMask}set disableMask(e){this._logger.i(re,"call set disableMask",e),this._data&&(this._data.disableMask=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_MASK))}get src(){return this._logger.v(re,"call get src",this._src),this._src}set src(e){this._logger.i(re,"call set src",e),this._src=this._preprocessSrcFunc?this._preprocessSrcFunc(e):e,this._destroyKernel(),this.emit(J.ATTRIBUTE_CHANGE_SRC),this._initKernel()}get isLiveShift(){return this._isLiveShift}set liveShiftType(e){this._logger.i(re,"call set liveShiftType",e),this._data&&(this._data.liveShiftType=e,this.emit(J.LIVE_SHIFT_TYPE_CHANGE))}get liveShiftType(){var e;return((e=this._data)==null?void 0:e.liveShiftType)||ti.NONE}set crossOrigin(e){this._logger.i(re,"call set crossOrigin",e),this._video&&(this._video.crossOrigin=e),this.emit(J.ATTRIBUTE_CHANGE_CROSS_ORIGIN)}get crossOrigin(){var e;return this._logger.v(re,"call get crossOrigin",(e=this._video)==null?void 0:e.crossOrigin),this._video?this._video.crossOrigin:null}get networkState(){var e;return this._logger.v(re,"call get networkState",(e=this._video)==null?void 0:e.networkState),this._video?this._video.networkState:0}get preload(){return this._logger.v(re,"call get preload",this._preload),this._preload}set preload(e){this._logger.i(re,"call set preload",e),this._preload=e,this._video.preload=e,this.emit(J.ATTRIBUTE_CHANGE_PRELOAD)}get buffered(){var e;if(!this._yoda)return(e=this._video)==null?void 0:e.buffered}get readyState(){return this._yoda?this._yoda.readyState:this._video?this._video.readyState:0}get seeking(){var e;return this._yoda?this._yoda.seeking:!!((e=this._video)!=null&&e.seeking)}get currentTime(){return this._yoda?this._yoda.currentTime:this._video?this._video.currentTime:0}set currentTime(e){this._logger.i(re,"call set currentTime",e);try{this._yoda&&(this._yoda.currentTime=e),this._video&&(this._video.currentTime=e),this.emit(J.ATTRIBUTE_CHANGE_CURRENT_TIME)}catch(r){}}get duration(){return this._yoda?this._yoda.duration:this._video?this._video.duration:NaN}get paused(){return this._yoda?this._yoda.paused:this._video?this._video.paused:!0}get defaultPlaybackRate(){var e;return this._logger.v(re,"call get defaultPlaybackRate",(e=this._video)==null?void 0:e.defaultPlaybackRate),this._video?this._video.defaultPlaybackRate:1}set defaultPlaybackRate(e){this._logger.i(re,"call set defaultPlaybackRate",e),this._yoda&&(this._yoda.defaultPlaybackRate=e),this._video&&(this._video.defaultPlaybackRate=e),this.emit(J.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE)}get playbackRate(){return this._video?this._video.playbackRate:1}set playbackRate(e){this._logger.i(re,"call set playbackRate",e),this._yoda&&(this._yoda.playbackRate=e),this._video&&(this._video.playbackRate=e),this.emit(J.ATTRIBUTE_CHANGE_PLAYBACK_RATE)}get played(){var e;if(!this._yoda)return(e=this._video)==null?void 0:e.played}get seekable(){var e;if(!this._yoda)return(e=this._video)==null?void 0:e.seekable}get ended(){return this._yoda?this._yoda.ended:this._video?this._video.ended:!1}get autoplay(){return this._autoplay}set autoplay(e){this._logger.i(re,"call set autoplay",e),this._autoplay=e,this._yoda&&(this._yoda.autoplay=e),this.emit(J.ATTRIBUTE_CHANGE_AUTOPLAY)}get loop(){return this._yoda?this._yoda.loop:this._video?this._video.loop:!1}set loop(e){this._logger.i(re,"call set loop",e),this._video&&(this._video.loop=e),this.emit(J.ATTRIBUTE_CHANGE_LOOP)}get controls(){return this._controls}set controls(e){this._logger.i(re,"call set controls",e),e!==this._controls&&(this._controls=e),this.emit(J.ATTRIBUTE_CHANGE_CONTROLS)}get volume(){return this._yoda?1:this._video?this._video.volume:1}set volume(e){this._video&&(this._video.volume=e<0?0:e>1?1:e,this.emit(J.ATTRIBUTE_CHANGE_VOLUME))}get muted(){return this._yoda?this._yoda.muted:this._video?this._video.muted:!1}set muted(e){this._logger.i(re,`call set muted: ${e}, hasVideo: ${!!this._video}`),this._yoda&&(this._yoda.muted=e),this._video&&(this._video.muted=e),this.emit(J.ATTRIBUTE_CHANGE_MUTED)}get defaultMuted(){return this._yoda?this._yoda.defaultMuted:this._video?this._video.defaultMuted:!1}set defaultMuted(e){this._logger.i(re,"call set defaultMuted",e),this._yoda&&(this._yoda.defaultMuted=e),this._video&&(this._video.defaultMuted=e),this.emit(J.ATTRIBUTE_CHANGE_DEFAULT_MUTED)}get videoWidth(){var e;return this._videoWidth||((e=this._video)==null?void 0:e.videoWidth)}get videoHeight(){var e;return this._videoHeight||((e=this._video)==null?void 0:e.videoHeight)}get poster(){return this._poster}set poster(e){this._logger.i(re,"call set poster",e),this._poster=e,this._updatePosterDom(),this.emit(J.ATTRIBUTE_CHANGE_POSTER)}get disablePictureInPicture(){var e;return this._yoda?!0:!!((e=this._video)!=null&&e.disablePictureInPicture)}set disablePictureInPicture(e){this._logger.i(re,"call set disablePictureInPicture",e),!this._yoda&&this._video&&(this._video.disablePictureInPicture=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE))}get disableDownload(){var e;return(e=this._data)==null?void 0:e.disableDownload}set disableDownload(e){this._logger.i(re,"call set disableDownload",e),this._data&&(this._data.disableDownload=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD))}get playsinline(){var e;return!!((e=this._video)!=null&&e.hasAttribute("playsinline"))}set playsinline(e){this._logger.i(re,"call set playsinline",e),this._video&&(this._video.playsInline=e,this._video.webKitPlaysInline=e,e?(this._video.setAttribute("playsinline","playsinline"),this._video.setAttribute("webkit-playsinline","webkit-playsinline"),this._video.setAttribute("x5-playsinline","x5-playsinline")):(this._video.removeAttribute("playsinline"),this._video.removeAttribute("webkit-playsinline"),this._video.removeAttribute("x5-playsinline")),this.emit(J.ATTRIBUTE_CHANGE_PLAYSINLINE))}get disableAdaptive(){var e;return(e=this._data)==null?void 0:e.disableAdaptive}set disableAdaptive(e){this._logger.i(re,"call set disableAdaptive",e),this._data&&(this._data.disableAdaptive=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE))}get currentLevel(){var e;return((e=this._kernel)==null?void 0:e.currentLevel)||0}set currentLevel(e){var r,s,l;if(this._logger.i(re,"call set currentLevel",e,!!this._kernel,this._livePaused),this._kernel){const d=this._video.paused;this._livePaused?((r=this._kernel)==null||r.refresh(),this._kernel.currentLevel=e):(this._kernel.currentLevel=e,this.emit(J.ATTRIBUTE_CHANGE_CURRENT_LEVEL)),!d&&this._video.paused&&(this._logger.i(re,"set level. play"),(l=(s=this._video)==null?void 0:s.play())==null||l.catch(f=>this._logger.i(re,"set current level, call play() fail.",f)))}}get nextLevel(){var e;return((e=this._kernel)==null?void 0:e.nextLevel)||0}set nextLevel(e){var r,s,l;if(this._logger.i(re,"call set nextLevel",e),this._kernel){const d=this._video.paused;this._livePaused?((r=this._kernel)==null||r.refresh(),this._kernel.currentLevel=e):(this._kernel.nextLevel=e,this.emit(J.ATTRIBUTE_CHANGE_NEXT_LEVEL)),!d&&this._video.paused&&(this._logger.i(re,"set next level. play"),(l=(s=this._video)==null?void 0:s.play())==null||l.catch(f=>this._logger.i(re,"set next level, call play() fail.",f)))}}get currentVideoFrame(){var e;return((e=this._kernel)==null?void 0:e.currentVideoFrame)||0}set currentVideoFrame(e){this._kernel&&(this._kernel.currentVideoFrame=e,this.emit(J.ATTRIBUTE_CHANGE_CURRENT_FRAME))}get totalVideoFrames(){var e;return((e=this._kernel)==null?void 0:e.totalVideoFrames)||0}get currentLevelTimeInfo(){var e;return(e=this._kernel)==null?void 0:e.currentLevelTimeInfo}get video(){return this._video}get canvas(){return this._canvas}get yodaDom(){return this._yodaDom}get audioTrack(){return this._kernel?this._kernel.audioTrack:-1}set audioTrack(e){this._logger.i(re,"call set audioTrack",e),this._kernel&&(this._kernel.audioTrack=e,this.emit(J.ATTRIBUTE_CHANGE_AUDIO_TRACK))}get productName(){var e;return(e=this._data)==null?void 0:e.productName}set productName(e){this._logger.i(re,"call set productName",e),this._data&&(this._data.productName=e)}get prefetch(){var e;return(e=this._data)==null?void 0:e.prefetch}set prefetch(e){this._logger.i(re,"call set prefetch",e),this._data&&(this._data.prefetch=e,this.emit(J.ATTRIBUTE_CHANGE_PREFETCH))}get showProgress(){var e;return(e=this._data)==null?void 0:e.showProgress}set showProgress(e){this._logger.i(re,"call set showProgress",e),this._data&&(this._data.showProgress=e,this.emit(J.ATTRIBUTE_CHANGE_SHOW_PROGRESS))}get showTime(){var e;return(e=this._data)==null?void 0:e.showTime}set showTime(e){this._logger.i(re,"call set showTime",e),this._data&&(this._data.showTime=e,this.emit(J.ATTRIBUTE_CHANGE_SHOW_TIME))}get disableHotkey(){var e;return(e=this._data)==null?void 0:e.disableHotkey}set disableHotkey(e){this._logger.i(re,"call set disableHotkey",e),this._data&&(this._data.disableHotkey=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_HOTKEY))}get disableDanmaku(){var e;return(e=this._data)==null?void 0:e.disableDanmaku}set disableDanmaku(e){this._logger.i(re,"call set disableDanmaku",e),this._data&&(this._data.disableDanmaku=e,this.emit(J.ATTRIBUTE_CHANGE_DISABLE_DANMAKU))}get danmakuRendering(){var e;return(e=this._data)==null?void 0:e.danmakuRendering}set danmakuRendering(e){this._logger.i(re,"call set danmakuRendering",e),this._data&&(this._data.danmakuRendering=e,this.emit(J.ATTRIBUTE_CHANGE_DANMAKU_RENDERING))}get showInfoPanel(){var e;return(e=this._data)==null?void 0:e.showInfoPanel}set showInfoPanel(e){this._logger.i(re,"call set showInfoPanel",e),this._data&&(this._data.showInfoPanel=e,this.emit(J.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL))}get showNext(){var e;return(e=this._data)==null?void 0:e.showNext}set showNext(e){this._logger.i(re,"call set showNext",e),this._data&&(this._data.showNext=e,this.emit(J.ATTRIBUTE_CHANGE_SHOW_NEXT))}get showPrev(){var e;return(e=this._data)==null?void 0:e.showPrev}set showPrev(e){this._logger.i(re,"call set showPrev",e),this._data&&(this._data.showPrev=e,this.emit(J.ATTRIBUTE_CHANGE_SHOW_PREV))}get bizData(){var e;return(e=this._data)==null?void 0:e.bizData}set bizData(e){this._logger.i(re,"set biz data",e),this._data&&(this._data.bizData=e),this._yoda&&this._yoda.updateUserConfig({biz:JSON.parse(JSON.stringify(e))}),this.emit(J.ATTRIBUTE_CHANGE_BIZ_DATA)}get liveTime(){var e;return(e=this._data)!=null&&e.liveTime?{start:this._data.liveTime.start,end:this._data.liveTime.end}:void 0}set liveTime(e){this._logger.i(re,"set live time",e),this._data&&(this._data.liveTime=Object.assign({},e)),this.emit(J.ATTRIBUTE_CHANGE_LIVE_TIME)}get objectFit(){return this._objectFit}get kernel(){return this._kernel}setPreprocessURL(e){this._preprocessURL=e}setPreprocessSrcFunc(e){this._preprocessSrcFunc=e}load(){var e;this._logger.i(re,"call load"),(e=this._kernel)==null||e.load(),this._kernelLoaded=!0}play(){var e,r,s,l,d;return this._logger.i(re,"call play",this._kernelLoaded,this._livePaused),this._yoda?((r=(e=this._video)==null?void 0:e.play())==null||r.catch(f=>this._logger.i(re,"play, call play() fail.",f)),this._yoda.play()):(this._livePaused&&!this._isLiveShiftMode()?(s=this._kernel)==null||s.refresh():this._kernelLoaded||this.load(),this._video.paused?(d=(l=this._video)==null?void 0:l.play())==null?void 0:d.catch(f=>this._logger.i(re,"play, call play() fail.",f)):Promise.resolve())}pause(){var e,r,s;if(this._logger.i(re,"call pause",(e=this._mediaInfo)==null?void 0:e.isLive),this._yoda){this._yoda.pause();return}return this._kernel&&(r=this._mediaInfo)!=null&&r.isLive&&!this._isLiveShiftMode()&&(this._logger.i(re,"live stop load"),this._kernel.stopLoad(),this._livePaused=!0),this._isLiveShiftMode()&&!this._isLiveShift&&this._updateIsLiveShift(!0),(s=this._video)==null?void 0:s.pause()}requestPictureInPicture(){return this._logger.i(re,"call requestPictureInPicture"),this._yoda?Promise.reject("not support requestPictureInPicture. yoda"):this._video&&"requestPictureInPicture"in this._video?this._video.requestPictureInPicture():Promise.reject("not support requestPictureInPicture")}isPictureInPictureAvailable(){return this._yoda?!1:Ru()}destroy(){var e,r,s;this._logger.i(re,"call destroy"),(e=this._observer)==null||e.disconnect(),this._observer=void 0,this._clearKernelStartTimer(),this._preprocessSrcFunc=void 0,this._screenshotQueue=[],this._pluginBase.beforeUninstallPlugins(this),this._evt.removeAllListeners(),this._destroyKernel(),this._unbindVideo(),this._destroyYoda(),(r=this._videoLayer.parentElement)==null||r.removeChild(this._videoLayer),(s=this._videoLayer.parentElement)==null||s.removeChild(this._videoInteractiveLayer),this.removeAllListeners(),this._pluginBase.afterUninstallPlugins(this)}refresh(){var e;this._logger.i(re,"call refresh"),(e=this._kernel)==null||e.refresh()}jumpToLive(){var e,r;this._logger.i(re,`call jumpToLive type: ${(e=this._data)==null?void 0:e.liveShiftType}`),this.kernel&&(r=this._data)!=null&&r.liveShiftType&&this._isLiveShiftMode()&&(this.video.currentTime=this.video.duration-this.kernel.liveShiftDelaySec,this.kernel&&this._updateIsLiveShift(!0))}getStreamTime(e){var r;return this._yoda?0:((r=this._kernel)==null?void 0:r.getStreamTime(e))||0}static register(e,r="append"){Ir.register(e,r)}static deregister(e){Ir.deregister(e)}static setYoda(e){Tt._yodaClass=e}getPluginInstance(e){return this._pluginBase.getPlugin(e)}getAllPlugins(){return this._pluginBase.getAllPlugins()}createSubContainer(e=Ri.DEFAULT){const r=document.createElement("div");r.id=`${this._id}-sub-${Math.round(this._subContainerNumber++)}`;let s=this._mainDom;if(e===Ri.VIDEO&&(s=this._videoLayer),e===Ri.VIDEO_INTERACTIVE&&(s=this._videoInteractiveLayer),s)s.children.length?s.children[s.children.length-1].insertAdjacentElement("afterend",r):s.appendChild(r);else throw new Error("cteate sub container error. no parent found.");return r}isFullscreen(e){return this._yoda?this._yoda.isFullscreen():this._full.isFull(e)}isFullscreenAvailable(e){return this._yoda?!0:this._full.isFullscreenAvailable(e)}_applyObjectFit(){var e;const r=((e=this._mainDom)==null?void 0:e.style.objectFit)||"";this._logger.i(re,`apply objectFit: ${r}`),this._video.style.objectFit=r,this._canvas&&(this._canvas.style.objectFit=r),this._yoda&&(this._yoda.objectFit=r||"contain"),this._objectFit=r,this.emit(J.OBJECT_FIT_CHANGE)}removeSubContainer(e){e.parentElement&&e.parentElement.removeChild(e)}screenshot(){const e=this._kernel;return this._yoda?(this._logger.i(re,"screenshot yoda"),this._yoda.screenshot()):e?(this._screenshotId++,new Promise(r=>{const s=this._screenshotId.toString();this._screenshotQueue.push({id:s,timer:setTimeout(()=>{this._logger.i(re,`screenshot[${s}] timeout.`),this._resolveScreenShotFromQueue(s)},500),callback:r}),e.screenshot({id:s}),this._logger.i(re,`screenshot[${s}] kernel`)})):(this._logger.i(re,"screenshot player not ready."),Promise.resolve())}_resolveScreenShotFromQueue(e,r){for(let s=0;s<this._screenshotQueue.length;s++)if(e===this._screenshotQueue[s].id){clearTimeout(this._screenshotQueue[s].timer),this._screenshotQueue[s].callback(r),this._screenshotQueue.splice(s,1);return}this._logger.i(re,`screenshot[${e}] not found.`)}get mainContainer(){return this._mainDom}get videoLayer(){return this._videoLayer}get videoInteractiveLayer(){return this._videoInteractiveLayer}get audienceStat(){var e;return(e=this._kernel)==null?void 0:e.getAudienceStat()}_updatePosterDom(){fi?(this._video.poster=this._poster||"",this._hidePosterDom()):this._poster?(this._video.poster=Fu,this._posterLayer.className=Ct["kwai-player-poster"],this._posterLayer.style.backgroundImage=`url(${this._poster})`):(this._video.poster="",this._posterLayer.className="",this._posterLayer.style.backgroundImage="")}_hidePosterDom(){this._posterLayer.style.display="none"}_setIsUseCanvas(e){this._video&&(this._video.style.display=e?"none":"block")}_setError(e){this._error=e,this._error&&setTimeout(()=>{try{this.emit(J.ERROR,this._error)}catch(r){}},0)}_resetPlayerStat(){if(this._canvas){try{this._videoLayer.removeChild(this._canvas)}catch(e){}this._canvas=void 0}this._setError(void 0),this._setIsUseCanvas(!1),this._mediaInfo=void 0,this._isLiveShift=!1}_destroyKernel(){this._kernel&&(this._kernelLoaded=!1,this._livePaused=!1,this.pause(),this._kernel.destroy(),this._kernel=void 0)}_destroyYoda(){this._yoda&&(this._yoda.destroy(),this._yoda=void 0)}_initYodaKernel(e){if(this._logger.i(re,"yoda init"),!Tt._yodaClass||!this._yodaDom||!this._src)return!1;const r=Tu.parse(this._src);return r&&r.src?(this._yoda||(this._logger.i(re,"yoda new instance."),this._yoda=new Tt._yodaClass(this._yodaDom,this._logger,e),this._bindYoda(this._yoda),this._kernelType="yoda"),this._logger.i(re,"yoda instance already exists. try update conf"),r.isLive?this._yoda.src={isLive:r.isLive,src:r.src}:this._yoda.src={isLive:r.isLive,src:r.src},this.emit(J.ATTRIBUTE_CHANGE_MUTED),!0):!1}_bindYoda(e){this._logger.i(re,"yoda bind event."),e.on("play",this._onVideoPlay),e.on("playing",this._onVideoPlaying),e.on("pause",this._onVideoPause),e.on("loadedmetadata",()=>{this._onVideoLoadedmetadata(),this._onVideoDurationchange()}),e.on("timeupdate",this._onVideoTimeupdate),e.on("ended",this._onVideoEnded),e.on("waiting",this._onVideoWaiting),e.on("seeked",this._onVideoSeeked),e.on("seeking",this._onVideoSeeking),e.on("resize",r=>{this._videoWidth=r.data.width,this._videoHeight=r.data.height,this._onVideoResize()}),e.on("error",r=>{if(r.data.type==="initFailed"||r.data.type==="canNotInsert"||r.data.type==="internal"||r.data.type==="domLost"){const s=e.actionOnReady==="play";this._destroyYoda(),this._yodaEnabled=!1,this._initKernel(),s&&this.play();return}this._setError(Object.assign({code:0},r.data.originalError))})}_bindVideo(){if(this._video)for(const e in this._eventHandlers)this._video.addEventListener(e,this._eventHandlers[e])}_unbindVideo(){if(this._video)for(const e in this._eventHandlers)this._video.removeEventListener(e,this._eventHandlers[e])}_parseData(e){this._logger.i(re,"parse data.",e),e.src&&(this._src=this._preprocessSrcFunc?this._preprocessSrcFunc(e.src):e.src),e.config&&(this._config=e.config),e.crossOrigin&&(this.crossOrigin=e.crossOrigin),typeof e.preload<"u"&&(this.preload=e.preload),typeof e.defaultPlaybackRate=="number"&&(this.defaultPlaybackRate=e.defaultPlaybackRate),typeof e.playbackRate=="number"&&(this.playbackRate=e.playbackRate),typeof e.autoplay<"u"&&(this.autoplay=e.autoplay),typeof e.loop<"u"&&(this.loop=e.loop),typeof e.controls<"u"&&(this.controls=e.controls),typeof e.volume=="number"&&(this.volume=e.volume),typeof e.muted<"u"&&(this.muted=e.muted),typeof e.defaultMuted<"u"&&(this.defaultMuted=e.defaultMuted),typeof e.disablePictureInPicture<"u"&&(this.disablePictureInPicture=e.disablePictureInPicture),typeof e.disableAdaptive<"u"&&(this.disableAdaptive=e.disableAdaptive),typeof e.playsinline<"u"&&(this.playsinline=e.playsinline),typeof e.liveShiftType<"u"&&(this.liveShiftType=e.liveShiftType),typeof e.logger<"u"&&(this._outputLogger=e.logger),this.poster=e.poster||""}_initKernel(e=!0){var r,s,l,d,f;if(this._logger.i(re,"init kernel"),!this._video)return;if(this._posterLayer.style.display=fi?"none":"block",this._destroyKernel(),!this._src&&!((r=this._config)!=null&&r.src)){this._video.src="",this._resetPlayerStat();return}this._config||(this._config={});const c=Object.assign({},this._config,{adaptive:((s=this._data)==null?void 0:s.disableAdaptive)===!1,liveShiftType:(l=this._data)==null?void 0:l.liveShiftType,ntp:!1});if(kr.verify(this._src)?(this._logger.i(re,"live feed to media desc"),c.src=kr.parse(this._src)):c.src=this._src,this._preprocessURL&&(c.preprocessUrl=this._preprocessURL),typeof c.nativeFirst>"u"&&fi&&(c.nativeFirst=!0),this._isLiveShiftMode()&&(c.catchUpPausedLive=!1),(d=this._data)!=null&&d.logger&&(c.logger=this._data.logger),this._resetPlayerStat(),this._logger.i(re,`yoda check mobile: ${fi} liveshift: ${this.liveShiftType} class: ${!!Tt._yodaClass}`),fi&&this._yodaEnabled&&this.liveShiftType===ti.NONE&&Tt._yodaClass){const A={defaultMuted:this.defaultMuted,muted:this.muted,defaultPlaybackRate:this.defaultPlaybackRate,playbackRate:this.playbackRate,autoplay:this._autoplay,loop:this.loop,objectFit:this._objectFit||"contain",biz:(f=this._data)==null?void 0:f.bizData};if(this._initYodaKernel(A)){e&&this._clearKernelStartTimer();return}}else this._destroyYoda();this._kernelType="kwai-player-kernel",this._logger.i(re,"init kernel",this._kernelType);const R=this._kernel=new mu(this._video,c);R.on(ht.VIDEO_RENDERER_CHANGE,A=>{const v=this._videoLayer;if(A.type==="canvas"&&(this._setIsUseCanvas(!0),this._canvas=A.canvas,this._canvas&&v.insertAdjacentElement("afterbegin",this._canvas)),A.type==="video"){this._setIsUseCanvas(!1);try{this._canvas&&v.removeChild(this._canvas)}catch(O){}this._canvas=void 0}this._applyObjectFit(),this.emit(J.VIDEO_RENDERER_CHANGE,A)}),R.on(ht.MANIFEST_PARSED,A=>{this._logger.i(re,ht.MANIFEST_PARSED,A),this.emit(J.MANIFEST_PARSED,A)}),R.on(ht.LEVEL_SWITCHING,A=>{this.emit(J.LEVEL_SWITCHING,A)}),R.on(ht.LEVEL_SWITCHED,A=>{this.emit(J.LEVEL_SWITCHED,A)}),R.on(ht.LEVEL_SWITCH_PLAYING,A=>{this.emit(J.LEVEL_SWITCH_PLAYING,A)}),R.on(ht.LEVEL_SWITCH_FAILED,()=>{this.emit(J.LEVEL_SWITCH_FAILED)}),R.on(ht.LEVEL_UPDATED,A=>{this.emit(J.LEVEL_UPDATED,A)}),R.on(ht.AUDIO_TRACK_SWITCHING,A=>{this.emit(J.AUDIO_TRACKS_SWITCHING,A)}),R.on(ht.AUDIO_TRACK_SWITCHED,A=>{this.emit(J.AUDIO_TRACKS_SWITCHED,A)}),R.on(ht.ERROR,A=>{this._setError({code:A.code,message:A.reason})}),R.on(ht.REPORT,A=>{A.type==="mediaInfo"&&(this._videoWidth=A.value.width||0,this._videoHeight=A.value.height||0,this._mediaInfo=A.value,this._data&&A.value.liveShiftType&&(this.liveShiftType=A.value.liveShiftType)),this.emit(J.REPORT,A)}),R.on(ht.SCREENSHOT,A=>{this._logger.i(re,`screenshot[${A.id}] kernel evt. id: ${A.id}  img: ${!!A.image}`),A.id&&this._resolveScreenShotFromQueue(A.id,A.image)}),e&&(this._clearKernelStartTimer(),this._kernelStart())}_clearKernelStartTimer(){this._kernelStartTimeout&&(clearTimeout(this._kernelStartTimeout),this._kernelStartTimeout=0)}_kernelStart(){if(!(!this._kernel||!this._video)&&(this._autoplay||this._preload===""||this._preload==="auto"||this._preload==="metadata")&&(this._kernel.load(),this._kernelLoaded=!0,this.autoplay)){const e=this._video.play();e instanceof Promise&&e.catch(()=>{var r;this._logger.i(re,"autoplay fail, retry."),this._onMutedChange(!0),(r=this._video)==null||r.play().catch(()=>{})})}}_updateIsLiveShift(e){e!==this._isLiveShift&&(this._isLiveShift=e,this.emit(J.LIVE_SHIFT_CHANGE))}_isLiveShiftMode(){var e;return!!((e=this._data)!=null&&e.liveShiftType)&&this._data.liveShiftType!==ti.NONE}on(e,r){this._evt.on(e,r)}once(e,r){this._evt.once(e,r)}removeAllListeners(e){this._logger.i(re,"call removeAllListeners"),this._evt.removeAllListeners(e)}off(e,r){this._evt.off(e,r)}listeners(e){return this._evt.listeners(e)}emit(e,r){return this._evt.emit(e,r)}listenerCount(e){return this._evt.listenerCount(e)}};X(xr,"packVersion","1.1.0"),X(xr,"_yodaClass");let Ai=xr;const Bu=["id"],Oe="vue3",Ki=ce.defineComponent({__name:"Player",props:{id:{default:""},config:{default:void 0},plugins:{default:void 0},src:{default:""},controls:{type:[Boolean,String],default:!0},videoId:{default:""},autoplay:{type:Boolean,default:!1},crossOrigin:{default:null},defaultMuted:{type:Boolean,default:!1},defaultPlaybackRate:{default:1},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},preload:{default:void 0},poster:{default:""},currentTime:{},playbackRate:{default:1},volume:{default:1},disablePictureInPicture:{type:Boolean,default:!1},playsinline:{type:Boolean,default:!1},disableDownload:{type:Boolean,default:!0},disableAdaptive:{type:Boolean,default:!0},disableHotkey:{type:Boolean,default:!1},disableMask:{type:Boolean,default:!1},currentLevel:{default:0},nextLevel:{default:0},audioTrack:{default:0},currentVideoFrame:{default:0},showProgress:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},prefetch:{type:Boolean,default:!0},showInfoPanel:{type:Boolean,default:!1},productName:{default:""},previewUrl:{default:""},maskUrl:{default:""},disableDanmaku:{type:Boolean},danmakuRendering:{type:Boolean,default:!0},bizData:{},liveShiftType:{}},setup(t,{expose:e,emit:r}){const s=[J.LOADSTART,J.PROGRESS,J.SUSPEND,J.ABORT,J.ERROR,J.EMPTIED,J.STALLED,J.LOADEDMETADATA,J.LOADEDDATA,J.CANPLAY,J.CANPLAYTHROUGH,J.PLAYING,J.WAITING,J.SEEKING,J.SEEKED,J.ENDED,J.DURATIONCHANGE,J.TIMEUPDATE,J.PLAY,J.PAUSE,J.RATECHANGE,J.RESIZE,J.VOLUMECHANGE,J.MANIFEST_PARSED,J.LEVEL_SWITCHING,J.LEVEL_SWITCHED,J.LEVEL_SWITCH_PLAYING,J.LEVEL_SWITCH_FAILED,J.AUDIO_TRACKS_SWITCHING,J.AUDIO_TRACKS_SWITCHED,J.FULLSCREEN_CHANGE,J.LEVEL_UPDATED,J.CLICK_NEXT,J.CLICK_REGISTER,J.CLICK_LOGIN,J.CLICK_VIP,J.INTERACTION,J.ATTRIBUTE_CHANGE,J.REPORT],l=r,d=t,f=ce.ref(fu());let c,R;return ce.watch(()=>d.config,A=>{c&&(R==null||R.i(Oe,"call set config",A),c.config=A)}),ce.watch(()=>d.controls,A=>{c&&(c.logger.i(Oe,"call set controls",A),c.controls=A)}),ce.watch(()=>d.videoId,A=>{c&&(c.logger.i(Oe,"call set videoId",A),c.videoId=A)}),ce.watch(()=>d.src,A=>{c&&(c.logger.i(Oe,"call set src",A),c.src=A||"")}),ce.watch(()=>d.autoplay,A=>{c&&(c.logger.i(Oe,"call set autoplay",A),c.autoplay=!!A)}),ce.watch(()=>d.crossOrigin,A=>{c&&(c.logger.i(Oe,"call set crossorigin",A),c.crossOrigin=A||null)}),ce.watch(()=>d.defaultMuted,A=>{c&&(c.logger.i(Oe,"call set defaultMuted",A),c.defaultMuted=!!A)}),ce.watch(()=>d.defaultPlaybackRate,A=>{c&&(c.logger.i(Oe,"call set defaultPlaybackRate",A),c.defaultPlaybackRate=A||1)}),ce.watch(()=>d.loop,A=>{c&&(c.logger.i(Oe,"call set loop",A),c.loop=!!A)}),ce.watch(()=>d.muted,A=>{c&&(c.logger.i(Oe,"call set muted",A),c.muted=!!A)}),ce.watch(()=>d.preload,A=>{c&&(c.logger.i(Oe,"call set preload",A),c.preload=A||"none")}),ce.watch(()=>d.poster,A=>{c&&(c.logger.i(Oe,"call set poster",A),c.poster=A||"")}),ce.watch(()=>d.currentTime,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set currentTime",A),c.currentTime=A)}),ce.watch(()=>d.playbackRate,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set playbackRate",A),c.playbackRate=A)}),ce.watch(()=>d.volume,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set volume",A),c.volume=A)}),ce.watch(()=>d.disablePictureInPicture,A=>{c&&(c.logger.i(Oe,"call set disablePictureInPicture",A),c.disablePictureInPicture=!!A)}),ce.watch(()=>d.playsinline,A=>{c&&(c.logger.i(Oe,"call set playsinline",A),c.playsinline=!!A)}),ce.watch(()=>d.disableDownload,A=>{c&&(c.logger.i(Oe,"call set disableDownload",A),c.disableDownload=!!A)}),ce.watch(()=>d.disableAdaptive,A=>{c&&(c.logger.i(Oe,"call set disableAdaptive",A),c.disableAdaptive=A||!0)}),ce.watch(()=>d.disableHotkey,A=>{c&&(c.logger.i(Oe,"call set disableHotkey",A),c.disableHotkey=!!A)}),ce.watch(()=>d.disableMask,A=>{c&&(c.logger.i(Oe,"call set disableMask",A),c.disableMask=!!A)}),ce.watch(()=>d.currentLevel,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set currentLevel",A),c.currentLevel=A)}),ce.watch(()=>d.nextLevel,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set nextLevel",A),c.nextLevel=A)}),ce.watch(()=>d.audioTrack,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set audioTrack",A),c.audioTrack=A)}),ce.watch(()=>d.currentVideoFrame,A=>{c&&typeof A=="number"&&(c.logger.i(Oe,"call set currentVideoFrame",A),c.currentVideoFrame=A)}),ce.watch(()=>d.showProgress,A=>{c&&(c.logger.i(Oe,"call set showProgress",A),c.showProgress=A||!0)}),ce.watch(()=>d.showTime,A=>{c&&(c.logger.i(Oe,"call set showTime",A),c.showTime=A||!0)}),ce.watch(()=>d.prefetch,A=>{c&&(c.logger.i(Oe,"call set prefetch",A),c.prefetch=A)}),ce.watch(()=>d.showInfoPanel,A=>{c&&(c.logger.i(Oe,"call set showInfoPanel",A),c.showInfoPanel=A)}),ce.watch(()=>d.previewUrl,A=>{c&&(c.logger.i(Oe,"call set previewUrl",A),c.previewUrl=A)}),ce.watch(()=>d.maskUrl,A=>{c&&(c.logger.i(Oe,"call set maskUrl",A),c.maskUrl=A)}),ce.watch(()=>d.disableDanmaku,A=>{c&&(c.logger.i(Oe,"call set disableDanmaku",A),c.disableDanmaku=!!A)}),ce.watch(()=>d.danmakuRendering,A=>{c&&(c.logger.i(Oe,"call set danmakuRendering",A),c.danmakuRendering=!!A)}),ce.watch(()=>d.bizData,A=>{c&&(c.logger.i(Oe,"call set bizData",A),c.bizData=A)},{deep:!0}),ce.watch(()=>d.liveShiftType,A=>{c&&(c.logger.i(Oe,"call set liveShiftType",A),c.liveShiftType=A||ti.NONE)}),e({load:()=>c==null?void 0:c.load(),play:()=>c==null?void 0:c.play(),pause:()=>c==null?void 0:c.pause(),destroy:()=>c==null?void 0:c.destroy(),requestPictureInPicture:()=>c==null?void 0:c.requestPictureInPicture(),isFullscreen:A=>c==null?void 0:c.isFullscreen(A),requestFullscreen:A=>c==null?void 0:c.requestFullscreen(A),exitFullscreen:A=>c==null?void 0:c.exitFullscreen(A),isFullscreenAvailable:A=>c==null?void 0:c.isFullscreenAvailable(A),screenshot:()=>c==null?void 0:c.screenshot(),getError:()=>c==null?void 0:c.error,getNetworkState:()=>c?c.networkState:0,getBuffered:()=>c==null?void 0:c.buffered,getSeeking:()=>c?c.seeking:!1,getReadyState:()=>c?c.readyState:0,getDuration:()=>c?c.duration:NaN,getPaused:()=>c?c.paused:!0,getSeekable:()=>c==null?void 0:c.seekable,getEnded:()=>c?c.ended:!1,getVideoWidth:()=>c?c.videoWidth:0,getVideoHeight:()=>c?c.videoHeight:0,getTotalVideoFrames:()=>c?c.totalVideoFrames:0,setSrc:A=>{c&&(c.src=A)},getSrc:()=>c==null?void 0:c.src,setConfig:A=>{c&&(c.config=A)},getConfig:()=>c?c.config:d.config,setCrossOrigin:A=>{c&&(c.crossOrigin=A)},getCrossOrigin:()=>c?c.crossOrigin:d.crossOrigin,setPreload:A=>{c&&(c.preload=A)},getPreload:()=>c?c.preload:d.preload||"",setCurrentTime:A=>{c&&(c.currentTime=A)},getCurrentTime:()=>c?c.currentTime:0,setDefaultPlaybackRate:A=>{c&&(c.defaultPlaybackRate=A)},getDefaultPlaybackRate:()=>c?c.defaultPlaybackRate:d.defaultPlaybackRate,setPlaybackRate:A=>{c&&(c.playbackRate=A)},getPlaybackRate:()=>c?c.playbackRate:d.playbackRate,setAutoplay:A=>{c&&(c.autoplay=A)},getAutoplay:()=>c?c.autoplay:d.autoplay,setLoop:A=>{c&&(c.loop=A)},getLoop:()=>c?c.loop:d.loop,setControls:A=>{c&&(c.controls=A)},getControls:()=>c?c.controls:d.controls,setVideoId:A=>{c&&(c.videoId=A)},getVideoId:()=>c?c.videoId:d.videoId,setVolume:A=>{c&&(c.volume=A)},getVolume:()=>c?c.volume:1,setMuted:A=>{c&&(c.muted=A)},getMuted:()=>c?c.muted:d.muted,setDefaultMuted:A=>{c&&(c.defaultMuted=A)},getDefaultMuted:()=>c?c.defaultMuted:d.defaultMuted,setPoster:A=>{c&&(c.poster=A)},getPoster:()=>c?c.poster:d.poster,setDisablePictureInPicture:A=>{c&&(c.disablePictureInPicture=A)},getDisablePictureInPicture:()=>c?c.disablePictureInPicture:d.disablePictureInPicture,setPlaysinline:A=>{c&&(c.playsinline=A)},getPlaysinline:()=>c?c.playsinline:d.playsinline,setDisableDownload:A=>{c&&(c.disableDownload=A)},getDisableDownload:()=>c?c.disableDownload:d.disableDownload,setDisableAdaptive:A=>{c&&(c.disableAdaptive=A)},getDisableAdaptive:()=>c?c.disableAdaptive:d.disableAdaptive,setDisableHotkey:A=>{c&&(c.disableHotkey=A)},getDisableHotkey:()=>c?c.disableHotkey:d.disableHotkey,setDisableMask:A=>{c&&(c.disableMask=A)},getDisableMask:()=>c?c.disableMask:d.disableMask,setCurrentLevel:A=>{c&&(c.currentLevel=A)},getCurrentLevel:()=>c?c.currentLevel:0,setNextLevel:A=>{c&&(c.nextLevel=A)},getNextLevel:()=>c?c.nextLevel:0,setAudioTrack:A=>{c&&(c.audioTrack=A)},getAudioTrack:()=>c?c.audioTrack:-1,setCurrentVideoFrame:A=>{c&&(c.currentVideoFrame=A)},getCurrentVideoFrame:()=>(c==null?void 0:c.currentVideoFrame)||0,setShowProgress:A=>{c&&(c.showProgress=A)},getShowProgress:()=>c?c.showProgress:d.showProgress,setShowTime:A=>{c&&(c.showTime=A)},getShowTime:()=>c==null?void 0:c.showTime,setPrefetch:A=>{c&&(c.prefetch=A)},getPrefetch:()=>c==null?void 0:c.prefetch,setShowInfoPanel:A=>{c&&(c.showInfoPanel=A)},getShowInfoPanel:()=>c?c.showInfoPanel:d.showInfoPanel,setProductName:A=>{c&&(c.productName=A)},getProductName:()=>c?c.productName:d.productName,setPreviewUrl:A=>{c&&(c.previewUrl=A)},getPreviewUrl:()=>c?c.previewUrl:d.previewUrl,setMaskUrl:A=>{c&&(c.maskUrl=A)},getMaskUrl:()=>c?c.maskUrl:d.maskUrl,setDisableDanmaku:A=>{c&&(c.disableDanmaku=A)},getDisableDanmaku:()=>c?c.disableDanmaku:d.disableDanmaku,setDanmakuRendering:A=>{c&&(c.danmakuRendering=A)},getDanmakuRendering:()=>c==null?void 0:c.danmakuRendering,getStreamTime:A=>c?c.getStreamTime(A):0,getAudienceStat:()=>c==null?void 0:c.audienceStat,getIsLiveShift:()=>c?c.isLiveShift:!1,getLiveShiftType:()=>c?c.liveShiftType:ti.NONE,setLiveShiftType:A=>{c&&(c.liveShiftType=A)},getVersion:()=>Ai.version,getPluginInstance:A=>c==null?void 0:c.getPluginInstance(A),getAllPlugins:()=>c==null?void 0:c.getAllPlugins()}),ce.onMounted(()=>{const A=c=new Ai(`#${f.value}`,{config:d.config,src:d.src,crossOrigin:d.crossOrigin,preload:d.preload,defaultPlaybackRate:d.defaultPlaybackRate,playbackRate:d.playbackRate,autoplay:d.autoplay,loop:d.loop,controls:d.controls,videoId:d.videoId,volume:d.volume,muted:d.muted,defaultMuted:d.defaultMuted,poster:d.poster,disablePictureInPicture:d.disablePictureInPicture,disableDownload:d.disableDownload,disableAdaptive:d.disableAdaptive,disableHotkey:d.disableHotkey,disableMask:d.disableMask,playsinline:d.playsinline,showProgress:d.showProgress,showTime:d.showTime,prefetch:d.prefetch,showInfoPanel:d.showInfoPanel,productName:d.productName,previewUrl:d.previewUrl,maskUrl:d.maskUrl,disableDanmaku:d.disableDanmaku,danmakuRendering:d.danmakuRendering,plugins:d.plugins,bizData:d.bizData,liveShiftType:d.liveShiftType});R=A.logger,s.forEach(v=>{A.on(v,O=>l(v,O))})}),ce.onBeforeUnmount(()=>{c==null||c.destroy(),c=void 0}),(A,v)=>(ce.openBlock(),ce.createElementBlock("div",{id:f.value},[ce.renderSlot(A.$slots,"watermark")],8,Bu))}});Ki.install=t=>{t.component("KwaiPlayerVue3",Ki)};var Hu=Object.defineProperty,Vu=(t,e,r)=>e in t?Hu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,So=(t,e,r)=>(Vu(t,typeof e!="symbol"?e+"":e,r),r),qt=function(t){var e={};function r(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=e,r.d=function(s,l,d){r.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:d})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,l){if(1&l&&(s=r(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var f in s)r.d(d,f,function(c){return s[c]}.bind(null,f));return d},r.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(l,"a",l),l},r.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},r.p="",r(r.s=8)}([function(t,e,r){var s=r(5);function l(d,f){for(var c=0;c<f.length;c++){var R=f[c];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(d,s(R.key),R)}}t.exports=function(d,f,c){return f&&l(d.prototype,f),c&&l(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(s){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t.exports.__esModule=!0,t.exports.default=t.exports,r(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(7)();t.exports=s;try{regeneratorRuntime=s}catch(l){typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},function(t,e){function r(){return t.exports=r=Object.assign?Object.assign.bind():function(s){for(var l=1;l<arguments.length;l++){var d=arguments[l];for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(s[f]=d[f])}return s},t.exports.__esModule=!0,t.exports.default=t.exports,r.apply(this,arguments)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(s,l,d,f,c,R,A){try{var v=s[R](A),O=v.value}catch(m){return void d(m)}v.done?l(O):Promise.resolve(O).then(f,c)}t.exports=function(s){return function(){var l=this,d=arguments;return new Promise(function(f,c){var R=s.apply(l,d);function A(O){r(R,f,c,A,v,"next",O)}function v(O){r(R,f,c,A,v,"throw",O)}A(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default,l=r(6);t.exports=function(d){var f=l(d,"string");return s(f)=="symbol"?f:f+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default;t.exports=function(l,d){if(s(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,d||"default");if(s(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(l)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(1).default;function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=l=function(){return f},t.exports.__esModule=!0,t.exports.default=t.exports;var d,f={},c=Object.prototype,R=c.hasOwnProperty,A=Object.defineProperty||function(C,M,B){C[M]=B.value},v=typeof Symbol=="function"?Symbol:{},O=v.iterator||"@@iterator",m=v.asyncIterator||"@@asyncIterator",x=v.toStringTag||"@@toStringTag";function g(C,M,B){return Object.defineProperty(C,M,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[M]}try{g({},"")}catch(C){g=function(M,B,Z){return M[B]=Z}}function E(C,M,B,Z){var K=M&&M.prototype instanceof I?M:I,se=Object.create(K.prototype),ve=new z(Z||[]);return A(se,"_invoke",{value:S(C,B,ve)}),se}function k(C,M,B){try{return{type:"normal",arg:C.call(M,B)}}catch(Z){return{type:"throw",arg:Z}}}f.wrap=E;var y="suspendedStart",w="executing",_="completed",b={};function I(){}function P(){}function G(){}var H={};g(H,O,function(){return this});var Q=Object.getPrototypeOf,ue=Q&&Q(Q(Y([])));ue&&ue!==c&&R.call(ue,O)&&(H=ue);var he=G.prototype=I.prototype=Object.create(H);function j(C){["next","throw","return"].forEach(function(M){g(C,M,function(B){return this._invoke(M,B)})})}function F(C,M){function B(K,se,ve,fe){var Re=k(C[K],C,se);if(Re.type!=="throw"){var ee=Re.arg,ze=ee.value;return ze&&s(ze)=="object"&&R.call(ze,"__await")?M.resolve(ze.__await).then(function(Ie){B("next",Ie,ve,fe)},function(Ie){B("throw",Ie,ve,fe)}):M.resolve(ze).then(function(Ie){ee.value=Ie,ve(ee)},function(Ie){return B("throw",Ie,ve,fe)})}fe(Re.arg)}var Z;A(this,"_invoke",{value:function(K,se){function ve(){return new M(function(fe,Re){B(K,se,fe,Re)})}return Z=Z?Z.then(ve,ve):ve()}})}function S(C,M,B){var Z=y;return function(K,se){if(Z===w)throw Error("Generator is already running");if(Z===_){if(K==="throw")throw se;return{value:d,done:!0}}for(B.method=K,B.arg=se;;){var ve=B.delegate;if(ve){var fe=D(ve,B);if(fe){if(fe===b)continue;return fe}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(Z===y)throw Z=_,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);Z=w;var Re=k(C,M,B);if(Re.type==="normal"){if(Z=B.done?_:"suspendedYield",Re.arg===b)continue;return{value:Re.arg,done:B.done}}Re.type==="throw"&&(Z=_,B.method="throw",B.arg=Re.arg)}}}function D(C,M){var B=M.method,Z=C.iterator[B];if(Z===d)return M.delegate=null,B==="throw"&&C.iterator.return&&(M.method="return",M.arg=d,D(C,M),M.method==="throw")||B!=="return"&&(M.method="throw",M.arg=new TypeError("The iterator does not provide a '"+B+"' method")),b;var K=k(Z,C.iterator,M.arg);if(K.type==="throw")return M.method="throw",M.arg=K.arg,M.delegate=null,b;var se=K.arg;return se?se.done?(M[C.resultName]=se.value,M.next=C.nextLoc,M.method!=="return"&&(M.method="next",M.arg=d),M.delegate=null,b):se:(M.method="throw",M.arg=new TypeError("iterator result is not an object"),M.delegate=null,b)}function U(C){var M={tryLoc:C[0]};1 in C&&(M.catchLoc=C[1]),2 in C&&(M.finallyLoc=C[2],M.afterLoc=C[3]),this.tryEntries.push(M)}function N(C){var M=C.completion||{};M.type="normal",delete M.arg,C.completion=M}function z(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(U,this),this.reset(!0)}function Y(C){if(C||C===""){var M=C[O];if(M)return M.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var B=-1,Z=function K(){for(;++B<C.length;)if(R.call(C,B))return K.value=C[B],K.done=!1,K;return K.value=d,K.done=!0,K};return Z.next=Z}}throw new TypeError(s(C)+" is not iterable")}return P.prototype=G,A(he,"constructor",{value:G,configurable:!0}),A(G,"constructor",{value:P,configurable:!0}),P.displayName=g(G,x,"GeneratorFunction"),f.isGeneratorFunction=function(C){var M=typeof C=="function"&&C.constructor;return!!M&&(M===P||(M.displayName||M.name)==="GeneratorFunction")},f.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,G):(C.__proto__=G,g(C,x,"GeneratorFunction")),C.prototype=Object.create(he),C},f.awrap=function(C){return{__await:C}},j(F.prototype),g(F.prototype,m,function(){return this}),f.AsyncIterator=F,f.async=function(C,M,B,Z,K){K===void 0&&(K=Promise);var se=new F(E(C,M,B,Z),K);return f.isGeneratorFunction(M)?se:se.next().then(function(ve){return ve.done?ve.value:se.next()})},j(he),g(he,x,"Generator"),g(he,O,function(){return this}),g(he,"toString",function(){return"[object Generator]"}),f.keys=function(C){var M=Object(C),B=[];for(var Z in M)B.push(Z);return B.reverse(),function K(){for(;B.length;){var se=B.pop();if(se in M)return K.value=se,K.done=!1,K}return K.done=!0,K}},f.values=Y,z.prototype={constructor:z,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(N),!C)for(var M in this)M.charAt(0)==="t"&&R.call(this,M)&&!isNaN(+M.slice(1))&&(this[M]=d)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var M=this;function B(Re,ee){return se.type="throw",se.arg=C,M.next=Re,ee&&(M.method="next",M.arg=d),!!ee}for(var Z=this.tryEntries.length-1;Z>=0;--Z){var K=this.tryEntries[Z],se=K.completion;if(K.tryLoc==="root")return B("end");if(K.tryLoc<=this.prev){var ve=R.call(K,"catchLoc"),fe=R.call(K,"finallyLoc");if(ve&&fe){if(this.prev<K.catchLoc)return B(K.catchLoc,!0);if(this.prev<K.finallyLoc)return B(K.finallyLoc)}else if(ve){if(this.prev<K.catchLoc)return B(K.catchLoc,!0)}else{if(!fe)throw Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return B(K.finallyLoc)}}}},abrupt:function(C,M){for(var B=this.tryEntries.length-1;B>=0;--B){var Z=this.tryEntries[B];if(Z.tryLoc<=this.prev&&R.call(Z,"finallyLoc")&&this.prev<Z.finallyLoc){var K=Z;break}}K&&(C==="break"||C==="continue")&&K.tryLoc<=M&&M<=K.finallyLoc&&(K=null);var se=K?K.completion:{};return se.type=C,se.arg=M,K?(this.method="next",this.next=K.finallyLoc,b):this.complete(se)},complete:function(C,M){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&M&&(this.next=M),b},finish:function(C){for(var M=this.tryEntries.length-1;M>=0;--M){var B=this.tryEntries[M];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),N(B),b}},catch:function(C){for(var M=this.tryEntries.length-1;M>=0;--M){var B=this.tryEntries[M];if(B.tryLoc===C){var Z=B.completion;if(Z.type==="throw"){var K=Z.arg;N(B)}return K}}throw Error("illegal catch attempt")},delegateYield:function(C,M,B){return this.delegate={iterator:Y(C),resultName:M,nextLoc:B},this.method==="next"&&(this.arg=d),b}},f}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){r.r(e),r.d(e,"KwaiVideoLocalLog",function(){return he}),r.d(e,"LogLevel",function(){return m}),r.d(e,"DefaultLogger",function(){return k}),r.d(e,"Logger",function(){return E}),r.d(e,"printVersion",function(){return R}),r.d(e,"DEFAULT_LOG_LEVEL",function(){return x});var s=r(0),l=r.n(s),d=r(3),f=r.n(d),c={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function R(j,F){console.log("%c "+j+" %c "+F+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")}var A=function(){function j(){this.timeout=6048e5}var F=j.prototype;return F.write=function(S,D){if(j.available)try{localStorage.setItem(S,JSON.stringify({value:D,time:Date.now()}))}catch(U){}},F.read=function(S,D){if(D===void 0&&(D=!0),j.available)try{var U=localStorage.getItem(S);if(U){var N=JSON.parse(U),z=N.value,Y=N.time,C=Y===void 0?0:Y;if(!D||Date.now()-C<(typeof D=="number"?D:this.timeout))return z}}catch(M){}},l()(j,null,[{key:"available",get:function(){if(j._available===void 0)try{localStorage.setItem("alg","test"),j._available=!0}catch(S){j._available=!1}return j._available}}])}();A._available=void 0;var v,O=A,m=function(j){return j.NONE="none",j.ERROR="e",j.WARN="w",j.INFO="i",j.DEBUG="d",j.VERBOSE="v",j}({}),x=m.ERROR,g=((v={})[m.NONE]={value:1,str:"N"},v[m.ERROR]={value:100,str:"E"},v[m.WARN]={value:200,str:"W"},v[m.INFO]={value:300,str:"I"},v[m.DEBUG]={value:400,str:"D"},v[m.VERBOSE]={value:500,str:"V"},v),E=function(){function j(S){if(this._name="kwai-v",this._level=x,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&location.protocol==="blob:"){var D,U=location.href.split("/"),N=(D=U[U.length-1])==null?void 0:D.match(/(\w+)-/);N&&(this._workerTag=S?S+"-"+N[1]:N[1])}else S&&(this._workerTag=S)}j.loadLogLevel=function(S,D){if(D===void 0&&(D=!0),location.href){var U=new RegExp(S+"=([a-z]{1})"),N=location.href.match(U);if(N&&N.length>1){var z=N[1];if(this._isValueInLevel(z))return z}}var Y=new O().read(S,D);if(this._isValueInLevel(Y))return Y},j.saveLogLevel=function(S,D){this._isValueInLevel(D)&&new O().write(S,D)},j._isValueInLevel=function(S){return Object.values(m).indexOf(S)!==-1};var F=j.prototype;return F.setOutput=function(S){return this._output=S,this},F.setLevel=function(S){return this._level=S,this},F.setId=function(S){return this._id=S,this},F.setName=function(S){return this._name=S,this},F.getLevel=function(){return this._level},F.getOutput=function(){return this._output},F.hasOutput=function(){return!!this._output},F.e=function(S){if(this._isLevelEnabled(this._level,m.ERROR)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.ERROR,S,U);try{var Y;(Y=this._output)==null||Y.e.apply(Y,[z].concat(U))}catch(C){}}},F.w=function(S){if(this._isLevelEnabled(this._level,m.WARN)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.WARN,S,U);try{var Y;(Y=this._output)==null||Y.w.apply(Y,[z].concat(U))}catch(C){}}},F.i=function(S){if(this._isLevelEnabled(this._level,m.INFO)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.INFO,S,U);try{var Y;(Y=this._output)==null||Y.i.apply(Y,[z].concat(U))}catch(C){}}},F.d=function(S){if(this._isLevelEnabled(this._level,m.DEBUG)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.DEBUG,S,U);try{var Y;(Y=this._output)==null||Y.d.apply(Y,[z].concat(U))}catch(C){}}},F.v=function(S){if(this._isLevelEnabled(this._level,m.VERBOSE)){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];var z=this._printLog(m.VERBOSE,S,U);try{var Y;(Y=this._output)==null||Y.v.apply(Y,[z].concat(U))}catch(C){}}},F._isLevelEnabled=function(S,D){return g[S].value>=g[D].value},F._printLog=function(S,D,U){var N,z,Y=typeof D;if(Y==="object")D=((z=D)==null?void 0:z.constructor.name)||"unknown";else if(Y==="function"){var C;D=((C=Object.getOwnPropertyDescriptor(D,"name"))==null?void 0:C.value)||"unknown"}var M,B,Z=(((N=g[S])==null?void 0:N.str)||"")+"|"+this._name+"["+(typeof this._id=="function"?this._id():this._id)+"]["+this._workerTag+"]::"+D;return S===m.ERROR?(M=console).error.apply(M,[Z].concat(U.slice(0))):(B=console).log.apply(B,[Z].concat(U.slice(0))),Z},j}(),k=new E,y=function(){return l()(function j(F){this._logger=void 0,this._id=0,this._config=c,this._id=j._id,j._id++,this._logger=new E().setId(this._id).setLevel(m.INFO),this._config=f()({},c,F)},[{key:"config",get:function(){return this._config}},{key:"logger",get:function(){return this._logger}},{key:"id",get:function(){return this._id}}],[{key:"packName",get:function(){return"ll_es"}},{key:"version",get:function(){return"1.0.13"}},{key:"buildTime",get:function(){return"Tue Oct 08 2024 17:18:49 GMT+0800 (中国标准时间)"}}])}();y._id=0;var w=r(4),_=r.n(w),b=r(2),I=r.n(b),P=function(){function j(S,D,U,N,z){var Y=this;z===void 0&&(z=1),this._logger=void 0,this._name=void 0,this._storeName=void 0,this._dbIndex=void 0,this._version=void 0,this._taskQueue=[],this._openReq=void 0,this._isTransactionActive=!1,this._runTaskQueue=function(){for(;Y._taskQueue.length;){var C=Y._taskQueue.shift();C&&Y.run(C.task,C.mode)}},this._logger=S,this._name=D,this._storeName=U,this._dbIndex=N,this._version=z}var F=j.prototype;return F.init=function(){var S=this;if(!this._openReq&&indexedDB){var D=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",D),D.onerror=function(){S._logger.i("idb-wrapper","open error.")},D.onsuccess=function(){S._logger.i("idb-wrapper","open success."),S._runTaskQueue()},D.onupgradeneeded=function(){S._logger.i("idb-wrapper","open upgradeneeded."),D.result.objectStoreNames.contains(S._storeName)&&D.result.deleteObjectStore(S._storeName);var U=D.result.createObjectStore(S._storeName,{keyPath:"id",autoIncrement:!0});S._dbIndex&&S._dbIndex.forEach(function(N){U.createIndex(N.name,N.keyPath,N.option)})}}},F.run=function(S,D){if(D===void 0&&(D="readwrite"),this.init(),this._openReq&&this._openReq.readyState==="done"&&!this._openReq.error)return this._doTask(S,D);this.state!=="error"&&(this._taskQueue.push({task:S,mode:D}),this._taskQueue.length>1e3&&this._taskQueue.shift())},F.close=function(){var S=this;this._logger.i("idb-wrapper","close"),this._openReq&&(this._openReq.readyState==="done"?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){S.close()})},F.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},F._doTask=function(S,D){var U=this;if(D===void 0&&(D="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var N=this._openReq.result.transaction(this._storeName,D),z=void 0;N.oncomplete=function(){U._isTransactionActive=!1,S.callback&&S.callback(z),U._runTaskQueue()},N.onabort=N.onerror=function(){U._isTransactionActive=!1,S.callback&&S.callback(z),U._runTaskQueue()},z=S.exec(N.objectStore(this._storeName))}catch(Y){}else S.callback&&S.callback()},l()(j,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&this._openReq.readyState==="done"?this._openReq.error?"error":"ready":"idle"}}])}(),G=[{name:"id",keyPath:"id",option:{unique:!0}}],H=[function(){function j(S){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=S,this._idb=new P(S.logger,S.config.idbName,S.config.idbName,G),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}j.isSupported=function(){return typeof indexedDB<"u"};var F=j.prototype;return F.saveLog=function(S){var D=this,U={exec:function(N){return N.add({value:S})},callback:function(N){D._saveCount++,D._saveCount%D._reCountOnSaveCount==0&&D._count(),N!=null&&N.error&&D._ctx.logger.i("idb-backend","save log err",N.error)}};this._idb.run(U)},F.exportLog=function(){var S=_()(I.a.mark(function D(){var U=this;return I.a.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.abrupt("return",new Promise(function(z,Y){U._ctx.logger.i("idb-backend","export start");var C={exec:function(M){return M.getAll()},callback:function(M){z(M===void 0?"":U._mergeGetAll(M.result))}};U._idb.run(C,"readonly")}));case 1:case"end":return N.stop()}},D)}));return function(){return S.apply(this,arguments)}}(),F.destroy=function(){this._idb.destroy()},F.clean=function(){this._idb.run({exec:function(S){return S.clear()}})},F._count=function(){var S=this,D={exec:function(U){return U.count()},callback:function(U){U!=null&&U.error||U==null||!U.result||(S._ctx.logger.i("idb-backend","count: "+U.result+" max: "+S._ctx.config.idbMaxDataCount),S._logCount=U.result,S._logCount>=S._ctx.config.idbMaxDataCount&&!S._reduceData&&S._deleteFromHead(S._logCount-Math.round(S._ctx.config.idbMaxDataCount/2)))}};this._idb.run(D)},F._deleteFromHead=function(S){var D=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var U={exec:function(N){return N.openCursor()},callback:function(N){if(D._reduceData=!1,N!=null&&N.result){var z=IDBKeyRange.bound(N.result.key,N.result.key+S,!1,!1),Y={exec:function(C){return D._ctx.logger.i("idb-backend","del: "+z.lower+"~"+z.upper),C.delete(z)},callback:function(C){D._ctx.logger.i("idb-backend","del result: "+!(C==null||!C.error))}};D._idb.run(Y)}}};this._idb.run(U)},F._mergeGetAll=function(S){return S.length?S.reduce(function(D,U){return""+D+U.value+`
`},""):""},l()(j,[{key:"isActive",get:function(){return this._idb.state!=="error"}}])}()];function Q(j,F,S){var D=new Date;typeof j!="string"&&(j=j.toString());var U=D.toLocaleString()+"."+D.getMilliseconds().toString().padStart(3,"0")+"|"+j+"|";return F.forEach(function(N){U+=typeof N=="object"?JSON.stringify(N)+" ":N+" "}),U.length>S?U.substring(0,S):U}function ue(j){return j.join(`
`)}var he=function(){function j(S){var D=this;this._ctx=void 0,this._backend=void 0,this._delayTimer=void 0,this._logCache=[],this._loggerForAdd=void 0,this._downloadHref=void 0,this._startDelay=function(){D._delayTimer=setInterval(function(){D._saveLog(!0)},1e3)},this._stopDelay=function(){D._delayTimer&&(clearTimeout(D._delayTimer),D._delayTimer=void 0)},R("kwai-video-local-log","1.0.13"),this._ctx=new y(S);var U=function(N){for(var z=arguments.length,Y=new Array(z>1?z-1:0),C=1;C<z;C++)Y[C-1]=arguments[C];D.addLog.apply(D,[N].concat(Y))};this._loggerForAdd={e:U,w:U,i:U,d:U,v:U},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",S,this._ctx.config),this._backend=function(N){for(var z=0;z<H.length;z++){var Y=H[z];if(Y!=null&&Y.isSupported())return new Y(N)}}(this._ctx),this._backend&&this._startDelay()}j.isSupported=function(){return function(){for(var S=0;S<H.length;S++){var D=H[S];if(D!=null&&D.isSupported())return!0}return!1}()};var F=j.prototype;return F.addLog=function(S){for(var D=arguments.length,U=new Array(D>1?D-1:0),N=1;N<D;N++)U[N-1]=arguments[N];this._logCache.push(Q(S,U,this._ctx.config.maxLogLen)),this._saveLog()},F.cleanLog=function(){var S;this._ctx.logger.i("kwai-video-local-log","clean"),(S=this._backend)==null||S.clean()},F.exportLog=function(){var S=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise(function(D,U){S._backend?S._backend.exportLog().then(function(N){D(ue([N].concat(S._logCache)))}):D("")})},F.downloadLog=function(S){var D=this;this._ctx.logger.i("kwai-video-local-log","download log: "+S),this._destroyDownloadHref(),this.exportLog().then(function(U){var N=new Blob([U],{type:"text/plain"});if(document){var z=document.createElement("a");D._downloadHref=z.href=URL.createObjectURL(N),z.download=S||"Log_web_"+new Date().toLocaleString()+".log",document.body.appendChild(z),z.click(),z.remove()}else console.log("无document,当前是否在worker中")})},F.destroy=function(){var S;this._destroyDownloadHref(),(S=this._backend)==null||S.destroy(),this._stopDelay()},F.getLoggerForAdd=function(){return this._loggerForAdd},F._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(S){}},F._saveLog=function(S){if(S===void 0&&(S=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&S)){var D=ue(this._logCache);this._logCache.splice(0,this._logCache.length),D&&this._backend.saveLog(D)}},l()(j,null,[{key:"version",get:function(){return"1.0.13"}}])}();e.default=he}]);qt===void 0&&console.error("esm-webpack-plugin: nothing exported!");const Lo=qt.KwaiVideoLocalLog,ko=qt.LogLevel,Gu=qt.DefaultLogger,Wu=qt.Logger;qt.printVersion,qt.DEFAULT_LOG_LEVEL,qt.default;var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dr={exports:{}},pi=typeof Reflect=="object"?Reflect:null,xo=pi&&typeof pi.apply=="function"?pi.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},zi;pi&&typeof pi.ownKeys=="function"?zi=pi.ownKeys:Object.getOwnPropertySymbols?zi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:zi=function(t){return Object.getOwnPropertyNames(t)};function ju(t){console&&console.warn&&console.warn(t)}var Co=Number.isNaN||function(t){return t!==t};function He(){He.init.call(this)}Dr.exports=He,Dr.exports.once=$u,He.EventEmitter=He,He.prototype._events=void 0,He.prototype._eventsCount=0,He.prototype._maxListeners=void 0;var Do=10;function Ji(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(He,"defaultMaxListeners",{enumerable:!0,get:function(){return Do},set:function(t){if(typeof t!="number"||t<0||Co(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Do=t}}),He.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},He.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Co(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Oo(t){return t._maxListeners===void 0?He.defaultMaxListeners:t._maxListeners}He.prototype.getMaxListeners=function(){return Oo(this)},He.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s=t==="error",l=this._events;if(l!==void 0)s=s&&l.error===void 0;else if(!s)return!1;if(s){var d;if(e.length>0&&(d=e[0]),d instanceof Error)throw d;var f=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw f.context=d,f}var c=l[t];if(c===void 0)return!1;if(typeof c=="function")xo(c,this,e);else for(var R=c.length,A=Fo(c,R),r=0;r<R;++r)xo(A[r],this,e);return!0};function Mo(t,e,r,s){var l,d,f;if(Ji(r),d=t._events,d===void 0?(d=t._events=Object.create(null),t._eventsCount=0):(d.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),d=t._events),f=d[e]),f===void 0)f=d[e]=r,++t._eventsCount;else if(typeof f=="function"?f=d[e]=s?[r,f]:[f,r]:s?f.unshift(r):f.push(r),l=Oo(t),l>0&&f.length>l&&!f.warned){f.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=f.length,ju(c)}return t}He.prototype.addListener=function(t,e){return Mo(this,t,e,!1)},He.prototype.on=He.prototype.addListener,He.prototype.prependListener=function(t,e){return Mo(this,t,e,!0)};function Ku(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function No(t,e,r){var s={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},l=Ku.bind(s);return l.listener=r,s.wrapFn=l,l}He.prototype.once=function(t,e){return Ji(e),this.on(t,No(this,t,e)),this},He.prototype.prependOnceListener=function(t,e){return Ji(e),this.prependListener(t,No(this,t,e)),this},He.prototype.removeListener=function(t,e){var r,s,l,d,f;if(Ji(e),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(l=-1,d=r.length-1;d>=0;d--)if(r[d]===e||r[d].listener===e){f=r[d].listener,l=d;break}if(l<0)return this;l===0?r.shift():zu(r,l),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,f||e)}return this},He.prototype.off=He.prototype.removeListener,He.prototype.removeAllListeners=function(t){var e,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var l=Object.keys(r),d;for(s=0;s<l.length;++s)d=l[s],d!=="removeListener"&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this};function Po(t,e,r){var s=t._events;if(s===void 0)return[];var l=s[e];return l===void 0?[]:typeof l=="function"?r?[l.listener||l]:[l]:r?Ju(l):Fo(l,l.length)}He.prototype.listeners=function(t){return Po(this,t,!0)},He.prototype.rawListeners=function(t){return Po(this,t,!1)},He.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Uo.call(t,e)},He.prototype.listenerCount=Uo;function Uo(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}He.prototype.eventNames=function(){return this._eventsCount>0?zi(this._events):[]};function Fo(t,e){for(var r=new Array(e),s=0;s<e;++s)r[s]=t[s];return r}function zu(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Ju(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function $u(t,e){return new Promise(function(r,s){function l(f){t.removeListener(e,d),s(f)}function d(){typeof t.removeListener=="function"&&t.removeListener("error",l),r([].slice.call(arguments))}Bo(t,e,d,{once:!0}),e!=="error"&&qu(t,l,{once:!0})})}function qu(t,e,r){typeof t.on=="function"&&Bo(t,"error",e,r)}function Bo(t,e,r,s){if(typeof t.on=="function")s.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function l(d){s.once&&t.removeEventListener(e,l),r(d)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Yu=Dr.exports,Ho=function(){if(typeof Map<"u")return Map;function t(e,r){var s=-1;return e.some(function(l,d){return l[0]===r?(s=d,!0):!1}),s}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var s=t(this.__entries__,r),l=this.__entries__[s];return l&&l[1]},e.prototype.set=function(r,s){var l=t(this.__entries__,r);~l?this.__entries__[l][1]=s:this.__entries__.push([r,s])},e.prototype.delete=function(r){var s=this.__entries__,l=t(s,r);~l&&s.splice(l,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,s){s===void 0&&(s=null);for(var l=0,d=this.__entries__;l<d.length;l++){var f=d[l];r.call(s,f[1],f[0])}},e}()}(),Or=typeof window<"u"&&typeof document<"u"&&window.document===document,$i=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),Qu=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind($i):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),Zu=2;function Xu(t,e){var r=!1,s=!1,l=0;function d(){r&&(r=!1,t()),s&&c()}function f(){Qu(d)}function c(){var R=Date.now();if(r){if(R-l<Zu)return;s=!0}else r=!0,s=!1,setTimeout(f,e);l=R}return c}var ec=20,tc=["top","right","bottom","left","width","height","size","weight"],ic=typeof MutationObserver<"u",rc=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Xu(this.refresh.bind(this),ec)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,s=r.indexOf(e);~s&&r.splice(s,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!Or||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ic?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Or||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,s=r===void 0?"":r,l=tc.some(function(d){return!!~s.indexOf(d)});l&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Vo=function(t,e){for(var r=0,s=Object.keys(e);r<s.length;r++){var l=s[r];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},vi=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||$i},Go=Yi(0,0,0,0);function qi(t){return parseFloat(t)||0}function Wo(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(s,l){var d=t["border-"+l+"-width"];return s+qi(d)},0)}function nc(t){for(var e=["top","right","bottom","left"],r={},s=0,l=e;s<l.length;s++){var d=l[s],f=t["padding-"+d];r[d]=qi(f)}return r}function oc(t){var e=t.getBBox();return Yi(0,0,e.width,e.height)}function ac(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return Go;var s=vi(t).getComputedStyle(t),l=nc(s),d=l.left+l.right,f=l.top+l.bottom,c=qi(s.width),R=qi(s.height);if(s.boxSizing==="border-box"&&(Math.round(c+d)!==e&&(c-=Wo(s,"left","right")+d),Math.round(R+f)!==r&&(R-=Wo(s,"top","bottom")+f)),!lc(t)){var A=Math.round(c+d)-e,v=Math.round(R+f)-r;Math.abs(A)!==1&&(c-=A),Math.abs(v)!==1&&(R-=v)}return Yi(l.left,l.top,c,R)}var sc=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof vi(t).SVGGraphicsElement}:function(t){return t instanceof vi(t).SVGElement&&typeof t.getBBox=="function"}}();function lc(t){return t===vi(t).document.documentElement}function uc(t){return Or?sc(t)?oc(t):ac(t):Go}function cc(t){var e=t.x,r=t.y,s=t.width,l=t.height,d=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,f=Object.create(d.prototype);return Vo(f,{x:e,y:r,width:s,height:l,top:r,right:e+s,bottom:l+r,left:e}),f}function Yi(t,e,r,s){return{x:t,y:e,width:r,height:s}}var dc=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Yi(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=uc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),hc=function(){function t(e,r){var s=cc(r);Vo(this,{target:e,contentRect:s})}return t}(),fc=function(){function t(e,r,s){if(this.activeObservations_=[],this.observations_=new Ho,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=s}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof vi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new dc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof vi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(s){return new hc(s.target,s.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),jo=typeof WeakMap<"u"?new WeakMap:new Ho,Ko=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=rc.getInstance(),s=new fc(e,r,this);jo.set(this,s)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Ko.prototype[t]=function(){var e;return(e=jo.get(this))[t].apply(e,arguments)}}),function(){return typeof $i.ResizeObserver<"u"?$i.ResizeObserver:Ko}();var Ac=function(t,e){if(e=e.split(":")[0],t=+t,!t)return!1;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Mr={},pc=Object.prototype.hasOwnProperty,vc;function zo(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return null}}function Jo(t){try{return encodeURIComponent(t)}catch(e){return null}}function _c(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},s;s=e.exec(t);){var l=zo(s[1]),d=zo(s[2]);l===null||d===null||l in r||(r[l]=d)}return r}function mc(t,e){e=e||"";var r=[],s,l;typeof e!="string"&&(e="?");for(l in t)if(pc.call(t,l)){if(s=t[l],!s&&(s===null||s===vc||isNaN(s))&&(s=""),l=Jo(l),s=Jo(s),l===null||s===null)continue;r.push(l+"="+s)}return r.length?e+r.join("&"):""}Mr.stringify=mc,Mr.parse=_c;var $o=Ac,Qi=Mr,gc=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,qo=/[\n\r\t]/g,yc=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Yo=/:\d+$/,bc=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Ec=/^[a-zA-Z]:/;function Nr(t){return(t||"").toString().replace(gc,"")}var Pr=[["#","hash"],["?","query"],function(t,e){return Dt(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Qo={hash:1,query:1};function Zo(t){var e;typeof window<"u"?e=window:typeof Cr<"u"?e=Cr:typeof self<"u"?e=self:e={};var r=e.location||{};t=t||r;var s={},l=typeof t,d;if(t.protocol==="blob:")s=new Ot(unescape(t.pathname),{});else if(l==="string"){s=new Ot(t,{});for(d in Qo)delete s[d]}else if(l==="object"){for(d in t)d in Qo||(s[d]=t[d]);s.slashes===void 0&&(s.slashes=yc.test(t.href))}return s}function Dt(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}function Xo(t,e){t=Nr(t),t=t.replace(qo,""),e=e||{};var r=bc.exec(t),s=r[1]?r[1].toLowerCase():"",l=!!r[2],d=!!r[3],f=0,c;return l?d?(c=r[2]+r[3]+r[4],f=r[2].length+r[3].length):(c=r[2]+r[4],f=r[2].length):d?(c=r[3]+r[4],f=r[3].length):c=r[4],s==="file:"?f>=2&&(c=c.slice(2)):Dt(s)?c=r[4]:s?l&&(c=c.slice(2)):f>=2&&Dt(e.protocol)&&(c=r[4]),{protocol:s,slashes:l||Dt(s),slashesCount:f,rest:c}}function wc(t,e){if(t==="")return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),s=r.length,l=r[s-1],d=!1,f=0;s--;)r[s]==="."?r.splice(s,1):r[s]===".."?(r.splice(s,1),f++):f&&(s===0&&(d=!0),r.splice(s,1),f--);return d&&r.unshift(""),(l==="."||l==="..")&&r.push(""),r.join("/")}function Ot(t,e,r){if(t=Nr(t),t=t.replace(qo,""),!(this instanceof Ot))return new Ot(t,e,r);var s,l,d,f,c,R,A=Pr.slice(),v=typeof e,O=this,m=0;for(v!=="object"&&v!=="string"&&(r=e,e=null),r&&typeof r!="function"&&(r=Qi.parse),e=Zo(e),l=Xo(t||"",e),s=!l.protocol&&!l.slashes,O.slashes=l.slashes||s&&e.slashes,O.protocol=l.protocol||e.protocol||"",t=l.rest,(l.protocol==="file:"&&(l.slashesCount!==2||Ec.test(t))||!l.slashes&&(l.protocol||l.slashesCount<2||!Dt(O.protocol)))&&(A[3]=[/(.*)/,"pathname"]);m<A.length;m++){if(f=A[m],typeof f=="function"){t=f(t,O);continue}d=f[0],R=f[1],d!==d?O[R]=t:typeof d=="string"?(c=d==="@"?t.lastIndexOf(d):t.indexOf(d),~c&&(typeof f[2]=="number"?(O[R]=t.slice(0,c),t=t.slice(c+f[2])):(O[R]=t.slice(c),t=t.slice(0,c)))):(c=d.exec(t))&&(O[R]=c[1],t=t.slice(0,c.index)),O[R]=O[R]||s&&f[3]&&e[R]||"",f[4]&&(O[R]=O[R].toLowerCase())}r&&(O.query=r(O.query)),s&&e.slashes&&O.pathname.charAt(0)!=="/"&&(O.pathname!==""||e.pathname!=="")&&(O.pathname=wc(O.pathname,e.pathname)),O.pathname.charAt(0)!=="/"&&Dt(O.protocol)&&(O.pathname="/"+O.pathname),$o(O.port,O.protocol)||(O.host=O.hostname,O.port=""),O.username=O.password="",O.auth&&(c=O.auth.indexOf(":"),~c?(O.username=O.auth.slice(0,c),O.username=encodeURIComponent(decodeURIComponent(O.username)),O.password=O.auth.slice(c+1),O.password=encodeURIComponent(decodeURIComponent(O.password))):O.username=encodeURIComponent(decodeURIComponent(O.auth)),O.auth=O.password?O.username+":"+O.password:O.username),O.origin=O.protocol!=="file:"&&Dt(O.protocol)&&O.host?O.protocol+"//"+O.host:"null",O.href=O.toString()}function Tc(t,e,r){var s=this;switch(t){case"query":typeof e=="string"&&e.length&&(e=(r||Qi.parse)(e)),s[t]=e;break;case"port":s[t]=e,$o(e,s.protocol)?e&&(s.host=s.hostname+":"+e):(s.host=s.hostname,s[t]="");break;case"hostname":s[t]=e,s.port&&(e+=":"+s.port),s.host=e;break;case"host":s[t]=e,Yo.test(e)?(e=e.split(":"),s.port=e.pop(),s.hostname=e.join(":")):(s.hostname=e,s.port="");break;case"protocol":s.protocol=e.toLowerCase(),s.slashes=!r;break;case"pathname":case"hash":if(e){var l=t==="pathname"?"/":"#";s[t]=e.charAt(0)!==l?l+e:e}else s[t]=e;break;case"username":case"password":s[t]=encodeURIComponent(e);break;case"auth":var d=e.indexOf(":");~d?(s.username=e.slice(0,d),s.username=encodeURIComponent(decodeURIComponent(s.username)),s.password=e.slice(d+1),s.password=encodeURIComponent(decodeURIComponent(s.password))):s.username=encodeURIComponent(decodeURIComponent(e))}for(var f=0;f<Pr.length;f++){var c=Pr[f];c[4]&&(s[c[1]]=s[c[1]].toLowerCase())}return s.auth=s.password?s.username+":"+s.password:s.username,s.origin=s.protocol!=="file:"&&Dt(s.protocol)&&s.host?s.protocol+"//"+s.host:"null",s.href=s.toString(),s}function Rc(t){(!t||typeof t!="function")&&(t=Qi.stringify);var e,r=this,s=r.host,l=r.protocol;l&&l.charAt(l.length-1)!==":"&&(l+=":");var d=l+(r.protocol&&r.slashes||Dt(r.protocol)?"//":"");return r.username?(d+=r.username,r.password&&(d+=":"+r.password),d+="@"):r.password?(d+=":"+r.password,d+="@"):r.protocol!=="file:"&&Dt(r.protocol)&&!s&&r.pathname!=="/"&&(d+="@"),(s[s.length-1]===":"||Yo.test(r.hostname)&&!r.port)&&(s+=":"),d+=s+r.pathname,e=typeof r.query=="object"?t(r.query):r.query,e&&(d+=e.charAt(0)!=="?"?"?"+e:e),r.hash&&(d+=r.hash),d}Ot.prototype={set:Tc,toString:Rc},Ot.extractProtocol=Xo,Ot.location=Zo,Ot.trimLeft=Nr,Ot.qs=Qi;var Sc=Ot;const ea=Io(Sc);var _i=function(t){var e={};function r(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=e,r.d=function(s,l,d){r.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:d})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,l){if(1&l&&(s=r(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var f in s)r.d(d,f,function(c){return s[c]}.bind(null,f));return d},r.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(l,"a",l),l},r.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},r.p="",r(r.s=4)}([function(t,e){function r(s){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t.exports.__esModule=!0,t.exports.default=t.exports,r(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(2);function l(d,f){for(var c=0;c<f.length;c++){var R=f[c];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(d,s(R.key),R)}}t.exports=function(d,f,c){return f&&l(d.prototype,f),c&&l(d,c),Object.defineProperty(d,"prototype",{writable:!1}),d},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(0).default,l=r(3);t.exports=function(d){var f=l(d,"string");return s(f)=="symbol"?f:f+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var s=r(0).default;t.exports=function(l,d){if(s(l)!="object"||!l)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,d||"default");if(s(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(l)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){function s(g,E){console.log("%c "+g+" %c "+E+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px;  color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0;  color: #fff","background:transparent")}r.r(e),r.d(e,"LogLevel",function(){return A}),r.d(e,"DefaultLogger",function(){return x}),r.d(e,"Logger",function(){return m}),r.d(e,"printVersion",function(){return s}),r.d(e,"DEFAULT_LOG_LEVEL",function(){return v});var l=r(1),d=r.n(l),f=function(){function g(){this.timeout=6048e5}var E=g.prototype;return E.write=function(k,y){if(g.available)try{localStorage.setItem(k,JSON.stringify({value:y,time:Date.now()}))}catch(w){}},E.read=function(k,y){if(y===void 0&&(y=!0),g.available)try{var w=localStorage.getItem(k);if(w){var _=JSON.parse(w),b=_.value,I=_.time,P=I===void 0?0:I;if(!y||Date.now()-P<(typeof y=="number"?y:this.timeout))return b}}catch(G){}},d()(g,null,[{key:"available",get:function(){if(g._available===void 0)try{localStorage.setItem("alg","test"),g._available=!0}catch(k){g._available=!1}return g._available}}])}();f._available=void 0;var c,R=f,A=function(g){return g.NONE="none",g.ERROR="e",g.WARN="w",g.INFO="i",g.DEBUG="d",g.VERBOSE="v",g}({}),v=A.ERROR,O=((c={})[A.NONE]={value:1,str:"N"},c[A.ERROR]={value:100,str:"E"},c[A.WARN]={value:200,str:"W"},c[A.INFO]={value:300,str:"I"},c[A.DEBUG]={value:400,str:"D"},c[A.VERBOSE]={value:500,str:"V"},c),m=function(){function g(k){if(this._name="kwai-v",this._level=v,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&location.protocol==="blob:"){var y,w=location.href.split("/"),_=(y=w[w.length-1])==null?void 0:y.match(/(\w+)-/);_&&(this._workerTag=k?k+"-"+_[1]:_[1])}else k&&(this._workerTag=k)}g.loadLogLevel=function(k,y){if(y===void 0&&(y=!0),location.href){var w=new RegExp(k+"=([a-z]{1})"),_=location.href.match(w);if(_&&_.length>1){var b=_[1];if(this._isValueInLevel(b))return b}}var I=new R().read(k,y);if(this._isValueInLevel(I))return I},g.saveLogLevel=function(k,y){this._isValueInLevel(y)&&new R().write(k,y)},g._isValueInLevel=function(k){return Object.values(A).indexOf(k)!==-1};var E=g.prototype;return E.setOutput=function(k){return this._output=k,this},E.setLevel=function(k){return this._level=k,this},E.setId=function(k){return this._id=k,this},E.setName=function(k){return this._name=k,this},E.getLevel=function(){return this._level},E.getOutput=function(){return this._output},E.hasOutput=function(){return!!this._output},E.e=function(k){if(this._isLevelEnabled(this._level,A.ERROR)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.ERROR,k,w);try{var I;(I=this._output)==null||I.e.apply(I,[b].concat(w))}catch(P){}}},E.w=function(k){if(this._isLevelEnabled(this._level,A.WARN)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.WARN,k,w);try{var I;(I=this._output)==null||I.w.apply(I,[b].concat(w))}catch(P){}}},E.i=function(k){if(this._isLevelEnabled(this._level,A.INFO)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.INFO,k,w);try{var I;(I=this._output)==null||I.i.apply(I,[b].concat(w))}catch(P){}}},E.d=function(k){if(this._isLevelEnabled(this._level,A.DEBUG)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.DEBUG,k,w);try{var I;(I=this._output)==null||I.d.apply(I,[b].concat(w))}catch(P){}}},E.v=function(k){if(this._isLevelEnabled(this._level,A.VERBOSE)){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_<y;_++)w[_-1]=arguments[_];var b=this._printLog(A.VERBOSE,k,w);try{var I;(I=this._output)==null||I.v.apply(I,[b].concat(w))}catch(P){}}},E._isLevelEnabled=function(k,y){return O[k].value>=O[y].value},E._printLog=function(k,y,w){var _,b,I=typeof y;if(I==="object")y=((b=y)==null?void 0:b.constructor.name)||"unknown";else if(I==="function"){var P;y=((P=Object.getOwnPropertyDescriptor(y,"name"))==null?void 0:P.value)||"unknown"}var G,H,Q=(((_=O[k])==null?void 0:_.str)||"")+"|"+this._name+"["+(typeof this._id=="function"?this._id():this._id)+"]["+this._workerTag+"]::"+y;return k===A.ERROR?(G=console).error.apply(G,[Q].concat(w.slice(0))):(H=console).log.apply(H,[Q].concat(w.slice(0))),Q},g}(),x=new m}]);_i===void 0&&console.error("esm-webpack-plugin: nothing exported!"),_i.LogLevel;const Si=_i.DefaultLogger;_i.Logger,_i.printVersion,_i.DEFAULT_LOG_LEVEL;/*! js-cookie v3.0.5 | MIT */function Zi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)t[s]=r[s]}return t}var Lc={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ur(t,e){function r(l,d,f){if(!(typeof document>"u")){f=Zi({},e,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),l=encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var R in f)f[R]&&(c+="; "+R,f[R]!==!0&&(c+="="+f[R].split(";")[0]));return document.cookie=l+"="+t.write(d,l)+c}}function s(l){if(!(typeof document>"u"||arguments.length&&!l)){for(var d=document.cookie?document.cookie.split("; "):[],f={},c=0;c<d.length;c++){var R=d[c].split("="),A=R.slice(1).join("=");try{var v=decodeURIComponent(R[0]);if(f[v]=t.read(A,v),l===v)break}catch(O){}}return l?f[l]:f}}return Object.create({set:r,get:s,remove:function(l,d){r(l,"",Zi({},d,{expires:-1}))},withAttributes:function(l){return Ur(this.converter,Zi({},this.attributes,l))},withConverter:function(l){return Ur(Zi({},this.converter,l),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Fr=Ur(Lc,{path:"/"});const Li="did",Br="kwai_player_device_id";function ta(){try{const t=Math.random()*1e9>>>0,e=[],r="0123456789ABCDEF";for(let l=0;l<7;l++)e.push(r.charAt(Math.random()*16));const s=`web_${t}${e.join("")}`;return Si.i(Li,"generate nanoId",s),s}catch(t){}return"web_did_generation_failed"}function kc(){let t="";try{t=(Fr.get("did")||Fr.get("_did")||Fr.get("weblogger_did")||"").trim(),Si.i(Li,"generate deviceId from cookie",t)}catch(e){Si.i(Li,"generate deviceId from cookie err",e)}try{t?localStorage==null||localStorage.setItem(Br,t):(t=((localStorage==null?void 0:localStorage.getItem(Br))||"").trim(),Si.i(Li,"generate deviceId from ls",t)),t||(t=ta(),localStorage==null||localStorage.setItem(Br,t))}catch(e){Si.i(Li,"generate deviceId from ls err",e)}return t||ta()}function Ic(t){Xi=t}let Xi=kc();const ia=class li{constructor(){So(this,"timeout",7*24*3600*1e3)}write(e,r){if(li.available)try{localStorage.setItem(e,JSON.stringify({value:r,time:Date.now()}))}catch(s){}}read(e,r=!0){if(li.available)try{const s=localStorage.getItem(e);if(s){const{value:l,time:d=0}=JSON.parse(s);if(!r||Date.now()-d<(typeof r=="number"?r:this.timeout))return l}}catch(s){}}static get available(){if(typeof li._available>"u")try{localStorage.setItem("alg","test"),li._available=!0}catch(e){li._available=!1}return li._available}};So(ia,"_available");let ra=ia;var Hr={exports:{}};(function(t,e){(function(r,s){var l="1.0.2",d="",f="?",c="function",R="undefined",A="object",v="string",O="major",m="model",x="name",g="type",E="vendor",k="version",y="architecture",w="console",_="mobile",b="tablet",I="smarttv",P="wearable",G="embedded",H=255,Q="Amazon",ue="Apple",he="ASUS",j="BlackBerry",F="Browser",S="Chrome",D="Edge",U="Firefox",N="Google",z="Huawei",Y="LG",C="Microsoft",M="Motorola",B="Opera",Z="Samsung",K="Sony",se="Xiaomi",ve="Zebra",fe="Facebook",Re=function(oe,le){var ne={};for(var ye in oe)le[ye]&&le[ye].length%2===0?ne[ye]=le[ye].concat(oe[ye]):ne[ye]=oe[ye];return ne},ee=function(oe){for(var le={},ne=0;ne<oe.length;ne++)le[oe[ne].toUpperCase()]=oe[ne];return le},ze=function(oe,le){return typeof oe===v?Ie(le).indexOf(Ie(oe))!==-1:!1},Ie=function(oe){return oe.toLowerCase()},Gt=function(oe){return typeof oe===v?oe.replace(/[^\d\.]/g,d).split(".")[0]:s},rt=function(oe,le){if(typeof oe===v)return oe=oe.replace(/^\s\s*/,d).replace(/\s\s*$/,d),typeof le===R?oe:oe.substring(0,H)},Ae=function(oe,le){for(var ne=0,ye,ae,St,pe,it,qe;ne<le.length&&!it;){var Lt=le[ne],oi=le[ne+1];for(ye=ae=0;ye<Lt.length&&!it;)if(it=Lt[ye++].exec(oe),it)for(St=0;St<oi.length;St++)qe=it[++ae],pe=oi[St],typeof pe===A&&pe.length>0?pe.length===2?typeof pe[1]==c?this[pe[0]]=pe[1].call(this,qe):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===c&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=qe?pe[1].call(this,qe,pe[2]):s:this[pe[0]]=qe?qe.replace(pe[1],pe[2]):s:pe.length===4&&(this[pe[0]]=qe?pe[3].call(this,qe.replace(pe[1],pe[2])):s):this[pe]=qe||s;ne+=2}},Ve=function(oe,le){for(var ne in le)if(typeof le[ne]===A&&le[ne].length>0){for(var ye=0;ye<le[ne].length;ye++)if(ze(le[ne][ye],oe))return ne===f?s:ne}else if(ze(le[ne],oe))return ne===f?s:ne;return oe},Nt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},de={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[k,[x,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[k,[x,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[x,k],[/opios[\/ ]+([\w\.]+)/i],[k,[x,B+" Mini"]],[/\bopr\/([\w\.]+)/i],[k,[x,B]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[x,k],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[k,[x,"UC"+F]],[/\bqbcore\/([\w\.]+)/i],[k,[x,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[k,[x,"WeChat"]],[/konqueror\/([\w\.]+)/i],[k,[x,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[k,[x,"IE"]],[/yabrowser\/([\w\.]+)/i],[k,[x,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[x,/(.+)/,"$1 Secure "+F],k],[/\bfocus\/([\w\.]+)/i],[k,[x,U+" Focus"]],[/\bopt\/([\w\.]+)/i],[k,[x,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[k,[x,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[k,[x,"Dolphin"]],[/coast\/([\w\.]+)/i],[k,[x,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[k,[x,"MIUI "+F]],[/fxios\/([-\w\.]+)/i],[k,[x,U]],[/\bqihu|(qi?ho?o?|360)browser/i],[[x,"360 "+F]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[x,/(.+)/,"$1 "+F],k],[/(comodo_dragon)\/([\w\.]+)/i],[[x,/_/g," "],k],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[x,k],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[x],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[x,fe],k],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[x,k],[/\bgsa\/([\w\.]+) .*safari\//i],[k,[x,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[k,[x,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[x,S+" WebView"],k],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[k,[x,"Android "+F]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[x,k],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[k,[x,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[k,x],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[x,[k,Ve,Nt]],[/(webkit|khtml)\/([\w\.]+)/i],[x,k],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[x,"Netscape"],k],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[k,[x,U+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[x,k]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,Ie]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,d,Ie]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,Ie]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[E,Z],[g,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[E,Z],[g,_]],[/\((ip(?:hone|od)[\w ]*);/i],[m,[E,ue],[g,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[E,ue],[g,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[E,z],[g,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[m,[E,z],[g,_]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[E,se],[g,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[E,se],[g,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[E,"OPPO"],[g,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[E,"Vivo"],[g,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[m,[E,"Realme"],[g,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[E,M],[g,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[E,M],[g,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[E,Y],[g,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[E,Y],[g,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[E,"Lenovo"],[g,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[E,"Nokia"],[g,_]],[/(pixel c)\b/i],[m,[E,N],[g,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[E,N],[g,_]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[E,K],[g,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[E,K],[g,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[E,"OnePlus"],[g,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[E,Q],[g,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[E,Q],[g,_]],[/(playbook);[-\w\),; ]+(rim)/i],[m,E,[g,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[E,j],[g,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[E,he],[g,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[E,he],[g,_]],[/(nexus 9)/i],[m,[E,"HTC"],[g,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[E,[m,/_/g," "],[g,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[E,"Acer"],[g,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[E,"Meizu"],[g,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[E,"Sharp"],[g,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[E,m,[g,_]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[E,m,[g,b]],[/(surface duo)/i],[m,[E,C],[g,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[E,"Fairphone"],[g,_]],[/(u304aa)/i],[m,[E,"AT&T"],[g,_]],[/\bsie-(\w*)/i],[m,[E,"Siemens"],[g,_]],[/\b(rct\w+) b/i],[m,[E,"RCA"],[g,b]],[/\b(venue[\d ]{2,7}) b/i],[m,[E,"Dell"],[g,b]],[/\b(q(?:mv|ta)\w+) b/i],[m,[E,"Verizon"],[g,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[E,"Barnes & Noble"],[g,b]],[/\b(tm\d{3}\w+) b/i],[m,[E,"NuVision"],[g,b]],[/\b(k88) b/i],[m,[E,"ZTE"],[g,b]],[/\b(nx\d{3}j) b/i],[m,[E,"ZTE"],[g,_]],[/\b(gen\d{3}) b.+49h/i],[m,[E,"Swiss"],[g,_]],[/\b(zur\d{3}) b/i],[m,[E,"Swiss"],[g,b]],[/\b((zeki)?tb.*\b) b/i],[m,[E,"Zeki"],[g,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[E,"Dragon Touch"],m,[g,b]],[/\b(ns-?\w{0,9}) b/i],[m,[E,"Insignia"],[g,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[E,"NextBook"],[g,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[E,"Voice"],m,[g,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[E,"LvTel"],m,[g,_]],[/\b(ph-1) /i],[m,[E,"Essential"],[g,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[E,"Envizen"],[g,b]],[/\b(trio[-\w\. ]+) b/i],[m,[E,"MachSpeed"],[g,b]],[/\btu_(1491) b/i],[m,[E,"Rotor"],[g,b]],[/(shield[\w ]+) b/i],[m,[E,"Nvidia"],[g,b]],[/(sprint) (\w+)/i],[E,m,[g,_]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[E,C],[g,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[E,ve],[g,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[E,ve],[g,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[E,m,[g,w]],[/droid.+; (shield) bui/i],[m,[E,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[m,[E,K],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[E,C],[g,w]],[/smart-tv.+(samsung)/i],[E,[g,I]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[E,Z],[g,I]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[E,Y],[g,I]],[/(apple) ?tv/i],[E,[m,ue+" TV"],[g,I]],[/crkey/i],[[m,S+"cast"],[E,N],[g,I]],[/droid.+aft(\w)( bui|\))/i],[m,[E,Q],[g,I]],[/\(dtv[\);].+(aquos)/i],[m,[E,"Sharp"],[g,I]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[E,rt],[m,rt],[g,I]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,I]],[/((pebble))app/i],[E,m,[g,P]],[/droid.+; (glass) \d/i],[m,[E,N],[g,P]],[/droid.+; (wt63?0{2,3})\)/i],[m,[E,ve],[g,P]],[/(quest( 2)?)/i],[m,[E,fe],[g,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[E,[g,G]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[m,[g,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[g,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,b]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[g,_]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[E,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[k,[x,D+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[k,[x,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[x,k],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[k,x]],os:[[/microsoft (windows) (vista|xp)/i],[x,k],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[x,[k,Ve,de]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[x,"Windows"],[k,Ve,de]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[k,/_/g,"."],[x,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[x,"Mac OS"],[k,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[k,x],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[x,k],[/\(bb(10);/i],[k,[x,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[k,[x,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[k,[x,U+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[k,[x,"webOS"]],[/crkey\/([\d\.]+)/i],[k,[x,S+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[x,"Chromium OS"],k],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[x,k],[/(sunos) ?([\w\.\d]*)/i],[[x,"Solaris"],k],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[x,k]]},Pe=function(oe,le){if(typeof oe===A&&(le=oe,oe=s),!(this instanceof Pe))return new Pe(oe,le).getResult();var ne=oe||(typeof r!==R&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:d),ye=le?Re(Ge,le):Ge;return this.getBrowser=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.browser),ae.major=Gt(ae.version),ae},this.getCPU=function(){var ae={};return ae[y]=s,Ae.call(ae,ne,ye.cpu),ae},this.getDevice=function(){var ae={};return ae[E]=s,ae[m]=s,ae[g]=s,Ae.call(ae,ne,ye.device),ae},this.getEngine=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.engine),ae},this.getOS=function(){var ae={};return ae[x]=s,ae[k]=s,Ae.call(ae,ne,ye.os),ae},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ne},this.setUA=function(ae){return ne=typeof ae===v&&ae.length>H?rt(ae,H):ae,this},this.setUA(ne),this};Pe.VERSION=l,Pe.BROWSER=ee([x,k,O]),Pe.CPU=ee([y]),Pe.DEVICE=ee([m,E,g,w,_,I,b,P,G]),Pe.ENGINE=Pe.OS=ee([x,k]),t.exports&&(e=t.exports=Pe),e.UAParser=Pe;var Fe=typeof r!==R&&(r.jQuery||r.Zepto);if(Fe&&!Fe.ua){var be=new Pe;Fe.ua=be.getResult(),Fe.ua.get=function(){return be.getUA()},Fe.ua.set=function(oe){be.setUA(oe);var le=be.getResult();for(var ne in le)Fe.ua[ne]=le[ne]}}})(typeof window=="object"?window:Cr)})(Hr,Hr.exports);var xc=Hr.exports;const Yt=Io(xc)(),er=Yt.os.name,Cc=er&&er.toLowerCase().indexOf("android")>=0,Dc=er&&er.toLowerCase().indexOf("ios")>=0,Qt=Yt.device.type==="mobile"||Cc||Dc,Oc="kwai-p";let na=ko.ERROR;typeof location<"u"&&(na=Wu.loadLogLevel("kwai-player-log")||ko.ERROR,Gu.setLevel(na).setName(Oc));const oa=Yu.EventEmitter;var Mc=Object.defineProperty,Nc=(t,e,r)=>e in t?Mc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Me=(t,e,r)=>(Nc(t,typeof e!="symbol"?e+"":e,r),r);const aa={development:"./misc2",production:"https://log-sdk.ksapisrv.com/rest/wd/common/log/collect/misc2",oversea:"https://logsdk.kwai-pro.com/rest/wd/common/log/collect/misc2","logger-oversea":"https://data-track-sgp.corp.kuaishou.com/rest/wd/common/log/collect/misc2"},Pc=5e3;var mi=(t=>(t.SUMMARY="KP_WEB_SUMMARY",t.REALTIME="KP_WEB_REALTIME",t.DOWNLOAD="KP_WEB_DOWNLOAD",t.EVENT="KP_WEB_EVENT",t))(mi||{});const Uc={summary:"KP_WEB_SUMMARY",realtimeBeacon:"KP_WEB_REALTIME",download:"KP_WEB_DOWNLOAD",event:"KP_WEB_EVENT"},sa="production",Fc="streamlake",la=["summary","realtimeBeacon","download","event"];(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var Bc=Object.defineProperty,Hc=(t,e,r)=>e in t?Bc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ft=(t,e,r)=>(Hc(t,typeof e!="symbol"?e+"":e,r),r);const Vc="ControlsPlugin",Gc="I18nPlugin",Wc="LoggerPlugin",jc="HotkeyPlugin",Kc="PlayInfoPlugin",zc="RotatePlugin",Jc="PreviewPlugin",$c="MaskPlugin",qc="VRPlugin",Yc="DanmakuPlugin";let At=class extends oa{static isInstanceOfPlugin(e){return typeof e.beforeInstall=="function"&&typeof e.afterInstall=="function"&&typeof e.beforeUninstall=="function"&&typeof e.afterUninstall=="function"&&typeof e.getLabel=="function"}get controlsSoltBtns(){}beforeInstall(e,r){}afterInstall(e,r){}beforeUninstall(e){}afterUninstall(e){}};ft(At,"label"),ft(At,"version"),ft(At,"isSupported"),ft(class dl extends At{getLabel(){return dl.label}beforeInstall(e,r){}afterInstall(e,r){}},"label",Vc),ft(class hl extends At{getLabel(){return hl.label}beforeInstall(e,r){}afterInstall(e,r){}},"label",Gc);const ua=class fl extends At{getLabel(){return fl.label}beforeInstall(e,r){}afterInstall(e,r){}addBizLog(e,r){}appendSummaryField(e,r){}};ft(ua,"label",Wc);let Qc=ua;ft(class Al extends At{getLabel(){return Al.label}},"label",jc),ft(class pl extends At{getLabel(){return pl.label}},"label",Kc),ft(class vl extends At{getLabel(){return vl.label}},"label",zc),ft(class _l extends At{getLabel(){return _l.label}},"label",Jc),ft(class ml extends At{getLabel(){return ml.label}},"label",$c),ft(class gl extends At{getLabel(){return gl.label}},"label",qc),ft(class yl extends At{getLabel(){return yl.label}},"label",Yc);var ii=(t=>(t.ERROR="error",t.MANIFEST_PARSED="manifestparsed",t.LEVEL_SWITCHING="levelswitching",t.LEVEL_SWITCHED="levelswitched",t.LEVEL_SWITCH_PLAYING="levelswitchplaying",t.LEVEL_SWITCH_FAILED="levelswitchfailed",t.LEVEL_UPDATED="levelupdated",t.AUDIO_TRACKS_SWITCHING="audiotrackswitching",t.AUDIO_TRACKS_SWITCHED="audiotrackswitched",t.LOADSTART="loadstart",t.PROGRESS="progress",t.SUSPEND="suspend",t.ABORT="abort",t.EMPTIED="emptied",t.STALLED="stalled",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.CANPLAY="canplay",t.CANPLAYTHROUGH="canplaythrough",t.PLAYING="playing",t.WAITING="waiting",t.SEEKING="seeking",t.SEEKED="seeked",t.ENDED="ended",t.DURATIONCHANGE="durationchange",t.TIMEUPDATE="timeupdate",t.PLAY="play",t.PAUSE="pause",t.RATECHANGE="ratechange",t.RESIZE="resize",t.VOLUMECHANGE="volumechange",t.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",t.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",t.REPORT="report",t.VIDEO_RENDERER_CHANGE="videorendererchange",t.FULLSCREEN_CHANGE="fullscreenchange",t.ATTRIBUTE_CHANGE="attribute:change",t.INTERACTION="interaction",t.LIVE_SHIFT_CHANGE="liveshiftchange",t.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",t.OBJECT_FIT_CHANGE="objectfitchange",t.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",t.ATTRIBUTE_CHANGE_SRC="attribute:change:src",t.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",t.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",t.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",t.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",t.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",t.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",t.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",t.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",t.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",t.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",t.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",t.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",t.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",t.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",t.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",t.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",t.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",t.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",t.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",t.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",t.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",t.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",t.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",t.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",t.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",t.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",t.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",t.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",t.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",t.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",t.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",t.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",t.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",t.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",t.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",t.CLICK_NEXT="clicknext",t.CLICK_LOGIN="clicklogin",t.CLICK_REGISTER="clickregister",t.CLICK_VIP="clickvip",t))(ii||{}),tr,Zc=new Uint8Array(16);function Xc(){if(!tr&&(tr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!tr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return tr(Zc)}const ed=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function td(t){return typeof t=="string"&&ed.test(t)}for(var ot=[],Vr=0;Vr<256;++Vr)ot.push((Vr+256).toString(16).substr(1));function id(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(ot[t[e+0]]+ot[t[e+1]]+ot[t[e+2]]+ot[t[e+3]]+"-"+ot[t[e+4]]+ot[t[e+5]]+"-"+ot[t[e+6]]+ot[t[e+7]]+"-"+ot[t[e+8]]+ot[t[e+9]]+"-"+ot[t[e+10]]+ot[t[e+11]]+ot[t[e+12]]+ot[t[e+13]]+ot[t[e+14]]+ot[t[e+15]]).toLowerCase();if(!td(r))throw TypeError("Stringified UUID is invalid");return r}function ca(t,e,r){t=t||{};var s=t.random||(t.rng||Xc)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){r=r||0;for(var l=0;l<16;++l)e[r+l]=s[l];return e}return id(s)}const Gr="log-ctx";class rd{constructor(){Me(this,"_env",sa),Me(this,"_reportTypes",[]),Me(this,"_player"),Me(this,"_logger"),Me(this,"_logBaseInfo",this._getDefaultLogBaseInfo()),Me(this,"_biz",{}),Me(this,"_extraSummaryFields",{}),Me(this,"_forceSendBeacon",!1)}setBaseInfo(e,r,s){this._player=e,this._logger=e.logger,this._logBaseInfo.env=this._env=r,this._reportTypes=s}setBizData(e){var r,s;if((r=this._logger)==null||r.i(Gr,"set biz",e),!e){this._logBaseInfo=this._getDefaultLogBaseInfo();return}const l={};Object.keys(e).forEach(d=>{var f;const c=this._underscoreToCamelCase(d),R=e[d];if(["sessionId","deviceId","userId","globalId","networkType","packageName","versionName","channel"].indexOf(c)>=0&&(typeof R=="string"||typeof R=="number")){const A=this._val2String(e[d]).trim();A&&((f=this._logger)==null||f.i(Gr,"biz to log:",c,A),l[c]=A)}d!=="secretId"&&d!=="secretKey"&&(this._biz[d]=R)}),Object.assign(this._logBaseInfo,l),l.deviceId&&((s=this._logger)==null||s.i(Gr,`update did by bizData. ${l.deviceId}`),Ic(this._logBaseInfo.deviceId))}preprocessingLog(e,r,s){var l,d;if(r)return r=Object.assign(r,{player_version:((l=this._player)==null?void 0:l.version)||"",pack_version:((d=this._player)==null?void 0:d.packVersion)||"",biz:this._biz}),e===mi.SUMMARY&&typeof r=="object"&&(s?r.extra=Object.assign({},this._extraSummaryFields,s):r.extra=this._extraSummaryFields),r}clearExtraSummary(){this._extraSummaryFields={}}appendSummaryField(e,r){this._extraSummaryFields[e]=r}get reportTypes(){return this._reportTypes}get logBaseInfo(){var e;return(e=this._player)!=null&&e.productName&&(this._logBaseInfo.productName=this._player.productName),this._logBaseInfo.deviceId||(this._logBaseInfo.deviceId=Xi),this._logBaseInfo}get player(){return this._player}set forceSendBeacon(e){this._forceSendBeacon=e}get forceSendBeacon(){return this._forceSendBeacon}_getDefaultLogBaseInfo(){let e=10;return Yt.os.name==="iOS"?e=9:Yt.os.name==="Android"&&(e=8),{env:this._env,productName:Fc,sessionId:ca(),platform:e,deviceId:Xi,userId:"",globalId:"",networkType:"",packageName:"",versionName:"",channel:""}}_underscoreToCamelCase(e){return e.replace(/_([a-z])/g,(r,s)=>s.toUpperCase())}_val2String(e){return typeof e=="number"?e.toString():e||""}}const Wr="kwai-player-web-log-temp",nd=3*24*3600*1e3,od=5*1e3,da=1,ri="log-reissue";class ad{constructor(e,r,s){Me(this,"_ctx"),Me(this,"_logger"),Me(this,"_webLogger"),Me(this,"_active",!1),Me(this,"_processingTs",0),Me(this,"_lc",new ra),Me(this,"_timer",0),Me(this,"_checkMissing",!1),Me(this,"_tick",()=>{if(!this._active||!this._ctx.player)return;this._checkMissing&&(this._checkMissing=!1,this._checkMissingLog());const l=performance.now();if(l-this._processingTs>=od){this._processingTs=l;const d=this._ctx.preprocessingLog(mi.SUMMARY,this._ctx.player.audienceStat,{reissue_log:1});d&&(this._logger.v(ri,"write temp"),this._writeTemp(this._webLogger.generateFormData(this._ctx.logBaseInfo,[{key:mi.SUMMARY,value:d}])))}}),Me(this,"_startTimer",()=>{this._timer||(this._timer=+setInterval(this._tick,1e3))}),Me(this,"_stopTimer",()=>{clearInterval(this._timer),this._timer=0}),this._ctx=e,this._logger=r,this._webLogger=s,this._lc.timeout=nd}start(){this._logger.i(ri,"start"),this._active||(this._active=!0,this._processingTs=performance.now(),this._checkMissing=!0,this._startTimer())}stop(){this._logger.i(ri,"stop"),this._active=!1,this._clear(),this._stopTimer()}_checkMissingLog(){const e=this._readTemp();this._clear(),e?(this._logger.i(ri,"send missing log"),this._webLogger.send(this._ctx.logBaseInfo.env,mi.SUMMARY,e.value)):this._logger.i(ri,"no missing log")}_clear(){try{localStorage==null||localStorage.removeItem(Wr)}catch(e){}}_writeTemp(e){if(!e)return;const r={version:da,value:e,checkSum:this._fletcher16(e)};try{this._lc.write(Wr,btoa(JSON.stringify(r)))}catch(s){}}_readTemp(){const e=this._lc.read(Wr,!0);if(typeof e=="string")try{const r=JSON.parse(atob(e));if(r.version===da&&typeof r.value=="string"&&r.checkSum===this._fletcher16(r.value))return this._logger.i(ri,"read success"),r;this._logger.i(ri,"read failed",r)}catch(r){}}_fletcher16(e){let r=0,s=0;for(let l=0;l<e.length;l++)r=(r+e.charCodeAt(l))%255,s=(s+r)%255;return s<<8|r}}const ha={unknown:0,none:1,wifi:2,"4g":3,"3g":4,"2g":5,"5g":7,"slow-2g":5},jr=new Date().toString().match(/GMT\+\d+/);let Kr="";function sd(){try{return parseInt((localStorage==null?void 0:localStorage.getItem("kwai_player_client_increment_id"))||"")||0}catch(t){}return 0}const gi="web-logger",zr=class ui{constructor(e){Me(this,"_waitingQueue",[]),Me(this,"_nextTickTimer"),Me(this,"_logger"),this._logger=e}sendLog(e,r,s,l=!1,d){this._logger.i(gi,"sendLog",e,r,s,`forceSendBeacon: ${l} immediately: ${d}`),s&&(this._waitingQueue.push({key:r,value:s}),d?(this.send(e.env,e.productName,this.generateFormData(e,this._waitingQueue),l),this._waitingQueue.splice(0)):this._nextTickTimer||(this._nextTickTimer=setTimeout(()=>{this._nextTickTimer=void 0,this.send(e.env,e.productName,this.generateFormData(e,this._waitingQueue),l),this._waitingQueue.splice(0)},0)))}send(e,r,s,l=!1){if(this._logger.i(gi,"send",e,r,!!s,`forceSendBeacon: ${l}`),!s)return;let d=aa[e]||aa.production;ui._clientIncrementId++;try{localStorage&&(localStorage.kwai_player_client_increment_id=ui._clientIncrementId)}catch(c){}const f=new ea(d,!0);if(f.query.v="3.10.24",f.query.kpn=r,d=f.toString(),this._logger.i(gi,"send",e,r,!!s,d),l&&navigator.sendBeacon){const c=navigator.sendBeacon(d,s);this._logger.i(gi,"send data use sendBeacon.",c),c||this._sendByXhr(d,s)}else this._sendByXhr(d,s)}_sendByXhr(e,r){this._logger.i(gi,"send data use xhr.");const s=new XMLHttpRequest;s.open("POST",e),s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),s.onerror=s.ontimeout=()=>{this._logger.i("sendLog error"),s.onerror=s.ontimeout=s.onload=null},s.onload=()=>{s.onerror=s.ontimeout=s.onload=null},s.timeout=Pc,s.send(r)}generateFormData(e,r){this._logger.i(gi,`device_id: ${e.deviceId}`);const s={common:ui._buildCommon(e,{service_name:"KwaiPlayerWeb"}),logs:r.map(l=>ui._buildEvent(e,l.key,l.value))};return s.logs.length?JSON.stringify(s):""}static _buildEvent(e,r,s){Kr||(Kr=ca());const l={identity:Kr,page:location.href,hostname:location.hostname,page_type:2,params:new ea(location.href,!0).query};return{client_timestamp:Date.now(),client_increment_id:ui._clientIncrementId,session_id:e.sessionId,time_zone:ui._timeZone,stat_package:{custom_stat_event:{key:r,value:JSON.stringify(Object.assign({},s,{url_package:l}))}}}}static _buildCommon(e,r){return Xs({identity_package:{device_id:e.deviceId,global_id:e.globalId,user_id:e.userId},app_package:{language:navigator.language,platform:e.platform,container:e.platform===10?"WEB":"H5",package_name:e.packageName,product_name:e.productName,version_name:e.versionName,channel:e.channel},device_package:{os_version:Yt.os.version,model:Yt.os.name,ua:navigator.userAgent},need_encrypt:!1,sdk_version:"",h5_extra_attr:this._getH5ExtraAttr(e),global_attr:"{}",network_package:{type:this._getNetworkType(e.networkType)}},r)}static _getNetworkType(e){var r;const s=e||((r=(navigator==null?void 0:navigator.connection)||(navigator==null?void 0:navigator.mozConnection)||(navigator==null?void 0:navigator.webkitConnection))==null?void 0:r.effectiveType);return s&&ha[s]||ha.unknown}static _getH5ExtraAttr(e){const r=parseFloat(devicePixelRatio.toFixed(3))||1;return JSON.stringify({sdk_name:"",sdk_version:"",sdk_bundle:"",app_version_name:e.versionName,resolution:`${Math.floor(screen.width*r)}x${Math.floor(screen.height*r)}`,screen_width:Math.floor(screen.width),screen_height:Math.floor(screen.height),device_pixel_ratio:r,domain:location.origin,fromIframe:self!==top})}};Me(zr,"_clientIncrementId",sd()),Me(zr,"_timeZone",jr&&jr[0]?jr[0]:"");let ld=zr;const ki="logger-plugin";class fa extends Qc{constructor(){super(...arguments),Me(this,"_summaryAlreadySend",!1),Me(this,"_webLogger"),Me(this,"_logger"),Me(this,"_ctx",new rd),Me(this,"_logReissue"),Me(this,"_parseBizData",()=>{var e,r,s;(r=this._logger)==null||r.i(ki,"parse biz data",(e=this._ctx.player)==null?void 0:e.bizData),this._ctx.setBizData((s=this._ctx.player)==null?void 0:s.bizData)}),Me(this,"_onReport",e=>{var r,s;if(this._ctx.reportTypes.indexOf(e.type)!==-1){const l=Uc[e.type];l?((r=this._logger)==null||r.i(ki,"sendLog",this._ctx.logBaseInfo.productName,l),this._send(l,e.value)):(s=this._logger)==null||s.i(ki,"unknown weblogger key.")}}),Me(this,"_onSrcChange",()=>{var e;this._sendSummary(),this._summaryAlreadySend=!1,(e=this._logReissue)==null||e.start()}),Me(this,"_sendSummary",()=>{var e,r;!this._ctx.player||this._summaryAlreadySend||!this._ctx.player.audienceStat||((e=this._logReissue)==null||e.stop(),this._summaryAlreadySend=!0,(r=this._logger)==null||r.i(ki,"send summary"),this._send(mi.SUMMARY,this._ctx.player.audienceStat,!0))}),Me(this,"_onBeforeunload",()=>{this._sendSummary()})}beforeInstall(e,r){let s;r&&r.reportTypes&&Array.isArray(r.reportTypes)&&(s=r.reportTypes.filter(l=>la.indexOf(l)>=0)),r!=null&&r.productName&&(e.productName=r.productName),typeof(r==null?void 0:r.forceSendBeacon)<"u"&&(this._ctx.forceSendBeacon=r.forceSendBeacon),this._logger=e.logger,this._ctx.setBaseInfo(e,(r==null?void 0:r.env)||sa,s||la),this._webLogger||(this._webLogger=new ld(e.logger)),this._logReissue=new ad(this._ctx,e.logger,this._webLogger),e.on(ii.REPORT,this._onReport),e.on(ii.ATTRIBUTE_CHANGE_SRC,this._onSrcChange),e.on(ii.ATTRIBUTE_CHANGE_BIZ_DATA,this._parseBizData),window.addEventListener("beforeunload",this._onBeforeunload),Yt&&Yt.device.type==="mobile"&&window.addEventListener("unload",this._onBeforeunload),this._parseBizData()}beforeUninstall(){this._sendSummary()}afterUninstall(){var e,r,s;(e=this._ctx.player)==null||e.off(ii.REPORT,this._onReport),(r=this._ctx.player)==null||r.off(ii.ATTRIBUTE_CHANGE_SRC,this._onSrcChange),(s=this._ctx.player)==null||s.off(ii.ATTRIBUTE_CHANGE_BIZ_DATA,this._parseBizData),window.removeEventListener("beforeunload",this._onBeforeunload),window.removeEventListener("unload",this._onBeforeunload)}appendSummaryField(e,r){var s;(s=this._logger)==null||s.i(ki,"add summary field",e,r),this._ctx.appendSummaryField(e,r)}_send(e,r,s){var l;r&&((l=this._webLogger)==null||l.sendLog(this._ctx.logBaseInfo,e,this._ctx.preprocessingLog(e,r),this._ctx.forceSendBeacon,s))}}Me(fa,"version","1.1.0-alpha.0");var ir,Ee,Aa,ni,pa,va,Jr,_a,rr={},ma=[],ud=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Zt(t,e){for(var r in e)t[r]=e[r];return t}function ga(t){var e=t.parentNode;e&&e.removeChild(t)}function cd(t,e,r){var s,l,d,f={};for(d in e)d=="key"?s=e[d]:d=="ref"?l=e[d]:f[d]=e[d];if(arguments.length>2&&(f.children=arguments.length>3?ir.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(d in t.defaultProps)f[d]===void 0&&(f[d]=t.defaultProps[d]);return nr(t,f,s,l,null)}function nr(t,e,r,s,l){var d={type:t,props:e,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:l==null?++Aa:l};return l==null&&Ee.vnode!=null&&Ee.vnode(d),d}function Ii(t){return t.children}function or(t,e){this.props=t,this.context=e}function xi(t,e){if(e==null)return t.__?xi(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?xi(t):null}function ya(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return ya(t)}}function $r(t){(!t.__d&&(t.__d=!0)&&ni.push(t)&&!ar.__r++||pa!==Ee.debounceRendering)&&((pa=Ee.debounceRendering)||va)(ar)}function ar(){var t,e,r,s,l,d,f,c;for(ni.sort(Jr);t=ni.shift();)t.__d&&(e=ni.length,s=void 0,l=void 0,f=(d=(r=t).__v).__e,(c=r.__P)&&(s=[],(l=Zt({},d)).__v=d.__v+1,qr(c,d,l,r.__n,c.ownerSVGElement!==void 0,d.__h!=null?[f]:null,s,f==null?xi(d):f,d.__h),ka(s,d),d.__e!=f&&ya(d)),ni.length>e&&ni.sort(Jr));ar.__r=0}function ba(t,e,r,s,l,d,f,c,R,A){var v,O,m,x,g,E,k,y=s&&s.__k||ma,w=y.length;for(r.__k=[],v=0;v<e.length;v++)if((x=r.__k[v]=(x=e[v])==null||typeof x=="boolean"||typeof x=="function"?null:typeof x=="string"||typeof x=="number"||typeof x=="bigint"?nr(null,x,null,null,x):Array.isArray(x)?nr(Ii,{children:x},null,null,null):x.__b>0?nr(x.type,x.props,x.key,x.ref?x.ref:null,x.__v):x)!=null){if(x.__=r,x.__b=r.__b+1,(m=y[v])===null||m&&x.key==m.key&&x.type===m.type)y[v]=void 0;else for(O=0;O<w;O++){if((m=y[O])&&x.key==m.key&&x.type===m.type){y[O]=void 0;break}m=null}qr(t,x,m=m||rr,l,d,f,c,R,A),g=x.__e,(O=x.ref)&&m.ref!=O&&(k||(k=[]),m.ref&&k.push(m.ref,null,x),k.push(O,x.__c||g,x)),g!=null?(E==null&&(E=g),typeof x.type=="function"&&x.__k===m.__k?x.__d=R=Ea(x,R,t):R=wa(t,x,m,y,g,R),typeof r.type=="function"&&(r.__d=R)):R&&m.__e==R&&R.parentNode!=t&&(R=xi(m))}for(r.__e=E,v=w;v--;)y[v]!=null&&(typeof r.type=="function"&&y[v].__e!=null&&y[v].__e==r.__d&&(r.__d=Ta(s).nextSibling),xa(y[v],y[v]));if(k)for(v=0;v<k.length;v++)Ia(k[v],k[++v],k[++v])}function Ea(t,e,r){for(var s,l=t.__k,d=0;l&&d<l.length;d++)(s=l[d])&&(s.__=t,e=typeof s.type=="function"?Ea(s,e,r):wa(r,s,s,l,s.__e,e));return e}function wa(t,e,r,s,l,d){var f,c,R;if(e.__d!==void 0)f=e.__d,e.__d=void 0;else if(r==null||l!=d||l.parentNode==null)e:if(d==null||d.parentNode!==t)t.appendChild(l),f=null;else{for(c=d,R=0;(c=c.nextSibling)&&R<s.length;R+=1)if(c==l)break e;t.insertBefore(l,d),f=d}return f!==void 0?f:l.nextSibling}function Ta(t){var e,r,s;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((r=t.__k[e])&&(s=Ta(r)))return s}return null}function dd(t,e,r,s,l){var d;for(d in r)d==="children"||d==="key"||d in e||sr(t,d,null,r[d],s);for(d in e)l&&typeof e[d]!="function"||d==="children"||d==="key"||d==="value"||d==="checked"||r[d]===e[d]||sr(t,d,e[d],r[d],s)}function Ra(t,e,r){e[0]==="-"?t.setProperty(e,r==null?"":r):t[e]=r==null?"":typeof r!="number"||ud.test(e)?r:r+"px"}function sr(t,e,r,s,l){var d;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof s=="string"&&(t.style.cssText=s=""),s)for(e in s)r&&e in r||Ra(t.style,e,"");if(r)for(e in r)s&&r[e]===s[e]||Ra(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")d=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+d]=r,r?s||t.addEventListener(e,d?La:Sa,d):t.removeEventListener(e,d?La:Sa,d);else if(e!=="dangerouslySetInnerHTML"){if(l)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=r==null?"":r;break e}catch(f){}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function Sa(t){return this.l[t.type+!1](Ee.event?Ee.event(t):t)}function La(t){return this.l[t.type+!0](Ee.event?Ee.event(t):t)}function qr(t,e,r,s,l,d,f,c,R){var A,v,O,m,x,g,E,k,y,w,_,b,I,P,G,H=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(R=r.__h,c=e.__e=r.__e,e.__h=null,d=[c]),(A=Ee.__b)&&A(e);try{e:if(typeof H=="function"){if(k=e.props,y=(A=H.contextType)&&s[A.__c],w=A?y?y.props.value:A.__:s,r.__c?E=(v=e.__c=r.__c).__=v.__E:("prototype"in H&&H.prototype.render?e.__c=v=new H(k,w):(e.__c=v=new or(k,w),v.constructor=H,v.render=fd),y&&y.sub(v),v.props=k,v.state||(v.state={}),v.context=w,v.__n=s,O=v.__d=!0,v.__h=[],v._sb=[]),v.__s==null&&(v.__s=v.state),H.getDerivedStateFromProps!=null&&(v.__s==v.state&&(v.__s=Zt({},v.__s)),Zt(v.__s,H.getDerivedStateFromProps(k,v.__s))),m=v.props,x=v.state,v.__v=e,O)H.getDerivedStateFromProps==null&&v.componentWillMount!=null&&v.componentWillMount(),v.componentDidMount!=null&&v.__h.push(v.componentDidMount);else{if(H.getDerivedStateFromProps==null&&k!==m&&v.componentWillReceiveProps!=null&&v.componentWillReceiveProps(k,w),!v.__e&&v.shouldComponentUpdate!=null&&v.shouldComponentUpdate(k,v.__s,w)===!1||e.__v===r.__v){for(e.__v!==r.__v&&(v.props=k,v.state=v.__s,v.__d=!1),v.__e=!1,e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(Q){Q&&(Q.__=e)}),_=0;_<v._sb.length;_++)v.__h.push(v._sb[_]);v._sb=[],v.__h.length&&f.push(v);break e}v.componentWillUpdate!=null&&v.componentWillUpdate(k,v.__s,w),v.componentDidUpdate!=null&&v.__h.push(function(){v.componentDidUpdate(m,x,g)})}if(v.context=w,v.props=k,v.__P=t,b=Ee.__r,I=0,"prototype"in H&&H.prototype.render){for(v.state=v.__s,v.__d=!1,b&&b(e),A=v.render(v.props,v.state,v.context),P=0;P<v._sb.length;P++)v.__h.push(v._sb[P]);v._sb=[]}else do v.__d=!1,b&&b(e),A=v.render(v.props,v.state,v.context),v.state=v.__s;while(v.__d&&++I<25);v.state=v.__s,v.getChildContext!=null&&(s=Zt(Zt({},s),v.getChildContext())),O||v.getSnapshotBeforeUpdate==null||(g=v.getSnapshotBeforeUpdate(m,x)),G=A!=null&&A.type===Ii&&A.key==null?A.props.children:A,ba(t,Array.isArray(G)?G:[G],e,r,s,l,d,f,c,R),v.base=e.__e,e.__h=null,v.__h.length&&f.push(v),E&&(v.__E=v.__=null),v.__e=!1}else d==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=hd(r.__e,e,r,s,l,d,f,R);(A=Ee.diffed)&&A(e)}catch(Q){e.__v=null,(R||d!=null)&&(e.__e=c,e.__h=!!R,d[d.indexOf(c)]=null),Ee.__e(Q,e,r)}}function ka(t,e){Ee.__c&&Ee.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){Ee.__e(s,r.__v)}})}function hd(t,e,r,s,l,d,f,c){var R,A,v,O=r.props,m=e.props,x=e.type,g=0;if(x==="svg"&&(l=!0),d!=null){for(;g<d.length;g++)if((R=d[g])&&"setAttribute"in R==!!x&&(x?R.localName===x:R.nodeType===3)){t=R,d[g]=null;break}}if(t==null){if(x===null)return document.createTextNode(m);t=l?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,m.is&&m),d=null,c=!1}if(x===null)O===m||c&&t.data===m||(t.data=m);else{if(d=d&&ir.call(t.childNodes),A=(O=r.props||rr).dangerouslySetInnerHTML,v=m.dangerouslySetInnerHTML,!c){if(d!=null)for(O={},g=0;g<t.attributes.length;g++)O[t.attributes[g].name]=t.attributes[g].value;(v||A)&&(v&&(A&&v.__html==A.__html||v.__html===t.innerHTML)||(t.innerHTML=v&&v.__html||""))}if(dd(t,m,O,l,c),v)e.__k=[];else if(g=e.props.children,ba(t,Array.isArray(g)?g:[g],e,r,s,l&&x!=="foreignObject",d,f,d?d[0]:r.__k&&xi(r,0),c),d!=null)for(g=d.length;g--;)d[g]!=null&&ga(d[g]);c||("value"in m&&(g=m.value)!==void 0&&(g!==t.value||x==="progress"&&!g||x==="option"&&g!==O.value)&&sr(t,"value",g,O.value,!1),"checked"in m&&(g=m.checked)!==void 0&&g!==t.checked&&sr(t,"checked",g,O.checked,!1))}return t}function Ia(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(s){Ee.__e(s,r)}}function xa(t,e,r){var s,l;if(Ee.unmount&&Ee.unmount(t),(s=t.ref)&&(s.current&&s.current!==t.__e||Ia(s,null,e)),(s=t.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(d){Ee.__e(d,e)}s.base=s.__P=null,t.__c=void 0}if(s=t.__k)for(l=0;l<s.length;l++)s[l]&&xa(s[l],e,r||typeof t.type!="function");r||t.__e==null||ga(t.__e),t.__=t.__e=t.__d=void 0}function fd(t,e,r){return this.constructor(t,r)}function Ca(t,e,r){var s,l,d;Ee.__&&Ee.__(t,e),l=(s=typeof r=="function")?null:r&&r.__k||e.__k,d=[],qr(e,t=(!s&&r||e).__k=cd(Ii,null,[t]),l||rr,rr,e.ownerSVGElement!==void 0,!s&&r?[r]:l?null:e.firstChild?ir.call(e.childNodes):null,d,!s&&r?r:l?l.__e:e.firstChild,s),ka(d,t)}function Ad(t,e){var r={__c:e="__cC"+_a++,__:t,Consumer:function(s,l){return s.children(l)},Provider:function(s){var l,d;return this.getChildContext||(l=[],(d={})[e]=this,this.getChildContext=function(){return d},this.shouldComponentUpdate=function(f){this.props.value!==f.value&&l.some(function(c){c.__e=!0,$r(c)})},this.sub=function(f){l.push(f);var c=f.componentWillUnmount;f.componentWillUnmount=function(){l.splice(l.indexOf(f),1),c&&c.call(f)}}),s.children}};return r.Provider.__=r.Consumer.contextType=r}ir=ma.slice,Ee={__e:function(t,e,r,s){for(var l,d,f;e=e.__;)if((l=e.__c)&&!l.__)try{if((d=l.constructor)&&d.getDerivedStateFromError!=null&&(l.setState(d.getDerivedStateFromError(t)),f=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(t,s||{}),f=l.__d),f)return l.__E=l}catch(c){t=c}throw t}},Aa=0,or.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Zt({},this.state),typeof t=="function"&&(t=t(Zt({},r),this.props)),t&&Zt(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),$r(this))},or.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),$r(this))},or.prototype.render=Ii,ni=[],va=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jr=function(t,e){return t.__v.__b-e.__v.__b},ar.__r=0,_a=0;var pd=0;function Se(t,e,r,s,l,d){var f,c,R={};for(c in e)c=="ref"?f=e[c]:R[c]=e[c];var A={type:t,props:R,key:r,ref:f,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--pd,__source:l,__self:d};if(typeof t=="function"&&(f=t.defaultProps))for(c in f)R[c]===void 0&&(R[c]=f[c]);return Ee.vnode&&Ee.vnode(A),A}var yi,We,Yr,Da,Ci=0,Oa=[],lr=[],Ma=Ee.__b,Na=Ee.__r,Pa=Ee.diffed,Ua=Ee.__c,Fa=Ee.unmount;function Di(t,e){Ee.__h&&Ee.__h(We,t,Ci||e),Ci=0;var r=We.__H||(We.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:lr}),r.__[t]}function tt(t){return Ci=1,vd(Va,t)}function vd(t,e,r){var s=Di(yi++,2);if(s.t=t,!s.__c&&(s.__=[r?r(e):Va(void 0,e),function(c){var R=s.__N?s.__N[0]:s.__[0],A=s.t(R,c);R!==A&&(s.__N=[A,s.__[1]],s.__c.setState({}))}],s.__c=We,!We.u)){var l=function(c,R,A){if(!s.__c.__H)return!0;var v=s.__c.__H.__.filter(function(m){return m.__c});if(v.every(function(m){return!m.__N}))return!d||d.call(this,c,R,A);var O=!1;return v.forEach(function(m){if(m.__N){var x=m.__[0];m.__=m.__N,m.__N=void 0,x!==m.__[0]&&(O=!0)}}),!(!O&&s.__c.props===c)&&(!d||d.call(this,c,R,A))};We.u=!0;var d=We.shouldComponentUpdate,f=We.componentWillUpdate;We.componentWillUpdate=function(c,R,A){if(this.__e){var v=d;d=void 0,l(c,R,A),d=v}f&&f.call(this,c,R,A)},We.shouldComponentUpdate=l}return s.__N||s.__}function Qr(t,e){var r=Di(yi++,3);!Ee.__s&&en(r.__H,e)&&(r.__=t,r.i=e,We.__H.__h.push(r))}function _d(t,e){var r=Di(yi++,4);!Ee.__s&&en(r.__H,e)&&(r.__=t,r.i=e,We.__h.push(r))}function Zr(t){return Ci=5,Ba(function(){return{current:t}},[])}function Ba(t,e){var r=Di(yi++,7);return en(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function bi(t,e){return Ci=8,Ba(function(){return t},e)}function md(t){var e=We.context[t.__c],r=Di(yi++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(We)),e.props.value):t.__}function gd(){for(var t;t=Oa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ur),t.__H.__h.forEach(Xr),t.__H.__h=[]}catch(e){t.__H.__h=[],Ee.__e(e,t.__v)}}Ee.__b=function(t){We=null,Ma&&Ma(t)},Ee.__r=function(t){Na&&Na(t),yi=0;var e=(We=t.__c).__H;e&&(Yr===We?(e.__h=[],We.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=lr,r.__N=r.i=void 0})):(e.__h.forEach(ur),e.__h.forEach(Xr),e.__h=[])),Yr=We},Ee.diffed=function(t){Pa&&Pa(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Oa.push(e)!==1&&Da===Ee.requestAnimationFrame||((Da=Ee.requestAnimationFrame)||yd)(gd)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==lr&&(r.__=r.__V),r.i=void 0,r.__V=lr})),Yr=We=null},Ee.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ur),r.__h=r.__h.filter(function(s){return!s.__||Xr(s)})}catch(s){e.some(function(l){l.__h&&(l.__h=[])}),e=[],Ee.__e(s,r.__v)}}),Ua&&Ua(t,e)},Ee.unmount=function(t){Fa&&Fa(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(s){try{ur(s)}catch(l){e=l}}),r.__H=void 0,e&&Ee.__e(e,r.__v))};var Ha=typeof requestAnimationFrame=="function";function yd(t){var e,r=function(){clearTimeout(s),Ha&&cancelAnimationFrame(e),setTimeout(t)},s=setTimeout(r,100);Ha&&(e=requestAnimationFrame(r))}function ur(t){var e=We,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),We=e}function Xr(t){var e=We;t.__c=t.__(),We=e}function en(t,e){return!t||t.length!==e.length||e.some(function(r,s){return r!==t[s]})}function Va(t,e){return typeof e=="function"?e(t):e}(function(){try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode("._container_afsrn_1{background-color:rgba(0,0,0,.5);border-radius:.375em;position:relative;color:#fff;font-size:12px;font-family:Arial,Roboto,Noto,sans-serif;box-sizing:border-box;padding:2em .625em .625em;overflow:auto;word-break:break-all;white-space:normal;max-width:500px;max-height:calc(100% - 10px);line-height:1.5;margin:.3125em}._container-h5_afsrn_19{background-color:rgba(0,0,0,.5);border-radius:.375em;position:relative;color:#fff;font-size:12px;font-family:Arial,Roboto,Noto,sans-serif;box-sizing:border-box;padding:2em .625em .625em;overflow:auto;word-break:break-all;white-space:normal;font-size:14px;width:100%;height:100%}._close-btn_afsrn_36{position:absolute;right:0;top:0;cursor:pointer;word-break:keep-all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:.625em}._btn-tip_afsrn_49{background-color:rgba(0,0,0,.5);border-radius:.375em;position:absolute;left:50%;transform:translate(-50%);bottom:2.1875em;white-space:nowrap;padding:.5em}._actions_afsrn_60{display:flex;justify-content:flex-end;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0}._actions_afsrn_60 ._copy-btn_afsrn_69{word-break:keep-all;cursor:pointer;padding:.625em 0 0 .625em}._info-item_afsrn_75{display:flex}._info-item-name_afsrn_79{width:20%;min-width:7.5em;text-align:right;margin-right:.625em;flex-shrink:0}._info-item-value_afsrn_87{flex-grow:1;text-align:left}._item-svg_afsrn_92{display:inline-block;width:60%;height:1em;margin-right:.625em;background:rgba(255,255,255,.2)}._item-value_afsrn_100{display:inline-block}@media (hover: hover){._close-btn_afsrn_36:hover,._copy-btn_afsrn_69:hover{color:#ccc}}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var bd=Object.defineProperty,Ed=(t,e,r)=>e in t?bd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xt=(t,e,r)=>(Ed(t,typeof e!="symbol"?e+"":e,r),r);(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var wd=Object.defineProperty,Td=(t,e,r)=>e in t?wd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dt=(t,e,r)=>(Td(t,typeof e!="symbol"?e+"":e,r),r);const Rd="ControlsPlugin",Ga="I18nPlugin",Sd="LoggerPlugin",Ld="HotkeyPlugin",kd="PlayInfoPlugin",Id="RotatePlugin",xd="PreviewPlugin",Cd="MaskPlugin",Dd="VRPlugin",Od="DanmakuPlugin";var tn=(t=>(t.PLAY_BAR_LEFT="playBarLeft",t.PLAY_BAR_RIGHT="playBarRight",t.CONTEXT_MENU="contextMenu",t))(tn||{});class Md{constructor(){dt(this,"_callbacks",[])}add(e){this._callbacks.push(e)}remove(e){const r=this._callbacks.findIndex(s=>s===e);r>=0&&this._callbacks.splice(r,1)}call(e){this._callbacks.forEach(r=>r(e))}destroy(){this._callbacks.splice(0,this._callbacks.length)}}class pt extends oa{static isInstanceOfPlugin(e){return typeof e.beforeInstall=="function"&&typeof e.afterInstall=="function"&&typeof e.beforeUninstall=="function"&&typeof e.afterUninstall=="function"&&typeof e.getLabel=="function"}get controlsSoltBtns(){}beforeInstall(e,r){}afterInstall(e,r){}beforeUninstall(e){}afterUninstall(e){}}dt(pt,"label"),dt(pt,"version"),dt(pt,"isSupported"),dt(class bl extends pt{getLabel(){return bl.label}beforeInstall(e,r){}afterInstall(e,r){}},"label",Rd),dt(class El extends pt{getLabel(){return El.label}beforeInstall(e,r){}afterInstall(e,r){}},"label",Ga),dt(class wl extends pt{getLabel(){return wl.label}beforeInstall(e,r){}afterInstall(e,r){}addBizLog(e,r){}appendSummaryField(e,r){}},"label",Sd),dt(class Tl extends pt{getLabel(){return Tl.label}},"label",Ld);const Wa=class Rl extends pt{getLabel(){return Rl.label}};dt(Wa,"label",kd);let Nd=Wa;dt(class Sl extends pt{getLabel(){return Sl.label}},"label",Id),dt(class Ll extends pt{getLabel(){return Ll.label}},"label",xd),dt(class kl extends pt{getLabel(){return kl.label}},"label",Cd),dt(class Il extends pt{getLabel(){return Il.label}},"label",Dd),dt(class xl extends pt{getLabel(){return xl.label}},"label",Od);var Mt=(t=>(t.ERROR="error",t.MANIFEST_PARSED="manifestparsed",t.LEVEL_SWITCHING="levelswitching",t.LEVEL_SWITCHED="levelswitched",t.LEVEL_SWITCH_PLAYING="levelswitchplaying",t.LEVEL_SWITCH_FAILED="levelswitchfailed",t.LEVEL_UPDATED="levelupdated",t.AUDIO_TRACKS_SWITCHING="audiotrackswitching",t.AUDIO_TRACKS_SWITCHED="audiotrackswitched",t.LOADSTART="loadstart",t.PROGRESS="progress",t.SUSPEND="suspend",t.ABORT="abort",t.EMPTIED="emptied",t.STALLED="stalled",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.CANPLAY="canplay",t.CANPLAYTHROUGH="canplaythrough",t.PLAYING="playing",t.WAITING="waiting",t.SEEKING="seeking",t.SEEKED="seeked",t.ENDED="ended",t.DURATIONCHANGE="durationchange",t.TIMEUPDATE="timeupdate",t.PLAY="play",t.PAUSE="pause",t.RATECHANGE="ratechange",t.RESIZE="resize",t.VOLUMECHANGE="volumechange",t.ENTER_PICTURE_IN_PICTURE="enterpictureinpicture",t.LEAVE_PICTURE_IN_PICTURE="leavepictureinpicture",t.REPORT="report",t.VIDEO_RENDERER_CHANGE="videorendererchange",t.FULLSCREEN_CHANGE="fullscreenchange",t.ATTRIBUTE_CHANGE="attribute:change",t.INTERACTION="interaction",t.LIVE_SHIFT_CHANGE="liveshiftchange",t.LIVE_SHIFT_TYPE_CHANGE="liveshifttypechange",t.OBJECT_FIT_CHANGE="objectfitchange",t.ATTRIBUTE_CHANGE_CONFIG="attribute:change:config",t.ATTRIBUTE_CHANGE_SRC="attribute:change:src",t.ATTRIBUTE_CHANGE_VIDEO_ID="attribute:change:videoid",t.ATTRIBUTE_CHANGE_PREVIEW_URL="attribute:change:previewurl",t.ATTRIBUTE_CHANGE_MASK_URL="attribute:change:maskurl",t.ATTRIBUTE_CHANGE_CROSS_ORIGIN="attribute:change:crossorigin",t.ATTRIBUTE_CHANGE_PRELOAD="attribute:change:preload",t.ATTRIBUTE_CHANGE_CURRENT_TIME="attribute:change:currenttime",t.ATTRIBUTE_CHANGE_DEFAULT_PLAYBACK_RATE="attribute:change:defaultplaybackrate",t.ATTRIBUTE_CHANGE_PLAYBACK_RATE="attribute:change:playbackrate",t.ATTRIBUTE_CHANGE_AUTOPLAY="attribute:change:autoplay",t.ATTRIBUTE_CHANGE_LOOP="attribute:change:loop",t.ATTRIBUTE_CHANGE_CONTROLS="attribute:change:controls",t.ATTRIBUTE_CHANGE_VOLUME="attribute:change:volume",t.ATTRIBUTE_CHANGE_MUTED="attribute:change:muted",t.ATTRIBUTE_CHANGE_DEFAULT_MUTED="attribute:change:defaultmuted",t.ATTRIBUTE_CHANGE_POSTER="attribute:change:poster",t.ATTRIBUTE_CHANGE_DISABLE_PICTURE_IN_PICTURE="attribute:change:disablepictureinpicture",t.ATTRIBUTE_CHANGE_PLAYSINLINE="attribute:change:playsinline",t.ATTRIBUTE_CHANGE_DISABLE_ADAPTIVE="attribute:change:disableadaptive",t.ATTRIBUTE_CHANGE_DISABLE_DOWNLOAD="attribute:change:disabledownload",t.ATTRIBUTE_CHANGE_DISABLE_MASK="attribute:change:disablemask",t.ATTRIBUTE_CHANGE_DISABLE_HOTKEY="attribute:change:disablehotkey",t.ATTRIBUTE_CHANGE_DISABLE_DANMAKU="attribute:change:disabledanmaku",t.ATTRIBUTE_CHANGE_DANMAKU_RENDERING="attribute:change:danmakurendering",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS="attribute:change:danmakucontrolspos",t.ATTRIBUTE_CHANGE_DANMAKU_CONTROLS_POS_FULLSCREEN="attribute:change:danmakucontrolsposfullscreen",t.ATTRIBUTE_CHANGE_CURRENT_LEVEL="attribute:change:currentlevel",t.ATTRIBUTE_CHANGE_NEXT_LEVEL="attribute:change:nextlevel",t.ATTRIBUTE_CHANGE_CURRENT_FRAME="attribute:change:currentframe",t.ATTRIBUTE_CHANGE_AUDIO_TRACK="attribute:change:audiotrack",t.ATTRIBUTE_CHANGE_PREFETCH="attribute:change:prefetch",t.ATTRIBUTE_CHANGE_SHOW_PROGRESS="attribute:change:showprogress",t.ATTRIBUTE_CHANGE_SHOW_TIME="attribute:change:showtime",t.ATTRIBUTE_CHANGE_SHOW_NEXT="attribute:change:shownext",t.ATTRIBUTE_CHANGE_SHOW_PREV="attribute:change:showprev",t.ATTRIBUTE_CHANGE_BIZ_DATA="attribute:change:bizdata",t.ATTRIBUTE_CHANGE_LIVE_TIME="attribute:change:livetime",t.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL="attribute:change:showinfopanel",t.CLICK_NEXT="clicknext",t.CLICK_LOGIN="clicklogin",t.CLICK_REGISTER="clickregister",t.CLICK_VIP="clickvip",t))(Mt||{});const ja=Ad(void 0),Ka="kwai_player_ll_enabled",Pd="play-info-context",Ud=t=>{const{children:e,player:r}=t,s=r.logger,l=new Lo,d=Lo.isSupported()&&!Qt,f=`${r.packVersion}(${r.version})`,c=new ra,[R,A]=tt(!1),v=(g,E=!1)=>{if(g=g&&d,g?(O(),r.outputLogger=l.getLoggerForAdd()):r.outputLogger=void 0,A(g),E)try{c.write(Ka,g?"1":"0")}catch(k){}},O=()=>{try{localStorage.setItem("kwai-kernel-log",JSON.stringify({value:"i",time:Date.now()})),localStorage.setItem("kwai-player-log",JSON.stringify({value:"i",time:Date.now()}))}catch(g){}},m=()=>{v(!R,!0)},x=()=>{l.downloadLog()};try{const g=(c.read(Ka)=="1"||!1)&&d;A(g),g&&v(g)}catch(g){}return Qr(()=>()=>{s.i(Pd,"destroy"),l.destroy()},[]),Se(ja.Provider,{value:{player:r,playerVersion:f,localLogSwitch:R,localLogEnabled:d,toggleLocalLog:m,downloadLocalLog:x},children:e})},Fd="_container_afsrn_1",Bd="_actions_afsrn_60",Qe={container:Fd,"container-h5":"_container-h5_afsrn_19","close-btn":"_close-btn_afsrn_36","btn-tip":"_btn-tip_afsrn_49",actions:Bd,"copy-btn":"_copy-btn_afsrn_69","info-item":"_info-item_afsrn_75","info-item-name":"_info-item-name_afsrn_79","info-item-value":"_info-item-value_afsrn_87","item-svg":"_item-svg_afsrn_92","item-value":"_item-value_afsrn_100"};function gt(t){const{title:e,value:r}=t;return Se("div",{className:Qe["info-item"],children:[Se("div",{className:Qe["info-item-name"],children:[e,":"]}),Se("div",{className:Qe["info-item-value"],children:r})]})}function Hd(t){const{dataArray:e}=t,r=Zr(null),[s,l]=tt("");return Qr(()=>{if(r!=null&&r.current){const{width:d,height:f}=r.current.getBoundingClientRect(),c=Math.max(...e)||1,R=f-2,A=d/e.length;let v=`M0 ${R*(c-e[0])/c+1}`;for(let O=1;O<e.length;O++)v+=` L${O*A} ${R*(c-e[O])/c+1}`;l(v)}},[e]),Se("svg",{ref:r,height:"100%",width:"100%",style:"display:block",children:Se("path",{fill:"none",stroke:"#fff",strokeWidth:"1",d:s})})}function cr(t){const{title:e,suffix:r,value:s}=t,[l,d]=tt(0);return Qr(()=>{d(s[s.length-1]||0)},[s]),Se("div",{className:Qe["info-item"],children:[Se("div",{className:Qe["info-item-name"],children:[e,":"]}),Se("div",{className:Qe["info-item-value"],children:[Se("div",{className:Qe["item-svg"],children:Se(Hd,{dataArray:s})}),Se("div",{className:Qe["item-value"],children:r(l)})]})]})}function Vd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gd=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],s=0;s<t.rangeCount;s++)r.push(t.getRangeAt(s));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(l){t.addRange(l)}),e&&e.focus()}},Wd=Gd,za={"text/plain":"Text","text/html":"Url",default:"Text"},jd="Copy to clipboard: #{key}, Enter";function Kd(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function zd(t,e){var r,s,l,d,f,c,R=!1;e||(e={}),r=e.debug||!1;try{l=Wd(),d=document.createRange(),f=document.getSelection(),c=document.createElement("span"),c.textContent=t,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(v){if(v.stopPropagation(),e.format)if(v.preventDefault(),typeof v.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var O=za[e.format]||za.default;window.clipboardData.setData(O,t)}else v.clipboardData.clearData(),v.clipboardData.setData(e.format,t);e.onCopy&&(v.preventDefault(),e.onCopy(v.clipboardData))}),document.body.appendChild(c),d.selectNodeContents(c),f.addRange(d);var A=document.execCommand("copy");if(!A)throw new Error("copy command was unsuccessful");R=!0}catch(v){r&&console.error("unable to copy using execCommand: ",v),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),R=!0}catch(O){r&&console.error("unable to copy using clipboardData: ",O),r&&console.error("falling back to prompt"),s=Kd("message"in e?e.message:jd),window.prompt(s,t)}}finally{f&&(typeof f.removeRange=="function"?f.removeRange(d):f.removeAllRanges()),c&&document.body.removeChild(c),l()}return R}var Jd=zd;const $d=Vd(Jd),Ja=100,qd="info-panel";function Yd(t){const e=md(ja);if(!e)return Se(Ii,{});const{player:r,playerVersion:s,localLogEnabled:l,localLogSwitch:d,toggleLocalLog:f,downloadLocalLog:c}=e,{onChangeShowEventLog:R}=t,A=Xi,[v,O]=tt(""),[m,x]=tt(""),[g,E]=tt(""),[k,y]=tt(""),[w,_]=tt(""),[b,I]=tt(""),[P,G]=tt(0),[H,Q]=tt(""),[ue,he]=tt(""),[j,F]=tt([]),[S,D]=tt([]),[U,N]=tt([]),[z,Y]=tt([]),[C,M]=tt(new Date().toString()),B=Zr(void 0);_d(()=>{const Ae=()=>{x(""),E(""),y(""),_(""),I(""),G(0),Q(""),z.splice(0,S.length),S.splice(0,S.length),U.splice(0,U.length),j.splice(0,j.length)},Ve=()=>{O(r.kernelType||"")},Nt=de=>{if(de&&de.type==="mediaInfo"){B.current=de.value,O(r.kernelType||""),x(de.value.streamHost||""),E(de.value.colorSpace||""),Q(de.value.sid||""),he(de.value.gpu||"");const Ge=[];de.value.coreType&&Ge.push(de.value.coreType),de.value.box&&(de.value.enhancedFlv?Ge.push("enhanced-flv"):Ge.push(de.value.box)),de.value.videoCodecType&&Ge.push(de.value.videoCodecType),de.value.videoDecoder&&Ge.push(de.value.videoDecoder),de.value.width&&de.value.height&&Ge.push(`${de.value.width}x${de.value.height}`),de.value.sar&&Ge.push(`[SAR ${de.value.sar.width}:${de.value.sar.height}]`),de.value.fps&&Ge.push(`@${de.value.fps.toFixed(2)}`),y(Ge.join(" "));const Pe=[];de.value.videoCodec&&Pe.push(de.value.videoCodec),de.value.audioCodec&&Pe.push(de.value.audioCodec),_(Pe.join(","))}de&&de.type==="heartbeat"&&(de.value.decodedFrames&&I(`${de.value.decodedFPS||0}/${de.value.droppedFPS||0} ${de.value.decodedFrames||0}/${de.value.droppedFrames||0}`),typeof de.value.totalReceive=="number"&&G(de.value.totalReceive),Re(de.value.videoBuffered||0,S,D),Re(de.value.audioBuffered||0,U,N),!S.length&&!U.length&&Re(de.value.buffered||0,z,Y),Re(de.value.speed||0,j,F),M(new Date().toString()))};return r.on(Mt.ATTRIBUTE_CHANGE_SRC,Ae),r.on(Mt.REPORT,Nt),r.on(Mt.LOADEDMETADATA,Ve),()=>{r.off(Mt.ATTRIBUTE_CHANGE_SRC,Ae),r.off(Mt.REPORT,Nt),r.off(Mt.LOADEDMETADATA,Ve),fe.current&&clearTimeout(fe.current)}},[]);const[Z,K]=tt(""),[se,ve]=tt(!1),fe=Zr(0),Re=bi((Ae,Ve,Nt)=>{typeof Ae=="number"&&!isNaN(Ae)&&(Ve.push(Ae),Ve.length>Ja?Ve.shift():Ve.length===1&&(Ve.unshift(...new Array(Ja-1)),Ve.forEach((de,Ge)=>{typeof de!="number"&&(Ve[Ge]=0)})),Nt([...Ve]))},[]),ee=bi(()=>{r.logger.i(qd,"click copy");const Ae={date:C};A&&(Ae.did=A),s&&(Ae.playerVersion=s),H&&(Ae.sessionId=H),m&&(Ae.streamHost=m),g&&(Ae.colorSpace=g),k&&(Ae.res=k),w&&(Ae.codec=w),ue&&(Ae.gpu=ue),S.length&&(Ae.vBuffer=S[S.length-1]),U.length&&(Ae.aBuffer=U[U.length-1]),z.length&&(Ae.buffer=z[z.length-1]),j.length&&(Ae.speed=j[j.length-1]),B.current&&(Ae.mediainfo=B.current),Ae.userAgent=navigator.userAgent,Ae.summary=r.audienceStat;const Ve=$d(JSON.stringify(Ae));K(Ve?"已复制":"复制失败"),ve(!0),fe.current&&clearTimeout(fe.current),fe.current=+setTimeout(()=>{ve(!1),fe.current=0},1e3)},[]),ze=bi(Ae=>Ae>1e9?`${(Ae/1e9).toFixed(2)} GB`:Ae>1e6?`${(Ae/1e6).toFixed(2)} MB`:`${(Ae/1e3).toFixed(2)} KB`,[]),Ie=bi(Ae=>Ae>1e7?`${(Ae/1e6).toFixed(2)} MB/s`:`${(Ae/1e3).toFixed(2)} KB/s`,[]),Gt=bi(Ae=>Ae>1e3?`${(Ae/1e3).toFixed(2)} s`:`${Ae} ms`,[]),rt=bi(Ae=>{Ae.stopPropagation()},[]);return Se("div",{className:Qt?Qe["container-h5"]:Qe.container,onContextMenu:rt,children:[A&&Se(gt,{title:"DeviceId",value:A}),s&&Se(gt,{title:"PlayerVersion",value:s}),v&&Se(gt,{title:"kernel",value:v}),H&&Se(gt,{title:"SessionId",value:H}),m&&Se(gt,{title:"StreamHost",value:m}),k&&Se(gt,{title:"Res",value:k}),g&&Se(gt,{title:"Color",value:g}),w&&Se(gt,{title:"Codec",value:w}),b&&Se(gt,{title:"Frames",value:b}),!!z.length&&Se(cr,{title:"Buffered",value:z,suffix:Gt}),!!S.length&&Se(cr,{title:"VideoBuffered",value:S,suffix:Gt}),!!U.length&&Se(cr,{title:"AudioBuffered",value:U,suffix:Gt}),!!j.length&&Se(cr,{title:"Speed",value:j,suffix:Ie}),P>0&&Se(gt,{title:"TotalReceive",value:ze(P)}),ue&&Se(gt,{title:"GPU",value:ue}),Se(gt,{title:"Date",value:C}),Se("div",{className:[Qt?Qe["h5-btn"]:"",Qe["close-btn"]].join(" "),onClick:R,children:"[X]"}),Se("div",{className:Qe.actions,children:[d&&Se("div",{className:[Qt?Qe["h5-btn"]:"",Qe["copy-btn"]].join(" "),onClick:c,children:"[Download Log]"}),l&&Se("div",{className:[Qt?Qe["h5-btn"]:"",Qe["copy-btn"]].join(" "),onClick:f,children:["[Log ",d?"on":"off","]"]}),Se("div",{className:[Qt?Qe["h5-btn"]:"",Qe["copy-btn"]].join(" "),onClick:ee,children:[se&&Se("div",{className:Qe["btn-tip"],children:Z}),Se("div",{children:"[Copy]"})]})]})]})}const Qd="kwai-player-web-play-info",$a="play-info-plugin",qa=class Tn extends Nd{constructor(){super(...arguments),Xt(this,"_player"),Xt(this,"_i18n"),Xt(this,"_callback",new Md),Xt(this,"_option",{showInPlayBar:!1,showInContextMenu:!0,svgRaw:'<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>'}),Xt(this,"_container"),Xt(this,"_onChangeShowEventLog",()=>{this._container&&(this.isShow=!this.isShow)}),Xt(this,"_onShowInfoPanelChange",()=>{var e;this.isShow=!!((e=this._player)!=null&&e.showInfoPanel)})}beforeInstall(e,r){r&&(r.showInPlayBar===!0&&(this._option.showInPlayBar=!0),r.showInContextMenu===!1&&(this._option.showInContextMenu=!1),r.svgRaw&&(this._option.svgRaw=r.svgRaw)),this._i18n=e.getPluginInstance(Ga)}afterInstall(e,r){if(this._player=e,!this._player)return;this._container||(this._container=this._player.createSubContainer(),this._container.style.display="none",this._container.style.position="absolute",this._container.style.maxHeight="100%",this._container.style.overflowY="auto",this._container.style.top="0",this._container.style.left="0",Qt&&(this._container.style.width="100%"));const s=e.logger;if(Ca(Se(Ud,{player:e,children:Se(Yd,{onChangeShowEventLog:this._onChangeShowEventLog})}),this._container),typeof e.showInfoPanel=="boolean")this.isShow=e.showInfoPanel,s.i($a,`set show by player: ${e.showInfoPanel}`);else{let l=Qd;typeof(r==null?void 0:r.keyInUrl)=="string"&&(l=r==null?void 0:r.keyInUrl),location.href.indexOf(l)>=0&&(this.isShow=!0,s.i($a,"set show by url: true"))}e.on(Mt.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL,this._onShowInfoPanelChange)}beforeUninstall(e){this._callback.destroy()}afterUninstall(e){this._container&&(Ca(null,this._container),e.removeSubContainer(this._container)),this._player=void 0,e.off(Mt.ATTRIBUTE_CHANGE_SHOW_INFO_PANEL,this._onShowInfoPanelChange),this.removeAllListeners()}set isShow(e){this._container&&(this._container.style.display=e?"block":"none",this.emit(Mt.ATTRIBUTE_CHANGE),this._callback.call(e))}get isShow(){var e;return((e=this._container)==null?void 0:e.style.display)==="block"}get dom(){return this._container}getLabel(){return Tn.label}get controlsSoltBtns(){const e=[];if(this._option.showInContextMenu){const r={role:"play-info-context-menu",slotPos:tn.CONTEXT_MENU,getChecked:()=>this.isShow,getText:()=>this._text("playInfo"),svgRaw:this._option.svgRaw,onClick:()=>this.isShow=!this.isShow,callback:this._callback};e.push(r)}if(this._option.showInPlayBar&&!Qt){const r={role:"play-info-btn",slotPos:tn.PLAY_BAR_RIGHT,getTips:()=>this._text("playInfo"),svgRaw:this._option.svgRaw,onClick:()=>this.isShow=!this.isShow,callback:this._callback};e.push(r)}return e}_text(e){var r;return((r=this._i18n)==null?void 0:r.text(Tn.label,e))||"视频信息"}};Xt(qa,"version","1.1.0-alpha.0");let Zd=qa;Ai.register(fa),Ai.register(Zd),Ai.packVersion="1.1.19.vue3-mini",ge.CallbackProxy=Lu,ge.ControlsPluginLabel=to,ge.ControlsPluginModule=ku,ge.ControlsSlotPos=Ao,ge.DanmakuControlsPos=fo,ge.DanmakuPluginDomStyle=ho,ge.DanmakuPluginLabel=co,ge.DanmakuPluginModule=Uu,ge.FullscreenType=Rt,ge.HotkeyPluginLabel=no,ge.HotkeyPluginModule=Cu,ge.I18nPluginLabel=io,ge.I18nPluginModule=Iu,ge.KwaiPlayer=Ai,ge.KwaiPlayerEvent=J,ge.KwaiPlayerLayer=Ri,ge.KwaiPlayerVue3=Ki,ge.LiveShiftType=ti,ge.LoggerPluginLabel=ro,ge.LoggerPluginModule=xu,ge.MaskPluginLabel=lo,ge.MaskPluginModule=Nu,ge.PlayInfoPluginLabel=oo,ge.PlayInfoPluginModule=Du,ge.PluginModule=ct,ge.PreviewPluginLabel=so,ge.PreviewPluginModule=Mu,ge.RotatePluginLabel=ao,ge.RotatePluginModule=Ou,ge.VRPluginLabel=uo,ge.VRPluginModule=Pu,ge.default=Ki,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});