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)*

1 lines 1.01 MB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KwaiPlayer=e():t.KwaiPlayer=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e,i){var n=i(5);t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(){return t.exports=i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){"use strict";i.r(e),i.d(e,"CallbackProxy",(function(){return Ge})),i.d(e,"ControlsLangDictKey",(function(){return Ir})),i.d(e,"ControlsPluginLabel",(function(){return we})),i.d(e,"ControlsPluginModule",(function(){return Ye})),i.d(e,"ControlsSlotPos",(function(){return ze})),i.d(e,"DanmakuControlsPos",(function(){return He})),i.d(e,"DanmakuPluginDomStyle",(function(){return Fe})),i.d(e,"DanmakuPluginLabel",(function(){return je})),i.d(e,"DanmakuPluginModule",(function(){return li})),i.d(e,"FullscreenType",(function(){return se})),i.d(e,"HotkeyPluginLabel",(function(){return Me})),i.d(e,"HotkeyPluginModule",(function(){return $e})),i.d(e,"I18nPluginLabel",(function(){return Ne})),i.d(e,"I18nPluginModule",(function(){return Xe})),i.d(e,"KwaiPlayer",(function(){return vi})),i.d(e,"KwaiPlayerEvent",(function(){return ue})),i.d(e,"KwaiPlayerLayer",(function(){return ce})),i.d(e,"LiveShiftType",(function(){return oe})),i.d(e,"LoggerPluginLabel",(function(){return ke})),i.d(e,"LoggerPluginModule",(function(){return qe})),i.d(e,"MaskPluginLabel",(function(){return Ve})),i.d(e,"MaskPluginModule",(function(){return si})),i.d(e,"PlayInfoPluginLabel",(function(){return xe})),i.d(e,"PlayInfoPluginModule",(function(){return ei})),i.d(e,"PluginModule",(function(){return We})),i.d(e,"PreviewPluginLabel",(function(){return Ue})),i.d(e,"PreviewPluginModule",(function(){return ai})),i.d(e,"RotatePluginLabel",(function(){return Pe})),i.d(e,"RotatePluginModule",(function(){return ni})),i.d(e,"VRPluginLabel",(function(){return Be})),i.d(e,"VRPluginModule",(function(){return ui})),i.d(e,"default",(function(){return vi}));var n,r,a,o,s,c=i(1),u=i.n(c),h=i(3),l=i.n(h),d=i(0),f=i.n(d),p=i(2),A=i.n(p);function _(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return v(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var m=Object.defineProperty,g=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,y=function(t,e,i){return e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i};Number.isFinite||(Number.isFinite=function(t){return"number"==typeof t&&isFinite(t)}),Array.prototype.find||(Array.prototype.find=function(t,e){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(t.call(e,i[r],r,i))return i[r]}),Array.prototype.findIndex||(Array.prototype.findIndex=function(t,e){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(r in i&&t.call(e,i[r],r,i))return r;return-1}),Array.prototype.fill||(Array.prototype.fill=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=this.length),null==this)throw new TypeError("Array.prototype.fill called on null or undefined");for(var n=Object(this),r=n.length>>>0,a=e>>0,o=i>>0,s=a<0?Math.max(r+a,0):Math.min(a,r),c=o<0?Math.max(r+o,0):Math.min(o,r),u=s;u<c;u++)n[u]=t;return n});var C=Object.defineProperty,I=function(t,e,i){return function(t,e,i){e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i}(t,"symbol"!=typeof e?e+"":e,i),i},T=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([function(t,e,i){var n=i(5);function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}t.exports=function(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(e){return t.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(7)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e){function i(){return t.exports=i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,i.apply(this,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(t,e,i,n,r,a,o){try{var s=t[a](o),c=s.value}catch(t){return void i(t)}s.done?e(c):Promise.resolve(c).then(n,r)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function s(t){i(o,r,a,s,c,"next",t)}function c(t){i(o,r,a,s,c,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(1).default,r=i(6);t.exports=function(t){var e=r(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(1).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(1).default;function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(t,e,i){t[e]=i.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function d(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,i){return t[e]=i}}function f(t,e,i,n){var r=e&&e.prototype instanceof g?e:g,a=Object.create(r.prototype),o=new N(n||[]);return s(a,"_invoke",{value:S(t,i,o)}),a}function p(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}i.wrap=f;var A="suspendedStart",_="executing",v="completed",m={};function g(){}function b(){}function E(){}var y={};d(y,u,(function(){return this}));var C=Object.getPrototypeOf,I=C&&C(C(k([])));I&&I!==a&&o.call(I,u)&&(y=I);var T=E.prototype=g.prototype=Object.create(y);function R(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){var i;s(this,"_invoke",{value:function(r,a){function s(){return new e((function(i,s){!function i(r,a,s,c){var u=p(t[r],t,a);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==n(l)&&o.call(l,"__await")?e.resolve(l.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):e.resolve(l).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,c)}))}c(u.arg)}(r,a,i,s)}))}return i=i?i.then(s,s):s()}})}function S(t,i,n){var r=A;return function(a,o){if(r===_)throw Error("Generator is already running");if(r===v){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=L(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===A)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=_;var u=p(t,i,n);if("normal"===u.type){if(r=n.done?v:"suspendedYield",u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=v,n.method="throw",n.arg=u.arg)}}}function L(t,i){var n=i.method,r=t.iterator[n];if(r===e)return i.delegate=null,"throw"===n&&t.iterator.return&&(i.method="return",i.arg=e,L(t,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(r,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,m;var o=a.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,m):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t||""===t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function i(){for(;++r<t.length;)if(o.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=e,i.done=!0,i};return a.next=a}}throw new TypeError(n(t)+" is not iterable")}return b.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:b,configurable:!0}),b.displayName=d(E,l,"GeneratorFunction"),i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,d(t,l,"GeneratorFunction")),t.prototype=Object.create(T),t},i.awrap=function(t){return{__await:t}},R(D.prototype),d(D.prototype,h,(function(){return this})),i.AsyncIterator=D,i.async=function(t,e,n,r,a){void 0===a&&(a=Promise);var o=new D(f(t,e,n,r),a);return i.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},R(T),d(T,l,"Generator"),d(T,u,(function(){return this})),d(T,"toString",(function(){return"[object Generator]"})),i.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},i.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(w),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(n,r){return s.type="throw",s.arg=t,i.next=n,r&&(i.method="next",i.arg=e),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;w(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:k(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),m}},i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){i.r(e),i.d(e,"KwaiVideoLocalLog",(function(){return S})),i.d(e,"LogLevel",(function(){return f})),i.d(e,"DefaultLogger",(function(){return v})),i.d(e,"Logger",(function(){return _})),i.d(e,"printVersion",(function(){return c})),i.d(e,"DEFAULT_LOG_LEVEL",(function(){return p}));var n=i(0),r=i.n(n),a=i(3),o=i.n(a),s={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function c(t,e){console.log("%c "+t+" %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")}var u=function(){function t(){this.timeout=6048e5}var e=t.prototype;return e.write=function(e,i){if(t.available)try{localStorage.setItem(e,JSON.stringify({value:i,time:Date.now()}))}catch(t){}},e.read=function(e,i){if(void 0===i&&(i=!0),t.available)try{var n=localStorage.getItem(e);if(n){var r=JSON.parse(n),a=r.value,o=r.time,s=void 0===o?0:o;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return a}}catch(t){}},r()(t,null,[{key:"available",get:function(){if(void 0===t._available)try{localStorage.setItem("alg","test"),t._available=!0}catch(e){t._available=!1}return t._available}}])}();u._available=void 0;var h,l,d=u,f=((l={}).NONE="none",l.ERROR="e",l.WARN="w",l.INFO="i",l.DEBUG="d",l.VERBOSE="v",l),p=f.ERROR,A=((h={})[f.NONE]={value:1,str:"N"},h[f.ERROR]={value:100,str:"E"},h[f.WARN]={value:200,str:"W"},h[f.INFO]={value:300,str:"I"},h[f.DEBUG]={value:400,str:"D"},h[f.VERBOSE]={value:500,str:"V"},h),_=function(){function t(t){if(this._name="kwai-v",this._level=p,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var e,i=location.href.split("/"),n=null==(e=i[i.length-1])?void 0:e.match(/(\w+)-/);n&&(this._workerTag=t?t+"-"+n[1]:n[1])}else t&&(this._workerTag=t)}t.loadLogLevel=function(t,e){if(void 0===e&&(e=!0),location.href){var i=new RegExp(t+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var a=(new d).read(t,e);if(this._isValueInLevel(a))return a},t.saveLogLevel=function(t,e){this._isValueInLevel(e)&&(new d).write(t,e)},t._isValueInLevel=function(t){return-1!==Object.values(f).indexOf(t)};var e=t.prototype;return e.setOutput=function(t){return this._output=t,this},e.setLevel=function(t){return this._level=t,this},e.setId=function(t){return this._id=t,this},e.setName=function(t){return this._name=t,this},e.getLevel=function(){return this._level},e.getOutput=function(){return this._output},e.hasOutput=function(){return!!this._output},e.e=function(t){if(this._isLevelEnabled(this._level,f.ERROR)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._printLog(f.ERROR,t,i);try{var a;null==(a=this._output)||a.e.apply(a,[r].concat(i))}catch(t){}}},e.w=function(t){if(this._isLevelEnabled(this._level,f.WARN)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._printLog(f.WARN,t,i);try{var a;null==(a=this._output)||a.w.apply(a,[r].concat(i))}catch(t){}}},e.i=function(t){if(this._isLevelEnabled(this._level,f.INFO)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._printLog(f.INFO,t,i);try{var a;null==(a=this._output)||a.i.apply(a,[r].concat(i))}catch(t){}}},e.d=function(t){if(this._isLevelEnabled(this._level,f.DEBUG)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._printLog(f.DEBUG,t,i);try{var a;null==(a=this._output)||a.d.apply(a,[r].concat(i))}catch(t){}}},e.v=function(t){if(this._isLevelEnabled(this._level,f.VERBOSE)){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._printLog(f.VERBOSE,t,i);try{var a;null==(a=this._output)||a.v.apply(a,[r].concat(i))}catch(t){}}},e._isLevelEnabled=function(t,e){return A[t].value>=A[e].value},e._printLog=function(t,e,i){var n,r,a=typeof e;if("object"===a)e=(null==(r=e)?void 0:r.constructor.name)||"unknown";else if("function"===a){var o;e=(null==(o=Object.getOwnPropertyDescriptor(e,"name"))?void 0:o.value)||"unknown"}var s,c,u=((null==(n=A[t])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+e;return t===f.ERROR?(s=console).error.apply(s,[u].concat(i.slice(0))):(c=console).log.apply(c,[u].concat(i.slice(0))),u},t}(),v=new _,m=r()((function t(e){this._logger=void 0,this._id=0,this._config=s,this._id=t._id,t._id++,this._logger=(new _).setId(this._id).setLevel(f.INFO),this._config=o()({},s,e)}),[{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 (中国标准时间)"}}]);m._id=0;var g=i(4),b=i.n(g),E=i(2),y=i.n(E),C=function(){function t(t,e,i,n,r){var a=this;void 0===r&&(r=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(;a._taskQueue.length;){var t=a._taskQueue.shift();t&&a.run(t.task,t.mode)}},this._logger=t,this._name=e,this._storeName=i,this._dbIndex=n,this._version=r}var e=t.prototype;return e.init=function(){var t=this;if(!this._openReq&&indexedDB){var e=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",e),e.onerror=function(){t._logger.i("idb-wrapper","open error.")},e.onsuccess=function(){t._logger.i("idb-wrapper","open success."),t._runTaskQueue()},e.onupgradeneeded=function(){t._logger.i("idb-wrapper","open upgradeneeded."),e.result.objectStoreNames.contains(t._storeName)&&e.result.deleteObjectStore(t._storeName);var i=e.result.createObjectStore(t._storeName,{keyPath:"id",autoIncrement:!0});t._dbIndex&&t._dbIndex.forEach((function(t){i.createIndex(t.name,t.keyPath,t.option)}))}}},e.run=function(t,e){if(void 0===e&&(e="readwrite"),this.init(),this._openReq&&"done"===this._openReq.readyState&&!this._openReq.error)return this._doTask(t,e);"error"!==this.state&&(this._taskQueue.push({task:t,mode:e}),this._taskQueue.length>1e3&&this._taskQueue.shift())},e.close=function(){var t=this;this._logger.i("idb-wrapper","close"),this._openReq&&("done"===this._openReq.readyState?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){t.close()})},e.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},e._doTask=function(t,e){var i=this;if(void 0===e&&(e="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var n=this._openReq.result.transaction(this._storeName,e),r=void 0;n.oncomplete=function(){i._isTransactionActive=!1,t.callback&&t.callback(r),i._runTaskQueue()},n.onabort=n.onerror=function(){i._isTransactionActive=!1,t.callback&&t.callback(r),i._runTaskQueue()},r=t.exec(n.objectStore(this._storeName))}catch(t){}else t.callback&&t.callback()},r()(t,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&"done"===this._openReq.readyState?this._openReq.error?"error":"ready":"idle"}}])}(),I=[{name:"id",keyPath:"id",option:{unique:!0}}],T=[function(){function t(t){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=t,this._idb=new C(t.logger,t.config.idbName,t.config.idbName,I),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}t.isSupported=function(){return typeof indexedDB<"u"};var e,i=t.prototype;return i.saveLog=function(t){var e=this,i={exec:function(e){return e.add({value:t})},callback:function(t){e._saveCount++,e._saveCount%e._reCountOnSaveCount==0&&e._count(),null!=t&&t.error&&e._ctx.logger.i("idb-backend","save log err",t.error)}};this._idb.run(i)},i.exportLog=(e=b()(y.a.mark((function t(){var e=this;return y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){e._ctx.logger.i("idb-backend","export start");var n={exec:function(t){return t.getAll()},callback:function(i){t(void 0===i?"":e._mergeGetAll(i.result))}};e._idb.run(n,"readonly")})));case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)}),i.destroy=function(){this._idb.destroy()},i.clean=function(){this._idb.run({exec:function(t){return t.clear()}})},i._count=function(){var t=this,e={exec:function(t){return t.count()},callback:function(e){null!=e&&e.error||null==e||!e.result||(t._ctx.logger.i("idb-backend","count: "+e.result+" max: "+t._ctx.config.idbMaxDataCount),t._logCount=e.result,t._logCount>=t._ctx.config.idbMaxDataCount&&!t._reduceData&&t._deleteFromHead(t._logCount-Math.round(t._ctx.config.idbMaxDataCount/2)))}};this._idb.run(e)},i._deleteFromHead=function(t){var e=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var i={exec:function(t){return t.openCursor()},callback:function(i){if(e._reduceData=!1,null!=i&&i.result){var n=IDBKeyRange.bound(i.result.key,i.result.key+t,!1,!1),r={exec:function(t){return e._ctx.logger.i("idb-backend","del: "+n.lower+"~"+n.upper),t.delete(n)},callback:function(t){e._ctx.logger.i("idb-backend","del result: "+!(null==t||!t.error))}};e._idb.run(r)}}};this._idb.run(i)},i._mergeGetAll=function(t){return t.length?t.reduce((function(t,e){return""+t+e.value+"\n"}),""):""},r()(t,[{key:"isActive",get:function(){return"error"!==this._idb.state}}])}()];function R(t,e,i){var n=new Date;"string"!=typeof t&&(t=t.toString());var r=n.toLocaleString()+"."+n.getMilliseconds().toString().padStart(3,"0")+"|"+t+"|";return e.forEach((function(t){r+="object"==typeof t?JSON.stringify(t)+" ":t+" "})),r.length>i?r.substring(0,i):r}function D(t){return t.join("\n")}var S=function(){function t(t){var e=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(){e._delayTimer=setInterval((function(){e._saveLog(!0)}),1e3)},this._stopDelay=function(){e._delayTimer&&(clearTimeout(e._delayTimer),e._delayTimer=void 0)},c("kwai-video-local-log","1.0.13"),this._ctx=new m(t);var i=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.addLog.apply(e,[t].concat(n))};this._loggerForAdd={e:i,w:i,i:i,d:i,v:i},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",t,this._ctx.config),this._backend=function(t){for(var e=0;e<T.length;e++){var i=T[e];if(null!=i&&i.isSupported())return new i(t)}}(this._ctx),this._backend&&this._startDelay()}t.isSupported=function(){return function(){for(var t=0;t<T.length;t++){var e=T[t];if(null!=e&&e.isSupported())return!0}return!1}()};var e=t.prototype;return e.addLog=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];this._logCache.push(R(t,i,this._ctx.config.maxLogLen)),this._saveLog()},e.cleanLog=function(){var t;this._ctx.logger.i("kwai-video-local-log","clean"),null==(t=this._backend)||t.clean()},e.exportLog=function(){var t=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise((function(e,i){t._backend?t._backend.exportLog().then((function(i){e(D([i].concat(t._logCache)))})):e("")}))},e.downloadLog=function(t){var e=this;this._ctx.logger.i("kwai-video-local-log","download log: "+t),this._destroyDownloadHref(),this.exportLog().then((function(i){var n=new Blob([i],{type:"text/plain"});if(document){var r=document.createElement("a");e._downloadHref=r.href=URL.createObjectURL(n),r.download=t||"Log_web_"+(new Date).toLocaleString()+".log",document.body.appendChild(r),r.click(),r.remove()}else console.log("无document,当前是否在worker中")}))},e.destroy=function(){var t;this._destroyDownloadHref(),null==(t=this._backend)||t.destroy(),this._stopDelay()},e.getLoggerForAdd=function(){return this._loggerForAdd},e._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(t){}},e._saveLog=function(t){if(void 0===t&&(t=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&t)){var e=D(this._logCache);this._logCache.splice(0,this._logCache.length),e&&this._backend.saveLog(e)}},r()(t,null,[{key:"version",get:function(){return"1.0.13"}}])}();e.default=S}]);void 0===T&&console.error("esm-webpack-plugin: nothing exported!"),T.KwaiVideoLocalLog;var R=T.LogLevel,D=T.DefaultLogger,S=T.Logger,L=T.printVersion;T.DEFAULT_LOG_LEVEL,T.default;var O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function w(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var N,k={exports:{}},M="object"==typeof Reflect?Reflect:null,x=M&&"function"==typeof M.apply?M.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};N=M&&"function"==typeof M.ownKeys?M.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var P=Number.isNaN||function(t){return t!=t};function U(){U.init.call(this)}k.exports=U,k.exports.once=function(t,e){return new Promise((function(i,n){function r(i){t.removeListener(e,a),n(i)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",r),i([].slice.call(arguments))}Y(t,e,a,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&Y(t,"error",e,i)}(t,r,{once:!0})}))},U.EventEmitter=U,U.prototype._events=void 0,U.prototype._eventsCount=0,U.prototype._maxListeners=void 0;var V=10;function B(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function j(t){return void 0===t._maxListeners?U.defaultMaxListeners:t._maxListeners}function F(t,e,i,n){var r,a,o;if(B(i),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),a=t._events),o=a[e]),void 0===o)o=a[e]=i,++t._eventsCount;else if("function"==typeof o?o=a[e]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(r=j(t))>0&&o.length>r&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=o.length,function(t){console&&console.warn&&console.warn(t)}(s)}return t}function H(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function z(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=H.bind(n);return r.listener=i,n.wrapFn=r,r}function G(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(r):K(r,r.length)}function W(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function K(t,e){for(var i=new Array(e),n=0;n<e;++n)i[n]=t[n];return i}function Y(t,e,i,n){if("function"==typeof t.on)n.once?t.once(e,i):t.on(e,i);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function r(a){n.once&&t.removeEventListener(e,r),i(a)}))}}Object.defineProperty(U,"defaultMaxListeners",{enumerable:!0,get:function(){return V},set:function(t){if("number"!=typeof t||t<0||P(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");V=t}}),U.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},U.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||P(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},U.prototype.getMaxListeners=function(){return j(this)},U.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var n="error"===t,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var s=r[t];if(void 0===s)return!1;if("function"==typeof s)x(s,this,e);else{var c=s.length,u=K(s,c);for(i=0;i<c;++i)x(u[i],this,e)}return!0},U.prototype.addListener=function(t,e){return F(this,t,e,!1)},U.prototype.on=U.prototype.addListener,U.prototype.prependListener=function(t,e){return F(this,t,e,!0)},U.prototype.once=function(t,e){return B(e),this.on(t,z(this,t,e)),this},U.prototype.prependOnceListener=function(t,e){return B(e),this.prependListener(t,z(this,t,e)),this},U.prototype.removeListener=function(t,e){var i,n,r,a,o;if(B(e),void 0===(n=this._events))return this;if(void 0===(i=n[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(r=-1,a=i.length-1;a>=0;a--)if(i[a]===e||i[a].listener===e){o=i[a].listener,r=a;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(i,r),1===i.length&&(n[t]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},U.prototype.off=U.prototype.removeListener,U.prototype.removeAllListeners=function(t){var e,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var r,a=Object.keys(i);for(n=0;n<a.length;++n)"removeListener"!==(r=a[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},U.prototype.listeners=function(t){return G(this,t,!0)},U.prototype.rawListeners=function(t){return G(this,t,!1)},U.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):W.call(t,e)},U.prototype.listenerCount=W,U.prototype.eventNames=function(){return this._eventsCount>0?N(this._events):[]};var Q=k.exports,X=function(){if(typeof Map<"u")return Map;function t(t,e){var i=-1;return t.some((function(t,n){return t[0]===e&&(i=n,!0)})),i}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(e){var i=t(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},e.prototype.set=function(e,i){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,n=t(i,e);~n&&i.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];t.call(e,r[1],r[0])}},e}()}(),Z=typeof window<"u"&&typeof document<"u"&&window.document===document,q=typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),J="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(q):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var $=["top","right","bottom","left","width","height","size","weight"],tt=typeof MutationObserver<"u",et=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,n=!1,r=0;function a(){i&&(i=!1,t()),n&&s()}function o(){J(a)}function s(){var t=Date.now();if(i){if(t-r<2)return;n=!0}else i=!0,n=!1,setTimeout(o,e);r=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){!Z||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),tt?(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(){!Z||!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(t){var e=t.propertyName,i=void 0===e?"":e;$.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),it=function(t,e){for(var i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},nt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||q},rt=ht(0,0,0,0);function at(t){return parseFloat(t)||0}function ot(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce((function(e,i){return e+at(t["border-"+i+"-width"])}),0)}function st(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return rt;var n=nt(t).getComputedStyle(t),r=function(t){for(var e={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],a=t["padding-"+r];e[r]=at(a)}return e}(n),a=r.left+r.right,o=r.top+r.bottom,s=at(n.width),c=at(n.height);if("border-box"===n.boxSizing&&(Math.round(s+a)!==e&&(s-=ot(n,"left","right")+a),Math.round(c+o)!==i&&(c-=ot(n,"top","bottom")+o)),!function(t){return t===nt(t).document.documentElement}(t)){var u=Math.round(s+a)-e,h=Math.round(c+o)-i;1!==Math.abs(u)&&(s-=u),1!==Math.abs(h)&&(c-=h)}return ht(r.left,r.top,s,c)}var ct=typeof SVGGraphicsElement<"u"?function(t){return t instanceof nt(t).SVGGraphicsElement}:function(t){return t instanceof nt(t).SVGElement&&"function"==typeof t.getBBox};function ut(t){return Z?ct(t)?function(t){var e=t.getBBox();return ht(0,0,e.width,e.height)}(t):st(t):rt}function ht(t,e,i,n){return{x:t,y:e,width:i,height:n}}var lt=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ht(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=ut(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),dt=function(t,e){var i=function(t){var e=t.x,i=t.y,n=t.width,r=t.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return it(o,{x:e,y:i,width:n,height:r,top:i,right:e+n,bottom:r+i,left:e}),o}(e);it(this,{target:t,contentRect:i})},ft=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new X,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(t instanceof nt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new lt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(t instanceof nt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new dt(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),pt=typeof WeakMap<"u"?new WeakMap:new X,At=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 i=et.getInstance(),n=new ft(e,i,this);pt.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){At.prototype[t]=function(){var e;return(e=pt.get(this))[t].apply(e,arguments)}}));var _t=typeof q.ResizeObserver<"u"?q.ResizeObserver:At,vt={},mt=Object.prototype.hasOwnProperty;function gt(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function bt(t){try{return encodeURIComponent(t)}catch(t){return null}}vt.stringify=function(t,e){e=e||"";var i,n,r=[];for(n in"string"!=typeof e&&(e="?"),t)if(mt.call(t,n)){if(!(i=t[n])&&(null==i||isNaN(i))&&(i=""),n=bt(n),i=bt(i),null===n||null===i)continue;r.push(n+"="+i)}return r.length?e+r.join("&"):""},vt.parse=function(t){for(var e,i=/([^=?#&]+)=?([^&]*)/g,n={};e=i.exec(t);){var r=gt(e[1]),a=gt(e[2]);null===r||null===a||r in n||(n[r]=a)}return n};var Et=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t},yt=vt,Ct=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,It=/[\n\r\t]/g,Tt=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Rt=/:\d+$/,Dt=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,St=/^[a-zA-Z]:/;function Lt(t){return(t||"").toString().replace(Ct,"")}var Ot=[["#","hash"],["?","query"],function(t,e){return kt(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]],wt={hash:1,query:1};function Nt(t){var e,i=(typeof window<"u"?window:typeof O<"u"?O:typeof self<"u"?self:{}).location||{},n={},r=typeof(t=t||i);if("blob:"===t.protocol)n=new xt(unescape(t.pathname),{});else if("string"===r)for(e in n=new xt(t,{}),wt)delete n[e];else if("object"===r){for(e in t)e in wt||(n[e]=t[e]);void 0===n.slashes&&(n.slashes=Tt.test(t.href))}return n}function kt(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function Mt(t,e){t=(t=Lt(t)).replace(It,""),e=e||{};var i,n=Dt.exec(t),r=n[1]?n[1].toLowerCase():"",a=!!n[2],o=!!n[3],s=0;return a?o?(i=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(i=n[2]+n[4],s=n[2].length):o?(i=n[3]+n[4],s=n[3].length):i=n[4],"file:"===r?s>=2&&(i=i.slice(2)):kt(r)?i=n[4]:r?a&&(i=i.slice(2)):s>=2&&kt(e.protocol)&&(i=n[4]),{protocol:r,slashes:a||kt(r),slashesCount:s,rest:i}}function xt(t,e,i){if(t=(t=Lt(t)).replace(It,""),!(this instanceof xt))return new xt(t,e,i);var n,r,a,o,s,c,u=Ot.slice(),h=typeof e,l=this,d=0;for("object"!==h&&"string"!==h&&(i=e,e=null),i&&"function"!=typeof i&&(i=yt.parse),n=!(r=Mt(t||"",e=Nt(e))).protocol&&!r.slashes,l.slashes=r.slashes||n&&e.slashes,l.protocol=r.protocol||e.protocol||"",t=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||St.test(t))||!r.slashes&&(r.protocol||r.slashesCount<2||!kt(l.protocol)))&&(u[3]=[/(.*)/,"pathname"]);d<u.length;d++)"function"!=typeof(o=u[d])?(a=o[0],c=o[1],a!=a?l[c]=t:"string"==typeof a?~(s="@"===a?t.lastIndexOf(a):t.indexOf(a))&&("number"==typeof o[2]?(l[c]=t.slice(0,s),t=t.slice(s+o[2])):(l[c]=t.slice(s),t=t.slice(0,s))):(s=a.exec(t))&&(l[c]=s[1],t=t.slice(0,s.index)),l[c]=l[c]||n&&o[3]&&e[c]||"",o[4]&&(l[c]=l[c].toLowerCase())):t=o(t,l);i&&(l.query=i(l.query)),n&&e.slashes&&"/"!==l.pathname.charAt(0)&&(""!==l.pathname||""!==e.pathname)&&(l.pathname=function(t,e){if(""===t)return e;for(var i=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=i.length,r=i[n-1],a=!1,o=0;n--;)"."===i[n]?i.splice(n,1):".."===i[n]?(i.splice(n,1),o++):o&&(0===n&&(a=!0),i.splice(n,1),o--);return a&&i.unshift(""),("."===r||".."===r)&&i.push(""),i.join("/")}(l.pathname,e.pathname)),"/"!==l.pathname.charAt(0)&&kt(l.protocol)&&(l.pathname="/"+l.pathname),Et(l.port,l.protocol)||(l.host=l.hostname,l.port=""),l.username=l.password="",l.auth&&(~(s=l.auth.indexOf(":"))?(l.username=l.auth.slice(0,s),l.username=encodeURIComponent(decodeURIComponent(l.username)),l.password=l.auth.slice(s+1),l.password=encodeURIComponent(decodeURIComponent(l.password))):l.username=encodeURIComponent(decodeURIComponent(l.auth)),l.auth=l.password?l.username+":"+l.password:l.username),l.origin="file:"!==l.protocol&&kt(l.protocol)&&l.host?l.protocol+"//"+l.host:"null",l.href=l.toString()}xt.prototype={set:function(t,e,i){var n=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(i||yt.parse)(e)),n[t]=e;break;case"port":n[t]=e,Et(e,n.protocol)?e&&(n.host=n.hostname+":"+e):(n.host=n.hostname,n[t]="");break;case"hostname":n[t]=e,n.port&&(e+=":"+n.port),n.host=e;break;case"host":n[t]=e,Rt.test(e)?(e=e.split(":"),n.port=e.pop(),n.hostname=e.join(":")):(n.hostname=e,n.port="");break;case"protocol":n.protocol=e.toLowerCase(),n.slashes=!i;break;case"pathname":case"hash":if(e){var r="pathname"===t?"/":"#";n[t]=e.charAt(0)!==r?r+e:e}else n[t]=e;break;case"username":case"password":n[t]=encodeURIComponent(e);break;case"auth":var a=e.indexOf(":");~a?(n.username=e.slice(0,a),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=e.slice(a+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(e))}for(var o=0;o<Ot.length;o++){var s=Ot[o];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin="file:"!==n.protocol&&kt(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n},toString:function(t){(!t||"function"!=typeof t)&&(t=yt.stringify);var e,i=this,n=i.host,r=i.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var a=r+(i.protocol&&i.slashes||kt(i.protocol)?"//":"");return i.username?(a+=i.username,i.password&&(a+=":"+i.password),a+="@"):i.password?(a+=":"+i.password,a+="@"):"file:"!==i.protocol&&kt(i.protocol)&&!n&&"/"!==i.pathname&&(a+="@"),(":"===n[n.length-1]||Rt.test(i.hostname)&&!i.port)&&(n+=":"),a+=n+i.pathname,(e="object"==typeof i.query?t(i.query):i.query)&&(a+="?"!==e.charAt(0)?"?"+e:e),i.hash&&(a+=i.hash),a}},xt.extractProtocol=Mt,xt.location=Nt,xt.trimLeft=Lt,xt.qs=yt;var Pt=w(xt),Ut=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=4)}([function(t,e){function i(e){return t.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(2);function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writ