wg-video-player 1.7.0 → 1.8.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wg-video-player.js
CHANGED
|
@@ -125354,7 +125354,7 @@ const Hut = /* @__PURE__ */ Fn(jut, [["render", Uut]]), {
|
|
|
125354
125354
|
data() {
|
|
125355
125355
|
return {
|
|
125356
125356
|
id: `wg-video-player-${WC()}`,
|
|
125357
|
-
version: "1.
|
|
125357
|
+
version: "1.8.0-alpha.2"
|
|
125358
125358
|
};
|
|
125359
125359
|
},
|
|
125360
125360
|
computed: {
|
|
@@ -809,5 +809,5 @@ originalDts: `+Gn+" ms, curRefDts: "+or+" ms, dtsCorrection: "+Math.round(Pe)+"
|
|
|
809
809
|
-webkit-overflow-scrolling: touch;
|
|
810
810
|
}
|
|
811
811
|
|
|
812
|
-
`,""])},function(n,i,r){i.__esModule=!0;var a=r(139),o=s(a);function s(l){return l&&l.__esModule?l:{default:l}}i.default=function(l){if(Array.isArray(l)){for(var u=0,c=Array(l.length);u<l.length;u++)c[u]=l[u];return c}else return(0,o.default)(l)}},function(n,i,r){n.exports={default:r(140),__esModule:!0}},function(n,i,r){r(26),r(141),n.exports=r(4).Array.from},function(n,i,r){var a=r(48),o=r(13),s=r(22),l=r(142),u=r(143),c=r(55),d=r(144),f=r(69);o(o.S+o.F*!r(146)(function(h){Array.from(h)}),"Array",{from:function(p){var m=s(p),b=typeof this=="function"?this:Array,y=arguments.length,F=y>1?arguments[1]:void 0,x=F!==void 0,w=0,C=f(m),D,_,P,k;if(x&&(F=a(F,y>2?arguments[2]:void 0,2)),C!=null&&!(b==Array&&u(C)))for(k=C.call(m),_=new b;!(P=k.next()).done;w++)d(_,w,x?l(k,F,[P.value,w],!0):P.value);else for(D=c(m.length),_=new b(D);D>w;w++)d(_,w,x?F(m[w],w):m[w]);return _.length=w,_}})},function(n,i,r){var a=r(9);n.exports=function(o,s,l,u){try{return u?s(a(l)[0],l[1]):s(l)}catch(d){var c=o.return;throw c!==void 0&&a(c.call(o)),d}}},function(n,i,r){var a=r(16),o=r(2)("iterator"),s=Array.prototype;n.exports=function(l){return l!==void 0&&(a.Array===l||s[o]===l)}},function(n,i,r){var a=r(6),o=r(15);n.exports=function(s,l,u){l in s?a.f(s,l,o(0,u)):s[l]=u}},function(n,i,r){var a=r(31),o=r(2)("toStringTag"),s=a(function(){return arguments}())=="Arguments",l=function(u,c){try{return u[c]}catch(d){}};n.exports=function(u){var c,d,f;return u===void 0?"Undefined":u===null?"Null":typeof(d=l(c=Object(u),o))=="string"?d:s?a(c):(f=a(c))=="Object"&&typeof c.callee=="function"?"Arguments":f}},function(n,i,r){var a=r(2)("iterator"),o=!1;try{var s=[7][a]();s.return=function(){o=!0},Array.from(s,function(){throw 2})}catch(l){}n.exports=function(l,u){if(!u&&!o)return!1;var c=!1;try{var d=[7],f=d[a]();f.next=function(){return{done:c=!0}},d[a]=function(){return f},l(d)}catch(h){}return c}},function(n,i,r){n.exports={default:r(148),__esModule:!0}},function(n,i,r){r(56),r(26),n.exports=r(149)},function(n,i,r){var a=r(9),o=r(69);n.exports=r(4).getIterator=function(s){var l=o(s);if(typeof l!="function")throw TypeError(s+" is not iterable!");return a(l.call(s))}},function(n,i,r){var a=typeof window!="undefined";a&&function(){for(var o=0,s=["ms","moz","webkit","o"],l=0;l<s.length&&!window.requestAnimationFrame;++l)window.requestAnimationFrame=window[s[l]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[s[l]+"CancelAnimationFrame"]||window[s[l]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(u,c){var d=new Date().getTime(),f=Math.max(0,16-(d-o)),h=window.setTimeout(function(){u(d+f)},f);return o=d+f,h}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(u){clearTimeout(u)})}()},function(n,i,r){var a=function(){var l=this,u=l.$createElement,c=l._self._c||u;return c("div",{staticClass:"emoji-mart",style:l.customStyles},[l.showCategories?c("div",{staticClass:"emoji-mart-bar"},[c("anchors",{attrs:{data:l.mutableData,i18n:l.mutableI18n,color:l.color,categories:l.filteredCategories,"active-category":l.activeCategory},on:{click:l.onAnchorClick}})],1):l._e(),l._v(" "),l.showSearch?c("search",{ref:"search",attrs:{data:l.mutableData,i18n:l.mutableI18n,"emojis-to-show-filter":l.emojisToShowFilter,include:l.include,exclude:l.exclude,custom:l.customEmojis,recent:l.recentEmojis,"auto-focus":l.autoFocus},on:{search:l.onSearch}}):l._e(),l._v(" "),c("div",{ref:"scroll",staticClass:"emoji-mart-scroll",on:{scroll:l.onScroll}},[c("category",{directives:[{name:"show",rawName:"v-show",value:l.searchEmojis,expression:"searchEmojis"}],attrs:{data:l.mutableData,i18n:l.mutableI18n,id:"search",name:"Search",emojis:l.searchEmojis,"emoji-props":l.emojiProps}}),l._v(" "),l._l(l.filteredCategories,function(d){return c("category",{directives:[{name:"show",rawName:"v-show",value:!l.searchEmojis&&(l.infiniteScroll||d==l.activeCategory),expression:"!searchEmojis && (infiniteScroll || category == activeCategory)"}],key:d.id,ref:"categories",refInFor:!0,attrs:{data:l.mutableData,i18n:l.mutableI18n,id:d.id,name:d.name,emojis:d.emojis,"emoji-props":l.emojiProps}})})],2),l._v(" "),l.showPreview?c("div",{staticClass:"emoji-mart-bar"},[c("preview",{attrs:{data:l.mutableData,title:l.title,emoji:l.previewEmoji,"idle-emoji":l.emoji,"show-skin-tones":l.showSkinTones,"emoji-props":l.emojiProps,"skin-props":l.skinProps},on:{change:l.onSkinChange}})],1):l._e()],1)},o=[];a._withStripped=!0;var s={render:a,staticRenderFns:o};i.a=s},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var a=r(40),o=u(a),s=r(39),l=u(s);function u(p){return p&&p.__esModule?p:{default:p}}var c=new l.default(o.default),d=c.emojis,f=c.emoticons;function h(){return c.search.apply(c,arguments)}i.default={search:h,emojis:d,emoticons:f}}])})})(iY);var eYe=iY.exports;const vc=Object.create(null);vc.open="0",vc.close="1",vc.ping="2",vc.pong="3",vc.message="4",vc.upgrade="5",vc.noop="6";const t3=Object.create(null);Object.keys(vc).forEach(e=>{t3[vc[e]]=e});const zA={type:"error",data:"parser error"},aY=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",oY=typeof ArrayBuffer=="function",sY=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,VA=({type:e,data:t},n,i)=>aY&&t instanceof Blob?n?i(t):lY(t,i):oY&&(t instanceof ArrayBuffer||sY(t))?n?i(t):lY(new Blob([t]),i):i(vc[e]+(t||"")),lY=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function uY(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qA;function tYe(e,t){if(aY&&e.data instanceof Blob)return e.data.arrayBuffer().then(uY).then(t);if(oY&&(e.data instanceof ArrayBuffer||sY(e.data)))return t(uY(e.data));VA(e,!1,n=>{qA||(qA=new TextEncoder),t(qA.encode(n))})}const cY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vv=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<cY.length;e++)Vv[cY.charCodeAt(e)]=e;const nYe=e=>{let t=e.length*.75,n=e.length,i,r=0,a,o,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(i=0;i<n;i+=4)a=Vv[e.charCodeAt(i)],o=Vv[e.charCodeAt(i+1)],s=Vv[e.charCodeAt(i+2)],l=Vv[e.charCodeAt(i+3)],c[r++]=a<<2|o>>4,c[r++]=(o&15)<<4|s>>2,c[r++]=(s&3)<<6|l&63;return u},rYe=typeof ArrayBuffer=="function",WA=(e,t)=>{if(typeof e!="string")return{type:"message",data:dY(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:iYe(e.substring(1),t)}:t3[n]?e.length>1?{type:t3[n],data:e.substring(1)}:{type:t3[n]}:zA},iYe=(e,t)=>{if(rYe){const n=nYe(e);return dY(n,t)}else return{base64:!0,data:e}},dY=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},fY=String.fromCharCode(30),aYe=(e,t)=>{const n=e.length,i=new Array(n);let r=0;e.forEach((a,o)=>{VA(a,!1,s=>{i[o]=s,++r===n&&t(i.join(fY))})})},oYe=(e,t)=>{const n=e.split(fY),i=[];for(let r=0;r<n.length;r++){const a=WA(n[r],t);if(i.push(a),a.type==="error")break}return i};function sYe(){return new TransformStream({transform(e,t){tYe(e,n=>{const i=n.length;let r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);const a=new DataView(r.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{r=new Uint8Array(9);const a=new DataView(r.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})}let GA;function n3(e){return e.reduce((t,n)=>t+n.length,0)}function r3(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let r=0;r<t;r++)n[r]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function lYe(e,t){GA||(GA=new TextDecoder);const n=[];let i=0,r=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(i===0){if(n3(n)<1)break;const l=r3(n,1);a=(l[0]&128)===128,r=l[0]&127,r<126?i=3:r===126?i=1:i=2}else if(i===1){if(n3(n)<2)break;const l=r3(n,2);r=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),i=3}else if(i===2){if(n3(n)<8)break;const l=r3(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,53-32)-1){s.enqueue(zA);break}r=c*Math.pow(2,32)+u.getUint32(4),i=3}else{if(n3(n)<r)break;const l=r3(n,r);s.enqueue(WA(a?l:GA.decode(l),t)),i=0}if(r===0||r>e){s.enqueue(zA);break}}}})}const hY=4;function La(e){if(e)return uYe(e)}function uYe(e){for(var t in La.prototype)e[t]=La.prototype[t];return e}La.prototype.on=La.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},La.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},La.prototype.off=La.prototype.removeListener=La.prototype.removeAllListeners=La.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,r=0;r<n.length;r++)if(i=n[r],i===t||i.fn===t){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+e],this},La.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,t)}return this},La.prototype.emitReserved=La.prototype.emit,La.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},La.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ql=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function pY(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const cYe=ql.setTimeout,dYe=ql.clearTimeout;function i3(e,t){t.useNativeTimers?(e.setTimeoutFn=cYe.bind(ql),e.clearTimeoutFn=dYe.bind(ql)):(e.setTimeoutFn=ql.setTimeout.bind(ql),e.clearTimeoutFn=ql.clearTimeout.bind(ql))}const fYe=1.33;function hYe(e){return typeof e=="string"?pYe(e):Math.ceil((e.byteLength||e.size)*fYe)}function pYe(e){let t=0,n=0;for(let i=0,r=e.length;i<r;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function mYe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gYe(e){let t={},n=e.split("&");for(let i=0,r=n.length;i<r;i++){let a=n[i].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class _Ye extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class KA extends La{constructor(t){super(),this.writable=!1,i3(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new _Ye(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=WA(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mYe(t);return n.length?"?"+n:""}}const mY="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),XA=64,vYe={};let gY=0,a3=0,_Y;function vY(e){let t="";do t=mY[e%XA]+t,e=Math.floor(e/XA);while(e>0);return t}function yY(){const e=vY(+new Date);return e!==_Y?(gY=0,_Y=e):e+"."+vY(gY++)}for(;a3<XA;a3++)vYe[mY[a3]]=a3;let bY=!1;try{bY=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const yYe=bY;function FY(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||yYe))return new XMLHttpRequest}catch(n){}if(!t)try{return new ql[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}function hdt(){}function bYe(){}const FYe=function(){return new FY({xdomain:!1}).responseType!=null}();class wYe extends KA{constructor(t){if(super(t),this.polling=!1,typeof location!="undefined"){const i=location.protocol==="https:";let r=location.port;r||(r=i?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}const n=t&&t.forceBase64;this.supportsBinary=FYe&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};oYe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,aYe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yY()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new yc(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(r,a)=>{this.onError("xhr post error",r,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class yc extends La{constructor(t,n){super(),i3(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=pY(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const i=this.xhr=new FY(n);try{i.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&i.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{i.setRequestHeader("Accept","*/*")}catch(r){}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(i.timeout=this.opts.requestTimeout),i.onreadystatechange=()=>{var r;i.readyState===3&&((r=this.opts.cookieJar)===null||r===void 0||r.parseCookies(i)),i.readyState===4&&(i.status===200||i.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof i.status=="number"?i.status:0)},0))},i.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=yc.requestsCount++,yc.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=bYe,t)try{this.xhr.abort()}catch(n){}typeof document!="undefined"&&delete yc.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(yc.requestsCount=0,yc.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",wY);else if(typeof addEventListener=="function"){const e="onpagehide"in ql?"pagehide":"unload";addEventListener(e,wY,!1)}}function wY(){for(let e in yc.requests)yc.requests.hasOwnProperty(e)&&yc.requests[e].abort()}const YA=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),o3=ql.WebSocket||ql.MozWebSocket,SY=!0,SYe="arraybuffer",xY=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xYe extends KA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=xY?{}:pY(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=SY&&!xY?n?new o3(t,n):new o3(t):new o3(t,n,i)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],r=n===t.length-1;VA(i,this.supportsBinary,a=>{const o={};try{SY&&this.ws.send(a)}catch(s){}r&&YA(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yY()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!o3}}class CYe extends KA{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=lYe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),r=sYe();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const a=()=>{i.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],r=n===t.length-1;this.writer.write(i).then(()=>{r&&YA(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const EYe={websocket:xYe,webtransport:CYe,polling:wYe},TYe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kYe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function JA(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let r=TYe.exec(e||""),a={},o=14;for(;o--;)a[kYe[o]]=r[o]||"";return n!=-1&&i!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=AYe(a,a.path),a.queryKey=DYe(a,a.query),a}function AYe(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function DYe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,a){r&&(n[r]=a)}),n}let CY=class Kg extends La{constructor(t,n={}){super(),this.binaryType=SYe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=JA(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=JA(n.host).host),i3(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gYe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=hY,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new EYe[t](i)}open(){let t;if(this.opts.rememberUpgrade&&Kg.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;Kg.priorWebsocketSuccess=!1;const r=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!i)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Kg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function a(){i||(i=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,a(),this.emitReserved("upgradeError",f)};function s(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&a()}const c=()=>{n.removeListener("open",r),n.removeListener("error",o),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",r),n.once("error",o),n.once("close",s),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Kg.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const r=this.writeBuffer[i].data;if(r&&(n+=hYe(r)),i>0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,r){if(typeof n=="function"&&(r=n,n=void 0),typeof i=="function"&&(r=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const a={type:t,data:n,options:i};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){Kg.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const r=t.length;for(;i<r;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}};CY.protocol=hY;function PYe(e,t="",n){let i=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),i=JA(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const a=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port+t,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}const IYe=typeof ArrayBuffer=="function",OYe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EY=Object.prototype.toString,MYe=typeof Blob=="function"||typeof Blob!="undefined"&&EY.call(Blob)==="[object BlobConstructor]",RYe=typeof File=="function"||typeof File!="undefined"&&EY.call(File)==="[object FileConstructor]";function QA(e){return IYe&&(e instanceof ArrayBuffer||OYe(e))||MYe&&e instanceof Blob||RYe&&e instanceof File}function s3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(s3(e[n]))return!0;return!1}if(QA(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return s3(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&s3(e[n]))return!0;return!1}function BYe(e){const t=[],n=e.data,i=e;return i.data=ZA(n,t),i.attachments=t.length,{packet:i,buffers:t}}function ZA(e,t){if(!e)return e;if(QA(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=ZA(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ZA(e[i],t));return n}return e}function LYe(e,t){return e.data=e8(e.data,t),delete e.attachments,e}function e8(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=e8(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=e8(e[n],t));return e}const NYe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$Ye=5;var qr;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(qr||(qr={}));class jYe{constructor(t){this.replacer=t}encode(t){return(t.type===qr.EVENT||t.type===qr.ACK)&&s3(t)?this.encodeAsBinary({type:t.type===qr.EVENT?qr.BINARY_EVENT:qr.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===qr.BINARY_EVENT||t.type===qr.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=BYe(t),i=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(i),r}}function TY(e){return Object.prototype.toString.call(e)==="[object Object]"}class t8 extends La{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===qr.BINARY_EVENT;i||n.type===qr.BINARY_ACK?(n.type=i?qr.EVENT:qr.ACK,this.reconstructor=new UYe(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(QA(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(qr[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===qr.BINARY_EVENT||i.type===qr.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(a,n)}else i.nsp="/";const r=t.charAt(n+1);if(r!==""&&Number(r)==r){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}i.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(t8.isPayloadValid(i.type,a))i.data=a;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case qr.CONNECT:return TY(n);case qr.DISCONNECT:return n===void 0;case qr.CONNECT_ERROR:return typeof n=="string"||TY(n);case qr.EVENT:case qr.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&NYe.indexOf(n[0])===-1);case qr.ACK:case qr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class UYe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=LYe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const HYe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:t8,Encoder:jYe,get PacketType(){return qr},protocol:$Ye},Symbol.toStringTag,{value:"Module"}));function Cu(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zYe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kY extends La{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Cu(t,"open",this.onopen.bind(this)),Cu(t,"packet",this.onpacket.bind(this)),Cu(t,"error",this.onerror.bind(this)),Cu(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(zYe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:qr.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,s=n.pop();this._registerAckCallback(o,s),i.id=o}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){var i;const r=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(r===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(a),n.apply(this,[null,...o])}}emitWithAck(t,...n){const i=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((r,a)=>{n.push((o,s)=>i?o?a(o):r(s):r(o)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...a)=>i!==this._queue[0]?void 0:(r!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...a)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:qr.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qr.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qr.EVENT:case qr.BINARY_EVENT:this.onevent(t);break;case qr.ACK:case qr.BINARY_ACK:this.onack(t);break;case qr.DISCONNECT:this.ondisconnect();break;case qr.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...r){i||(i=!0,n.packet({type:qr.ACK,id:t,data:r}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function $g(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}$g.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},$g.prototype.reset=function(){this.attempts=0},$g.prototype.setMin=function(e){this.ms=e},$g.prototype.setMax=function(e){this.max=e},$g.prototype.setJitter=function(e){this.jitter=e};class n8 extends La{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,i3(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new $g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const r=n.parser||HYe;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new CY(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const r=Cu(n,"open",function(){i.onopen(),t&&t()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},o=Cu(n,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{r(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cu(t,"ping",this.onping.bind(this)),Cu(t,"data",this.ondata.bind(this)),Cu(t,"error",this.onerror.bind(this)),Cu(t,"close",this.onclose.bind(this)),Cu(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YA(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new kY(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const qv={};function Wv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=PYe(e,t.path||"/socket.io"),i=n.source,r=n.id,a=n.path,o=qv[r]&&a in qv[r].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return s?l=new n8(i,t):(qv[r]||(qv[r]=new n8(i,t)),l=qv[r]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Wv,{Manager:n8,Socket:kY,io:Wv,connect:Wv});const ho={CONNECT:"connect",CONNECTING:"connecting",CONNECT_FAILED:"connect_failed",CONNECT_ERROR:"error",RECONNECT:"reconnect",RECONNECTING:"reconnecting",RECONNECT_FAILED:"reconnect_failed",DISCONNECT:"disconnect",WELCOME:"welcome",MESSAGE:"message",LEAVEROOM:"leave_room",JOIN:"join",BROADCAST:"broadcast",LEAVE:"leave"},VYe={SYSTEM:0,MANAGER:1,INSTRUCTOR:2,STUDENT:3,VISITOR:4},l3={CN:"cn",US:"us",GB:"gb",TW:"tw",MO:"mo"},r8={getAccessInfo(e,t,n){const i=`${e==null?void 0:e.server}/api/user-info?token=${e==null?void 0:e.token}`;return pr.get(i).then(t,n)},getMsgs(e,t,n,i,r){const a=`${e==null?void 0:e.server}/api/room/${t}/msgs?token=${e==null?void 0:e.token}`;return pr.get(a,{params:n,crossOrigin:!0}).then(i,r)}},pdt="",mdt="",qYe={components:{Picker:eYe.Picker,InfiniteLoading:EX,MvpSvg:Ut},props:{width:{type:Number,default:300},config:{type:Object,require:!0},accessInfo:{type:Object,require:!0}},data(){return{socket:null,msgBox:null,history:[],roltType:VYe,showEmojiPicker:!1,showTip:!0,autoScroll:!0,content:"",lang:this.$i18n.locale,factorOfMerit:10,pageSize:20,newMsgCount:0,userCount:0,firstMsg:0,lastMsg:0,infiniteId:+new Date,emojiPickerStyle:{height:"205px"}}},computed:{useLang(){let e=this.lang;return e===l3.GB?e=l3.US:e===l3.MO&&(e=l3.TW),e}},created(){this.socket=Wv(this.config.server,{transports:["websocket"]})},mounted(){this.socket.on(ho.CONNECT,()=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT}]`),this.socket.emit(ho.JOIN,this.accessInfo)}),this.socket.on(ho.CONNECT_FAILED,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT_FAILED}]:${e}`)}),this.socket.on(ho.CONNECT_ERROR,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT_ERROR}]:${e}`)}),this.socket.on(ho.RECONNECT,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.RECONNECT}]:${e}`)}),this.socket.on(ho.RECONNECT_FAILED,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.RECONNECT_FAILED}]:${e}`)}),this.socket.on(ho.DISCONNECT,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.DISCONNECT}]:${e}`)}),this.socket.on(ho.WELCOME,e=>{this.userCount=e,this.loadNewMsg()}),this.socket.on(ho.LEAVEROOM,e=>{this.userCount=e}),this.socket.on(ho.MESSAGE,()=>{this.newMsgCount+=1,this.loadNewMsg()}),this.msgBox=this.$el.querySelector(".mvp-chat-container"),this.msgBox.addEventListener("scroll",this.onScroll)},beforeUnmount(){this.socket.emit(ho.LEAVE,1),this.socket.destroy()},methods:{addEmoji(e){this.showEmojiPicker=!1,this.content+=e.native},sendMessage(){this.content.length>0&&(this.accessInfo.msg=this.content,this.socket.emit(ho.BROADCAST,this.accessInfo),this.content="",this.autoScroll=!0)},onScroll(){this.$nextTick(()=>{const e=this.msgBox.offsetHeight+this.msgBox.scrollTop;this.msgBox.scrollHeight-e<this.factorOfMerit?(this.autoScroll=!0,this.newMsgCount=0):this.autoScroll=!1})},scrollToBottom(){this.autoScroll&&this.$nextTick(()=>{this.msgBox.scrollTop=this.msgBox.scrollHeight,this.newMsgCount=0})},viewNewMsg(){this.autoScroll=!0,this.scrollToBottom(),this.newMsgCount=0},infiniteScroll(e){var n;const t={page_size:this.pageSize,msg_cursor:this.firstMsg,type:0};r8.getMsgs(this.config,(n=this.accessInfo)==null?void 0:n.room_id,t,i=>{setTimeout(()=>{i.data&&i.data.length>0?(this.unshiftHistory(i.data),e.loaded()):e.complete()},1e3)},i=>{qt.info(i),e.complete()})},unshiftHistory(e){var t;if(e&&e.length>0){this.history.unshift(...e.filter(i=>this.firstMsg===0||i.msg_id<this.firstMsg)),this.firstMsg=this.history[0].msg_id;const n=this.history.length;this.lastMsg=(t=this.history[n-1])==null?void 0:t.msg_id}},appendNewMsg(e){var t;if(e&&e.length>0){e.forEach(i=>{i.msg_id>this.lastMsg&&this.history.push(i)}),this.firstMsg===0&&(this.firstMsg=this.history[0].msg_id);const n=this.history.length;this.lastMsg=(t=this.history[n-1])==null?void 0:t.msg_id,this.scrollToBottom()}},loadNewMsg(){var t;const e={page_size:this.pageSize,msg_cursor:this.lastMsg,type:1};r8.getMsgs(this.config,(t=this.accessInfo)==null?void 0:t.room_id,e,n=>{this.appendNewMsg(n.data)},n=>{qt.info(n)})}}},WYe={key:0,class:"tip-wrapper"},GYe={class:"icon-alert"},KYe={class:"content"},XYe={key:0},YYe={class:"mvp-no-more-data"},JYe={class:"mvp-no-more-data"},QYe={key:0,class:"user-name"},ZYe={key:1},eJe={class:"user-name"},tJe={key:2},nJe={class:"user-name"},rJe={key:3,class:"user-name"},iJe={key:4,class:"user-name"},aJe={key:5,class:"content"},oJe={key:6,class:"content"},sJe={class:"content"},lJe={key:0},uJe={key:1},cJe={class:"chat-input"},dJe={id:"emoji-box"},fJe={class:"option-group"},hJe=["placeholder"],pJe=["disabled"];function mJe(e,t,n,i,r,a){const o=yn("mvp-svg"),s=yn("infinite-loading"),l=yn("svg-icon"),u=yn("picker");return pe(),He("div",{class:"mvp-chat-panel",style:Pr({"min-width":`${n.width}px`,"max-width":`${n.width}px`})},[r.showTip?(pe(),He("div",WYe,[fe("span",GYe,[z(o,{name:"alert"})]),fe("span",KYe,Ze(e.$t("multiPlayer.playerPlugin.chat.note")),1),fe("span",{class:"close-wrapper",onClick:t[0]||(t[0]=c=>r.showTip=!1)},[z(o,{name:"close",class:"mvp-uno-c-white"})])])):yt("",!0),fe("div",{class:on(["mvp-chat-container",{"show-tip":r.showTip}])},[fe("ul",null,[r.history.length>r.pageSize?(pe(),He("li",XYe,[z(s,{direction:"top",spinner:"waveDots",onInfinite:a.infiniteScroll},{"no-results":Qe(()=>[fe("div",YYe,[fe("p",null,Ze(e.$t("multiPlayer.playerPlugin.chat.noMore")),1)])]),"no-more":Qe(()=>[fe("div",JYe,[fe("p",null,Ze(e.$t("multiPlayer.playerPlugin.chat.noMore")),1)])]),_:1},8,["onInfinite"])])):yt("",!0),(pe(!0),He(rn,null,vr(r.history,(c,d)=>(pe(),He("li",{key:d},[c.role_type===r.roltType.SYSTEM?(pe(),He("span",QYe,Ze(e.$t("multiPlayer.playerPlugin.chat.system"))+":",1)):c.role_type===r.roltType.MANAGER?(pe(),He("span",ZYe,[z(l,{"icon-class":`admin-${a.useLang}`,"class-name":"role-tag admin-tag"},null,8,["icon-class"]),fe("span",eJe," "+Ze(c.user_name)+":",1)])):c.role_type===r.roltType.INSTRUCTOR?(pe(),He("span",tJe,[z(l,{"icon-class":`instructor-${a.useLang}`,"class-name":r.lang==="cn"?"role-tag instructor-cn":"role-tag instructor-us"},null,8,["icon-class","class-name"]),fe("span",nJe," "+Ze(c.user_name)+":",1)])):c.role_type===r.roltType.VISITOR?(pe(),He("span",rJe,Ze(e.$t("multiPlayer.playerPlugin.chat.visitor"))+"-"+Ze(c.user_name)+": ",1)):(pe(),He("span",iJe,Ze(c.user_name)+":",1)),c.role_type===0?(pe(),He("span",aJe,Ze(e.$t("multiPlayer.playerPlugin.chat.joinTip",{0:c.user_name})),1)):(pe(),He("span",oJe,Ze(c.msg),1))]))),128))])],2),!r.autoScroll&&r.newMsgCount>0?(pe(),He("div",{key:1,class:"new-msg-tip",onClick:t[1]||(t[1]=(...c)=>a.viewNewMsg&&a.viewNewMsg(...c))},[fe("span",sJe,[z(o,{name:"unfurl",class:"mvp-uno-c-white"}),r.newMsgCount<100?(pe(),He("span",lJe,Ze(e.$t("multiPlayer.playerPlugin.chat.newMsgTip",{0:r.newMsgCount})),1)):(pe(),He("span",uJe,Ze(e.$t("multiPlayer.playerPlugin.chat.newMsgTip",{0:"99+"})),1))])])):yt("",!0),fe("div",cJe,[fe("div",dJe,[lr(z(u,{class:"emoji-picker",set:"apple","show-preview":!1,"show-search":!1,"show-skin-tones":!1,"show-categories":!1,include:["people"],color:"#232323",style:Pr(r.emojiPickerStyle),onSelect:a.addEmoji},null,8,["style","onSelect"]),[[Vr,r.showEmojiPicker]])]),fe("div",fJe,[fe("button",{class:"add-emoji",onClick:t[2]||(t[2]=c=>r.showEmojiPicker=!r.showEmojiPicker)},[z(o,{name:"smile",class:on({active:r.showEmojiPicker})},null,8,["class"])]),lr(fe("input",{"onUpdate:modelValue":t[3]||(t[3]=c=>r.content=c),placeholder:e.t("multiPlayer.playerPlugin.chat.placeholder"),maxlength:"100",onKeyup:t[4]||(t[4]=Kne((...c)=>a.sendMessage&&a.sendMessage(...c),["enter"]))},null,40,hJe),[[E_,r.content]]),fe("button",{class:on(["add-msg",{forbidden:r.content.length===0}]),disabled:r.content.length===0,onClick:t[5]||(t[5]=c=>a.sendMessage())},Ze(e.$t("multiPlayer.playerPlugin.chat.send")),11,pJe)])])],4)}const gJe={inject:["id"],data(){return{chatConfig:{},showChatPanel:!1,authed:!1,accessInfo:{}}},components:{chatPanel:Fn(qYe,[["render",mJe],["__scopeId","data-v-cdcb44ce"]])},computed:{enableChat(){return this.chatConfig&&this.chatConfig.toggle&&this.authed}},methods:{toggleChatPanel(){this.showChatPanel||this.closePanels(),this.showChatPanel=!this.showChatPanel},authChat(){r8.getAccessInfo(this.chatConfig,e=>{this.accessInfo=e.data,this.authed=!0},e=>{qt.error(e)})},initChatPlugin(){const e=Ai(this.id);e.on("chatConfigUpdated",()=>{this.chatConfig=e.plugins.chat,this.chatConfig.toggle&&this.authChat()})}}},_dt="",_Je={class:"mvp-caption-ctl-wrapper"},vJe=Fn(Object.assign({name:"LivePlayerCaption",inheritAttrs:!1,customOptions:{}},{__name:"index",props:{active:{type:Boolean,default:!1},config:{type:Object,default:()=>({})}},emits:["clickCaption"],setup(e,{emit:t}){const n=t;function i(){n("clickCaption")}return(r,a)=>(pe(),He("div",_Je,[fe("button",{class:on(["mvp-caption-ctl-btn",{"mvp-caption-ctl-active":e.active}]),onClick:i},Ze(r.$t("multiPlayer.playerPlugin.caption.caption")),3)]))}}),[["__scopeId","data-v-6ba05169"]]),yJe={inject:["id"],data(){return{liveCaptionConfig:{},showLiveCaptionPanel:!0}},computed:{enableLiveCaption(){return this.liveCaptionConfig.toggle}},methods:{initLiveCaptionPlugin(){const e=Ai(this.id);e.on("liveCaptionConfigUpdated",()=>{this.liveCaptionConfig=e.plugins.liveCaption,window.localStorage.removeItem(this.liveCaptionConfig.deviceCode)})},toggleLiveCaptionPanel(){this.showLiveCaptionPanel||this.closePanels(),this.showLiveCaptionPanel=!this.showLiveCaptionPanel}}},ydt="",bJe={class:"mvp-caption-item-wrapper"},FJe={class:"mvp-caption-item"},wJe={class:"mvp-caption-item-text"},SJe={key:0,class:"mvp-caption-item-text"},xJe=Fn({__name:"caption-item",props:{caption:Object},setup(e){return(t,n)=>(pe(),He("div",bJe,[fe("div",FJe,[fe("div",wJe,Ze(e.caption.text),1),e.caption.trans?(pe(),He("div",SJe,Ze(e.caption.trans),1)):yt("",!0)])]))}},[["__scopeId","data-v-6dde9c0d"]]),Fdt="",CJe={class:"mvp-caption-header mvp-uno-flex mvp-uno-justify-between"},EJe={class:"mvp-uno-flex mvp-uno-gap-2px mvp-uno-text-white",hover:"mvp-uno-cursor-pointer mvp-uno-border-opacity-48"},TJe={key:0,class:"mvp-caption-list"},kJe=Fn({__name:"caption-panel",props:{width:{type:Number,default:300},config:{type:Object,required:!0}},setup(e){const t=e,n=Mt("id"),i=ze(null),r=ze(null),a=ze(null),o=ze(!0),s=ze(10),l=ze([]),u=ze(null);u.value=Ai(n);const c=ze([]),d=ze(null);function f(x){return Dt(this,arguments,function*({key:F}){d.value=F,yield m()})}function h(){return Dt(this,null,function*(){const F=yield pr.get(`${t.config.server}/rtasr/${t.config.deviceCode}/support-translate-languages`);qe.isEmpty(F.data)||(c.value=F.data.map(x=>({value:x,label:`multiPlayer.playerPlugin.caption.lang.${x}`})))})}function p(){return Dt(this,null,function*(){const F=yield pr.get(`${t.config.server}/rtasr-jobs/${t.config.deviceCode}`);!qe.isEmpty(F.data)&&F.data.is_translate&&(d.value=F.data.target_lang)})}function m(){return Dt(this,null,function*(){yield pr.patch(`${t.config.server}/rtasr-jobs/${t.config.deviceCode}/update`,{is_translate:!0,target_lang:d.value})})}function b(){Jn(()=>{const F=a.value.offsetHeight+a.value.scrollTop;o.value=a.value.scrollHeight-F<s.value})}function y(){o.value&&Jn(()=>{a.value.scrollTop=a.value.scrollHeight})}return Cn(()=>Dt(this,null,function*(){yield h(),yield p(),r.value=Wv(`${t.config.server}/rtasr`,{transports:["websocket"]}),r.value.on("connect",()=>{const F=window.localStorage.getItem(`${t.config.deviceCode}`);F&&(l.value=JSON.parse(F)),qt.info(`connect: ${r.value.id}`)}),r.value.on("disconnect",()=>{qt.info(`disconnect: ${r.value.id}`)}),r.value.on(`${t.config.deviceCode}-caption`,F=>{if(u.value.playing){const x=l.value.length;x>0&&F.start_time&&l.value[x-1].start_time===F.start_time&&l.value.pop(),l.value.push(F),y()}}),r.value.on("connect_error",F=>{qt.info(`err.message: ${F.message}`)}),a.value.addEventListener("scroll",b)})),zr(()=>{window.localStorage.setItem(t.config.deviceCode,JSON.stringify(l.value)),r.value.disconnect()}),(F,x)=>(pe(),He("div",{ref_key:"target",ref:i,class:"mvp-caption-panel",style:Pr({"min-width":`${e.width}px`,"max-width":`${e.width}px`})},[fe("div",CJe,[fe("span",null,Ze(F.$t("multiPlayer.playerPlugin.caption.caption")),1),c.value.length>0?(pe(),dt(be(Oa),{key:0,"get-popup-container":()=>i.value,trigger:["hover"],placement:"bottomRight"},{overlay:Qe(()=>[z(be(Ma),{theme:"dark","selected-keys":[d.value],onClick:f},{default:Qe(()=>[(pe(!0),He(rn,null,vr(c.value,w=>(pe(),dt(be(ha),{key:w.value},{default:Qe(()=>[Rn(Ze(F.$t(w.label)),1)]),_:2},1024))),128))]),_:1},8,["selected-keys"])]),default:Qe(()=>[fe("div",EJe,[fe("span",null,Ze(F.$t("multiPlayer.playerPlugin.caption.translate")),1),z(Ut,{name:"round-arrow-down"})])]),_:1},8,["get-popup-container"])):yt("",!0)]),fe("div",{ref_key:"captionScrollBox",ref:a,class:"mvp-caption-list-wrapper"},[l.value.length>0?(pe(),He("div",TJe,[(pe(!0),He(rn,null,vr(l.value,(w,C)=>(pe(),dt(xJe,{key:C,caption:w},null,8,["caption"]))),128))])):yt("",!0)],512)],4))}},[["__scopeId","data-v-196906bf"]]),Sdt="",AJe={key:0,class:"live-player-tip"},DJe={class:"live-player-tip-text mvp-uno-truncate"},PJe=Fn({__name:"live-player-tip",props:{copyrightNotice:{required:!1,type:Object,default:()=>{}}},setup(e){const t=e,{locale:n}=Bi(),i=ve(()=>t.copyrightNotice&&t.copyrightNotice[n.value]);return(r,a)=>i.value?(pe(),He("div",AJe,[z(Ut,{name:"warning-line",class:"mvp-uno-text-white"}),fe("span",DJe,Ze(i.value),1)])):yt("",!0)}},[["__scopeId","data-v-477487cd"]]),Cdt="",IJe={components:{LivePlayer:pXe,HeaderBar:kKe,MvpTooltip:gKe,PlayerSwitcher:yXe,PlayerController:LXe,LiveStatusMask:GXe,BigPlayButton:QXe,PlayerWaterMark:ZXe,LivePlayerCaption:vJe,CaptionPanel:kJe,MvpSvg:Ut,LivePlayerTip:PJe},mixins:[mXe,gXe,gJe,yJe],props:{id:{required:!0},videos:{type:Array,required:!0},autoPlay:{type:Boolean,required:!1,default:!1},plugins:{type:Object,default:()=>({})},copyrightNotice:{type:Object,default:()=>({})}},emits:["multiPlayerError","multiPlayerReady"],data(){return{isPlayerReady:!1,minPanelWidth:300,maxPanelWidth:500,pannelWidth:this.minPanelWidth,dragStartX:0}},methods:{whenPlayerError(e){this.$emit("multiPlayerError",e)},whenPlayerReady(e){this.isPlayerReady=!0,this.initSwitcherPlugin(),this.initControllerPlugin(),this.initChatPlugin(),this.initLiveCaptionPlugin(),this.minPanelWidth=e.el.clientWidth*.3,this.maxPanelWidth=e.el.clientWidth*.5,this.pannelWidth=this.minPanelWidth,this.$emit("multiPlayerReady",e)},closePanels(){this.showNotePanel=!1,this.showTopicPanel=!1,this.showChatPanel=!1,this.showLiveCaptionPanel=!1},dragStart(e){this.dragStartX=e.clientX;const t=this.pannelWidth;document.onmousemove=n=>{const i=this.dragStartX-n.clientX;this.pannelWidth=t+i,this.pannelWidth<this.minPanelWidth&&(this.pannelWidth=this.minPanelWidth),this.pannelWidth>this.maxPanelWidth&&(this.pannelWidth=this.maxPanelWidth)}},dragStop(){document.onmousemove=null}}},OJe={class:"mvp-player-content"},MJe={key:0,class:"control-btn"},RJe={key:0,class:"mvp-drag"};function BJe(e,t,n,i,r,a){const o=yn("player-controller"),s=yn("mvp-svg"),l=yn("mvp-tooltip"),u=yn("player-switcher"),c=yn("header-bar"),d=yn("live-status-mask"),f=yn("player-water-mark"),h=yn("live-player-caption"),p=yn("live-player"),m=yn("big-play-button"),b=yn("live-player-tip"),y=yn("chat-panel"),F=yn("caption-panel");return e.showPlayer?(pe(),He("div",{key:0,class:"mvp-player-content-wrapper",onMouseup:t[2]||(t[2]=(...x)=>a.dragStop&&a.dragStop(...x))},[fe("div",OJe,[r.isPlayerReady?(pe(),dt(c,{key:0,"show-live-status":!e.controllerConfig.toggle},{default:Qe(()=>[r.isPlayerReady?(pe(),dt(o,{key:0,config:e.controllerConfig},null,8,["config"])):yt("",!0),z(l,{placement:"top",content:e.$t("multiPlayer.playerHeaderBar.playerChat")},{default:Qe(()=>[e.enableChat?(pe(),He("button",MJe,[z(s,{name:"player-chat",class:on({active:e.showChatPanel}),onClick:e.toggleChatPanel},null,8,["class","onClick"])])):yt("",!0)]),_:1},8,["content"]),r.isPlayerReady?(pe(),dt(u,{key:1,config:e.switcherConfig},null,8,["config"])):yt("",!0)]),_:1},8,["show-live-status"])):yt("",!0),e.showStatusMask?(pe(),dt(d,{key:1,"live-status":e.liveStatus},null,8,["live-status"])):yt("",!0),z(p,{id:n.id,"auto-play":n.autoPlay,videos:n.videos,onMultiPlayerReady:a.whenPlayerReady,onMultiPlayerError:a.whenPlayerError},{pluginWatermark:Qe(()=>[r.isPlayerReady?(pe(),dt(f,{key:0})):yt("",!0)]),pluginControls:Qe(()=>[e.enableLiveCaption&&r.isPlayerReady?(pe(),dt(h,{key:0,config:e.liveCaptionConfig,active:e.showLiveCaptionPanel,onClickCaption:e.toggleLiveCaptionPanel},null,8,["config","active","onClickCaption"])):yt("",!0)]),_:1},8,["id","auto-play","videos","onMultiPlayerReady","onMultiPlayerError"]),r.isPlayerReady&&e.useAutoPlayBtn?(pe(),dt(m,{key:2,"auto-play":n.autoPlay},null,8,["auto-play"])):yt("",!0),z(b,{"copyright-notice":n.copyrightNotice},null,8,["copyright-notice"])]),e.showChatPanel?(pe(),He("div",RJe,[fe("span",{onMousedown:t[0]||(t[0]=(...x)=>a.dragStart&&a.dragStart(...x)),onMouseup:t[1]||(t[1]=(...x)=>a.dragStop&&a.dragStop(...x))},null,32)])):yt("",!0),e.enableChat&&r.isPlayerReady&&e.showChatPanel?(pe(),dt(ss,{key:1,name:"mvp-plugin-panel"},{default:Qe(()=>[z(y,{width:r.pannelWidth,"access-info":e.accessInfo,config:e.chatConfig},null,8,["width","access-info","config"])]),_:1})):yt("",!0),e.enableLiveCaption&&r.isPlayerReady&&e.showLiveCaptionPanel?(pe(),dt(ss,{key:2,name:"mvp-plugin-panel"},{default:Qe(()=>[z(F,{width:r.pannelWidth,config:e.liveCaptionConfig},null,8,["width","config"])]),_:1})):yt("",!0)],32)):yt("",!0)}const LJe=Fn(IJe,[["render",BJe],["__scopeId","data-v-b1fb191c"]]),NJe={components:{AConfigProvider:OT},data(){return{theme:l5e}}};function $Je(e,t,n,i,r,a){const o=yn("a-config-provider");return pe(),dt(o,{"prefix-cls":"mvp-ant",theme:{token:{colorPrimary:"#00bbbd"}}},{default:Qe(()=>[Mr(e.$slots,"default")]),_:3})}const jJe=Fn(NJe,[["render",$Je]]),{registerListener:UJe,removeListener:HJe}=bF(),zJe={name:"WgVideoPlayer",components:{MultiLivePlayer:LJe,AntThemeProvider:jJe,ReplayPlayer:rGe},provide(){return{id:this.id,plugins:this.enabledPlugins,replayLayout:this.replayLayout,maxDisplayVideoCount:this.maxDisplayVideoCount,enableFullscreen:this.enableFullscreen,seekable:this.seekable,seekWarning:this.seekWarning,enablePlay:this.enablePlay,enablePause:this.enablePause,hideSubPanel:this.hideSubPanel}},props:{mode:{type:String,default:"live"},volume:{type:Number,default:.8},videos:{type:Array,required:!0},plugins:{type:Object},autoPlay:{type:Boolean,default:!1},seekable:{type:Boolean,required:!1,default:!0},seekWarning:{type:String,required:!1,default:""},lastPlayed:{type:Number,required:!1,default:0},maxPlayed:{type:Number,required:!1,default:0},isSimpleControls:{type:Boolean,required:!1},isMultiAudio:{type:Boolean,required:!1,default:!0},enableFullscreen:{type:Boolean,required:!1,default:!0},enablePlayRate:{type:Boolean,required:!1,default:!0},enableAskAir:{type:Boolean,required:!1,default:!1},unplayedSegments:{type:Array,default:()=>[]},defaultErr:{type:Boolean,required:!1,default:!1},copyrightNotice:{type:Object,required:!1,default:()=>{}},enablePlay:{type:Boolean,required:!1,default:!0},enablePause:{type:Boolean,required:!1,default:!0},hideSubPanel:{type:Boolean,default:!1}},emits:["playerReady","playerError","playerReload"],data(){return{id:`wg-video-player-${hS()}`,version:"1.7.0"}},computed:{refinedVideos(){const e=this.videos.map((n,i)=>(this.checkSource(n),this.presetVideo(n,i)));return e.length===1&&(e[0].mute=!1,e[0].volume=.8),qe.sortBy(e,n=>n.order).map((n,i)=>(n.show=i<this.maxDisplayVideoCount,n))},enabledPlugins(){return qe.pickBy(this.plugins,e=>e==null?void 0:e.toggle)},maxDisplayVideoCount(){return qe.intersection(qe.keys(this.enabledPlugins),["caption","topic","note"]).length&&this.mode==="replay"?2:3},replayLayout(){return qt.info(this.enabledPlugins),qe.intersection(qe.keys(this.enabledPlugins),["caption","topic","note"]).length?"second-generation":"first-generation"}},mounted(){UJe()},beforeUnmount(){HJe()},methods:{presetVideo(e,t){return e.volume=e.mute?0:e.volume,e.duration=0,e.progress=0,e.rate=1,e.status="LOADSTART",e.show=!1,e.key=e.key?e.key:`${e.label}-${hS()}`,e.order=e.order>=0?e.order:wC[e.label],e},checkSource(e){if(!qe.has(e,"src")&&!qe.has(e,"sources"))throw new Error("must provide at least one src or sources!");if(qe.has(e,"src")&&!qe.has(e,"type"))throw new Error("src and type must required!");if(!qe.has(e,"src")&&qe.has(e,"sources")&&e.sources.length<=0)throw new Error("must provide at least on sources, which include: src, type, label");qe.has(e,"src")&&qe.has(e,"sources")&&delete e.sources},whenPlayerReady(e){this.$emit("playerReady",e)},whenPlayerError(e){this.$emit("playerError",e)},whenPlayerReload(){this.$emit("playerReload")}}},VJe=["id","version"];function qJe(e,t,n,i,r,a){const o=yn("replay-player"),s=yn("multi-live-player"),l=yn("ant-theme-provider");return pe(),dt(l,null,{default:Qe(()=>[fe("div",{id:r.id,class:"mvp-uno-relative mvp-uno-flex mvp-uno-flex-col fullscreen-element",version:r.version},[n.mode==="replay"&&a.refinedVideos.length?(pe(),dt(o,{key:0,videos:a.refinedVideos,seekable:n.seekable,"seek-warning":n.seekWarning,"last-played":n.lastPlayed,"max-played":n.maxPlayed,"auto-play":n.autoPlay,"is-simple-controls":n.isSimpleControls,"is-multi-audio":n.isMultiAudio,"enable-play-rate":n.enablePlayRate,"enable-ask-air":n.enableAskAir,"unplayed-segments":n.unplayedSegments,"default-err":n.defaultErr,"copyright-notice":n.copyrightNotice,onPlayerReady:a.whenPlayerReady,onPlayerError:a.whenPlayerError,onPlayerReload:a.whenPlayerReload},null,8,["videos","seekable","seek-warning","last-played","max-played","auto-play","is-simple-controls","is-multi-audio","enable-play-rate","enable-ask-air","unplayed-segments","default-err","copyright-notice","onPlayerReady","onPlayerError","onPlayerReload"])):n.mode==="live"&&a.refinedVideos.length?(pe(),dt(s,{key:1,id:r.id,"custom-volume":n.volume,"auto-play":n.autoPlay,videos:a.refinedVideos,plugins:n.plugins,"copyright-notice":n.copyrightNotice,onMultiPlayerReady:a.whenPlayerReady,onMultiPlayerError:a.whenPlayerError},null,8,["id","custom-volume","auto-play","videos","plugins","copyright-notice","onMultiPlayerReady","onMultiPlayerError"])):yt("",!0)],8,VJe)]),_:1})}const WJe=Fn(zJe,[["render",qJe]]),GJe={cn:{multiPlayer:{locale:"zh-CN",loadFailed:"加载失败",loadFailedMsg:"抱歉,加载出错,请重试",loadFailedMsg1:"无法播放此内容",reload:"重新加载",more:"更多",collapse:"收起",videoEditor:"视频编辑",switchToMain:"切换到主画面",hideView:"隐藏",playRate:{rate:"倍速"},askAir:{title:"不懂",hoverTip:"针对当前画面提问"},playerResource:{resource:"视频源"},audioResource:{resource:"音源"},playerHeaderBar:{fav:"收藏",download:"下载",clip:"剪辑",capture:"截图",playerNote:"笔记",closePlayer:"关闭",livingStatus:"直播中",compositeVideo:"合成",topic:"标注",playerChat:"聊天"},bigPlayButton:{livingTips:"直播已经开始",watchRightNow:"马上观看"},playerError:{noLiveStream:"暂无直播流,请",retry:"重试"},playerVideoState:{load_fail:"视频加载失败,请重试",reload:"重新加载"},playerPlugin:{controller:{resumeLive:"继续直播",resumeRecord:"继续录制",end:"结束",living:"直播中",recording:"录制中",liveIsPaused:"直播暂停中...",liveIsEnded:"直播已结束",areYouSureToEnd:"确定结束排程吗?",itWillTerminateTheCurrentActivity:"结束排程将终止当前直录播活动"},topic:{cloudView:"词云视图",listView:"列表视图",topic:"标注",aiTopic:"智能标注",manualTopic:"教师标注",manage:"管理",emphasis:"重点",difficulty:"难点",exam:"考点",example:"例题",think:"思考",areYouSureToDelete:"是否删除此标注?",cancelPublic:"取消公开",setPublic:"设为公开",noTopic:"暂无标注",noTopicForPublished:"标注暂未公开",recover:"还原",aiGenerate:"AI 生成",addTime:"新增时间",addTopic:"添加标注",regenerate:"重新生成",aiTopicGenerating:"智能标注生成中",left:"剩余",youCanAddManualTopic:"您可以添加教师标注",aiTopicGenerateFail:"智能标注生成失败",tryRegenerate:"请尝试重新生成",deleteTopic:"删除",join:"加入",pleaseEnterTopic:"请输入标注",regenerateTopicTip:"当前已有标注内容,确定重新生成标注?重新生成将清空当前已有标注",unpublishTip:"标注暂未公开,公开后学生可见",searchNoTopic:"暂无相关内容",publicTip:"学生可查看标注内容",unpublicTip:"标注内容已对学生隐藏",regenerateTitle:"重新生成标注",duplicatePosition:"标注时间点重复,请修改",addAsTopic:"添加为标注",topicAdded:"标注已添加",checkCaption:"为了更好地生成标注内容,建议您先「生成字幕」",modalTitle:"AI 生成标注"},note:{placeholder:"请输入内容...",setPublic:"设为公开",more:"更多",less:"更少",title:"截图笔记",empty:"暂无内容",success:"截图成功",error:"截图失败",uploadCaptureError:"上传截图失败",searchPlaceholder:"输入关键字搜索",addNote:"新建笔记",search:"搜索",all:"全部",private:"我的笔记",public:"公开",latest:"最新",earliest:"最早",note_position:"笔记位置",delete_note:"是否删除此笔记?",hour:"小时前",minute:"分钟前",hours:"小时前",minutes:"分钟前",just:"刚刚",collapse:"收起",empty_note:"没有更多笔记了",searchText:"找到 {0} 条结果",loading:"加载中",nodata:"暂无数据",public_info:"公开",empty_snapshot:"当前无截图",textNote:"文本笔记",screenshotNote:"截图笔记",searchNoNote:"暂无相关内容"},chapter:{title:"章节",totalSummary:"共{0}章节",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无章节内容",regenerateChapterTip:"当前已有章节内容,确定重新生成章节?重新生成将清空当前已有章节和知识点",checkCaption:"为了更好地生成章节内容,建议您先「生成字幕」",modalTitle:"AI 生成章节",regenerateTitle:"重新生成章节"},outline:{title:"概要",summary:"内容总结",chapter:"知识概要",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无概要内容",regenerateOutlineTip:"当前已有概要内容,确定重新生成?重新生成将清空当前已有概要"},quizz:{title:"测试",totalSummary:"共 {0} 题",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无测试内容",aiGeneratingTip:"AI 生成中",regenerateQuizzTip:"当前已有测试内容,确定重新生成测试?重新生成将清空当前已有测试"},caption:{transcript:"逐字稿",listView:"列表视图",caption:"字幕",captionShort:"字幕",translate:"翻译",cCaption:"隐藏式字幕",uploadCaption:"上传字幕",downloadTemplate:"下载字幕模版",deleteCaption:"删除",areYouSureToDelete:"是否刪除字幕?",show:"显示",open:"开",close:"关",upload:"上传",download:"下载",vtt:"仅支持 .vtt 格式",demo:"样本字幕",lastPlayed:"上次观看到 {0}",generating:"AI 生成中",leftTime:"剩余",noCaption:"暂无字幕",please:"请",generateFail:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",uploadCaptionSuccess:"字幕上传成功",uploadCaptionFail:"字幕上传失败, 请检查文件重试",mutePart:"静音片段",durationPercentage:"时长占比",regenerateCaption:"重新生成字幕",regenerateCaptionTip:"当前已有字幕内容,确定重新生成字幕?重新生成将清空当前已有字幕",uploadCaptionTip:"当前已有字幕内容,上传成功后将替换现有内容",uploadFormatTip:"格式支持“SRT、TXT、Excel”",srtFormat:"SRT 格式",txtFormat:"TXT 格式",xlsFormat:"Excel 格式",placeholder:"请输入",searchResult:"搜索结果",uploadFile:"上传文件",exportCaption:"下载字幕",editCaption:"编辑",goToCurrentPlayPosition:"回到当前播放位置",searchNoCaption:"暂无相关内容",autoSkip:"自动跳过静音片段",language:"字幕语言",translating:"字幕翻译中",lang:{origin:"源语言",zh:"简体中文","zh-TW":"繁体中文",en:"英语",ja:"日语",ko:"韩语",ru:"俄语",fr:"法语",de:"德语",tr:"土耳其语",it:"意大利语",vi:"越南语",id:"印尼语",th:"泰语",ar:"阿拉伯语",es:"西班牙语",pt:"葡萄牙语",nl:"荷兰语",hi:"印地语",ug:"维语",ms:"马来西亚语"},captionGenerating:"字幕生成中,请您稍后再试",generateCaption:"生成字幕"},chat:{note:"欢迎来到课程直播间,请踊跃提问发言!",newMsgTip:"{0}条新消息",system:"系统",joinTip:"用户 {0} 进入了直播间",send:"发送",placeholder:"按住Enter发送消息",noMore:"没有更多聊天记录了",visitor:"游客"},ppt:{title:"课件截图",noContent:"暂无内容",aiGenerate:"AI 生成",aiGenerating:"AI 生成中",genearteFailedRetry:"生成失败,请重试",regenerate:"重新生成",havePptSureToRegenerate:"当前已有课件截图内容,确定重新生成?",showPpt:"显示课件截图",hidePpt:"隐藏课件截图",deleteTitle:"删除课件截图",deleteContent:"是否删除课件截图?",createPpt:"新增截图",batchExport:"导出",createPptTooltip:"新增当前时刻截图",exportDocInfo:{courseName:"课程名称",time:"时间",instructor:"主讲人",location:"地点"}},audioCopier:{title:"音视频合成",videoSource:"视频源",audioSource:"音频源",selectVideoSource:"请选择待合成视频",defaultAudioSource:"默认音源",videoSourceCannotBeNull:"视频源不能为空",compositeTip:"我们会将所选音频源复制到您选择的所有视频源上,这可能会花一段时间。"},outputLocale:{title:"输出语言",lang:{auto:"自动(默认)","zh-CN":"简体中文","zh-TW":"繁体中文","en-US":"英文"}}},ai:{aiGenerate:"AI 生成",generating:"智能生成中... ",generateNow:"立即生成",generatingWait:"请稍候片刻,精彩即将揭晓!",generatingWait2:"请稍候片刻,内容即将完成",generatingWait3:"内容正在快马加鞭赶来,马上就好!!",generateContentTips:"内容由 AI 大模型生成,仅供参考",creditsExhausted:"您的可用点数已耗尽,无法重新生成",creditsRemaining:"可用点数",creditsRemainingTip:"会根据场景的不同匹配合适的大模型,所以每次使用所消耗的点数不同。可使用点数为 0 后,无法再使用。",firstTimeTranslate:"首次翻译将消耗点数"},progress:{unplayedSegments:"未看片段",mutePart:"静音片段"},common:{manage:"管理",cancel:"取消",save:"保存",confirm:"确定",edit:"编辑",delete:"删除",pleaseInput:"请输入",enterFullscreen:"全屏",exitFullscreen:"退出全屏",download:"下载",downloading:"正在下载中,请稍候",quality:"画质",volume:"音量",operateSuccess:"操作成功",week:{week0:"周日",week1:"周一",week2:"周二",week3:"周三",week4:"周四",week5:"周五",week6:"周六"}},channel:{students:"学生路",encoder:"电脑路",instructor:"老师路"},audioLabel:{students:"学生路",encoder:"电脑路",instructor:"老师路"},unPauseable:"老师已设置观看该视频不能暂停",videoEnded:{tip:"当前视频播放已结束,您可继续查看其他内容"}}},tw:{multiPlayer:{locale:"zh-TW",loadFailed:"載入失敗",loadFailedMsg:"抱歉,載入出錯,請重新載入",loadFailedMsg1:"無法播放此內容",reload:"重新載入",more:"更多",collapse:"收起",videoEditor:"影片編輯",switchToMain:"切換到主畫面",hideView:"隱藏",playRate:{rate:"倍速"},askAir:{title:"不懂",hoverTip:"針對當前畫面提問"},playerResource:{resource:"影像選擇"},audioResource:{resource:"音频選擇"},playerHeaderBar:{fav:"收藏",clip:"剪輯",download:"下載",topic:"標註",capture:"截圖",playerNote:"筆記",closePlayer:"關閉",livingStatus:"直播中",compositeVideo:"合成",playerChat:"聊天"},bigPlayButton:{livingTips:"直播已經開始",watchRightNow:"馬上觀看"},playerError:{noLiveStream:"暫無直播串流,請",retry:"重試"},playerVideoState:{load_fail:"視頻加載失敗,請重試",reload:"重新加載"},playerPlugin:{controller:{resumeLive:"繼續直播",resumeRecord:"繼續錄製",end:"結束",living:"直播中",recording:"錄製中",liveIsPaused:"直播暫停中...",liveIsEnded:"直播已結束...",areYouSureToEnd:"確定結束排程嗎?",itWillTerminateTheCurrentActivity:"結束排程將終止當前直錄播活動"},topic:{cloudView:"詞雲視圖",listView:"清單視圖",topic:"標註",aiTopic:"AI 標註",manualTopic:"教師標註",manage:"管理",emphasis:"重點",difficulty:"難點",exam:"考點",example:"例題",think:"思考",areYouSureToDelete:"是否刪除此標註?",cancelPublic:"取消公開",setPublic:"設為公開",noTopic:"暫無標註",noTopicForPublished:"標註暫未公開",recover:"還原",aiGenerate:"AI 生成",addTime:"新增時間",addTopic:"新增標註",regenerate:"重新生成",aiTopicGenerating:"AI 標註生成中",left:"剩餘",youCanAddManualTopic:"您可以添加教師標註",aiTopicGenerateFail:"AI 標註生成失敗",tryRegenerate:"請嘗試重新生成",deleteTopic:"刪除",join:"加入",pleaseEnterTopic:"請輸入標註",regenerateTopicTip:"目前已有標註內容,確定重新生成標註?重新生成將清空目前已有標註",unpublishTip:"標註暫未公開,公開後學生可見",searchNoTopic:"暫無相關內容",publicTip:"學生可查看標註內容",unpublicTip:"標註內容已對學生隱藏",regenerateTitle:"重新生成標註",duplicatePosition:"標註時間點重複,請修改",addAsTopic:"新增為標註",topicAdded:"標註已新增",checkCaption:"為了更好地生成標注內容,建議您先「生成字幕」。",modalTitle:"AI 生成標註"},note:{placeholder:"請輸入內容...",setPublic:"設為公開",more:"更多",less:"更少",title:"筆記截圖",empty:"暂无内容",success:"截圖成功",error:"截圖失敗",uploadCaptureError:"上傳截圖失敗",searchPlaceholder:"輸入關鍵字搜索",addNote:"新建笔记",search:"搜索",all:"全部",private:"我的筆記",public:"公開",latest:"最新",earliest:"最早",note_position:"筆記位置",delete_note:"是否删除此筆記?",hour:"小時前",minute:"分鐘前",hours:"小時前",minutes:"分鐘前",just:"剛剛",collapse:"收起",empty_note:"沒有更多筆記了",searchText:"找到 {0} 條結果",loading:"加載中",nodata:"暫無數據",public_info:"公開",empty_snapshot:"當前無截圖",textNote:"文本筆記",screenshotNote:"截圖筆記",searchNoNote:"暫無相關內容"},chapter:{title:"章節",totalSummary:"共{0}章節",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無章節內容",regenerateChapterTip:"目前已有章節內容,確定重新生成章節?重新生成將清空目前已有章節與知識點",checkCaption:"為了更好地生成章節內容,建議您先「生成字幕」",modalTitle:"AI 生成章節",regenerateTitle:"重新生成章節"},outline:{title:"概要",summary:"內容總結",chapter:"知識概要",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無概要",regenerateOutlineTip:"目前已有概要內容,確定重新生成? 重新生成將清空當前已有概要"},quizz:{title:"測驗",totalSummary:"共 {0} 題",aiGenerateFailTip:"生成失敗,請重新嘗試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無測驗內容",aiGeneratingTip:"AI 生成中",regenerateQuizzTip:"目前已有測驗內容,確定重新生成測驗?重新生成將清空目前已有測驗"},caption:{transcript:"逐字稿",listView:"清單視圖",caption:"字幕",captionShort:"字幕",translate:"翻譯",cCaption:"CC字幕",uploadCaption:"上傳字幕",deleteCaption:"刪除",areYouSureToDelete:"是否刪除字幕?",downloadTemplate:"下載字幕模板",show:"顯示",open:"開",close:"關",upload:"上傳",download:"下載",vtt:"僅支持 .vtt 格式",demo:"樣本字幕",lastPlayed:"上次觀看到 {0}",generating:"AI 生成中",leftTime:"剩餘",noCaption:"暫無字幕",please:"請",generateFail:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",uploadCaptionSuccess:"字幕上傳成功",uploadCaptionFail:"字幕上傳失敗,請檢查文件重試",mutePart:"靜音片段",durationPercentage:"時長占比",regenerateCaption:"重新生成字幕",regenerateCaptionTip:"目前已有字幕內容,確定重新生成字幕?重新生成將清空目前已有字幕",uploadCaptionTip:"目前已有字幕內容,上傳成功後將取代現有內容",uploadFormatTip:"格式支援“SRT、TXT、Excel”",srtFormat:"SRT 格式",txtFormat:"TXT 格式",xlsFormat:"Excel 格式",placeholder:"請輸入",searchResult:"搜尋結果",uploadFile:"上傳檔案",exportCaption:"下載字幕",editCaption:"編輯",goToCurrentPlayPosition:"回到當前播放位置",searchNoCaption:"暫無相關內容",autoSkip:"自動跳過靜音片段",language:"字幕語言",translating:"字幕翻譯中",lang:{origin:"源語言",zh:"簡體中文","zh-TW":"繁體中文",en:"英語",ja:"日語",ko:"韓語",ru:"俄語",fr:"法語",de:"德語",tr:"土耳其語",it:"義大利語",vi:"越南語",id:"印尼語",th:"泰語",ar:"阿拉伯語",es:"西班牙語",pt:"葡萄牙語",nl:"荷蘭語",hi:"印地語",ug:"維語",ms:"馬來西亞語"},captionGenerating:"字幕生成中,請您稍後再試",generateCaption:"生成字幕"},chat:{note:"歡迎來到課程直播間,請踴躍提問發言!",newMsgTip:"{0}條新消息",system:"系統",joinTip:"用戶 {0} 進入了直播間",send:"發送",placeholder:"按Enter鍵發送",noMore:"沒有更多聊天記錄了",visitor:"遊客"},ppt:{title:"教材截圖",noContent:"暫無內容",aiGenerate:"AI 生成",aiGenerating:"AI 生成中",genearteFailedRetry:"生成失敗,請重試",regenerate:"重新生成",havePptSureToRegenerate:"目前已有教材截圖內容,確定重新生成?",showPpt:"顯示教材截圖",hidePpt:"隱藏教材截圖",deleteTitle:"刪除教材截圖",deleteContent:"是否刪除教材截圖?",createPpt:"新增截圖",createPptTooltip:"新增當前截圖",batchExport:"匯出",exportDocInfo:{courseName:"課程名稱",time:"時間",instructor:"主講人",location:"地點"}},audioCopier:{title:"音視頻合成",videoSource:"視頻源",audioSource:"音頻源",selectVideoSource:"請選擇待合成視頻",defaultAudioSource:"默認音源",videoSourceCannotBeNull:"視頻源不能為空",compositeTip:"我們會將所選音頻源複製到您選擇的所有視頻源上,這可能會花一段時間。"},outputLocale:{title:"輸出語言",lang:{auto:"自動(預設)","zh-CN":"简体中文","zh-TW":"繁體中文","en-US":"英文"}}},ai:{aiGenerate:"AI 生成",generating:"AI 生成中... ",generateNow:"立即生成",generatingWait:"請稍候片刻,精彩即將揭曉!",generatingWait2:"請稍候片刻,內容即將完成",generatingWait3:"內容正在快馬加鞭趕來,馬上就好!",generateContentTips:"內容由 AI 大模型生成,僅供參考",creditsExhausted:"您的可用點數已耗盡,無法重新生成",creditsRemaining:"可用點數",creditsRemainingTip:"會根據場景的不同匹配合適的,所以每次使用所消耗的點數不同。可使用點數為 0 後,無法再使用。",firstTimeTranslate:"首次翻譯將會消耗點數"},progress:{unplayedSegments:"未看片段",mutePart:"靜音片段"},common:{manage:"管理",cancel:"取消",save:"保存",confirm:"確認",edit:"編輯",delete:"刪除",pleaseInput:"請輸入",enterFullscreen:"全螢幕顯示",exitFullscreen:"退出全螢幕",download:"下載",downloading:"正在下載中,請稍候",quality:"畫質",volume:"音量",operateSuccess:"操作成功",week:{week0:"週日",week1:"週一",week2:"週二",week3:"週三",week4:"週四",week5:"週五",week6:"週六"}},channel:{students:"學生路",encoder:"電腦路",instructor:"老師路"},audioLabel:{students:"學生路",encoder:"電腦路",instructor:"老師路"},unPauseable:"老師已設定觀看該影片不能暫停",videoEnded:{tip:"當前影片播放已結束,您可繼續查看其他內容"}}},us:{multiPlayer:{locale:"en-US",loadFailed:"Failed to load",loadFailedMsg:"Sorry, there was an error loading, please try again",loadFailedMsg1:"Video cannot be played",reload:"Reload",more:"More",collapse:"Collapse",videoEditor:"Video Editing",switchToMain:"Switch to Main Screen",hideView:"Hide",playRate:{rate:"Speed"},askAir:{title:"Ask",hoverTip:"Ask Air about the current screen"},common:{save:"Save",cancel:"Cancel",manage:"Manage",confirm:"Confirm",edit:"Edit",delete:"Delete",pleaseInput:"Please enter",enterFullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",download:"Download",downloading:"Downloading in progress, please wait",quality:"Quality",volume:"Volume",operateSuccess:"Operation Success",week:{week0:"Sunday",week1:"Monday",week2:"Tuesday",week3:"Wednesday",week4:"Thursday",week5:"Friday",week6:"Saturday"}},playerResource:{resource:"Resource"},audioResource:{resource:"Audio Resource"},playerHeaderBar:{fav:"Fav",clip:"Clip",download:"Download",capture:"Capture",playerNote:"Note",closePlayer:"Close",livingStatus:"Living",compositeVideo:"Composite",topic:"Topics",playerChat:"Chat"},bigPlayButton:{livingTips:"Live is Started",watchRightNow:"Watch Now"},playerError:{noLiveStream:"No live stream, please ",retry:"retry"},playerPlugin:{controller:{resumeLive:"Resume Live",resumeRecord:"Resume Record",end:"End",living:"Living",recording:"Recording",liveIsPaused:"The live is paused...",liveIsEnded:"The live is ended...",areYouSureToEnd:"Are you sure to end?",itWillTerminateTheCurrentActivity:"It will terminate the current activity"},topic:{cloudView:"Word Cloud View",listView:"List View",topic:"Topic",aiTopic:"AI Topic",manualTopic:"Manual Topic",manage:"Manage",emphasis:"Emphasis",difficulty:"Difficulty",exam:"Exam",example:"Example",think:"Think",areYouSureToDelete:"Are you sure to delete?",cancelPublic:"Cancel Public",setPublic:"Set Public",noTopic:"No Topics",noTopicForPublished:"No Published Topics",recover:"Revert",aiGenerate:"AI Generate",addTime:"Add Time",addTopic:"Add Topic",regenerate:"Regenerate",aiTopicGenerating:"Topics are Generating",left:"left",youCanAddManualTopic:"You can add topic in Manual Topic",aiTopicGenerateFail:"Ai topic generate fail",tryRegenerate:"Please try regenerate",deleteTopic:"Delete",join:"Join",pleaseEnterTopic:"Please enter topic",regenerateTopicTip:"Already have topic, sure to regenerate? Regenerating will clear the current topics",unpublishTip:"Topic is not public. Visible to students after setting up public",searchNoTopic:"No related content",publicTip:"Students can view the topics",unpublicTip:"Topics are hidden from students",regenerateTitle:"Regenerate Topic",duplicatePosition:"The time point of the topic is repeated, please modify it",addAsTopic:"Add as topic",topicAdded:"Topic added",checkCaption:"For better topic generation, please “Generate Subtitles” first",modalTitle:"AI generate"},note:{placeholder:"Please enter content...",setPublic:"Post to public",more:"More",less:"Less",title:"Screenshot",empty:"Empty",success:"Success",error:"Fail",uploadCaptureError:"Upload Failed",searchPlaceholder:"Keyword",addNote:"Add notes",search:"Search",all:"All",private:"My notes",public:"Public",latest:"Newest",earliest:"Oldest",note_position:"Location",delete_note:"Confirm delete the note?",hour:" Hour ago",minute:" Minute ago",hours:" Hours ago",minutes:" Minutes ago",just:"Just",collapse:"Collapse",empty_note:"No more",searchText:"Find {0} results",loading:"Loading",nodata:"No data",public_info:"Public",empty_snapshot:"Empty snapshot",textNote:"Text",screenshotNote:"Screenshot",searchNoNote:"No related content"},chapter:{title:"Chapter",totalSummary:"Total {0} chapters",aiGeneratingTip:"AI generating",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No chapter",regenerateChapterTip:"Already have chapters, sure to regenerate? Regenerating will clear the current chapters and knowledge points",checkCaption:"For better chapters generation, please “Generate Subtitles” first",modalTitle:"AI generate",regenerateTitle:"Regenerate Chapter"},outline:{title:"Summary",summary:"Content summary",chapter:"Knowledge summary",aiGeneratingTip:"AI generating",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No summary",regenerateOutlineTip:"Already have summary, sure to regenerate? Regeneration will clear the current summary"},quizz:{title:"Quizzes",totalSummary:"Total {0} Questions",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No quizzes",aiGeneratingTip:"AI generating",regenerateQuizzTip:"Already have quizzes, sure to regenerate? Regenerating will clear the current quizzes"},caption:{transcript:"Transcript",listView:"List View",caption:"Subtitles/CC",captionShort:"Subtitles",translate:"Translate",cCaption:"CC",uploadCaption:"Upload Subtitles",downloadTemplate:"Download template",deleteCaption:"Delete",areYouSureToDelete:"Does it remove Subtitles?",show:"Show",open:"Open",close:"Close",upload:"Upload",download:"Download",vtt:"Only support .vtt",demo:"Demo Subtitles",lastPlayed:"Last played {0}",generating:"AI generating",leftTime:"left",noCaption:"No Subtitles",please:"please",generateFail:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",uploadCaptionSuccess:"Upload completed",uploadCaptionFail:"Upload failed, please check the file",mutePart:"Mute part",durationPercentage:"Percentage",regenerateCaption:"Regenerate Subtitles",regenerateCaptionTip:"Already have subtitles, sure to regenerate? Regenerating will clear the current subtitles",uploadCaptionTip:"Already have subtitles. Existing content will be replaced after successful upload",uploadFormatTip:'Format support "SRT、TXT、Excel"',srtFormat:"SRT",txtFormat:"TXT",xlsFormat:"Excel",placeholder:"Please enter",searchResult:"Search result",uploadFile:"Upload File",exportCaption:"Download Subtitles",editCaption:"Edit",goToCurrentPlayPosition:"Return to the position playing now",searchNoCaption:"No related content",autoSkip:"Auto Skip Mute part",language:"Language",translating:"Subtitles are being translated",lang:{origin:"Original",zh:"Simplified Chinese","zh-TW":"Traditional Chinese",en:"English",ja:"Japanese",ko:"Korean",ru:"Russian",fr:"French",de:"German",tr:"Turkish",it:"Italian",vi:"Vietnamese",id:"Indonesian",th:"Thai",ar:"Arabic",es:"Spanish",pt:"Portuguese",nl:"Dutch",hi:"Hindi",ug:"Uighur",ms:"Malay"},captionGenerating:"Subtitle generation is in progress, please try again later",generateCaption:"Generating subtitles"},chat:{note:"Warm reminder: Welcome to the live room, do not post non-topic chat content.",newMsgTip:"{0} New messages",system:"system",joinTip:"user {0} entered the live room",send:"send",placeholder:"Press Enter to send",noMore:"No more",visitor:"visitor"},ppt:{title:"Courseware screenshots",noContent:"No content",aiGenerate:"AI generate",aiGenerating:"AI generating",genearteFailedRetry:"Generation failed, please retry",regenerate:"Regenerate",havePptSureToRegenerate:"Already have screenshot, sure to regenerate?",showPpt:"Show screenshot",hidePpt:"Hide screenshot",deleteTitle:"Delete screenshot",deleteContent:"Are you sure you want to delete the screenshot?",createPpt:"Add screenshot",createPptTooltip:"Add screenshot of current moment",batchExport:"Export",exportDocInfo:{courseName:"Course",time:"Time",instructor:"Host",location:"Location"}},audioCopier:{title:"Copy audio to videos",videoSource:"Video Source",audioSource:"Audio source",selectVideoSource:"Please select need synthesized videos",defaultAudioSource:"Default audio",videoSourceCannotBeNull:"Video source can not be null",compositeTip:"We will copy the selected audio source to all the video sources you selected. This may take a while."},outputLocale:{title:"Output Language",lang:{auto:"auto(default)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","en-US":"English"}}},ai:{aiGenerate:"AI generate",generating:"AI generating.",generateNow:"Generate Now",generatingWait:"AI generating.",generatingWait2:"AI generating. AI is generating hard.",generatingWait3:"AI generating. AI is generating hard, exciting content will be presented soon.",generateContentTips:"The content is generated by LLM and is for reference only.",creditsExhausted:"Your available credits are exhausted and cannot regenerate",creditsRemaining:"Available credits",creditsRemainingTip:"The points consumed will vary based on different scenarios, so each use may require a different amount of points. Once the available points reach zero, you will no longer be able to use the service.",firstTimeTranslate:"The first translation will consume credits"},progress:{unplayedSegments:"Unfinished video clip",mutePart:"Mute part"},playerVideoState:{load_fail:"Video failed to load, please try again",reload:"Reload"},channel:{students:"Student",encoder:"Computer",instructor:"Instructor"},audioLabel:{students:"Student",encoder:"Computer",instructor:"Instructor"},unPauseable:"Pause is not allowed",videoEnded:{tip:"The current video has ended, you can continue to view other content"}}}};function i8(e){const t=e.target,n=t.value.replace(/\D+/,""),i=t.attributes.max,r=t.attributes.min;i&&r&&n.length>0?(Number.parseInt(n,10)>i.value&&(t.value=i.value),Number.parseInt(n,10)<r.value&&(t.value=i.value)):n.length<=0?t.value="0":t.value=n}function AY(e){const t=e.target;t.value=Number.parseInt(t.value,10);const{zeroPrefix:n}=t.attributes;t.value.length<=0||Number.parseInt(t.value,10)===0?t.value="00":n&&Number.parseInt(t.value,10)<10&&Number.parseInt(t.value,10)>=0&&t.value.length<2&&(t.value=`0${t.value}`)}const DY={numberOnly:{created:e=>{e.addEventListener("input",i8),e.addEventListener("change",i8),e.addEventListener("blur",AY)},mounted:()=>{},unmounted:e=>{e.removeEventListener("input",i8),e.removeEventListener("blur",AY)}}};function KJe(e,t,n=3e3){return pr.get(e,{timeout:n}).then(i=>{try{const r=i.data.data.CUSTOMIZED_WG_VIDEO_PLAYER_I18N||"{}",a=qe.isString(r)?JSON.parse(r):r;for(const[o,s]of Object.entries(a))t.global.mergeLocaleMessage(o,{multiPlayer:s});qt.info("loadCustomizedI18n success")}catch(r){qt.error("loadCustomizedI18n error, can not parse response data")}}).catch(i=>{qt.error("loadCustomizedI18n error",i)})}const Ddt="",Pdt="",Idt="",XJe=["timeupdate","videoSourceChanged","pause","play","closed","opened","playing","ended","loadstart","loadeddata","durationchange","loadedmetadata","ready","seeking","seeked","waiting","unplayable","captionLoaded"];class YJe{constructor(t,n,i={}){this.target=t,this.props=n,this.options=i,this.registedEvents={},this.oneRegistedEvents={},this._innerPlayer=null,this.localMap={cn:"cn",tw:"tw",us:"us",en:"us","zh-CN":"cn","zh-TW":"tw","en-US":"us","zh-MO":"tw","en-GB":"us"},this._createMyApp()}_createMyApp(){const t=Yne(WJe,yo(Wn({},this.props),{onPlayerReady:i=>this._onPlayerReady(i),onPlayerError:i=>this._onPlayerError(i),onPlayerReload:()=>this._onPlayerReload()})),n=Bre({silentTranslationWarn:!0,locale:this.localMap[this.options.locale]||"cn",messages:this.options.langs||GJe,legacy:!1});this.props.customizedI18nSource&&KJe(this.props.customizedI18nSource,n),this.i18n=n,t.use(n),t.mount(typeof this.target=="string"?`#${this.target}`:this.target);for(const i in DY)t.directive(i,DY[i]);Object.defineProperty(this,"app",{value:t,configurable:!0,enumerable:!1})}_proxyAllInnerPlayerEvents(){XJe.forEach(t=>{this._innerPlayer.on(t,n=>{t in this.registedEvents&&this.registedEvents[t].forEach(i=>{i(yo(Wn({},n),{player:this._innerPlayer}))}),t in this.oneRegistedEvents&&(this.oneRegistedEvents[t].forEach(i=>{i(yo(Wn({},n),{player:this._innerPlayer}))}),this.oneRegistedEvents[t]=[])})})}_onPlayerReady(t){this._innerPlayer=t,this.registedEvents.playerReady&&this.registedEvents.playerReady.forEach(n=>{n({player:t})}),this._proxyAllInnerPlayerEvents()}_onPlayerError(t){this.registedEvents.playerError&&this.registedEvents.playerError.forEach(n=>{n(t)})}_onPlayerReload(){this.destroy(),this._createMyApp()}_checkPlayer(){this._innerPlayer||qt.warn("wg video player not ready!!!")}get currentTime(){return this._checkPlayer(),this._innerPlayer.currentTime}set currentTime(t){this._checkPlayer(),this._innerPlayer.currentTime=t}get duration(){return this._checkPlayer(),this._innerPlayer.duration}get playing(){return this._checkPlayer(),this._innerPlayer.playing}get hasCaption(){return this._checkPlayer(),this._innerPlayer&&this._innerPlayer.hasCaption}get captionStatus(){return this._checkPlayer(),this._innerPlayer.captionStatus}one(t,n){this.oneRegistedEvents[t]?this.oneRegistedEvents[t].push(n):this.oneRegistedEvents[t]=[n]}on(t,n){this.registedEvents[t]?this.registedEvents[t].push(n):this.registedEvents[t]=[n]}off(t,n){if(this.registedEvents[t]&&this.registedEvents[t].length){const i=this.registedEvents[t].indexOf(n);i>=0&&this.registedEvents[t].splice(i,1)}}play(){this._checkPlayer(),this._innerPlayer.play()}pause(){this._checkPlayer(),this._innerPlayer.pause()}open(){this._innerPlayer.open()}close(){this._innerPlayer.close()}locale(t){this.i18n.global.locale=this.localMap[t]}destroy(){this.app.unmount(),this._innerPlayer&&this._innerPlayer.dispose()}generateCaptionIfNotExits(){if(this._checkPlayer(),!!this._innerPlayer)return qt.info("try generate caption if not exits"),this._innerPlayer.generateCaptionIfNotExits()}updateCaptions(t){this._checkPlayer(),this._innerPlayer&&this._innerPlayer.updateCaptions(t)}screenshot(){if(this._checkPlayer(),!!this._innerPlayer)return this._innerPlayer.screenshot()}}Dr.WgVideoPlayer=YJe,Object.defineProperty(Dr,Symbol.toStringTag,{value:"Module"})});
|
|
812
|
+
`,""])},function(n,i,r){i.__esModule=!0;var a=r(139),o=s(a);function s(l){return l&&l.__esModule?l:{default:l}}i.default=function(l){if(Array.isArray(l)){for(var u=0,c=Array(l.length);u<l.length;u++)c[u]=l[u];return c}else return(0,o.default)(l)}},function(n,i,r){n.exports={default:r(140),__esModule:!0}},function(n,i,r){r(26),r(141),n.exports=r(4).Array.from},function(n,i,r){var a=r(48),o=r(13),s=r(22),l=r(142),u=r(143),c=r(55),d=r(144),f=r(69);o(o.S+o.F*!r(146)(function(h){Array.from(h)}),"Array",{from:function(p){var m=s(p),b=typeof this=="function"?this:Array,y=arguments.length,F=y>1?arguments[1]:void 0,x=F!==void 0,w=0,C=f(m),D,_,P,k;if(x&&(F=a(F,y>2?arguments[2]:void 0,2)),C!=null&&!(b==Array&&u(C)))for(k=C.call(m),_=new b;!(P=k.next()).done;w++)d(_,w,x?l(k,F,[P.value,w],!0):P.value);else for(D=c(m.length),_=new b(D);D>w;w++)d(_,w,x?F(m[w],w):m[w]);return _.length=w,_}})},function(n,i,r){var a=r(9);n.exports=function(o,s,l,u){try{return u?s(a(l)[0],l[1]):s(l)}catch(d){var c=o.return;throw c!==void 0&&a(c.call(o)),d}}},function(n,i,r){var a=r(16),o=r(2)("iterator"),s=Array.prototype;n.exports=function(l){return l!==void 0&&(a.Array===l||s[o]===l)}},function(n,i,r){var a=r(6),o=r(15);n.exports=function(s,l,u){l in s?a.f(s,l,o(0,u)):s[l]=u}},function(n,i,r){var a=r(31),o=r(2)("toStringTag"),s=a(function(){return arguments}())=="Arguments",l=function(u,c){try{return u[c]}catch(d){}};n.exports=function(u){var c,d,f;return u===void 0?"Undefined":u===null?"Null":typeof(d=l(c=Object(u),o))=="string"?d:s?a(c):(f=a(c))=="Object"&&typeof c.callee=="function"?"Arguments":f}},function(n,i,r){var a=r(2)("iterator"),o=!1;try{var s=[7][a]();s.return=function(){o=!0},Array.from(s,function(){throw 2})}catch(l){}n.exports=function(l,u){if(!u&&!o)return!1;var c=!1;try{var d=[7],f=d[a]();f.next=function(){return{done:c=!0}},d[a]=function(){return f},l(d)}catch(h){}return c}},function(n,i,r){n.exports={default:r(148),__esModule:!0}},function(n,i,r){r(56),r(26),n.exports=r(149)},function(n,i,r){var a=r(9),o=r(69);n.exports=r(4).getIterator=function(s){var l=o(s);if(typeof l!="function")throw TypeError(s+" is not iterable!");return a(l.call(s))}},function(n,i,r){var a=typeof window!="undefined";a&&function(){for(var o=0,s=["ms","moz","webkit","o"],l=0;l<s.length&&!window.requestAnimationFrame;++l)window.requestAnimationFrame=window[s[l]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[s[l]+"CancelAnimationFrame"]||window[s[l]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(u,c){var d=new Date().getTime(),f=Math.max(0,16-(d-o)),h=window.setTimeout(function(){u(d+f)},f);return o=d+f,h}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(u){clearTimeout(u)})}()},function(n,i,r){var a=function(){var l=this,u=l.$createElement,c=l._self._c||u;return c("div",{staticClass:"emoji-mart",style:l.customStyles},[l.showCategories?c("div",{staticClass:"emoji-mart-bar"},[c("anchors",{attrs:{data:l.mutableData,i18n:l.mutableI18n,color:l.color,categories:l.filteredCategories,"active-category":l.activeCategory},on:{click:l.onAnchorClick}})],1):l._e(),l._v(" "),l.showSearch?c("search",{ref:"search",attrs:{data:l.mutableData,i18n:l.mutableI18n,"emojis-to-show-filter":l.emojisToShowFilter,include:l.include,exclude:l.exclude,custom:l.customEmojis,recent:l.recentEmojis,"auto-focus":l.autoFocus},on:{search:l.onSearch}}):l._e(),l._v(" "),c("div",{ref:"scroll",staticClass:"emoji-mart-scroll",on:{scroll:l.onScroll}},[c("category",{directives:[{name:"show",rawName:"v-show",value:l.searchEmojis,expression:"searchEmojis"}],attrs:{data:l.mutableData,i18n:l.mutableI18n,id:"search",name:"Search",emojis:l.searchEmojis,"emoji-props":l.emojiProps}}),l._v(" "),l._l(l.filteredCategories,function(d){return c("category",{directives:[{name:"show",rawName:"v-show",value:!l.searchEmojis&&(l.infiniteScroll||d==l.activeCategory),expression:"!searchEmojis && (infiniteScroll || category == activeCategory)"}],key:d.id,ref:"categories",refInFor:!0,attrs:{data:l.mutableData,i18n:l.mutableI18n,id:d.id,name:d.name,emojis:d.emojis,"emoji-props":l.emojiProps}})})],2),l._v(" "),l.showPreview?c("div",{staticClass:"emoji-mart-bar"},[c("preview",{attrs:{data:l.mutableData,title:l.title,emoji:l.previewEmoji,"idle-emoji":l.emoji,"show-skin-tones":l.showSkinTones,"emoji-props":l.emojiProps,"skin-props":l.skinProps},on:{change:l.onSkinChange}})],1):l._e()],1)},o=[];a._withStripped=!0;var s={render:a,staticRenderFns:o};i.a=s},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var a=r(40),o=u(a),s=r(39),l=u(s);function u(p){return p&&p.__esModule?p:{default:p}}var c=new l.default(o.default),d=c.emojis,f=c.emoticons;function h(){return c.search.apply(c,arguments)}i.default={search:h,emojis:d,emoticons:f}}])})})(iY);var eYe=iY.exports;const vc=Object.create(null);vc.open="0",vc.close="1",vc.ping="2",vc.pong="3",vc.message="4",vc.upgrade="5",vc.noop="6";const t3=Object.create(null);Object.keys(vc).forEach(e=>{t3[vc[e]]=e});const zA={type:"error",data:"parser error"},aY=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",oY=typeof ArrayBuffer=="function",sY=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,VA=({type:e,data:t},n,i)=>aY&&t instanceof Blob?n?i(t):lY(t,i):oY&&(t instanceof ArrayBuffer||sY(t))?n?i(t):lY(new Blob([t]),i):i(vc[e]+(t||"")),lY=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function uY(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qA;function tYe(e,t){if(aY&&e.data instanceof Blob)return e.data.arrayBuffer().then(uY).then(t);if(oY&&(e.data instanceof ArrayBuffer||sY(e.data)))return t(uY(e.data));VA(e,!1,n=>{qA||(qA=new TextEncoder),t(qA.encode(n))})}const cY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vv=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<cY.length;e++)Vv[cY.charCodeAt(e)]=e;const nYe=e=>{let t=e.length*.75,n=e.length,i,r=0,a,o,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(i=0;i<n;i+=4)a=Vv[e.charCodeAt(i)],o=Vv[e.charCodeAt(i+1)],s=Vv[e.charCodeAt(i+2)],l=Vv[e.charCodeAt(i+3)],c[r++]=a<<2|o>>4,c[r++]=(o&15)<<4|s>>2,c[r++]=(s&3)<<6|l&63;return u},rYe=typeof ArrayBuffer=="function",WA=(e,t)=>{if(typeof e!="string")return{type:"message",data:dY(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:iYe(e.substring(1),t)}:t3[n]?e.length>1?{type:t3[n],data:e.substring(1)}:{type:t3[n]}:zA},iYe=(e,t)=>{if(rYe){const n=nYe(e);return dY(n,t)}else return{base64:!0,data:e}},dY=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},fY=String.fromCharCode(30),aYe=(e,t)=>{const n=e.length,i=new Array(n);let r=0;e.forEach((a,o)=>{VA(a,!1,s=>{i[o]=s,++r===n&&t(i.join(fY))})})},oYe=(e,t)=>{const n=e.split(fY),i=[];for(let r=0;r<n.length;r++){const a=WA(n[r],t);if(i.push(a),a.type==="error")break}return i};function sYe(){return new TransformStream({transform(e,t){tYe(e,n=>{const i=n.length;let r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);const a=new DataView(r.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{r=new Uint8Array(9);const a=new DataView(r.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})}let GA;function n3(e){return e.reduce((t,n)=>t+n.length,0)}function r3(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let r=0;r<t;r++)n[r]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function lYe(e,t){GA||(GA=new TextDecoder);const n=[];let i=0,r=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(i===0){if(n3(n)<1)break;const l=r3(n,1);a=(l[0]&128)===128,r=l[0]&127,r<126?i=3:r===126?i=1:i=2}else if(i===1){if(n3(n)<2)break;const l=r3(n,2);r=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),i=3}else if(i===2){if(n3(n)<8)break;const l=r3(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,53-32)-1){s.enqueue(zA);break}r=c*Math.pow(2,32)+u.getUint32(4),i=3}else{if(n3(n)<r)break;const l=r3(n,r);s.enqueue(WA(a?l:GA.decode(l),t)),i=0}if(r===0||r>e){s.enqueue(zA);break}}}})}const hY=4;function La(e){if(e)return uYe(e)}function uYe(e){for(var t in La.prototype)e[t]=La.prototype[t];return e}La.prototype.on=La.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},La.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},La.prototype.off=La.prototype.removeListener=La.prototype.removeAllListeners=La.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,r=0;r<n.length;r++)if(i=n[r],i===t||i.fn===t){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+e],this},La.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,t)}return this},La.prototype.emitReserved=La.prototype.emit,La.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},La.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ql=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function pY(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const cYe=ql.setTimeout,dYe=ql.clearTimeout;function i3(e,t){t.useNativeTimers?(e.setTimeoutFn=cYe.bind(ql),e.clearTimeoutFn=dYe.bind(ql)):(e.setTimeoutFn=ql.setTimeout.bind(ql),e.clearTimeoutFn=ql.clearTimeout.bind(ql))}const fYe=1.33;function hYe(e){return typeof e=="string"?pYe(e):Math.ceil((e.byteLength||e.size)*fYe)}function pYe(e){let t=0,n=0;for(let i=0,r=e.length;i<r;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function mYe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gYe(e){let t={},n=e.split("&");for(let i=0,r=n.length;i<r;i++){let a=n[i].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class _Ye extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class KA extends La{constructor(t){super(),this.writable=!1,i3(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new _Ye(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=WA(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mYe(t);return n.length?"?"+n:""}}const mY="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),XA=64,vYe={};let gY=0,a3=0,_Y;function vY(e){let t="";do t=mY[e%XA]+t,e=Math.floor(e/XA);while(e>0);return t}function yY(){const e=vY(+new Date);return e!==_Y?(gY=0,_Y=e):e+"."+vY(gY++)}for(;a3<XA;a3++)vYe[mY[a3]]=a3;let bY=!1;try{bY=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const yYe=bY;function FY(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||yYe))return new XMLHttpRequest}catch(n){}if(!t)try{return new ql[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}function hdt(){}function bYe(){}const FYe=function(){return new FY({xdomain:!1}).responseType!=null}();class wYe extends KA{constructor(t){if(super(t),this.polling=!1,typeof location!="undefined"){const i=location.protocol==="https:";let r=location.port;r||(r=i?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}const n=t&&t.forceBase64;this.supportsBinary=FYe&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};oYe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,aYe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yY()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new yc(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(r,a)=>{this.onError("xhr post error",r,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class yc extends La{constructor(t,n){super(),i3(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=pY(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const i=this.xhr=new FY(n);try{i.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&i.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{i.setRequestHeader("Accept","*/*")}catch(r){}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(i.timeout=this.opts.requestTimeout),i.onreadystatechange=()=>{var r;i.readyState===3&&((r=this.opts.cookieJar)===null||r===void 0||r.parseCookies(i)),i.readyState===4&&(i.status===200||i.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof i.status=="number"?i.status:0)},0))},i.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=yc.requestsCount++,yc.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=bYe,t)try{this.xhr.abort()}catch(n){}typeof document!="undefined"&&delete yc.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(yc.requestsCount=0,yc.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",wY);else if(typeof addEventListener=="function"){const e="onpagehide"in ql?"pagehide":"unload";addEventListener(e,wY,!1)}}function wY(){for(let e in yc.requests)yc.requests.hasOwnProperty(e)&&yc.requests[e].abort()}const YA=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),o3=ql.WebSocket||ql.MozWebSocket,SY=!0,SYe="arraybuffer",xY=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xYe extends KA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=xY?{}:pY(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=SY&&!xY?n?new o3(t,n):new o3(t):new o3(t,n,i)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],r=n===t.length-1;VA(i,this.supportsBinary,a=>{const o={};try{SY&&this.ws.send(a)}catch(s){}r&&YA(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yY()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!o3}}class CYe extends KA{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=lYe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),r=sYe();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const a=()=>{i.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],r=n===t.length-1;this.writer.write(i).then(()=>{r&&YA(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const EYe={websocket:xYe,webtransport:CYe,polling:wYe},TYe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kYe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function JA(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let r=TYe.exec(e||""),a={},o=14;for(;o--;)a[kYe[o]]=r[o]||"";return n!=-1&&i!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=AYe(a,a.path),a.queryKey=DYe(a,a.query),a}function AYe(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function DYe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,a){r&&(n[r]=a)}),n}let CY=class Kg extends La{constructor(t,n={}){super(),this.binaryType=SYe,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=JA(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=JA(n.host).host),i3(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gYe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=hY,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new EYe[t](i)}open(){let t;if(this.opts.rememberUpgrade&&Kg.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;Kg.priorWebsocketSuccess=!1;const r=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!i)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Kg.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function a(){i||(i=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,a(),this.emitReserved("upgradeError",f)};function s(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&a()}const c=()=>{n.removeListener("open",r),n.removeListener("error",o),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",r),n.once("error",o),n.once("close",s),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Kg.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const r=this.writeBuffer[i].data;if(r&&(n+=hYe(r)),i>0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,r){if(typeof n=="function"&&(r=n,n=void 0),typeof i=="function"&&(r=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const a={type:t,data:n,options:i};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){Kg.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const r=t.length;for(;i<r;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}};CY.protocol=hY;function PYe(e,t="",n){let i=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),i=JA(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const a=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port+t,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}const IYe=typeof ArrayBuffer=="function",OYe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EY=Object.prototype.toString,MYe=typeof Blob=="function"||typeof Blob!="undefined"&&EY.call(Blob)==="[object BlobConstructor]",RYe=typeof File=="function"||typeof File!="undefined"&&EY.call(File)==="[object FileConstructor]";function QA(e){return IYe&&(e instanceof ArrayBuffer||OYe(e))||MYe&&e instanceof Blob||RYe&&e instanceof File}function s3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(s3(e[n]))return!0;return!1}if(QA(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return s3(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&s3(e[n]))return!0;return!1}function BYe(e){const t=[],n=e.data,i=e;return i.data=ZA(n,t),i.attachments=t.length,{packet:i,buffers:t}}function ZA(e,t){if(!e)return e;if(QA(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=ZA(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=ZA(e[i],t));return n}return e}function LYe(e,t){return e.data=e8(e.data,t),delete e.attachments,e}function e8(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=e8(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=e8(e[n],t));return e}const NYe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$Ye=5;var qr;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(qr||(qr={}));class jYe{constructor(t){this.replacer=t}encode(t){return(t.type===qr.EVENT||t.type===qr.ACK)&&s3(t)?this.encodeAsBinary({type:t.type===qr.EVENT?qr.BINARY_EVENT:qr.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===qr.BINARY_EVENT||t.type===qr.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=BYe(t),i=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(i),r}}function TY(e){return Object.prototype.toString.call(e)==="[object Object]"}class t8 extends La{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===qr.BINARY_EVENT;i||n.type===qr.BINARY_ACK?(n.type=i?qr.EVENT:qr.ACK,this.reconstructor=new UYe(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(QA(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(qr[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===qr.BINARY_EVENT||i.type===qr.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(a,n)}else i.nsp="/";const r=t.charAt(n+1);if(r!==""&&Number(r)==r){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}i.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(t8.isPayloadValid(i.type,a))i.data=a;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case qr.CONNECT:return TY(n);case qr.DISCONNECT:return n===void 0;case qr.CONNECT_ERROR:return typeof n=="string"||TY(n);case qr.EVENT:case qr.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&NYe.indexOf(n[0])===-1);case qr.ACK:case qr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class UYe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=LYe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const HYe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:t8,Encoder:jYe,get PacketType(){return qr},protocol:$Ye},Symbol.toStringTag,{value:"Module"}));function Cu(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zYe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kY extends La{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Cu(t,"open",this.onopen.bind(this)),Cu(t,"packet",this.onpacket.bind(this)),Cu(t,"error",this.onerror.bind(this)),Cu(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(zYe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:qr.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,s=n.pop();this._registerAckCallback(o,s),i.id=o}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){var i;const r=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(r===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(a),n.apply(this,[null,...o])}}emitWithAck(t,...n){const i=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((r,a)=>{n.push((o,s)=>i?o?a(o):r(s):r(o)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...a)=>i!==this._queue[0]?void 0:(r!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...a)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:qr.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qr.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qr.EVENT:case qr.BINARY_EVENT:this.onevent(t);break;case qr.ACK:case qr.BINARY_ACK:this.onack(t);break;case qr.DISCONNECT:this.ondisconnect();break;case qr.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...r){i||(i=!0,n.packet({type:qr.ACK,id:t,data:r}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function $g(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}$g.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},$g.prototype.reset=function(){this.attempts=0},$g.prototype.setMin=function(e){this.ms=e},$g.prototype.setMax=function(e){this.max=e},$g.prototype.setJitter=function(e){this.jitter=e};class n8 extends La{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,i3(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new $g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const r=n.parser||HYe;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new CY(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const r=Cu(n,"open",function(){i.onopen(),t&&t()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},o=Cu(n,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{r(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Cu(t,"ping",this.onping.bind(this)),Cu(t,"data",this.ondata.bind(this)),Cu(t,"error",this.onerror.bind(this)),Cu(t,"close",this.onclose.bind(this)),Cu(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){YA(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new kY(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const qv={};function Wv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=PYe(e,t.path||"/socket.io"),i=n.source,r=n.id,a=n.path,o=qv[r]&&a in qv[r].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return s?l=new n8(i,t):(qv[r]||(qv[r]=new n8(i,t)),l=qv[r]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Wv,{Manager:n8,Socket:kY,io:Wv,connect:Wv});const ho={CONNECT:"connect",CONNECTING:"connecting",CONNECT_FAILED:"connect_failed",CONNECT_ERROR:"error",RECONNECT:"reconnect",RECONNECTING:"reconnecting",RECONNECT_FAILED:"reconnect_failed",DISCONNECT:"disconnect",WELCOME:"welcome",MESSAGE:"message",LEAVEROOM:"leave_room",JOIN:"join",BROADCAST:"broadcast",LEAVE:"leave"},VYe={SYSTEM:0,MANAGER:1,INSTRUCTOR:2,STUDENT:3,VISITOR:4},l3={CN:"cn",US:"us",GB:"gb",TW:"tw",MO:"mo"},r8={getAccessInfo(e,t,n){const i=`${e==null?void 0:e.server}/api/user-info?token=${e==null?void 0:e.token}`;return pr.get(i).then(t,n)},getMsgs(e,t,n,i,r){const a=`${e==null?void 0:e.server}/api/room/${t}/msgs?token=${e==null?void 0:e.token}`;return pr.get(a,{params:n,crossOrigin:!0}).then(i,r)}},pdt="",mdt="",qYe={components:{Picker:eYe.Picker,InfiniteLoading:EX,MvpSvg:Ut},props:{width:{type:Number,default:300},config:{type:Object,require:!0},accessInfo:{type:Object,require:!0}},data(){return{socket:null,msgBox:null,history:[],roltType:VYe,showEmojiPicker:!1,showTip:!0,autoScroll:!0,content:"",lang:this.$i18n.locale,factorOfMerit:10,pageSize:20,newMsgCount:0,userCount:0,firstMsg:0,lastMsg:0,infiniteId:+new Date,emojiPickerStyle:{height:"205px"}}},computed:{useLang(){let e=this.lang;return e===l3.GB?e=l3.US:e===l3.MO&&(e=l3.TW),e}},created(){this.socket=Wv(this.config.server,{transports:["websocket"]})},mounted(){this.socket.on(ho.CONNECT,()=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT}]`),this.socket.emit(ho.JOIN,this.accessInfo)}),this.socket.on(ho.CONNECT_FAILED,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT_FAILED}]:${e}`)}),this.socket.on(ho.CONNECT_ERROR,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.CONNECT_ERROR}]:${e}`)}),this.socket.on(ho.RECONNECT,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.RECONNECT}]:${e}`)}),this.socket.on(ho.RECONNECT_FAILED,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.RECONNECT_FAILED}]:${e}`)}),this.socket.on(ho.DISCONNECT,e=>{qt.info(`SOCKET [${this.socket.connected}][${ho.DISCONNECT}]:${e}`)}),this.socket.on(ho.WELCOME,e=>{this.userCount=e,this.loadNewMsg()}),this.socket.on(ho.LEAVEROOM,e=>{this.userCount=e}),this.socket.on(ho.MESSAGE,()=>{this.newMsgCount+=1,this.loadNewMsg()}),this.msgBox=this.$el.querySelector(".mvp-chat-container"),this.msgBox.addEventListener("scroll",this.onScroll)},beforeUnmount(){this.socket.emit(ho.LEAVE,1),this.socket.destroy()},methods:{addEmoji(e){this.showEmojiPicker=!1,this.content+=e.native},sendMessage(){this.content.length>0&&(this.accessInfo.msg=this.content,this.socket.emit(ho.BROADCAST,this.accessInfo),this.content="",this.autoScroll=!0)},onScroll(){this.$nextTick(()=>{const e=this.msgBox.offsetHeight+this.msgBox.scrollTop;this.msgBox.scrollHeight-e<this.factorOfMerit?(this.autoScroll=!0,this.newMsgCount=0):this.autoScroll=!1})},scrollToBottom(){this.autoScroll&&this.$nextTick(()=>{this.msgBox.scrollTop=this.msgBox.scrollHeight,this.newMsgCount=0})},viewNewMsg(){this.autoScroll=!0,this.scrollToBottom(),this.newMsgCount=0},infiniteScroll(e){var n;const t={page_size:this.pageSize,msg_cursor:this.firstMsg,type:0};r8.getMsgs(this.config,(n=this.accessInfo)==null?void 0:n.room_id,t,i=>{setTimeout(()=>{i.data&&i.data.length>0?(this.unshiftHistory(i.data),e.loaded()):e.complete()},1e3)},i=>{qt.info(i),e.complete()})},unshiftHistory(e){var t;if(e&&e.length>0){this.history.unshift(...e.filter(i=>this.firstMsg===0||i.msg_id<this.firstMsg)),this.firstMsg=this.history[0].msg_id;const n=this.history.length;this.lastMsg=(t=this.history[n-1])==null?void 0:t.msg_id}},appendNewMsg(e){var t;if(e&&e.length>0){e.forEach(i=>{i.msg_id>this.lastMsg&&this.history.push(i)}),this.firstMsg===0&&(this.firstMsg=this.history[0].msg_id);const n=this.history.length;this.lastMsg=(t=this.history[n-1])==null?void 0:t.msg_id,this.scrollToBottom()}},loadNewMsg(){var t;const e={page_size:this.pageSize,msg_cursor:this.lastMsg,type:1};r8.getMsgs(this.config,(t=this.accessInfo)==null?void 0:t.room_id,e,n=>{this.appendNewMsg(n.data)},n=>{qt.info(n)})}}},WYe={key:0,class:"tip-wrapper"},GYe={class:"icon-alert"},KYe={class:"content"},XYe={key:0},YYe={class:"mvp-no-more-data"},JYe={class:"mvp-no-more-data"},QYe={key:0,class:"user-name"},ZYe={key:1},eJe={class:"user-name"},tJe={key:2},nJe={class:"user-name"},rJe={key:3,class:"user-name"},iJe={key:4,class:"user-name"},aJe={key:5,class:"content"},oJe={key:6,class:"content"},sJe={class:"content"},lJe={key:0},uJe={key:1},cJe={class:"chat-input"},dJe={id:"emoji-box"},fJe={class:"option-group"},hJe=["placeholder"],pJe=["disabled"];function mJe(e,t,n,i,r,a){const o=yn("mvp-svg"),s=yn("infinite-loading"),l=yn("svg-icon"),u=yn("picker");return pe(),He("div",{class:"mvp-chat-panel",style:Pr({"min-width":`${n.width}px`,"max-width":`${n.width}px`})},[r.showTip?(pe(),He("div",WYe,[fe("span",GYe,[z(o,{name:"alert"})]),fe("span",KYe,Ze(e.$t("multiPlayer.playerPlugin.chat.note")),1),fe("span",{class:"close-wrapper",onClick:t[0]||(t[0]=c=>r.showTip=!1)},[z(o,{name:"close",class:"mvp-uno-c-white"})])])):yt("",!0),fe("div",{class:on(["mvp-chat-container",{"show-tip":r.showTip}])},[fe("ul",null,[r.history.length>r.pageSize?(pe(),He("li",XYe,[z(s,{direction:"top",spinner:"waveDots",onInfinite:a.infiniteScroll},{"no-results":Qe(()=>[fe("div",YYe,[fe("p",null,Ze(e.$t("multiPlayer.playerPlugin.chat.noMore")),1)])]),"no-more":Qe(()=>[fe("div",JYe,[fe("p",null,Ze(e.$t("multiPlayer.playerPlugin.chat.noMore")),1)])]),_:1},8,["onInfinite"])])):yt("",!0),(pe(!0),He(rn,null,vr(r.history,(c,d)=>(pe(),He("li",{key:d},[c.role_type===r.roltType.SYSTEM?(pe(),He("span",QYe,Ze(e.$t("multiPlayer.playerPlugin.chat.system"))+":",1)):c.role_type===r.roltType.MANAGER?(pe(),He("span",ZYe,[z(l,{"icon-class":`admin-${a.useLang}`,"class-name":"role-tag admin-tag"},null,8,["icon-class"]),fe("span",eJe," "+Ze(c.user_name)+":",1)])):c.role_type===r.roltType.INSTRUCTOR?(pe(),He("span",tJe,[z(l,{"icon-class":`instructor-${a.useLang}`,"class-name":r.lang==="cn"?"role-tag instructor-cn":"role-tag instructor-us"},null,8,["icon-class","class-name"]),fe("span",nJe," "+Ze(c.user_name)+":",1)])):c.role_type===r.roltType.VISITOR?(pe(),He("span",rJe,Ze(e.$t("multiPlayer.playerPlugin.chat.visitor"))+"-"+Ze(c.user_name)+": ",1)):(pe(),He("span",iJe,Ze(c.user_name)+":",1)),c.role_type===0?(pe(),He("span",aJe,Ze(e.$t("multiPlayer.playerPlugin.chat.joinTip",{0:c.user_name})),1)):(pe(),He("span",oJe,Ze(c.msg),1))]))),128))])],2),!r.autoScroll&&r.newMsgCount>0?(pe(),He("div",{key:1,class:"new-msg-tip",onClick:t[1]||(t[1]=(...c)=>a.viewNewMsg&&a.viewNewMsg(...c))},[fe("span",sJe,[z(o,{name:"unfurl",class:"mvp-uno-c-white"}),r.newMsgCount<100?(pe(),He("span",lJe,Ze(e.$t("multiPlayer.playerPlugin.chat.newMsgTip",{0:r.newMsgCount})),1)):(pe(),He("span",uJe,Ze(e.$t("multiPlayer.playerPlugin.chat.newMsgTip",{0:"99+"})),1))])])):yt("",!0),fe("div",cJe,[fe("div",dJe,[lr(z(u,{class:"emoji-picker",set:"apple","show-preview":!1,"show-search":!1,"show-skin-tones":!1,"show-categories":!1,include:["people"],color:"#232323",style:Pr(r.emojiPickerStyle),onSelect:a.addEmoji},null,8,["style","onSelect"]),[[Vr,r.showEmojiPicker]])]),fe("div",fJe,[fe("button",{class:"add-emoji",onClick:t[2]||(t[2]=c=>r.showEmojiPicker=!r.showEmojiPicker)},[z(o,{name:"smile",class:on({active:r.showEmojiPicker})},null,8,["class"])]),lr(fe("input",{"onUpdate:modelValue":t[3]||(t[3]=c=>r.content=c),placeholder:e.t("multiPlayer.playerPlugin.chat.placeholder"),maxlength:"100",onKeyup:t[4]||(t[4]=Kne((...c)=>a.sendMessage&&a.sendMessage(...c),["enter"]))},null,40,hJe),[[E_,r.content]]),fe("button",{class:on(["add-msg",{forbidden:r.content.length===0}]),disabled:r.content.length===0,onClick:t[5]||(t[5]=c=>a.sendMessage())},Ze(e.$t("multiPlayer.playerPlugin.chat.send")),11,pJe)])])],4)}const gJe={inject:["id"],data(){return{chatConfig:{},showChatPanel:!1,authed:!1,accessInfo:{}}},components:{chatPanel:Fn(qYe,[["render",mJe],["__scopeId","data-v-cdcb44ce"]])},computed:{enableChat(){return this.chatConfig&&this.chatConfig.toggle&&this.authed}},methods:{toggleChatPanel(){this.showChatPanel||this.closePanels(),this.showChatPanel=!this.showChatPanel},authChat(){r8.getAccessInfo(this.chatConfig,e=>{this.accessInfo=e.data,this.authed=!0},e=>{qt.error(e)})},initChatPlugin(){const e=Ai(this.id);e.on("chatConfigUpdated",()=>{this.chatConfig=e.plugins.chat,this.chatConfig.toggle&&this.authChat()})}}},_dt="",_Je={class:"mvp-caption-ctl-wrapper"},vJe=Fn(Object.assign({name:"LivePlayerCaption",inheritAttrs:!1,customOptions:{}},{__name:"index",props:{active:{type:Boolean,default:!1},config:{type:Object,default:()=>({})}},emits:["clickCaption"],setup(e,{emit:t}){const n=t;function i(){n("clickCaption")}return(r,a)=>(pe(),He("div",_Je,[fe("button",{class:on(["mvp-caption-ctl-btn",{"mvp-caption-ctl-active":e.active}]),onClick:i},Ze(r.$t("multiPlayer.playerPlugin.caption.caption")),3)]))}}),[["__scopeId","data-v-6ba05169"]]),yJe={inject:["id"],data(){return{liveCaptionConfig:{},showLiveCaptionPanel:!0}},computed:{enableLiveCaption(){return this.liveCaptionConfig.toggle}},methods:{initLiveCaptionPlugin(){const e=Ai(this.id);e.on("liveCaptionConfigUpdated",()=>{this.liveCaptionConfig=e.plugins.liveCaption,window.localStorage.removeItem(this.liveCaptionConfig.deviceCode)})},toggleLiveCaptionPanel(){this.showLiveCaptionPanel||this.closePanels(),this.showLiveCaptionPanel=!this.showLiveCaptionPanel}}},ydt="",bJe={class:"mvp-caption-item-wrapper"},FJe={class:"mvp-caption-item"},wJe={class:"mvp-caption-item-text"},SJe={key:0,class:"mvp-caption-item-text"},xJe=Fn({__name:"caption-item",props:{caption:Object},setup(e){return(t,n)=>(pe(),He("div",bJe,[fe("div",FJe,[fe("div",wJe,Ze(e.caption.text),1),e.caption.trans?(pe(),He("div",SJe,Ze(e.caption.trans),1)):yt("",!0)])]))}},[["__scopeId","data-v-6dde9c0d"]]),Fdt="",CJe={class:"mvp-caption-header mvp-uno-flex mvp-uno-justify-between"},EJe={class:"mvp-uno-flex mvp-uno-gap-2px mvp-uno-text-white",hover:"mvp-uno-cursor-pointer mvp-uno-border-opacity-48"},TJe={key:0,class:"mvp-caption-list"},kJe=Fn({__name:"caption-panel",props:{width:{type:Number,default:300},config:{type:Object,required:!0}},setup(e){const t=e,n=Mt("id"),i=ze(null),r=ze(null),a=ze(null),o=ze(!0),s=ze(10),l=ze([]),u=ze(null);u.value=Ai(n);const c=ze([]),d=ze(null);function f(x){return Dt(this,arguments,function*({key:F}){d.value=F,yield m()})}function h(){return Dt(this,null,function*(){const F=yield pr.get(`${t.config.server}/rtasr/${t.config.deviceCode}/support-translate-languages`);qe.isEmpty(F.data)||(c.value=F.data.map(x=>({value:x,label:`multiPlayer.playerPlugin.caption.lang.${x}`})))})}function p(){return Dt(this,null,function*(){const F=yield pr.get(`${t.config.server}/rtasr-jobs/${t.config.deviceCode}`);!qe.isEmpty(F.data)&&F.data.is_translate&&(d.value=F.data.target_lang)})}function m(){return Dt(this,null,function*(){yield pr.patch(`${t.config.server}/rtasr-jobs/${t.config.deviceCode}/update`,{is_translate:!0,target_lang:d.value})})}function b(){Jn(()=>{const F=a.value.offsetHeight+a.value.scrollTop;o.value=a.value.scrollHeight-F<s.value})}function y(){o.value&&Jn(()=>{a.value.scrollTop=a.value.scrollHeight})}return Cn(()=>Dt(this,null,function*(){yield h(),yield p(),r.value=Wv(`${t.config.server}/rtasr`,{transports:["websocket"]}),r.value.on("connect",()=>{const F=window.localStorage.getItem(`${t.config.deviceCode}`);F&&(l.value=JSON.parse(F)),qt.info(`connect: ${r.value.id}`)}),r.value.on("disconnect",()=>{qt.info(`disconnect: ${r.value.id}`)}),r.value.on(`${t.config.deviceCode}-caption`,F=>{if(u.value.playing){const x=l.value.length;x>0&&F.start_time&&l.value[x-1].start_time===F.start_time&&l.value.pop(),l.value.push(F),y()}}),r.value.on("connect_error",F=>{qt.info(`err.message: ${F.message}`)}),a.value.addEventListener("scroll",b)})),zr(()=>{window.localStorage.setItem(t.config.deviceCode,JSON.stringify(l.value)),r.value.disconnect()}),(F,x)=>(pe(),He("div",{ref_key:"target",ref:i,class:"mvp-caption-panel",style:Pr({"min-width":`${e.width}px`,"max-width":`${e.width}px`})},[fe("div",CJe,[fe("span",null,Ze(F.$t("multiPlayer.playerPlugin.caption.caption")),1),c.value.length>0?(pe(),dt(be(Oa),{key:0,"get-popup-container":()=>i.value,trigger:["hover"],placement:"bottomRight"},{overlay:Qe(()=>[z(be(Ma),{theme:"dark","selected-keys":[d.value],onClick:f},{default:Qe(()=>[(pe(!0),He(rn,null,vr(c.value,w=>(pe(),dt(be(ha),{key:w.value},{default:Qe(()=>[Rn(Ze(F.$t(w.label)),1)]),_:2},1024))),128))]),_:1},8,["selected-keys"])]),default:Qe(()=>[fe("div",EJe,[fe("span",null,Ze(F.$t("multiPlayer.playerPlugin.caption.translate")),1),z(Ut,{name:"round-arrow-down"})])]),_:1},8,["get-popup-container"])):yt("",!0)]),fe("div",{ref_key:"captionScrollBox",ref:a,class:"mvp-caption-list-wrapper"},[l.value.length>0?(pe(),He("div",TJe,[(pe(!0),He(rn,null,vr(l.value,(w,C)=>(pe(),dt(xJe,{key:C,caption:w},null,8,["caption"]))),128))])):yt("",!0)],512)],4))}},[["__scopeId","data-v-196906bf"]]),Sdt="",AJe={key:0,class:"live-player-tip"},DJe={class:"live-player-tip-text mvp-uno-truncate"},PJe=Fn({__name:"live-player-tip",props:{copyrightNotice:{required:!1,type:Object,default:()=>{}}},setup(e){const t=e,{locale:n}=Bi(),i=ve(()=>t.copyrightNotice&&t.copyrightNotice[n.value]);return(r,a)=>i.value?(pe(),He("div",AJe,[z(Ut,{name:"warning-line",class:"mvp-uno-text-white"}),fe("span",DJe,Ze(i.value),1)])):yt("",!0)}},[["__scopeId","data-v-477487cd"]]),Cdt="",IJe={components:{LivePlayer:pXe,HeaderBar:kKe,MvpTooltip:gKe,PlayerSwitcher:yXe,PlayerController:LXe,LiveStatusMask:GXe,BigPlayButton:QXe,PlayerWaterMark:ZXe,LivePlayerCaption:vJe,CaptionPanel:kJe,MvpSvg:Ut,LivePlayerTip:PJe},mixins:[mXe,gXe,gJe,yJe],props:{id:{required:!0},videos:{type:Array,required:!0},autoPlay:{type:Boolean,required:!1,default:!1},plugins:{type:Object,default:()=>({})},copyrightNotice:{type:Object,default:()=>({})}},emits:["multiPlayerError","multiPlayerReady"],data(){return{isPlayerReady:!1,minPanelWidth:300,maxPanelWidth:500,pannelWidth:this.minPanelWidth,dragStartX:0}},methods:{whenPlayerError(e){this.$emit("multiPlayerError",e)},whenPlayerReady(e){this.isPlayerReady=!0,this.initSwitcherPlugin(),this.initControllerPlugin(),this.initChatPlugin(),this.initLiveCaptionPlugin(),this.minPanelWidth=e.el.clientWidth*.3,this.maxPanelWidth=e.el.clientWidth*.5,this.pannelWidth=this.minPanelWidth,this.$emit("multiPlayerReady",e)},closePanels(){this.showNotePanel=!1,this.showTopicPanel=!1,this.showChatPanel=!1,this.showLiveCaptionPanel=!1},dragStart(e){this.dragStartX=e.clientX;const t=this.pannelWidth;document.onmousemove=n=>{const i=this.dragStartX-n.clientX;this.pannelWidth=t+i,this.pannelWidth<this.minPanelWidth&&(this.pannelWidth=this.minPanelWidth),this.pannelWidth>this.maxPanelWidth&&(this.pannelWidth=this.maxPanelWidth)}},dragStop(){document.onmousemove=null}}},OJe={class:"mvp-player-content"},MJe={key:0,class:"control-btn"},RJe={key:0,class:"mvp-drag"};function BJe(e,t,n,i,r,a){const o=yn("player-controller"),s=yn("mvp-svg"),l=yn("mvp-tooltip"),u=yn("player-switcher"),c=yn("header-bar"),d=yn("live-status-mask"),f=yn("player-water-mark"),h=yn("live-player-caption"),p=yn("live-player"),m=yn("big-play-button"),b=yn("live-player-tip"),y=yn("chat-panel"),F=yn("caption-panel");return e.showPlayer?(pe(),He("div",{key:0,class:"mvp-player-content-wrapper",onMouseup:t[2]||(t[2]=(...x)=>a.dragStop&&a.dragStop(...x))},[fe("div",OJe,[r.isPlayerReady?(pe(),dt(c,{key:0,"show-live-status":!e.controllerConfig.toggle},{default:Qe(()=>[r.isPlayerReady?(pe(),dt(o,{key:0,config:e.controllerConfig},null,8,["config"])):yt("",!0),z(l,{placement:"top",content:e.$t("multiPlayer.playerHeaderBar.playerChat")},{default:Qe(()=>[e.enableChat?(pe(),He("button",MJe,[z(s,{name:"player-chat",class:on({active:e.showChatPanel}),onClick:e.toggleChatPanel},null,8,["class","onClick"])])):yt("",!0)]),_:1},8,["content"]),r.isPlayerReady?(pe(),dt(u,{key:1,config:e.switcherConfig},null,8,["config"])):yt("",!0)]),_:1},8,["show-live-status"])):yt("",!0),e.showStatusMask?(pe(),dt(d,{key:1,"live-status":e.liveStatus},null,8,["live-status"])):yt("",!0),z(p,{id:n.id,"auto-play":n.autoPlay,videos:n.videos,onMultiPlayerReady:a.whenPlayerReady,onMultiPlayerError:a.whenPlayerError},{pluginWatermark:Qe(()=>[r.isPlayerReady?(pe(),dt(f,{key:0})):yt("",!0)]),pluginControls:Qe(()=>[e.enableLiveCaption&&r.isPlayerReady?(pe(),dt(h,{key:0,config:e.liveCaptionConfig,active:e.showLiveCaptionPanel,onClickCaption:e.toggleLiveCaptionPanel},null,8,["config","active","onClickCaption"])):yt("",!0)]),_:1},8,["id","auto-play","videos","onMultiPlayerReady","onMultiPlayerError"]),r.isPlayerReady&&e.useAutoPlayBtn?(pe(),dt(m,{key:2,"auto-play":n.autoPlay},null,8,["auto-play"])):yt("",!0),z(b,{"copyright-notice":n.copyrightNotice},null,8,["copyright-notice"])]),e.showChatPanel?(pe(),He("div",RJe,[fe("span",{onMousedown:t[0]||(t[0]=(...x)=>a.dragStart&&a.dragStart(...x)),onMouseup:t[1]||(t[1]=(...x)=>a.dragStop&&a.dragStop(...x))},null,32)])):yt("",!0),e.enableChat&&r.isPlayerReady&&e.showChatPanel?(pe(),dt(ss,{key:1,name:"mvp-plugin-panel"},{default:Qe(()=>[z(y,{width:r.pannelWidth,"access-info":e.accessInfo,config:e.chatConfig},null,8,["width","access-info","config"])]),_:1})):yt("",!0),e.enableLiveCaption&&r.isPlayerReady&&e.showLiveCaptionPanel?(pe(),dt(ss,{key:2,name:"mvp-plugin-panel"},{default:Qe(()=>[z(F,{width:r.pannelWidth,config:e.liveCaptionConfig},null,8,["width","config"])]),_:1})):yt("",!0)],32)):yt("",!0)}const LJe=Fn(IJe,[["render",BJe],["__scopeId","data-v-b1fb191c"]]),NJe={components:{AConfigProvider:OT},data(){return{theme:l5e}}};function $Je(e,t,n,i,r,a){const o=yn("a-config-provider");return pe(),dt(o,{"prefix-cls":"mvp-ant",theme:{token:{colorPrimary:"#00bbbd"}}},{default:Qe(()=>[Mr(e.$slots,"default")]),_:3})}const jJe=Fn(NJe,[["render",$Je]]),{registerListener:UJe,removeListener:HJe}=bF(),zJe={name:"WgVideoPlayer",components:{MultiLivePlayer:LJe,AntThemeProvider:jJe,ReplayPlayer:rGe},provide(){return{id:this.id,plugins:this.enabledPlugins,replayLayout:this.replayLayout,maxDisplayVideoCount:this.maxDisplayVideoCount,enableFullscreen:this.enableFullscreen,seekable:this.seekable,seekWarning:this.seekWarning,enablePlay:this.enablePlay,enablePause:this.enablePause,hideSubPanel:this.hideSubPanel}},props:{mode:{type:String,default:"live"},volume:{type:Number,default:.8},videos:{type:Array,required:!0},plugins:{type:Object},autoPlay:{type:Boolean,default:!1},seekable:{type:Boolean,required:!1,default:!0},seekWarning:{type:String,required:!1,default:""},lastPlayed:{type:Number,required:!1,default:0},maxPlayed:{type:Number,required:!1,default:0},isSimpleControls:{type:Boolean,required:!1},isMultiAudio:{type:Boolean,required:!1,default:!0},enableFullscreen:{type:Boolean,required:!1,default:!0},enablePlayRate:{type:Boolean,required:!1,default:!0},enableAskAir:{type:Boolean,required:!1,default:!1},unplayedSegments:{type:Array,default:()=>[]},defaultErr:{type:Boolean,required:!1,default:!1},copyrightNotice:{type:Object,required:!1,default:()=>{}},enablePlay:{type:Boolean,required:!1,default:!0},enablePause:{type:Boolean,required:!1,default:!0},hideSubPanel:{type:Boolean,default:!1}},emits:["playerReady","playerError","playerReload"],data(){return{id:`wg-video-player-${hS()}`,version:"1.8.0-alpha.2"}},computed:{refinedVideos(){const e=this.videos.map((n,i)=>(this.checkSource(n),this.presetVideo(n,i)));return e.length===1&&(e[0].mute=!1,e[0].volume=.8),qe.sortBy(e,n=>n.order).map((n,i)=>(n.show=i<this.maxDisplayVideoCount,n))},enabledPlugins(){return qe.pickBy(this.plugins,e=>e==null?void 0:e.toggle)},maxDisplayVideoCount(){return qe.intersection(qe.keys(this.enabledPlugins),["caption","topic","note"]).length&&this.mode==="replay"?2:3},replayLayout(){return qt.info(this.enabledPlugins),qe.intersection(qe.keys(this.enabledPlugins),["caption","topic","note"]).length?"second-generation":"first-generation"}},mounted(){UJe()},beforeUnmount(){HJe()},methods:{presetVideo(e,t){return e.volume=e.mute?0:e.volume,e.duration=0,e.progress=0,e.rate=1,e.status="LOADSTART",e.show=!1,e.key=e.key?e.key:`${e.label}-${hS()}`,e.order=e.order>=0?e.order:wC[e.label],e},checkSource(e){if(!qe.has(e,"src")&&!qe.has(e,"sources"))throw new Error("must provide at least one src or sources!");if(qe.has(e,"src")&&!qe.has(e,"type"))throw new Error("src and type must required!");if(!qe.has(e,"src")&&qe.has(e,"sources")&&e.sources.length<=0)throw new Error("must provide at least on sources, which include: src, type, label");qe.has(e,"src")&&qe.has(e,"sources")&&delete e.sources},whenPlayerReady(e){this.$emit("playerReady",e)},whenPlayerError(e){this.$emit("playerError",e)},whenPlayerReload(){this.$emit("playerReload")}}},VJe=["id","version"];function qJe(e,t,n,i,r,a){const o=yn("replay-player"),s=yn("multi-live-player"),l=yn("ant-theme-provider");return pe(),dt(l,null,{default:Qe(()=>[fe("div",{id:r.id,class:"mvp-uno-relative mvp-uno-flex mvp-uno-flex-col fullscreen-element",version:r.version},[n.mode==="replay"&&a.refinedVideos.length?(pe(),dt(o,{key:0,videos:a.refinedVideos,seekable:n.seekable,"seek-warning":n.seekWarning,"last-played":n.lastPlayed,"max-played":n.maxPlayed,"auto-play":n.autoPlay,"is-simple-controls":n.isSimpleControls,"is-multi-audio":n.isMultiAudio,"enable-play-rate":n.enablePlayRate,"enable-ask-air":n.enableAskAir,"unplayed-segments":n.unplayedSegments,"default-err":n.defaultErr,"copyright-notice":n.copyrightNotice,onPlayerReady:a.whenPlayerReady,onPlayerError:a.whenPlayerError,onPlayerReload:a.whenPlayerReload},null,8,["videos","seekable","seek-warning","last-played","max-played","auto-play","is-simple-controls","is-multi-audio","enable-play-rate","enable-ask-air","unplayed-segments","default-err","copyright-notice","onPlayerReady","onPlayerError","onPlayerReload"])):n.mode==="live"&&a.refinedVideos.length?(pe(),dt(s,{key:1,id:r.id,"custom-volume":n.volume,"auto-play":n.autoPlay,videos:a.refinedVideos,plugins:n.plugins,"copyright-notice":n.copyrightNotice,onMultiPlayerReady:a.whenPlayerReady,onMultiPlayerError:a.whenPlayerError},null,8,["id","custom-volume","auto-play","videos","plugins","copyright-notice","onMultiPlayerReady","onMultiPlayerError"])):yt("",!0)],8,VJe)]),_:1})}const WJe=Fn(zJe,[["render",qJe]]),GJe={cn:{multiPlayer:{locale:"zh-CN",loadFailed:"加载失败",loadFailedMsg:"抱歉,加载出错,请重试",loadFailedMsg1:"无法播放此内容",reload:"重新加载",more:"更多",collapse:"收起",videoEditor:"视频编辑",switchToMain:"切换到主画面",hideView:"隐藏",playRate:{rate:"倍速"},askAir:{title:"不懂",hoverTip:"针对当前画面提问"},playerResource:{resource:"视频源"},audioResource:{resource:"音源"},playerHeaderBar:{fav:"收藏",download:"下载",clip:"剪辑",capture:"截图",playerNote:"笔记",closePlayer:"关闭",livingStatus:"直播中",compositeVideo:"合成",topic:"标注",playerChat:"聊天"},bigPlayButton:{livingTips:"直播已经开始",watchRightNow:"马上观看"},playerError:{noLiveStream:"暂无直播流,请",retry:"重试"},playerVideoState:{load_fail:"视频加载失败,请重试",reload:"重新加载"},playerPlugin:{controller:{resumeLive:"继续直播",resumeRecord:"继续录制",end:"结束",living:"直播中",recording:"录制中",liveIsPaused:"直播暂停中...",liveIsEnded:"直播已结束",areYouSureToEnd:"确定结束排程吗?",itWillTerminateTheCurrentActivity:"结束排程将终止当前直录播活动"},topic:{cloudView:"词云视图",listView:"列表视图",topic:"标注",aiTopic:"智能标注",manualTopic:"教师标注",manage:"管理",emphasis:"重点",difficulty:"难点",exam:"考点",example:"例题",think:"思考",areYouSureToDelete:"是否删除此标注?",cancelPublic:"取消公开",setPublic:"设为公开",noTopic:"暂无标注",noTopicForPublished:"标注暂未公开",recover:"还原",aiGenerate:"AI 生成",addTime:"新增时间",addTopic:"添加标注",regenerate:"重新生成",aiTopicGenerating:"智能标注生成中",left:"剩余",youCanAddManualTopic:"您可以添加教师标注",aiTopicGenerateFail:"智能标注生成失败",tryRegenerate:"请尝试重新生成",deleteTopic:"删除",join:"加入",pleaseEnterTopic:"请输入标注",regenerateTopicTip:"当前已有标注内容,确定重新生成标注?重新生成将清空当前已有标注",unpublishTip:"标注暂未公开,公开后学生可见",searchNoTopic:"暂无相关内容",publicTip:"学生可查看标注内容",unpublicTip:"标注内容已对学生隐藏",regenerateTitle:"重新生成标注",duplicatePosition:"标注时间点重复,请修改",addAsTopic:"添加为标注",topicAdded:"标注已添加",checkCaption:"为了更好地生成标注内容,建议您先「生成字幕」",modalTitle:"AI 生成标注"},note:{placeholder:"请输入内容...",setPublic:"设为公开",more:"更多",less:"更少",title:"截图笔记",empty:"暂无内容",success:"截图成功",error:"截图失败",uploadCaptureError:"上传截图失败",searchPlaceholder:"输入关键字搜索",addNote:"新建笔记",search:"搜索",all:"全部",private:"我的笔记",public:"公开",latest:"最新",earliest:"最早",note_position:"笔记位置",delete_note:"是否删除此笔记?",hour:"小时前",minute:"分钟前",hours:"小时前",minutes:"分钟前",just:"刚刚",collapse:"收起",empty_note:"没有更多笔记了",searchText:"找到 {0} 条结果",loading:"加载中",nodata:"暂无数据",public_info:"公开",empty_snapshot:"当前无截图",textNote:"文本笔记",screenshotNote:"截图笔记",searchNoNote:"暂无相关内容"},chapter:{title:"章节",totalSummary:"共{0}章节",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无章节内容",regenerateChapterTip:"当前已有章节内容,确定重新生成章节?重新生成将清空当前已有章节和知识点",checkCaption:"为了更好地生成章节内容,建议您先「生成字幕」",modalTitle:"AI 生成章节",regenerateTitle:"重新生成章节"},outline:{title:"概要",summary:"内容总结",chapter:"知识概要",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无概要内容",regenerateOutlineTip:"当前已有概要内容,确定重新生成?重新生成将清空当前已有概要"},quizz:{title:"测试",totalSummary:"共 {0} 题",aiGenerateFailTip:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暂无测试内容",aiGeneratingTip:"AI 生成中",regenerateQuizzTip:"当前已有测试内容,确定重新生成测试?重新生成将清空当前已有测试"},caption:{transcript:"逐字稿",listView:"列表视图",caption:"字幕",captionShort:"字幕",translate:"翻译",cCaption:"隐藏式字幕",uploadCaption:"上传字幕",downloadTemplate:"下载字幕模版",deleteCaption:"删除",areYouSureToDelete:"是否刪除字幕?",show:"显示",open:"开",close:"关",upload:"上传",download:"下载",vtt:"仅支持 .vtt 格式",demo:"样本字幕",lastPlayed:"上次观看到 {0}",generating:"AI 生成中",leftTime:"剩余",noCaption:"暂无字幕",please:"请",generateFail:"生成失败,请重试",regenerate:"重新生成",aiGenerate:"AI 生成",uploadCaptionSuccess:"字幕上传成功",uploadCaptionFail:"字幕上传失败, 请检查文件重试",mutePart:"静音片段",durationPercentage:"时长占比",regenerateCaption:"重新生成字幕",regenerateCaptionTip:"当前已有字幕内容,确定重新生成字幕?重新生成将清空当前已有字幕",uploadCaptionTip:"当前已有字幕内容,上传成功后将替换现有内容",uploadFormatTip:"格式支持“SRT、TXT、Excel”",srtFormat:"SRT 格式",txtFormat:"TXT 格式",xlsFormat:"Excel 格式",placeholder:"请输入",searchResult:"搜索结果",uploadFile:"上传文件",exportCaption:"下载字幕",editCaption:"编辑",goToCurrentPlayPosition:"回到当前播放位置",searchNoCaption:"暂无相关内容",autoSkip:"自动跳过静音片段",language:"字幕语言",translating:"字幕翻译中",lang:{origin:"源语言",zh:"简体中文","zh-TW":"繁体中文",en:"英语",ja:"日语",ko:"韩语",ru:"俄语",fr:"法语",de:"德语",tr:"土耳其语",it:"意大利语",vi:"越南语",id:"印尼语",th:"泰语",ar:"阿拉伯语",es:"西班牙语",pt:"葡萄牙语",nl:"荷兰语",hi:"印地语",ug:"维语",ms:"马来西亚语"},captionGenerating:"字幕生成中,请您稍后再试",generateCaption:"生成字幕"},chat:{note:"欢迎来到课程直播间,请踊跃提问发言!",newMsgTip:"{0}条新消息",system:"系统",joinTip:"用户 {0} 进入了直播间",send:"发送",placeholder:"按住Enter发送消息",noMore:"没有更多聊天记录了",visitor:"游客"},ppt:{title:"课件截图",noContent:"暂无内容",aiGenerate:"AI 生成",aiGenerating:"AI 生成中",genearteFailedRetry:"生成失败,请重试",regenerate:"重新生成",havePptSureToRegenerate:"当前已有课件截图内容,确定重新生成?",showPpt:"显示课件截图",hidePpt:"隐藏课件截图",deleteTitle:"删除课件截图",deleteContent:"是否删除课件截图?",createPpt:"新增截图",batchExport:"导出",createPptTooltip:"新增当前时刻截图",exportDocInfo:{courseName:"课程名称",time:"时间",instructor:"主讲人",location:"地点"}},audioCopier:{title:"音视频合成",videoSource:"视频源",audioSource:"音频源",selectVideoSource:"请选择待合成视频",defaultAudioSource:"默认音源",videoSourceCannotBeNull:"视频源不能为空",compositeTip:"我们会将所选音频源复制到您选择的所有视频源上,这可能会花一段时间。"},outputLocale:{title:"输出语言",lang:{auto:"自动(默认)","zh-CN":"简体中文","zh-TW":"繁体中文","en-US":"英文"}}},ai:{aiGenerate:"AI 生成",generating:"智能生成中... ",generateNow:"立即生成",generatingWait:"请稍候片刻,精彩即将揭晓!",generatingWait2:"请稍候片刻,内容即将完成",generatingWait3:"内容正在快马加鞭赶来,马上就好!!",generateContentTips:"内容由 AI 大模型生成,仅供参考",creditsExhausted:"您的可用点数已耗尽,无法重新生成",creditsRemaining:"可用点数",creditsRemainingTip:"会根据场景的不同匹配合适的大模型,所以每次使用所消耗的点数不同。可使用点数为 0 后,无法再使用。",firstTimeTranslate:"首次翻译将消耗点数"},progress:{unplayedSegments:"未看片段",mutePart:"静音片段"},common:{manage:"管理",cancel:"取消",save:"保存",confirm:"确定",edit:"编辑",delete:"删除",pleaseInput:"请输入",enterFullscreen:"全屏",exitFullscreen:"退出全屏",download:"下载",downloading:"正在下载中,请稍候",quality:"画质",volume:"音量",operateSuccess:"操作成功",week:{week0:"周日",week1:"周一",week2:"周二",week3:"周三",week4:"周四",week5:"周五",week6:"周六"}},channel:{students:"学生路",encoder:"电脑路",instructor:"老师路"},audioLabel:{students:"学生路",encoder:"电脑路",instructor:"老师路"},unPauseable:"老师已设置观看该视频不能暂停",videoEnded:{tip:"当前视频播放已结束,您可继续查看其他内容"}}},tw:{multiPlayer:{locale:"zh-TW",loadFailed:"載入失敗",loadFailedMsg:"抱歉,載入出錯,請重新載入",loadFailedMsg1:"無法播放此內容",reload:"重新載入",more:"更多",collapse:"收起",videoEditor:"影片編輯",switchToMain:"切換到主畫面",hideView:"隱藏",playRate:{rate:"倍速"},askAir:{title:"不懂",hoverTip:"針對當前畫面提問"},playerResource:{resource:"影像選擇"},audioResource:{resource:"音频選擇"},playerHeaderBar:{fav:"收藏",clip:"剪輯",download:"下載",topic:"標註",capture:"截圖",playerNote:"筆記",closePlayer:"關閉",livingStatus:"直播中",compositeVideo:"合成",playerChat:"聊天"},bigPlayButton:{livingTips:"直播已經開始",watchRightNow:"馬上觀看"},playerError:{noLiveStream:"暫無直播串流,請",retry:"重試"},playerVideoState:{load_fail:"視頻加載失敗,請重試",reload:"重新加載"},playerPlugin:{controller:{resumeLive:"繼續直播",resumeRecord:"繼續錄製",end:"結束",living:"直播中",recording:"錄製中",liveIsPaused:"直播暫停中...",liveIsEnded:"直播已結束...",areYouSureToEnd:"確定結束排程嗎?",itWillTerminateTheCurrentActivity:"結束排程將終止當前直錄播活動"},topic:{cloudView:"詞雲視圖",listView:"清單視圖",topic:"標註",aiTopic:"AI 標註",manualTopic:"教師標註",manage:"管理",emphasis:"重點",difficulty:"難點",exam:"考點",example:"例題",think:"思考",areYouSureToDelete:"是否刪除此標註?",cancelPublic:"取消公開",setPublic:"設為公開",noTopic:"暫無標註",noTopicForPublished:"標註暫未公開",recover:"還原",aiGenerate:"AI 生成",addTime:"新增時間",addTopic:"新增標註",regenerate:"重新生成",aiTopicGenerating:"AI 標註生成中",left:"剩餘",youCanAddManualTopic:"您可以添加教師標註",aiTopicGenerateFail:"AI 標註生成失敗",tryRegenerate:"請嘗試重新生成",deleteTopic:"刪除",join:"加入",pleaseEnterTopic:"請輸入標註",regenerateTopicTip:"目前已有標註內容,確定重新生成標註?重新生成將清空目前已有標註",unpublishTip:"標註暫未公開,公開後學生可見",searchNoTopic:"暫無相關內容",publicTip:"學生可查看標註內容",unpublicTip:"標註內容已對學生隱藏",regenerateTitle:"重新生成標註",duplicatePosition:"標註時間點重複,請修改",addAsTopic:"新增為標註",topicAdded:"標註已新增",checkCaption:"為了更好地生成標注內容,建議您先「生成字幕」。",modalTitle:"AI 生成標註"},note:{placeholder:"請輸入內容...",setPublic:"設為公開",more:"更多",less:"更少",title:"筆記截圖",empty:"暂无内容",success:"截圖成功",error:"截圖失敗",uploadCaptureError:"上傳截圖失敗",searchPlaceholder:"輸入關鍵字搜索",addNote:"新建笔记",search:"搜索",all:"全部",private:"我的筆記",public:"公開",latest:"最新",earliest:"最早",note_position:"筆記位置",delete_note:"是否删除此筆記?",hour:"小時前",minute:"分鐘前",hours:"小時前",minutes:"分鐘前",just:"剛剛",collapse:"收起",empty_note:"沒有更多筆記了",searchText:"找到 {0} 條結果",loading:"加載中",nodata:"暫無數據",public_info:"公開",empty_snapshot:"當前無截圖",textNote:"文本筆記",screenshotNote:"截圖筆記",searchNoNote:"暫無相關內容"},chapter:{title:"章節",totalSummary:"共{0}章節",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無章節內容",regenerateChapterTip:"目前已有章節內容,確定重新生成章節?重新生成將清空目前已有章節與知識點",checkCaption:"為了更好地生成章節內容,建議您先「生成字幕」",modalTitle:"AI 生成章節",regenerateTitle:"重新生成章節"},outline:{title:"概要",summary:"內容總結",chapter:"知識概要",aiGeneratingTip:"AI 生成中",aiGenerateFailTip:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無概要",regenerateOutlineTip:"目前已有概要內容,確定重新生成? 重新生成將清空當前已有概要"},quizz:{title:"測驗",totalSummary:"共 {0} 題",aiGenerateFailTip:"生成失敗,請重新嘗試",regenerate:"重新生成",aiGenerate:"AI 生成",emptyTip:"暫無測驗內容",aiGeneratingTip:"AI 生成中",regenerateQuizzTip:"目前已有測驗內容,確定重新生成測驗?重新生成將清空目前已有測驗"},caption:{transcript:"逐字稿",listView:"清單視圖",caption:"字幕",captionShort:"字幕",translate:"翻譯",cCaption:"CC字幕",uploadCaption:"上傳字幕",deleteCaption:"刪除",areYouSureToDelete:"是否刪除字幕?",downloadTemplate:"下載字幕模板",show:"顯示",open:"開",close:"關",upload:"上傳",download:"下載",vtt:"僅支持 .vtt 格式",demo:"樣本字幕",lastPlayed:"上次觀看到 {0}",generating:"AI 生成中",leftTime:"剩餘",noCaption:"暫無字幕",please:"請",generateFail:"生成失敗,請重試",regenerate:"重新生成",aiGenerate:"AI 生成",uploadCaptionSuccess:"字幕上傳成功",uploadCaptionFail:"字幕上傳失敗,請檢查文件重試",mutePart:"靜音片段",durationPercentage:"時長占比",regenerateCaption:"重新生成字幕",regenerateCaptionTip:"目前已有字幕內容,確定重新生成字幕?重新生成將清空目前已有字幕",uploadCaptionTip:"目前已有字幕內容,上傳成功後將取代現有內容",uploadFormatTip:"格式支援“SRT、TXT、Excel”",srtFormat:"SRT 格式",txtFormat:"TXT 格式",xlsFormat:"Excel 格式",placeholder:"請輸入",searchResult:"搜尋結果",uploadFile:"上傳檔案",exportCaption:"下載字幕",editCaption:"編輯",goToCurrentPlayPosition:"回到當前播放位置",searchNoCaption:"暫無相關內容",autoSkip:"自動跳過靜音片段",language:"字幕語言",translating:"字幕翻譯中",lang:{origin:"源語言",zh:"簡體中文","zh-TW":"繁體中文",en:"英語",ja:"日語",ko:"韓語",ru:"俄語",fr:"法語",de:"德語",tr:"土耳其語",it:"義大利語",vi:"越南語",id:"印尼語",th:"泰語",ar:"阿拉伯語",es:"西班牙語",pt:"葡萄牙語",nl:"荷蘭語",hi:"印地語",ug:"維語",ms:"馬來西亞語"},captionGenerating:"字幕生成中,請您稍後再試",generateCaption:"生成字幕"},chat:{note:"歡迎來到課程直播間,請踴躍提問發言!",newMsgTip:"{0}條新消息",system:"系統",joinTip:"用戶 {0} 進入了直播間",send:"發送",placeholder:"按Enter鍵發送",noMore:"沒有更多聊天記錄了",visitor:"遊客"},ppt:{title:"教材截圖",noContent:"暫無內容",aiGenerate:"AI 生成",aiGenerating:"AI 生成中",genearteFailedRetry:"生成失敗,請重試",regenerate:"重新生成",havePptSureToRegenerate:"目前已有教材截圖內容,確定重新生成?",showPpt:"顯示教材截圖",hidePpt:"隱藏教材截圖",deleteTitle:"刪除教材截圖",deleteContent:"是否刪除教材截圖?",createPpt:"新增截圖",createPptTooltip:"新增當前截圖",batchExport:"匯出",exportDocInfo:{courseName:"課程名稱",time:"時間",instructor:"主講人",location:"地點"}},audioCopier:{title:"音視頻合成",videoSource:"視頻源",audioSource:"音頻源",selectVideoSource:"請選擇待合成視頻",defaultAudioSource:"默認音源",videoSourceCannotBeNull:"視頻源不能為空",compositeTip:"我們會將所選音頻源複製到您選擇的所有視頻源上,這可能會花一段時間。"},outputLocale:{title:"輸出語言",lang:{auto:"自動(預設)","zh-CN":"简体中文","zh-TW":"繁體中文","en-US":"英文"}}},ai:{aiGenerate:"AI 生成",generating:"AI 生成中... ",generateNow:"立即生成",generatingWait:"請稍候片刻,精彩即將揭曉!",generatingWait2:"請稍候片刻,內容即將完成",generatingWait3:"內容正在快馬加鞭趕來,馬上就好!",generateContentTips:"內容由 AI 大模型生成,僅供參考",creditsExhausted:"您的可用點數已耗盡,無法重新生成",creditsRemaining:"可用點數",creditsRemainingTip:"會根據場景的不同匹配合適的,所以每次使用所消耗的點數不同。可使用點數為 0 後,無法再使用。",firstTimeTranslate:"首次翻譯將會消耗點數"},progress:{unplayedSegments:"未看片段",mutePart:"靜音片段"},common:{manage:"管理",cancel:"取消",save:"保存",confirm:"確認",edit:"編輯",delete:"刪除",pleaseInput:"請輸入",enterFullscreen:"全螢幕顯示",exitFullscreen:"退出全螢幕",download:"下載",downloading:"正在下載中,請稍候",quality:"畫質",volume:"音量",operateSuccess:"操作成功",week:{week0:"週日",week1:"週一",week2:"週二",week3:"週三",week4:"週四",week5:"週五",week6:"週六"}},channel:{students:"學生路",encoder:"電腦路",instructor:"老師路"},audioLabel:{students:"學生路",encoder:"電腦路",instructor:"老師路"},unPauseable:"老師已設定觀看該影片不能暫停",videoEnded:{tip:"當前影片播放已結束,您可繼續查看其他內容"}}},us:{multiPlayer:{locale:"en-US",loadFailed:"Failed to load",loadFailedMsg:"Sorry, there was an error loading, please try again",loadFailedMsg1:"Video cannot be played",reload:"Reload",more:"More",collapse:"Collapse",videoEditor:"Video Editing",switchToMain:"Switch to Main Screen",hideView:"Hide",playRate:{rate:"Speed"},askAir:{title:"Ask",hoverTip:"Ask Air about the current screen"},common:{save:"Save",cancel:"Cancel",manage:"Manage",confirm:"Confirm",edit:"Edit",delete:"Delete",pleaseInput:"Please enter",enterFullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",download:"Download",downloading:"Downloading in progress, please wait",quality:"Quality",volume:"Volume",operateSuccess:"Operation Success",week:{week0:"Sunday",week1:"Monday",week2:"Tuesday",week3:"Wednesday",week4:"Thursday",week5:"Friday",week6:"Saturday"}},playerResource:{resource:"Resource"},audioResource:{resource:"Audio Resource"},playerHeaderBar:{fav:"Fav",clip:"Clip",download:"Download",capture:"Capture",playerNote:"Note",closePlayer:"Close",livingStatus:"Living",compositeVideo:"Composite",topic:"Topics",playerChat:"Chat"},bigPlayButton:{livingTips:"Live is Started",watchRightNow:"Watch Now"},playerError:{noLiveStream:"No live stream, please ",retry:"retry"},playerPlugin:{controller:{resumeLive:"Resume Live",resumeRecord:"Resume Record",end:"End",living:"Living",recording:"Recording",liveIsPaused:"The live is paused...",liveIsEnded:"The live is ended...",areYouSureToEnd:"Are you sure to end?",itWillTerminateTheCurrentActivity:"It will terminate the current activity"},topic:{cloudView:"Word Cloud View",listView:"List View",topic:"Topic",aiTopic:"AI Topic",manualTopic:"Manual Topic",manage:"Manage",emphasis:"Emphasis",difficulty:"Difficulty",exam:"Exam",example:"Example",think:"Think",areYouSureToDelete:"Are you sure to delete?",cancelPublic:"Cancel Public",setPublic:"Set Public",noTopic:"No Topics",noTopicForPublished:"No Published Topics",recover:"Revert",aiGenerate:"AI Generate",addTime:"Add Time",addTopic:"Add Topic",regenerate:"Regenerate",aiTopicGenerating:"Topics are Generating",left:"left",youCanAddManualTopic:"You can add topic in Manual Topic",aiTopicGenerateFail:"Ai topic generate fail",tryRegenerate:"Please try regenerate",deleteTopic:"Delete",join:"Join",pleaseEnterTopic:"Please enter topic",regenerateTopicTip:"Already have topic, sure to regenerate? Regenerating will clear the current topics",unpublishTip:"Topic is not public. Visible to students after setting up public",searchNoTopic:"No related content",publicTip:"Students can view the topics",unpublicTip:"Topics are hidden from students",regenerateTitle:"Regenerate Topic",duplicatePosition:"The time point of the topic is repeated, please modify it",addAsTopic:"Add as topic",topicAdded:"Topic added",checkCaption:"For better topic generation, please “Generate Subtitles” first",modalTitle:"AI generate"},note:{placeholder:"Please enter content...",setPublic:"Post to public",more:"More",less:"Less",title:"Screenshot",empty:"Empty",success:"Success",error:"Fail",uploadCaptureError:"Upload Failed",searchPlaceholder:"Keyword",addNote:"Add notes",search:"Search",all:"All",private:"My notes",public:"Public",latest:"Newest",earliest:"Oldest",note_position:"Location",delete_note:"Confirm delete the note?",hour:" Hour ago",minute:" Minute ago",hours:" Hours ago",minutes:" Minutes ago",just:"Just",collapse:"Collapse",empty_note:"No more",searchText:"Find {0} results",loading:"Loading",nodata:"No data",public_info:"Public",empty_snapshot:"Empty snapshot",textNote:"Text",screenshotNote:"Screenshot",searchNoNote:"No related content"},chapter:{title:"Chapter",totalSummary:"Total {0} chapters",aiGeneratingTip:"AI generating",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No chapter",regenerateChapterTip:"Already have chapters, sure to regenerate? Regenerating will clear the current chapters and knowledge points",checkCaption:"For better chapters generation, please “Generate Subtitles” first",modalTitle:"AI generate",regenerateTitle:"Regenerate Chapter"},outline:{title:"Summary",summary:"Content summary",chapter:"Knowledge summary",aiGeneratingTip:"AI generating",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No summary",regenerateOutlineTip:"Already have summary, sure to regenerate? Regeneration will clear the current summary"},quizz:{title:"Quizzes",totalSummary:"Total {0} Questions",aiGenerateFailTip:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",emptyTip:"No quizzes",aiGeneratingTip:"AI generating",regenerateQuizzTip:"Already have quizzes, sure to regenerate? Regenerating will clear the current quizzes"},caption:{transcript:"Transcript",listView:"List View",caption:"Subtitles/CC",captionShort:"Subtitles",translate:"Translate",cCaption:"CC",uploadCaption:"Upload Subtitles",downloadTemplate:"Download template",deleteCaption:"Delete",areYouSureToDelete:"Does it remove Subtitles?",show:"Show",open:"Open",close:"Close",upload:"Upload",download:"Download",vtt:"Only support .vtt",demo:"Demo Subtitles",lastPlayed:"Last played {0}",generating:"AI generating",leftTime:"left",noCaption:"No Subtitles",please:"please",generateFail:"Generation failed, please retry",regenerate:"Regenerate",aiGenerate:"AI generate",uploadCaptionSuccess:"Upload completed",uploadCaptionFail:"Upload failed, please check the file",mutePart:"Mute part",durationPercentage:"Percentage",regenerateCaption:"Regenerate Subtitles",regenerateCaptionTip:"Already have subtitles, sure to regenerate? Regenerating will clear the current subtitles",uploadCaptionTip:"Already have subtitles. Existing content will be replaced after successful upload",uploadFormatTip:'Format support "SRT、TXT、Excel"',srtFormat:"SRT",txtFormat:"TXT",xlsFormat:"Excel",placeholder:"Please enter",searchResult:"Search result",uploadFile:"Upload File",exportCaption:"Download Subtitles",editCaption:"Edit",goToCurrentPlayPosition:"Return to the position playing now",searchNoCaption:"No related content",autoSkip:"Auto Skip Mute part",language:"Language",translating:"Subtitles are being translated",lang:{origin:"Original",zh:"Simplified Chinese","zh-TW":"Traditional Chinese",en:"English",ja:"Japanese",ko:"Korean",ru:"Russian",fr:"French",de:"German",tr:"Turkish",it:"Italian",vi:"Vietnamese",id:"Indonesian",th:"Thai",ar:"Arabic",es:"Spanish",pt:"Portuguese",nl:"Dutch",hi:"Hindi",ug:"Uighur",ms:"Malay"},captionGenerating:"Subtitle generation is in progress, please try again later",generateCaption:"Generating subtitles"},chat:{note:"Warm reminder: Welcome to the live room, do not post non-topic chat content.",newMsgTip:"{0} New messages",system:"system",joinTip:"user {0} entered the live room",send:"send",placeholder:"Press Enter to send",noMore:"No more",visitor:"visitor"},ppt:{title:"Courseware screenshots",noContent:"No content",aiGenerate:"AI generate",aiGenerating:"AI generating",genearteFailedRetry:"Generation failed, please retry",regenerate:"Regenerate",havePptSureToRegenerate:"Already have screenshot, sure to regenerate?",showPpt:"Show screenshot",hidePpt:"Hide screenshot",deleteTitle:"Delete screenshot",deleteContent:"Are you sure you want to delete the screenshot?",createPpt:"Add screenshot",createPptTooltip:"Add screenshot of current moment",batchExport:"Export",exportDocInfo:{courseName:"Course",time:"Time",instructor:"Host",location:"Location"}},audioCopier:{title:"Copy audio to videos",videoSource:"Video Source",audioSource:"Audio source",selectVideoSource:"Please select need synthesized videos",defaultAudioSource:"Default audio",videoSourceCannotBeNull:"Video source can not be null",compositeTip:"We will copy the selected audio source to all the video sources you selected. This may take a while."},outputLocale:{title:"Output Language",lang:{auto:"auto(default)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","en-US":"English"}}},ai:{aiGenerate:"AI generate",generating:"AI generating.",generateNow:"Generate Now",generatingWait:"AI generating.",generatingWait2:"AI generating. AI is generating hard.",generatingWait3:"AI generating. AI is generating hard, exciting content will be presented soon.",generateContentTips:"The content is generated by LLM and is for reference only.",creditsExhausted:"Your available credits are exhausted and cannot regenerate",creditsRemaining:"Available credits",creditsRemainingTip:"The points consumed will vary based on different scenarios, so each use may require a different amount of points. Once the available points reach zero, you will no longer be able to use the service.",firstTimeTranslate:"The first translation will consume credits"},progress:{unplayedSegments:"Unfinished video clip",mutePart:"Mute part"},playerVideoState:{load_fail:"Video failed to load, please try again",reload:"Reload"},channel:{students:"Student",encoder:"Computer",instructor:"Instructor"},audioLabel:{students:"Student",encoder:"Computer",instructor:"Instructor"},unPauseable:"Pause is not allowed",videoEnded:{tip:"The current video has ended, you can continue to view other content"}}}};function i8(e){const t=e.target,n=t.value.replace(/\D+/,""),i=t.attributes.max,r=t.attributes.min;i&&r&&n.length>0?(Number.parseInt(n,10)>i.value&&(t.value=i.value),Number.parseInt(n,10)<r.value&&(t.value=i.value)):n.length<=0?t.value="0":t.value=n}function AY(e){const t=e.target;t.value=Number.parseInt(t.value,10);const{zeroPrefix:n}=t.attributes;t.value.length<=0||Number.parseInt(t.value,10)===0?t.value="00":n&&Number.parseInt(t.value,10)<10&&Number.parseInt(t.value,10)>=0&&t.value.length<2&&(t.value=`0${t.value}`)}const DY={numberOnly:{created:e=>{e.addEventListener("input",i8),e.addEventListener("change",i8),e.addEventListener("blur",AY)},mounted:()=>{},unmounted:e=>{e.removeEventListener("input",i8),e.removeEventListener("blur",AY)}}};function KJe(e,t,n=3e3){return pr.get(e,{timeout:n}).then(i=>{try{const r=i.data.data.CUSTOMIZED_WG_VIDEO_PLAYER_I18N||"{}",a=qe.isString(r)?JSON.parse(r):r;for(const[o,s]of Object.entries(a))t.global.mergeLocaleMessage(o,{multiPlayer:s});qt.info("loadCustomizedI18n success")}catch(r){qt.error("loadCustomizedI18n error, can not parse response data")}}).catch(i=>{qt.error("loadCustomizedI18n error",i)})}const Ddt="",Pdt="",Idt="",XJe=["timeupdate","videoSourceChanged","pause","play","closed","opened","playing","ended","loadstart","loadeddata","durationchange","loadedmetadata","ready","seeking","seeked","waiting","unplayable","captionLoaded"];class YJe{constructor(t,n,i={}){this.target=t,this.props=n,this.options=i,this.registedEvents={},this.oneRegistedEvents={},this._innerPlayer=null,this.localMap={cn:"cn",tw:"tw",us:"us",en:"us","zh-CN":"cn","zh-TW":"tw","en-US":"us","zh-MO":"tw","en-GB":"us"},this._createMyApp()}_createMyApp(){const t=Yne(WJe,yo(Wn({},this.props),{onPlayerReady:i=>this._onPlayerReady(i),onPlayerError:i=>this._onPlayerError(i),onPlayerReload:()=>this._onPlayerReload()})),n=Bre({silentTranslationWarn:!0,locale:this.localMap[this.options.locale]||"cn",messages:this.options.langs||GJe,legacy:!1});this.props.customizedI18nSource&&KJe(this.props.customizedI18nSource,n),this.i18n=n,t.use(n),t.mount(typeof this.target=="string"?`#${this.target}`:this.target);for(const i in DY)t.directive(i,DY[i]);Object.defineProperty(this,"app",{value:t,configurable:!0,enumerable:!1})}_proxyAllInnerPlayerEvents(){XJe.forEach(t=>{this._innerPlayer.on(t,n=>{t in this.registedEvents&&this.registedEvents[t].forEach(i=>{i(yo(Wn({},n),{player:this._innerPlayer}))}),t in this.oneRegistedEvents&&(this.oneRegistedEvents[t].forEach(i=>{i(yo(Wn({},n),{player:this._innerPlayer}))}),this.oneRegistedEvents[t]=[])})})}_onPlayerReady(t){this._innerPlayer=t,this.registedEvents.playerReady&&this.registedEvents.playerReady.forEach(n=>{n({player:t})}),this._proxyAllInnerPlayerEvents()}_onPlayerError(t){this.registedEvents.playerError&&this.registedEvents.playerError.forEach(n=>{n(t)})}_onPlayerReload(){this.destroy(),this._createMyApp()}_checkPlayer(){this._innerPlayer||qt.warn("wg video player not ready!!!")}get currentTime(){return this._checkPlayer(),this._innerPlayer.currentTime}set currentTime(t){this._checkPlayer(),this._innerPlayer.currentTime=t}get duration(){return this._checkPlayer(),this._innerPlayer.duration}get playing(){return this._checkPlayer(),this._innerPlayer.playing}get hasCaption(){return this._checkPlayer(),this._innerPlayer&&this._innerPlayer.hasCaption}get captionStatus(){return this._checkPlayer(),this._innerPlayer.captionStatus}one(t,n){this.oneRegistedEvents[t]?this.oneRegistedEvents[t].push(n):this.oneRegistedEvents[t]=[n]}on(t,n){this.registedEvents[t]?this.registedEvents[t].push(n):this.registedEvents[t]=[n]}off(t,n){if(this.registedEvents[t]&&this.registedEvents[t].length){const i=this.registedEvents[t].indexOf(n);i>=0&&this.registedEvents[t].splice(i,1)}}play(){this._checkPlayer(),this._innerPlayer.play()}pause(){this._checkPlayer(),this._innerPlayer.pause()}open(){this._innerPlayer.open()}close(){this._innerPlayer.close()}locale(t){this.i18n.global.locale=this.localMap[t]}destroy(){this.app.unmount(),this._innerPlayer&&this._innerPlayer.dispose()}generateCaptionIfNotExits(){if(this._checkPlayer(),!!this._innerPlayer)return qt.info("try generate caption if not exits"),this._innerPlayer.generateCaptionIfNotExits()}updateCaptions(t){this._checkPlayer(),this._innerPlayer&&this._innerPlayer.updateCaptions(t)}screenshot(){if(this._checkPlayer(),!!this._innerPlayer)return this._innerPlayer.screenshot()}}Dr.WgVideoPlayer=YJe,Object.defineProperty(Dr,Symbol.toStringTag,{value:"Module"})});
|
|
813
813
|
//# sourceMappingURL=wg-video-player.umd.cjs.map
|