mn-video-player-v2 1.4.9

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.
@@ -0,0 +1,104 @@
1
+ (function(Ie,De){typeof exports=="object"&&typeof module<"u"?De(exports):typeof define=="function"&&define.amd?define(["exports"],De):(Ie=typeof globalThis<"u"?globalThis:Ie||self,De(Ie.MnVideoPlayerV2={}))})(this,(function(Ie){"use strict";function De(R){this.gl=R,this.texture=R.createTexture(),R.bindTexture(R.TEXTURE_2D,this.texture),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,R.LINEAR),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,R.LINEAR),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE)}De.prototype.bind=function(R,s,h){var g=this.gl;g.activeTexture([g.TEXTURE0,g.TEXTURE1,g.TEXTURE2][R]),g.bindTexture(g.TEXTURE_2D,this.texture),g.uniform1i(g.getUniformLocation(s,h),R)},De.prototype.fill=function(R,s,h){var g=this.gl;g.bindTexture(g.TEXTURE_2D,this.texture),g.texImage2D(g.TEXTURE_2D,0,g.LUMINANCE,R,s,0,g.LUMINANCE,g.UNSIGNED_BYTE,h)};function We(R,s){this.canvas=R,this.canvas,this.gl=R.getContext("webgl")||R.getContext("experimental-webgl"),this.initGL(s)}We.prototype.initGL=function(R){if(this.gl){var s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,1);var h=s.createProgram(),g=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join(`
2
+ `),C=s.createShader(s.VERTEX_SHADER);s.shaderSource(C,g),s.compileShader(C);var S=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4(texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join(`
3
+ `),D=s.createShader(s.FRAGMENT_SHADER);s.shaderSource(D,S),s.compileShader(D),s.attachShader(h,C),s.attachShader(h,D),s.linkProgram(h),s.useProgram(h),s.getProgramParameter(h,s.LINK_STATUS);var I=s.getAttribLocation(h,"aVertexPosition");s.enableVertexAttribArray(I);var N=s.getAttribLocation(h,"aTextureCoord");s.enableVertexAttribArray(N);var V=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,V),s.bufferData(s.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),s.STATIC_DRAW),s.vertexAttribPointer(I,3,s.FLOAT,!1,0,0);var ee=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,ee),s.bufferData(s.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),s.STATIC_DRAW),s.vertexAttribPointer(N,2,s.FLOAT,!1,0,0),s.y=new De(s),s.u=new De(s),s.v=new De(s),s.y.bind(0,h,"YTexture"),s.u.bind(1,h,"UTexture"),s.v.bind(2,h,"VTexture")}},We.prototype.renderFrame=function(R,s,h,g,C){if(this.gl){var S=this.gl;S.viewport(0,0,S.canvas.width,S.canvas.height),S.clearColor(0,0,0,0),S.clear(S.COLOR_BUFFER_BIT),S.y.fill(s,h,R.subarray(0,g)),S.u.fill(s>>1,h>>1,R.subarray(g,g+C)),S.v.fill(s>>1,h>>1,R.subarray(g+C,R.length)),S.drawArrays(S.TRIANGLE_STRIP,0,4)}},We.prototype.fullscreen=function(){var R=this.canvas;R.RequestFullScreen?R.RequestFullScreen():R.webkitRequestFullScreen?R.webkitRequestFullScreen():R.mozRequestFullScreen?R.mozRequestFullScreen():R.msRequestFullscreen?R.msRequestFullscreen():alert("This browser doesn't supporter fullscreen")},We.prototype.exitfullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():alert("Exit fullscreen doesn't work")},We.prototype.stop=function(){var R=this.gl;R&&R.getExtension("WEBGL_lose_context").loseContext()};class Zt{isPlaying=!1;isVideoReady=!1;constructor(s){this.init(s)}videoReady(){this.isVideoReady=!0}init(s){this.isPlaying=!1;const h={encoding:"16bitInt",channels:1,sampleRate:8e3,flushingTime:1e3};this.option=Object.assign({},h,s),this.samples=new Float32Array,this.playingBuffers=[],this.interval=setInterval(this.flush.bind(this),this.option.flushingTime),this.maxValue=this.getMaxValue(),this.typedArray=this.getTypedArray(),this.createContext(),this.baseTime=null,this.baseAudioTime=null,this.playbackRate=1,this.defaultVolume=0}setBaseTime(s){this.baseTime=s,this.baseAudioTime=this.audioCtx.currentTime}getMaxValue(){const s={"8bitInt":128,"16bitInt":32768,"32bitInt":2147483648,"32bitFloat":1};return s[this.option.encoding]?s[this.option.encoding]:s["16bitInt"]}getTypedArray(){const s={"8bitInt":Int8Array,"16bitInt":Int16Array,"32bitInt":Int32Array,"32bitFloat":Float32Array};return s[this.option.encoding]?s[this.option.encoding]:s["16bitInt"]}createContext(){this.audioCtx=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioCtx.createGain(),this.gainNode.gain.value=1,this.gainNode.connect(this.audioCtx.destination),this.startTime=this.audioCtx.currentTime}speed(s){if(s<.1||s>32)return;s>2?(s=1,this.pause()):this.resume(),this.playbackRate=s;const h=this.playingBuffers[0];h&&(h.bufferSource.playbackRate.value=this.playbackRate)}isTypedArray(s){return s.byteLength&&s.buffer&&s.buffer.constructor==ArrayBuffer}getNowPlayStamp(){const s=this.playingBuffers[0];if(s&&s.startTimeStamp){let h=this.audioCtx.currentTime-s.ctxStartTimeStamp;return parseInt(+s.startTimeStamp+h*1e3)}return-1}offsetAudio(s=0){const h=this.getNowPlayStamp();return h==-1||s==0?0:h-s}resetAudioByTimeStamp(s=0){if(s!=0)for(;;)if(this.playingBuffers.length>0){let h=this.playingBuffers[0];if(this.playingBuffers,+h.startTimeStamp,!h.startTimeStamp||isNaN(+h.startTimeStamp))return!1;if(+h.startTimeStamp>s+5e3)return h.startTimeStamp,!1;if(h.startTimeStamp+h.buffer.duration*1e3<s){this.playingBuffers.shift(),this.isPlaying=!1;try{h.bufferSource.onended=null,h.bufferSource.stop(),h.bufferSource.disconnect()}catch{h.bufferSource.disconnect()}continue}else{let C=s-h.startTimeStamp;C=Math.max(C,0);try{h.bufferSource.onended=null,h.bufferSource.stop()}catch{h.bufferSource.disconnect()}const S=this.audioCtx.createBufferSource();return S.buffer=h.buffer,S.connect(this.gainNode),h.bufferSource=S,h.bufferSource.start(0,C/1e3),h.bufferSource.playbackRate.value=this.playbackRate,h.ctxStartTimeStamp=this.audioCtx.currentTime-C/1e3,h.bufferSource.onended=()=>{this.playingBuffers.shift();const D=this.playingBuffers[0];if(D){this.isPlaying=!0,D.bufferSource.playbackRate.value=this.playbackRate;try{D.bufferSource.start()}catch{}D.ctxStartTimeStamp=this.audioCtx.currentTime}else this.isPlaying=!1},!0}}else return!1}feed(s,h){if(this.isTypedArray(s)){s=this.getFormatedValue(s),this.samples.length==0&&(this.samplesTimeStamp=h);var g=new Float32Array(this.samples.length+s.length);g.set(this.samples,0),g.set(s,this.samples.length),this.samples=g}}getFormatedValue(s){const h=new this.typedArray(s.buffer),g=new Float32Array(h.length);for(let C=0;C<h.length;C++)g[C]=h[C]/this.maxValue;return g}volume(s,h=!0){h&&(this.defaultVolume=s),this.gainNode.gain.value=s}destroy(){this.interval&&clearInterval(this.interval),this.playingBuffers.forEach(s=>{try{s.bufferSource.stop(),s.bufferSource.disconnect()}catch{}}),this.playingBuffers=[],this.samples=new Float32Array,this.samplesTimeStamp=0,this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null)}flush(){if(!this.samples?.length||this.samples.length<10)return;const s=this.audioCtx.createBufferSource(),h=this.samples.length/this.option.channels,g=this.audioCtx.createBuffer(this.option.channels,h,this.option.sampleRate);let C,S,D,I,N;for(S=0;S<this.option.channels;S++)for(C=g.getChannelData(S),D=S,N=50,I=0;I<h;I++)C[I]=this.samples[D],I<50&&(C[I]=C[I]*I/50),I>=h-51&&(C[I]=C[I]*N--/50),D+=this.option.channels;s.buffer=g,s.connect(this.gainNode);const V={bufferSource:s,buffer:g,startTimeStamp:+this.samplesTimeStamp};if(this.playingBuffers.push(V),!this.isPlaying&&this.isVideoReady&&this.playingBuffers.length>0){let ee=this.playingBuffers[0];try{ee.bufferSource.start()}catch{}ee.bufferSource.playbackRate.value=this.playbackRate,ee.ctxStartTimeStamp=this.audioCtx.currentTime,this.isPlaying=!0}s.onended=()=>{this.playingBuffers.shift();const ee=this.playingBuffers[0];if(ee){ee.bufferSource.playbackRate.value=this.playbackRate;try{ee.bufferSource.start()}catch{}ee.ctxStartTimeStamp=this.audioCtx.currentTime}else this.isPlaying=!1},this.samples=new Float32Array}getTimestamp(){return this.audioCtx?this.audioCtx.currentTime:0}pause(){this.audioCtx.state==="running"&&this.audioCtx.suspend()}clear(){for(;;)if(this.playingBuffers.length>0){this.playingBuffers;const s=this.playingBuffers.shift();this.isPlaying=!1,this.samplesTimeStamp=0;try{s.bufferSource.onended=null,s.bufferSource.stop(),s.bufferSource.disconnect()}catch{s.bufferSource.disconnect()}}else return!1}resume(){this.audioCtx.state==="suspended"&&this.audioCtx.resume()}}const Ui=2,$i=1,zi=3,Xi=4,Gi=5,Yi=6,Qi=7,Ki=9,Ji=10,Zi=11,en=12,tn=13,nn=14,rn=15,sn=16,on=2,an=4,un=5,ln=6,fn=7,cn=8,hn=13,dn=14,pn=16,gn=17,mn=18,yn=19;class vn{constructor(s){this.module=s}log(s){""+this.currentTimeStr()+this.module+s}logError(s){""+this.currentTimeStr()+this.module+s}logInfo(s){""+this.currentTimeStr()+this.module+s}logDebug(s){""+this.currentTimeStr()+this.module+s}currentTimeStr(){const s=new Date(Date.now()),h=s.getFullYear(),g=s.getMonth()+1,C=s.getDate(),S=s.getHours(),D=s.getMinutes(),I=s.getSeconds(),N=s.getMilliseconds();return h+"-"+g+"-"+C+" "+S+":"+D+":"+I+":"+N}}const _={kChangeRenderTypeReq:sn,kVideoAudioOffset:nn,kMediaSpeak:Ui,kOpenDecoderReq:$i,kResumeDecodingReq:zi,kPauseDecodingReq:Xi,kOpenStreamReq:Gi,kCloseStreamReq:Yi,kEnableAudioReq:Qi,kSwitchStreamReq:Ki,kFastForward:Ji,kRecorderSpeakReq:Zi,kRecorderTalkReq:en,kReplayReq:tn,kOpenDecoderRsp:on,kVideoReady:an,kVideoFrame:un,kAudioFrame:ln,kStringFrame:fn,kNetSpeedFrame:cn,kSocketErrorRsp:hn,kSocketCloseRsp:dn,kReplaySpeedReq:rn,kVideoFrameOriginRsp:pn,Logger:vn,kFlushAudio:gn,kNoCache:mn,kCacheAvailable:yn},bn="data:image/svg+xml,%3c!--%20By%20Sam%20Herbert%20(@sherb),%20for%20everyone.%20More%20@%20http://goo.gl/7AJzbL%20--%3e%3c!--%20Todo:%20add%20easing%20--%3e%3csvg%20width='57'%20height='57'%20viewBox='0%200%2057%2057'%20xmlns='http://www.w3.org/2000/svg'%20stroke='%23fff'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(1%201)'%20stroke-width='2'%3e%3ccircle%20cx='5'%20cy='50'%20r='5'%3e%3canimate%20attributeName='cy'%20begin='0s'%20dur='2.2s'%20values='50;5;50;50'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3canimate%20attributeName='cx'%20begin='0s'%20dur='2.2s'%20values='5;27;49;5'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='27'%20cy='5'%20r='5'%3e%3canimate%20attributeName='cy'%20begin='0s'%20dur='2.2s'%20from='5'%20to='5'%20values='5;50;50;5'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3canimate%20attributeName='cx'%20begin='0s'%20dur='2.2s'%20from='27'%20to='27'%20values='27;49;5;27'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='49'%20cy='50'%20r='5'%3e%3canimate%20attributeName='cy'%20begin='0s'%20dur='2.2s'%20values='50;50;5;50'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3canimate%20attributeName='cx'%20from='49'%20to='49'%20begin='0s'%20dur='2.2s'%20values='49;5;27;49'%20calcMode='linear'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3c/g%3e%3c/g%3e%3c/svg%3e";function xn(R){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/mn-worker-CW3JpGn0.js").href:new URL("mn-worker-CW3JpGn0.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{name:R?.name})}const qr=""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/mn-worker-CLBlI2q_.js").href:new URL("mn-worker-CLBlI2q_.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href);class Tn{constructor(s,h){this.onOutput=s,this.id=h||"",this.lastTime=0,this.baseTime=performance.now(),this.timeList=[],this.isPause=!1,this.speed=1,this.intervalTimer=null,this.isStop=!1,this.offsetDelay=0,this.offsetTime=0,this.isRealTime=!1,this.interval(),this.onSpeedChange=g=>{},this.isSpeedUp=!1,this.perfFrames=0,this.perfStart=performance.now(),this.perfLatencySum=0,this.perfLatencyMax=0}interval(){if(this.isStop)return;let s=(performance.now()-this.baseTime)*this.speed-this.offsetDelay;const h=this.timeList[0];this.isRealTime&&s>1e3&&this.output(),s>1e4&&this.output(),this.isRealTime&&(this.timeList.length>60?(this.isSpeedUp||this.onSpeedChange(1.1),this.isSpeedUp=!0):this.timeList.length<=10&&(this.isSpeedUp&&this.onSpeedChange(1),this.isSpeedUp=!1)),h&&s>=h.time-this.lastTime&&!this.isPause&&this.output(),this.intervalTimer=setTimeout(()=>{this.interval()},0)}append(s,h){this.lastTime===0&&(this.lastTime=s),this.timeList.push({time:s,data:h})}output(){try{const s=this.timeList.shift();if(s){const h=performance.now(),g=this.lastTime,C=(h-this.baseTime)*this.speed-this.offsetDelay,S=g<s.time?Math.max(0,C-(s.time-g)):0;this.lastTime=s.time,this.baseTime=h,this.perfFrames++,this.perfLatencySum+=S,S>this.perfLatencyMax&&(this.perfLatencyMax=S),this.onOutput(s)}}catch{}}offset(s){if(this.speed>2||!s)return;this.offsetTime=parseInt(s);let h=!1;if(this.offsetTime>0?h=!1:h=!0,Math.abs(this.offsetTime)>2e3){this.offsetDelay=h?200:-200;return}if(Math.abs(this.offsetTime)>1e3){this.offsetDelay=h?100:-100;return}if(Math.abs(this.offsetTime)>200){this.offsetDelay=h?10:-10;return}}pause(){this.isPause=!0,this.isRealTime&&(clearTimeout(this.intervalTimer),this.timeList=[],this.lastTime=1/0)}resume(){this.isPause=!1,this.isRealTime&&(this.timeList=[],this.lastTime=1/0,this.baseTime=performance.now(),this.interval())}changeSpeed(s){this.speed=s}perfSnapshot(){const s=(performance.now()-this.perfStart)/1e3;return{fps:s>0?this.perfFrames/s:0,avgLatency:this.perfFrames>0?this.perfLatencySum/this.perfFrames:0,maxLatency:this.perfLatencyMax,frames:this.perfFrames,cache:this.timeList.length}}perfReset(){this.perfFrames=0,this.perfLatencySum=0,this.perfLatencyMax=0,this.perfStart=performance.now()}perfLog(){const s=this.perfSnapshot();this.id&&""+this.id,`${s.fps.toFixed(1)}${s.avgLatency.toFixed(1)}${s.maxLatency.toFixed(1)}${s.frames}${s.cache}`,this.perfReset()}stop(){this.isStop=!0,clearTimeout(this.intervalTimer)}getCacheSize(){return this.timeList.length}}const ei=0,Dt=2,At=0,Ze=1,et=2;class Sn{host="";port=0;deviceType="1";userId="";tenantId="";token="";ws="";renderMode=0;frameCache=[];renderType=!0;timeCallback=null;netSpeedCallback=null;lastDrawTime=0;timerCtrl=null;onPaused=()=>{};onPlaying=()=>{};constructor(s,h,g,C,S,D="wasm"){this.phone=s,this.outerWorker=null,this.channel=h,this.div=g,this.chlId="chlId",this.spedId="spedId",this.loadId=null,this.hintId=null,this.loading=!0,this.canvas=C,this.lang=S,this.streamTime=null,this.replayTimer=null,this.isFirstLoad=!1,this.frameCache=[],this.renderType=D,this.messageId=0,this.mediaType=-1,this.streamType=-1,this.beginTime="",this.isPlayback=!1,this.timeout=3e4,this.playbackMode=null,this.width=0,this.height=0,this.yLength=0,this.uvLength=0,this.mnVideo=null,this.mnAudio=null,this.mnWorker=null,this.playAudio=!1,this.playerState=At,this.decoderState=ei,this.audioEncoding="16bitInt",this.audioChannels=1,this.audioSampleRate=8e3,this.supportH264=!1,this.supportH265=!1,this.videoTimeStamp=0,this.audioTimeStamp=0,this.lastAudioTimeStamp=0,this.isAbnormal=!1,this.isNormalTime=0,this.speed=1,this.decodeSlow=!1,this.isDetectAbnormal=!1,this.logger=new _.Logger("MnPlayer"),this.mnAudio=new Zt({encoding:this.audioEncoding,channels:this.audioChannels,sampleRate:this.audioSampleRate,flushingTime:1e3}),this.enableAudio(this.playAudio);let I=this;window.addEventListener("online",function(){I.online()}),window.addEventListener("offline",function(){I.offline()}),this.isSupportH264().then(N=>{this.supportH264=N}),this.isSupportH265().then(N=>{this.supportH265=N}),this.timerCtrl=new Tn(N=>{N.time&&(this.timeCallback&&typeof this.timeCallback=="function"&&this.timeCallback(new Date(N.time-1e3*60*60*8).getTime()),this.handleAudioVideoTimeCheck(+N.time));let V=new CustomEvent("videoTime",{detail:{data:N.time}});window.dispatchEvent?window.dispatchEvent(V):window.fireEvent(V),this.renderMode==0?(N=N.data,this.mnVideo!=null&&this.mnVideo.renderFrame(N,this.width,this.height,this.yLength,this.uvLength)):this.drawOne(N.data)}),this.timerCtrl.id=this.phone+"/"+this.channel,this.timerCtrl.onSpeedChange=N=>{this.changeSpeed(N,!1)}}online(){this.openStream()}offline(){this.stopReplayTimer(),this.stopWorker(!0),this.hidePrompt();let s="1连接异常,请检查网络";switch(this.lang){case"zh-CN,zh;":s="1连接异常,请检查网络";break;case"zh-TW,zh;":s="1連接異常,請檢查網絡";break;case"en-US,en;":s="1The connection is abnormal. Please check network";break;case"ru-RU,ru;":s="1Ошибка подключения к видео серверу";break;case"kk-KZ,kk;":s="1Видео серверіне қосылу жаңылысы";break}let h={t:_.kSocketErrorRsp,d:s};this.onStringFrame(h)}initMnWorker(){let s=this;try{this.outerWorker?this.mnWorker=this.outerWorker:this.mnWorker=new xn({type:"classic"})}catch(h){}this.renderMode=0,this.renderType=="decode"&&this.initVideoDecoder()?this.renderMode=1:(this.renderMode=0,this.canvas!=null&&(this.mnVideo=new We(this.canvas,{preserveDrawingBuffer:!1}))),this.mnAudio===null&&(this.mnAudio=this.mnAudio=new Zt({encoding:this.audioEncoding,channels:this.audioChannels,sampleRate:this.audioSampleRate,flushingTime:1e3}),this.enableAudio(this.playAudio)),this.mnWorker.onmessage=function(h){let g=h.data;switch(g.t){case _.kVideoFrameOriginRsp:s.decodeVideoFrame(g.d,g.ti,g.isKey);break;case _.kOpenDecoderRsp:s.onOpenDecoder(g);break;case _.kVideoReady:s.onVideoReady(g);break;case _.kVideoFrame:s.onVideoFrame(g),s.mnAudio.videoReady();break;case _.kAudioFrame:s.onAudioFrame(g);break;case _.kFlushAudio:s.mnAudio?.flush();break;case _.kNetSpeedFrame:s.onNetSpeedFrame(g);break;case _.kStringFrame:s.onStringFrame(g);break;case _.kNoCache:s.onNoCache(g);break;case _.kCacheAvailable:s.onCacheAvailable(g);break;case _.kSocketErrorRsp:case _.kSocketCloseRsp:s.stopWorker(!1),s.onStringFrame(g);break}},this.mnWorker.postMessage({t:_.kOpenDecoderReq,renderMode:this.renderMode,host:this.host,port:this.port,userId:this.userId,tenantId:this.tenantId,token:this.token,deviceType:this.deviceType,ws:this.ws,phone:this.phone,channel:this.channel,lang:this.lang})}changeRenderType(s){this.renderMode=s,this.mnWorker.postMessage,_.kChangeRenderTypeReq,this.mnWorker.postMessage({t:_.kChangeRenderTypeReq,renderMode:this.renderMode})}stopReplayTimer(){this.replayTimer&&(clearInterval(this.replayTimer),this.replayTimer=null)}stopWorker(s){this.mnWorker&&(s&&this.mnWorker.postMessage({t:_.kCloseStreamReq}),this.mnWorker.terminate(),this.mnWorker=null)}resetAudioOffset(s=0){this.mnAudio?.resetAudioByTimeStamp(s)}onNoCache(s){this.pause()}onCacheAvailable(s){this.resume()}play(s,h,g){do{if(this.playerState==et){this.resume();break}if(this.onPlaying(),this.playerState==Ze)break;if(this.mediaType=s,this.streamType=h,this.beginTime=g,this.isPlayback=!1,g==null||g.length==0?this.messageId=37121:(this.isPlayback=!0,this.playbackMode==null?(this.playbackMode=0,this.messageId=37377):(this.playbackMode=5,this.messageId=37378)),!this.canvas&&this.mediaType!=_.kMediaSpeak){this.logger.logError("[ER] playVideo error, canvas empty.");break}this.mediaType!=_.kMediaSpeak&&this.showChannel(),this.openStream(),this.playerState=Ze}while(!1)}openStream(){this.mnWorker==null&&this.initMnWorker(),this.mnWorker.postMessage({t:_.kOpenStreamReq,messageId:this.messageId,mediaType:this.mediaType,streamType:this.streamType,beginTime:this.beginTime,playbackMode:this.playbackMode,lang:this.lang}),this.replayTimer==null&&this.mediaType!==_.kMediaSpeak&&(this.replayTimer=setInterval(this.detectStream.bind(this),this.timeout)),this.showLoading()}fastForward(s){this.mnWorker&&this.mnWorker.postMessage({t:_.kFastForward,d:s})}resume(){if(this.onPlaying(),this.playerState!=et){this.logger.logInfo("Not pausing.");return}this.mnAudio!=null&&this.mnAudio.resume();let s={t:_.kResumeDecodingReq};this.mnWorker.postMessage(s),this.playerState=Ze,this.timerCtrl.resume()}pause(){if(this.onPaused(),this.playerState!=Ze){this.logger.logInfo("Not playing.");return}this.isPlayback||this.mnAudio?.clear(),this.playerState=et,this.mnAudio!=null&&this.mnAudio.pause();let s={t:_.kPauseDecodingReq};this.mnWorker.postMessage(s),this.timerCtrl.pause()}offsetVideo(s){this.timerCtrl.offset(s);let h={t:_.kVideoAudioOffset,data:s};this.mnWorker.postMessage(h)}async stop(){if(this.playerState==At){this.logger.logInfo("Not playing.");return}this.timerCtrl?.stop(),this.playbackMode=null,this.stopReplayTimer(),this.playerState=At,this.decoderState=ei,this.stopWorker(!0),this.mnVideo&&(this.mnVideo.stop(),this.canvas=null,this.mnVideo=null),this.mnAudio&&(this.enableAudio(!1),this.mnAudio.destroy(),this.mnAudio=null),await this.closeVideoDecoder(),this.streamType=-1,this.div!=null&&(this.hidePrompt(),this.div.find("#"+this.chlId).remove(),this.div.find("#"+this.spedId).remove())}switchStream(s){if(this.streamType==s)return;this.streamType=s;let h={t:_.kSwitchStreamReq,s};this.mnWorker.postMessage(h)}enableAudio(s){this.playAudio=s,this.playAudio?this.mnAudio.volume(1):this.mnAudio.volume(0);let h={t:_.kEnableAudioReq,d:s};this.mnWorker?.postMessage(h)}speak(s){if(this.decoderState!==Dt)return;let h={t:_.kRecorderSpeakReq,d:s};this.mnWorker.postMessage(h,h.d.buffer)}talk(s){if(this.decoderState!==Dt)return;let h={t:_.kRecorderTalkReq,d:s};this.mnWorker?.postMessage(h,[h.d.buffer])}fullscreen(){this.mnVideo&&this.mnVideo.fullscreen()}onOpenDecoder(s){s.e==0?(this.decoderState=Dt,this.mediaType==_.kMediaSpeak&&(this.playAudio=!0)):this.logger.logError("Open decoder response "+s.e+".")}detectStream(){if(this.playerState!=et)if(Date.now()-this.streamTime>=this.timeout){if(this.isDetectAbnormal=!0,this.loading){let s="码流响应超时";switch(this.lang){case"zh-CN,zh;":s="码流响应超时";break;case"zh-TW,zh;":s="碼流響應超時";break;case"en-US,en;":s="Stream response timeout";break;case"ru-RU,ru;":s="Тайм-аут ответа на поток";break;case"kk-KZ,kk;":s="Трансляцияға жауап берудің күту уақыты";break}this.showHinting(s)}else{if(this.renderType=="decode"){this.restartCallback?.();return}this.mnWorker==null?this.openStream():this.mnWorker.postMessage({t:_.kReplayReq}),this.showLoading()}this.loading=!this.loading}else this.isDetectAbnormal=!1}onVideoReady(s){this.width=s.w,this.height=s.h,this.yLength=s.w*s.h,this.uvLength=s.w/2*(s.h/2)}onVideoFrame(s){this.hidePrompt(),this.hideChannel(),this.streamTime=Date.now();let h=new Uint8Array(s.d);this.timerCtrl.append(+s.ti,h),this.timerCtrl.isRealTime=!this.isPlayback,!this.isPlayback&&this.timerCtrl.getCacheSize()>10&&this.timerCtrl.resume()}onAudioFrame(s){let h=new Uint8Array(s.d);this.mnAudio.feed(h,s.ti)}onStringFrame(s){let h=s.d;if(h!=null&&h.charAt(0)!=="0"){if(h.charAt(0)==="1")this.showHinting(h.substr(1)),this.loading=!1;else if(h.charAt(0)==="2"){let g=new CustomEvent("gpsData",{detail:{data:h.substr(1)}});window.dispatchEvent?window.dispatchEvent(g):window.fireEvent(g)}}}onNetSpeedFrame(s){let h,g=parseInt(s.d/1024,10);this.netSpeedCallback&&typeof this.netSpeedCallback=="function"&&this.netSpeedCallback(g,s),this.videoDecoder?this.isPlayback?g=`${g}KB/S;${this.renderMode==0?"Wasm":"Decoder"};cache:${s.len};que:${this.videoDecoder?.decodeQueueSize||0};`:g=`${g}KB/S;${this.renderMode==0?"Wasm":"Decoder"};cache:${this.timerCtrl.getCacheSize()};que:${this.videoDecoder?.decodeQueueSize||0};`:this.isPlayback?g=`${g}KB/S;${this.renderMode==0?"Wasm":"Decoder"};cache:${s.len}`:g=`${g}KB/S;${this.renderMode==0?"Wasm":"Decoder"};cache:${this.timerCtrl.getCacheSize()}`,this.div!==void 0&&this.div!==null&&(this.spedId!=null&&this.div.find("#"+this.spedId).remove(),h='<span id="'+this.spedId+'" style="position: absolute;bottom:0;right:0;transform:translate(-10px,-10px);font-size:1.0vh;color:white;width:auto">'+g+"</span>",this.div.append(h))}showChannel(){let s;this.hideChannel(),this.chlId="chlId",this.streamType==0?s='<span id="'+this.chlId+'" style="position: absolute;top:3%;right:2%;transform:translate(-50%,-50%);font-size:3.0vh;color:white;width:auto">'+this.channel+"</span>":s='<span id="'+this.chlId+'" style="position: absolute;top:5%;right:2%;transform:translate(-50%,-50%);font-size:1.0vh;color:white;width:auto">'+this.channel+"</span>",this.div!=null&&this.div.append(s)}hideChannel(){this.div!=null&&this.chlId!=null&&(this.div.find("#"+this.chlId).remove(),this.chlId=null)}showLoading(){this.mediaType!=_.kMediaSpeak&&(this.hidePrompt(),this.loadId="loadId",this.div!=null&&this.div.append('<img class="avue-home__loading" id="'+this.loadId+'" width="30" height="30" style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);" src="'+bn+'" alt="loading">'))}hideLoading(){this.div!=null&&this.loadId!=null&&(this.div.find("#"+this.loadId).remove(),this.loadId=null)}showHinting(s){this.mediaType!=_.kMediaSpeak&&(this.hidePrompt(),this.hintId="hintId",this.div.append('<span id="'+this.hintId+'" style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);font-size: 1.5vh;color: red;width: auto">'+s+"</span>"))}hideHinting(){this.mediaType!=_.kMediaSpeak&&this.div!=null&&this.hintId!=null&&(this.div.find("#"+this.hintId).remove(),this.hintId=null)}hidePrompt(){this.hideLoading(),this.hideHinting()}async isSupportH265(){try{if(VideoDecoder){const s={codec:"hev1.1.6.L93.B0",hardwareAcceleration:"prefer-hardware"},h=await VideoDecoder.isConfigSupported(s);return!0}else return!1}catch{return!1}}async isSupportH264(){try{if(VideoDecoder){const s={codec:"avc1.42001E",hardwareAcceleration:"prefer-hardware"},h=await VideoDecoder.isConfigSupported(s);return!0}else return!1}catch{return!1}}initVideoDecoder(s={}){if(!("VideoDecoder"in window))return console.warn("VideoDecoder is not supported in this browser"),!1;const g={...{codec:"avc1.42001E",width:this.width||640,height:this.height||480,hardwareAcceleration:"prefer-hardware",description:this.avcC},...s};return VideoDecoder.isConfigSupported(g).then(C=>{if(!C.supported){console.warn("VideoDecoder config is not supported:",g),alert("不支持");return}this.videoDecoder=new VideoDecoder({output:this.handleDecodedFrame.bind(this),error:this.handleDecoderError.bind(this)}),this.videoDecoder._id=this.id,this.videoDecoder._id,this.videoDecoder.configure(g)}).catch(C=>{console.error("Failed to initialize VideoDecoder:",C)}),!0}handleAudioVideoTimeCheck(s){let h=+this.mnAudio.getNowPlayStamp();if(h==-1)return;this.audioTimeStamp=h,s-this.audioTimeStamp,this.lastAudioTimeStamp=this.audioTimeStamp,this.videoTimeStamp=+s,this.audioTimeStamp=+this.mnAudio.getNowPlayStamp();const g=this.audioTimeStamp==0||this.audioTimeStamp==-1||isNaN(this.audioTimeStamp);if(this.isAbnormal){this.videoTimeStamp-this.lastAudioTimeStamp>0&&!g?this.isNormalTime++:this.isNormalTime=0,this.isNormalTime>10&&(this.isAbnormal=!1);return}if(g){this.isAbnormal=!0,this.offsetVideo(0);return}if(this.lastAudioTimeStamp!==0){if(this.audioTimeStamp-this.lastAudioTimeStamp>1e3){this.isAbnormal=!0;return}if(this.speed<=2){this.videoTimeStamp-this.audioTimeStamp>2e3&&this.resetAudioOffset(this.videoTimeStamp);const C=this.mnAudio.offsetAudio(this.videoTimeStamp);this.offsetVideo(C)}}}handleDecodedFrame(s){this.hidePrompt(),this.timerCtrl.append(s.timestamp/1e3,s),this.decodeSlow&&this.videoDecoder.decodeQueueSize<=20&&(this.decodeSlow=!1,this.mnWorker.postMessage({t:_.kResumeDecodingReq}))}drawOne(s){if(!this.canvas)return;const h=this.canvas.getContext("2d");if(h&&(this.mnAudio.videoReady(),!!s)){try{h.drawImage(s,0,0,this.canvas.width,this.canvas.height)}catch{}s.close()}}handleDecoderError(s){this.decodeSlow&&this.videoDecoder.decodeQueueSize<=20&&(this.decodeSlow=!1,this.mnWorker.postMessage({t:_.kResumeDecodingReq})),this.playerState==Ze&&(this.videoDecoder.state=="closed"&&this.initVideoDecoder(),this.isFirstLoad=!1)}dropLast16Bytes(s){return s.byteLength<=16?new ArrayBuffer(0):s.slice(0,s.byteLength-16)}annexBToAvcc(s){const h=s.reduce((S,D)=>S+4+D.length,0),g=new Uint8Array(h);let C=0;for(const S of s)g[C++]=S.length>>>24&255,g[C++]=S.length>>>16&255,g[C++]=S.length>>>8&255,g[C++]=S.length&255,g.set(S,C),C+=S.length;return g}splitAnnexBNalus(s){const h=[];let g=0;function C(S){return s[S]===0&&s[S+1]===0&&(s[S+2]===1||s[S+2]===0&&s[S+3]===1)}for(;g<s.length;){if(!C(g)){g++;continue}s[g+(s[g+2]===1?3:4)];const S=g+(s[g+2]===1?3:4);let D=S;for(;D<s.length&&!C(D);)D++;h.push(s.subarray(S,D)),g=D}return h}extractSpsPps(s){let h=null,g=null,C=0;for(;C+4<s.length;)if(s[C]===0&&s[C+1]===0&&(s[C+2]===1||s[C+2]===0&&s[C+3]===1)){const S=s[C+2]===1?3:4,D=C+S,I=s[D]&31;let N=D+1;for(;N+3<s.length&&!(s[N]===0&&s[N+1]===0&&(s[N+2]===1||s[N+2]===0&&s[N+3]===1));)N++;const V=s.slice(D,N);if(I===7&&!h&&(h=V),I===8&&!g&&(g=V),I===32&&!h&&(h=V),I===33&&!g&&(g=V),h&&g)break;C=N}else C++;return{sps:h,pps:g}}extractVpsSpsPps(s){const h=[];let g=0;function C(N){for(let V=N;V+3<s.length;V++)if(s[V]===0&&s[V+1]===0&&(s[V+2]===1||s[V+2]===0&&s[V+3]===1))return V;return-1}for(;g<s.length;){const N=C(g);if(N===-1)break;let V=s[N+2]===1?3:4,ee=N+V,ne=C(ee);ne===-1&&(ne=s.length);const se=s.subarray(ee,ne),Y=se[0]>>1&63;(Y===32||Y===33||Y===34)&&h.push({type:Y,data:se}),g=ne}const S=h.find(N=>N.type===32)?.data,D=h.find(N=>N.type===33)?.data,I=h.find(N=>N.type===34)?.data;return{vps:S,sps:D,pps:I}}guessCodec(s){if(s.length<1)return null;if((s[0]&31)===7)return"H.264";const g=s[0]>>1&63;return g===32||g===33?"H.265":"unknown"}parseNalUnitType(s){let h=0;for(;h<s.length-3;){if(s[h]===0&&s[h+1]===0&&s[h+2]===1)return s[h+3]>>1&63;h++}return null}detectVideoCodec(s){if(s.length<5)return"unknown";let h=0;for(;h+4<s.length;){if(s[h]===0&&s[h+1]===0){if(s[h+2]===1){h+=3;break}else if(s[h+2]===0&&s[h+3]===1){h+=4;break}}h++}if(h>=s.length)return"unknown";const g=s[h],C=g&31,S=g>>1&63;return C>=1&&C<=12?"h264":S>=0&&S<=40?"h265":"unknown"}makeAvcC(s,h){const g=s.length,C=h.length,S=new Uint8Array(8+g+3+C);let D=0;return S[D++]=1,S[D++]=s[1],S[D++]=s[2],S[D++]=s[3],S[D++]=255,S[D++]=225,S[D++]=g>>8&255,S[D++]=g&255,S.set(s,D),D+=g,S[D++]=1,S[D++]=C>>8&255,S[D++]=C&255,S.set(h,D),S}decodeVideoFrame(s,h,g=!1){if(!this.videoDecoder){console.warn("VideoDecoder is not initialized");return}if(this.isDetectAbnormal&&this.videoDecoder._id,this.videoDecoder.decodeQueueSize>100&&!g&&(this.decodeSlow=!0,this.mnWorker.postMessage({t:_.kPauseDecodingReq})),this.streamTime=Date.now(),!this.isFirstLoad){const C=this.detectVideoCodec(s);if(C==="unknown")return;if(C=="h264"){let S=function(V){const ee=V[1],ne=V[2],se=V[3];return`avc1.${ee.toString(16).padStart(2,"0")}${ne.toString(16).padStart(2,"0")}${se.toString(16).padStart(2,"0")}`};this.frameType="h264";const{sps:D,pps:I}=this.extractSpsPps(s);if(!D||!I)return;this.sps=D,this.pps=I,this.avcC=this.makeAvcC(D,I),console.warn("avcC",this.avcC);let N=S(D);if(this.videoDecoder.configure({codec:N,displayAspectWidth:this.canvas.width||640,displayAspectHeight:this.canvas.height||480,description:this.avcC,hardwareAcceleration:"prefer-hardware"}),this.t=0,g)this.isFirstLoad=!0;else return}else{this.frameType="h265";const{vps:S,sps:D,pps:I}=this.extractVpsSpsPps(s);if(this.vps=S,this.sps=D,this.pps=I,!S||!D||!I)return;const N={codec:"hev1.1.6.L93.90",codedWidth:1920,codedHeight:1080,hardwareAcceleration:"prefer-hardware"};if(VideoDecoder.isConfigSupported(N).then(V=>{if(!V.supported){console.warn("VideoDecoder config is not supported:",N);return}}),this.videoDecoder.configure(N),g)this.isFirstLoad=!0;else return}}if(this.frameType=="h264"){let C=this.annexBToAvcc(this.splitAnnexBNalus(s)),S=33333;const D=new EncodedVideoChunk({type:g?"key":"delta",data:C,timestamp:h*1e3,duration:S});try{this.videoDecoder.decode(D)}catch{this.videoDecoder._id}}else{let C=33333;const S=new EncodedVideoChunk({type:g?"key":"delta",data:s,timestamp:h*1e3,duration:C});try{this.videoDecoder.decode(S)}catch{this.videoDecoder._id}}}formatDateTime(s){if(!(s instanceof Date)||isNaN(s.getTime()))return"";const h=g=>g.toString().padStart(2,"0");return s.getFullYear()+"-"+h(s.getMonth()+1)+"-"+h(s.getDate())+" "+h(s.getHours())+":"+h(s.getMinutes())+":"+h(s.getSeconds())}async closeVideoDecoder(){try{if(this.videoDecoder){this.isFirstLoad=!1;try{await this.videoDecoder.reset()}catch{}this.videoDecoder._id,this.videoDecoder.close(),this.videoDecoder=null}}catch{}}changeSpeed(s=1,h=!0){let g=new Map([[1,1],[2,2],[4,3],[8,4],[16,5]]),C=0;s>=4&&(C=6);let S={t:_.kReplaySpeedReq,time:"",d:g.get(s)||1,v:s,playbackMode:C};g.get(s),this.speed=s,this.mnAudio.speed(s),this.speedValue=g.get(s),this.timerCtrl.changeSpeed(s),h&&this.mnWorker.postMessage(S),this.speed==1&&this.resetAudioOffset(this.videoTimeStamp)}delayTime(s){this.speed>=2||this.playerState!=et&&(s<300||s>3e3||(this.pause(),setTimeout(()=>{this.resume()},s)))}}function Cn(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var dt={exports:{}};var wn=dt.exports,ti;function kn(){return ti||(ti=1,(function(R){(function(s,h){R.exports=s.document?h(s,!0):function(g){if(!g.document)throw new Error("jQuery requires a window with a document");return h(g)}})(typeof window<"u"?window:wn,function(s,h){var g=[],C=Object.getPrototypeOf,S=g.slice,D=g.flat?function(e){return g.flat.call(e)}:function(e){return g.concat.apply([],e)},I=g.push,N=g.indexOf,V={},ee=V.toString,ne=V.hasOwnProperty,se=ne.toString,Y=se.call(Object),M={},q=function(t){return typeof t=="function"&&typeof t.nodeType!="number"&&typeof t.item!="function"},ae=function(t){return t!=null&&t===t.window},j=s.document,ve={type:!0,src:!0,nonce:!0,noModule:!0};function pt(e,t,i){i=i||j;var n,o,a=i.createElement("script");if(a.text=e,t)for(n in ve)o=t[n]||t.getAttribute&&t.getAttribute(n),o&&a.setAttribute(n,o);i.head.appendChild(a).parentNode.removeChild(a)}function _e(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?V[ee.call(e)]||"object":typeof e}var ni="3.7.1",Nn=/HTML$/i,r=function(e,t){return new r.fn.init(e,t)};r.fn=r.prototype={jquery:ni,constructor:r,length:0,toArray:function(){return S.call(this)},get:function(e){return e==null?S.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=r.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return r.each(this,e)},map:function(e){return this.pushStack(r.map(this,function(t,i){return e.call(t,i,t)}))},slice:function(){return this.pushStack(S.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(r.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(r.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:I,sort:g.sort,splice:g.splice},r.extend=r.fn.extend=function(){var e,t,i,n,o,a,u=arguments[0]||{},c=1,f=arguments.length,p=!1;for(typeof u=="boolean"&&(p=u,u=arguments[c]||{},c++),typeof u!="object"&&!q(u)&&(u={}),c===f&&(u=this,c--);c<f;c++)if((e=arguments[c])!=null)for(t in e)n=e[t],!(t==="__proto__"||u===n)&&(p&&n&&(r.isPlainObject(n)||(o=Array.isArray(n)))?(i=u[t],o&&!Array.isArray(i)?a=[]:!o&&!r.isPlainObject(i)?a={}:a=i,o=!1,u[t]=r.extend(p,a,n)):n!==void 0&&(u[t]=n));return u},r.extend({expando:"jQuery"+(ni+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!e||ee.call(e)!=="[object Object]"?!1:(t=C(e),t?(i=ne.call(t,"constructor")&&t.constructor,typeof i=="function"&&se.call(i)===Y):!0)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){pt(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(Et(e))for(i=e.length;n<i&&t.call(e[n],n,e[n])!==!1;n++);else for(n in e)if(t.call(e[n],n,e[n])===!1)break;return e},text:function(e){var t,i="",n=0,o=e.nodeType;if(!o)for(;t=e[n++];)i+=r.text(t);return o===1||o===11?e.textContent:o===9?e.documentElement.textContent:o===3||o===4?e.nodeValue:i},makeArray:function(e,t){var i=t||[];return e!=null&&(Et(Object(e))?r.merge(i,typeof e=="string"?[e]:e):I.call(i,e)),i},inArray:function(e,t,i){return t==null?-1:N.call(t,e,i)},isXMLDoc:function(e){var t=e&&e.namespaceURI,i=e&&(e.ownerDocument||e).documentElement;return!Nn.test(t||i&&i.nodeName||"HTML")},merge:function(e,t){for(var i=+t.length,n=0,o=e.length;n<i;n++)e[o++]=t[n];return e.length=o,e},grep:function(e,t,i){for(var n,o=[],a=0,u=e.length,c=!i;a<u;a++)n=!t(e[a],a),n!==c&&o.push(e[a]);return o},map:function(e,t,i){var n,o,a=0,u=[];if(Et(e))for(n=e.length;a<n;a++)o=t(e[a],a,i),o!=null&&u.push(o);else for(a in e)o=t(e[a],a,i),o!=null&&u.push(o);return D(u)},guid:1,support:M}),typeof Symbol=="function"&&(r.fn[Symbol.iterator]=g[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){V["[object "+t+"]"]=t.toLowerCase()});function Et(e){var t=!!e&&"length"in e&&e.length,i=_e(e);return q(e)||ae(e)?!1:i==="array"||t===0||typeof t=="number"&&t>0&&t-1 in e}function Z(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var Rn=g.pop,Ln=g.sort,Fn=g.splice,K="[\\x20\\t\\r\\n\\f]",tt=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g");r.contains=function(e,t){var i=t&&t.parentNode;return e===i||!!(i&&i.nodeType===1&&(e.contains?e.contains(i):e.compareDocumentPosition&&e.compareDocumentPosition(i)&16))};var Mn=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Pn(e,t){return t?e==="\0"?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}r.escapeSelector=function(e){return(e+"").replace(Mn,Pn)};var Ae=j,Nt=I;(function(){var e,t,i,n,o,a=Nt,u,c,f,p,b,T=r.expando,y=0,w=0,B=St(),X=St(),W=St(),re=St(),ie=function(l,d){return l===d&&(o=!0),0},Te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Se="(?:\\\\[\\da-fA-F]{1,6}"+K+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\["+K+"*("+Se+")(?:"+K+"*([*^$|!~]?=)"+K+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Se+"))|)"+K+"*\\]",Be=":("+Se+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+z+")*)|.*)\\)|)",G=new RegExp(K+"+","g"),te=new RegExp("^"+K+"*,"+K+"*"),ft=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),zt=new RegExp(K+"|>"),Ce=new RegExp(Be),ct=new RegExp("^"+Se+"$"),we={ID:new RegExp("^#("+Se+")"),CLASS:new RegExp("^\\.("+Se+")"),TAG:new RegExp("^("+Se+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+Be),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+Te+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},Fe=/^(?:input|select|textarea|button)$/i,Me=/^h\d$/i,pe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Xt=/[+~]/,Re=new RegExp("\\\\[\\da-fA-F]{1,6}"+K+"?|\\\\([^\\r\\n\\f])","g"),Le=function(l,d){var m="0x"+l.slice(1)-65536;return d||(m<0?String.fromCharCode(m+65536):String.fromCharCode(m>>10|55296,m&1023|56320))},Nr=function(){Pe()},Rr=wt(function(l){return l.disabled===!0&&Z(l,"fieldset")},{dir:"parentNode",next:"legend"});function Lr(){try{return u.activeElement}catch{}}try{a.apply(g=S.call(Ae.childNodes),Ae.childNodes),g[Ae.childNodes.length].nodeType}catch{a={apply:function(d,m){Nt.apply(d,S.call(m))},call:function(d){Nt.apply(d,S.call(arguments,1))}}}function Q(l,d,m,v){var x,k,A,L,E,U,H,O=d&&d.ownerDocument,$=d?d.nodeType:9;if(m=m||[],typeof l!="string"||!l||$!==1&&$!==9&&$!==11)return m;if(!v&&(Pe(d),d=d||u,f)){if($!==11&&(E=pe.exec(l)))if(x=E[1]){if($===9)if(A=d.getElementById(x)){if(A.id===x)return a.call(m,A),m}else return m;else if(O&&(A=O.getElementById(x))&&Q.contains(d,A)&&A.id===x)return a.call(m,A),m}else{if(E[2])return a.apply(m,d.getElementsByTagName(l)),m;if((x=E[3])&&d.getElementsByClassName)return a.apply(m,d.getElementsByClassName(x)),m}if(!re[l+" "]&&(!p||!p.test(l))){if(H=l,O=d,$===1&&(zt.test(l)||ft.test(l))){for(O=Xt.test(l)&&Gt(d.parentNode)||d,(O!=d||!M.scope)&&((L=d.getAttribute("id"))?L=r.escapeSelector(L):d.setAttribute("id",L=T)),U=ht(l),k=U.length;k--;)U[k]=(L?"#"+L:":scope")+" "+Ct(U[k]);H=U.join(",")}try{return a.apply(m,O.querySelectorAll(H)),m}catch{re(l,!0)}finally{L===T&&d.removeAttribute("id")}}}return Vi(l.replace(tt,"$1"),d,m,v)}function St(){var l=[];function d(m,v){return l.push(m+" ")>t.cacheLength&&delete d[l.shift()],d[m+" "]=v}return d}function ye(l){return l[T]=!0,l}function Ke(l){var d=u.createElement("fieldset");try{return!!l(d)}catch{return!1}finally{d.parentNode&&d.parentNode.removeChild(d),d=null}}function Fr(l){return function(d){return Z(d,"input")&&d.type===l}}function Mr(l){return function(d){return(Z(d,"input")||Z(d,"button"))&&d.type===l}}function Wi(l){return function(d){return"form"in d?d.parentNode&&d.disabled===!1?"label"in d?"label"in d.parentNode?d.parentNode.disabled===l:d.disabled===l:d.isDisabled===l||d.isDisabled!==!l&&Rr(d)===l:d.disabled===l:"label"in d?d.disabled===l:!1}}function Oe(l){return ye(function(d){return d=+d,ye(function(m,v){for(var x,k=l([],m.length,d),A=k.length;A--;)m[x=k[A]]&&(m[x]=!(v[x]=m[x]))})})}function Gt(l){return l&&typeof l.getElementsByTagName<"u"&&l}function Pe(l){var d,m=l?l.ownerDocument||l:Ae;return m==u||m.nodeType!==9||!m.documentElement||(u=m,c=u.documentElement,f=!r.isXMLDoc(u),b=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&Ae!=u&&(d=u.defaultView)&&d.top!==d&&d.addEventListener("unload",Nr),M.getById=Ke(function(v){return c.appendChild(v).id=r.expando,!u.getElementsByName||!u.getElementsByName(r.expando).length}),M.disconnectedMatch=Ke(function(v){return b.call(v,"*")}),M.scope=Ke(function(){return u.querySelectorAll(":scope")}),M.cssHas=Ke(function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),M.getById?(t.filter.ID=function(v){var x=v.replace(Re,Le);return function(k){return k.getAttribute("id")===x}},t.find.ID=function(v,x){if(typeof x.getElementById<"u"&&f){var k=x.getElementById(v);return k?[k]:[]}}):(t.filter.ID=function(v){var x=v.replace(Re,Le);return function(k){var A=typeof k.getAttributeNode<"u"&&k.getAttributeNode("id");return A&&A.value===x}},t.find.ID=function(v,x){if(typeof x.getElementById<"u"&&f){var k,A,L,E=x.getElementById(v);if(E){if(k=E.getAttributeNode("id"),k&&k.value===v)return[E];for(L=x.getElementsByName(v),A=0;E=L[A++];)if(k=E.getAttributeNode("id"),k&&k.value===v)return[E]}return[]}}),t.find.TAG=function(v,x){return typeof x.getElementsByTagName<"u"?x.getElementsByTagName(v):x.querySelectorAll(v)},t.find.CLASS=function(v,x){if(typeof x.getElementsByClassName<"u"&&f)return x.getElementsByClassName(v)},p=[],Ke(function(v){var x;c.appendChild(v).innerHTML="<a id='"+T+"' href='' disabled='disabled'></a><select id='"+T+"-\r\\' disabled='disabled'><option selected=''></option></select>",v.querySelectorAll("[selected]").length||p.push("\\["+K+"*(?:value|"+Te+")"),v.querySelectorAll("[id~="+T+"-]").length||p.push("~="),v.querySelectorAll("a#"+T+"+*").length||p.push(".#.+[+~]"),v.querySelectorAll(":checked").length||p.push(":checked"),x=u.createElement("input"),x.setAttribute("type","hidden"),v.appendChild(x).setAttribute("name","D"),c.appendChild(v).disabled=!0,v.querySelectorAll(":disabled").length!==2&&p.push(":enabled",":disabled"),x=u.createElement("input"),x.setAttribute("name",""),v.appendChild(x),v.querySelectorAll("[name='']").length||p.push("\\["+K+"*name"+K+"*="+K+`*(?:''|"")`)}),M.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),ie=function(v,x){if(v===x)return o=!0,0;var k=!v.compareDocumentPosition-!x.compareDocumentPosition;return k||(k=(v.ownerDocument||v)==(x.ownerDocument||x)?v.compareDocumentPosition(x):1,k&1||!M.sortDetached&&x.compareDocumentPosition(v)===k?v===u||v.ownerDocument==Ae&&Q.contains(Ae,v)?-1:x===u||x.ownerDocument==Ae&&Q.contains(Ae,x)?1:n?N.call(n,v)-N.call(n,x):0:k&4?-1:1)}),u}Q.matches=function(l,d){return Q(l,null,null,d)},Q.matchesSelector=function(l,d){if(Pe(l),f&&!re[d+" "]&&(!p||!p.test(d)))try{var m=b.call(l,d);if(m||M.disconnectedMatch||l.document&&l.document.nodeType!==11)return m}catch{re(d,!0)}return Q(d,u,null,[l]).length>0},Q.contains=function(l,d){return(l.ownerDocument||l)!=u&&Pe(l),r.contains(l,d)},Q.attr=function(l,d){(l.ownerDocument||l)!=u&&Pe(l);var m=t.attrHandle[d.toLowerCase()],v=m&&ne.call(t.attrHandle,d.toLowerCase())?m(l,d,!f):void 0;return v!==void 0?v:l.getAttribute(d)},Q.error=function(l){throw new Error("Syntax error, unrecognized expression: "+l)},r.uniqueSort=function(l){var d,m=[],v=0,x=0;if(o=!M.sortStable,n=!M.sortStable&&S.call(l,0),Ln.call(l,ie),o){for(;d=l[x++];)d===l[x]&&(v=m.push(x));for(;v--;)Fn.call(l,m[v],1)}return n=null,l},r.fn.uniqueSort=function(){return this.pushStack(r.uniqueSort(S.apply(this)))},t=r.expr={cacheLength:50,createPseudo:ye,match:we,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(l){return l[1]=l[1].replace(Re,Le),l[3]=(l[3]||l[4]||l[5]||"").replace(Re,Le),l[2]==="~="&&(l[3]=" "+l[3]+" "),l.slice(0,4)},CHILD:function(l){return l[1]=l[1].toLowerCase(),l[1].slice(0,3)==="nth"?(l[3]||Q.error(l[0]),l[4]=+(l[4]?l[5]+(l[6]||1):2*(l[3]==="even"||l[3]==="odd")),l[5]=+(l[7]+l[8]||l[3]==="odd")):l[3]&&Q.error(l[0]),l},PSEUDO:function(l){var d,m=!l[6]&&l[2];return we.CHILD.test(l[0])?null:(l[3]?l[2]=l[4]||l[5]||"":m&&Ce.test(m)&&(d=ht(m,!0))&&(d=m.indexOf(")",m.length-d)-m.length)&&(l[0]=l[0].slice(0,d),l[2]=m.slice(0,d)),l.slice(0,3))}},filter:{TAG:function(l){var d=l.replace(Re,Le).toLowerCase();return l==="*"?function(){return!0}:function(m){return Z(m,d)}},CLASS:function(l){var d=B[l+" "];return d||(d=new RegExp("(^|"+K+")"+l+"("+K+"|$)"))&&B(l,function(m){return d.test(typeof m.className=="string"&&m.className||typeof m.getAttribute<"u"&&m.getAttribute("class")||"")})},ATTR:function(l,d,m){return function(v){var x=Q.attr(v,l);return x==null?d==="!=":d?(x+="",d==="="?x===m:d==="!="?x!==m:d==="^="?m&&x.indexOf(m)===0:d==="*="?m&&x.indexOf(m)>-1:d==="$="?m&&x.slice(-m.length)===m:d==="~="?(" "+x.replace(G," ")+" ").indexOf(m)>-1:d==="|="?x===m||x.slice(0,m.length+1)===m+"-":!1):!0}},CHILD:function(l,d,m,v,x){var k=l.slice(0,3)!=="nth",A=l.slice(-4)!=="last",L=d==="of-type";return v===1&&x===0?function(E){return!!E.parentNode}:function(E,U,H){var O,$,P,J,he,oe=k!==A?"nextSibling":"previousSibling",ge=E.parentNode,ke=L&&E.nodeName.toLowerCase(),Je=!H&&!L,ue=!1;if(ge){if(k){for(;oe;){for(P=E;P=P[oe];)if(L?Z(P,ke):P.nodeType===1)return!1;he=oe=l==="only"&&!he&&"nextSibling"}return!0}if(he=[A?ge.firstChild:ge.lastChild],A&&Je){for($=ge[T]||(ge[T]={}),O=$[l]||[],J=O[0]===y&&O[1],ue=J&&O[2],P=J&&ge.childNodes[J];P=++J&&P&&P[oe]||(ue=J=0)||he.pop();)if(P.nodeType===1&&++ue&&P===E){$[l]=[y,J,ue];break}}else if(Je&&($=E[T]||(E[T]={}),O=$[l]||[],J=O[0]===y&&O[1],ue=J),ue===!1)for(;(P=++J&&P&&P[oe]||(ue=J=0)||he.pop())&&!((L?Z(P,ke):P.nodeType===1)&&++ue&&(Je&&($=P[T]||(P[T]={}),$[l]=[y,ue]),P===E)););return ue-=x,ue===v||ue%v===0&&ue/v>=0}}},PSEUDO:function(l,d){var m,v=t.pseudos[l]||t.setFilters[l.toLowerCase()]||Q.error("unsupported pseudo: "+l);return v[T]?v(d):v.length>1?(m=[l,l,"",d],t.setFilters.hasOwnProperty(l.toLowerCase())?ye(function(x,k){for(var A,L=v(x,d),E=L.length;E--;)A=N.call(x,L[E]),x[A]=!(k[A]=L[E])}):function(x){return v(x,0,m)}):v}},pseudos:{not:ye(function(l){var d=[],m=[],v=Jt(l.replace(tt,"$1"));return v[T]?ye(function(x,k,A,L){for(var E,U=v(x,null,L,[]),H=x.length;H--;)(E=U[H])&&(x[H]=!(k[H]=E))}):function(x,k,A){return d[0]=x,v(d,null,A,m),d[0]=null,!m.pop()}}),has:ye(function(l){return function(d){return Q(l,d).length>0}}),contains:ye(function(l){return l=l.replace(Re,Le),function(d){return(d.textContent||r.text(d)).indexOf(l)>-1}}),lang:ye(function(l){return ct.test(l||"")||Q.error("unsupported lang: "+l),l=l.replace(Re,Le).toLowerCase(),function(d){var m;do if(m=f?d.lang:d.getAttribute("xml:lang")||d.getAttribute("lang"))return m=m.toLowerCase(),m===l||m.indexOf(l+"-")===0;while((d=d.parentNode)&&d.nodeType===1);return!1}}),target:function(l){var d=s.location&&s.location.hash;return d&&d.slice(1)===l.id},root:function(l){return l===c},focus:function(l){return l===Lr()&&u.hasFocus()&&!!(l.type||l.href||~l.tabIndex)},enabled:Wi(!1),disabled:Wi(!0),checked:function(l){return Z(l,"input")&&!!l.checked||Z(l,"option")&&!!l.selected},selected:function(l){return l.parentNode&&l.parentNode.selectedIndex,l.selected===!0},empty:function(l){for(l=l.firstChild;l;l=l.nextSibling)if(l.nodeType<6)return!1;return!0},parent:function(l){return!t.pseudos.empty(l)},header:function(l){return Me.test(l.nodeName)},input:function(l){return Fe.test(l.nodeName)},button:function(l){return Z(l,"input")&&l.type==="button"||Z(l,"button")},text:function(l){var d;return Z(l,"input")&&l.type==="text"&&((d=l.getAttribute("type"))==null||d.toLowerCase()==="text")},first:Oe(function(){return[0]}),last:Oe(function(l,d){return[d-1]}),eq:Oe(function(l,d,m){return[m<0?m+d:m]}),even:Oe(function(l,d){for(var m=0;m<d;m+=2)l.push(m);return l}),odd:Oe(function(l,d){for(var m=1;m<d;m+=2)l.push(m);return l}),lt:Oe(function(l,d,m){var v;for(m<0?v=m+d:m>d?v=d:v=m;--v>=0;)l.push(v);return l}),gt:Oe(function(l,d,m){for(var v=m<0?m+d:m;++v<d;)l.push(v);return l})}},t.pseudos.nth=t.pseudos.eq;for(e in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=Fr(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=Mr(e);function _i(){}_i.prototype=t.filters=t.pseudos,t.setFilters=new _i;function ht(l,d){var m,v,x,k,A,L,E,U=X[l+" "];if(U)return d?0:U.slice(0);for(A=l,L=[],E=t.preFilter;A;){(!m||(v=te.exec(A)))&&(v&&(A=A.slice(v[0].length)||A),L.push(x=[])),m=!1,(v=ft.exec(A))&&(m=v.shift(),x.push({value:m,type:v[0].replace(tt," ")}),A=A.slice(m.length));for(k in t.filter)(v=we[k].exec(A))&&(!E[k]||(v=E[k](v)))&&(m=v.shift(),x.push({value:m,type:k,matches:v}),A=A.slice(m.length));if(!m)break}return d?A.length:A?Q.error(l):X(l,L).slice(0)}function Ct(l){for(var d=0,m=l.length,v="";d<m;d++)v+=l[d].value;return v}function wt(l,d,m){var v=d.dir,x=d.next,k=x||v,A=m&&k==="parentNode",L=w++;return d.first?function(E,U,H){for(;E=E[v];)if(E.nodeType===1||A)return l(E,U,H);return!1}:function(E,U,H){var O,$,P=[y,L];if(H){for(;E=E[v];)if((E.nodeType===1||A)&&l(E,U,H))return!0}else for(;E=E[v];)if(E.nodeType===1||A)if($=E[T]||(E[T]={}),x&&Z(E,x))E=E[v]||E;else{if((O=$[k])&&O[0]===y&&O[1]===L)return P[2]=O[2];if($[k]=P,P[2]=l(E,U,H))return!0}return!1}}function Yt(l){return l.length>1?function(d,m,v){for(var x=l.length;x--;)if(!l[x](d,m,v))return!1;return!0}:l[0]}function Pr(l,d,m){for(var v=0,x=d.length;v<x;v++)Q(l,d[v],m);return m}function kt(l,d,m,v,x){for(var k,A=[],L=0,E=l.length,U=d!=null;L<E;L++)(k=l[L])&&(!m||m(k,v,x))&&(A.push(k),U&&d.push(L));return A}function Qt(l,d,m,v,x,k){return v&&!v[T]&&(v=Qt(v)),x&&!x[T]&&(x=Qt(x,k)),ye(function(A,L,E,U){var H,O,$,P,J=[],he=[],oe=L.length,ge=A||Pr(d||"*",E.nodeType?[E]:E,[]),ke=l&&(A||!d)?kt(ge,J,l,E,U):ge;if(m?(P=x||(A?l:oe||v)?[]:L,m(ke,P,E,U)):P=ke,v)for(H=kt(P,he),v(H,[],E,U),O=H.length;O--;)($=H[O])&&(P[he[O]]=!(ke[he[O]]=$));if(A){if(x||l){if(x){for(H=[],O=P.length;O--;)($=P[O])&&H.push(ke[O]=$);x(null,P=[],H,U)}for(O=P.length;O--;)($=P[O])&&(H=x?N.call(A,$):J[O])>-1&&(A[H]=!(L[H]=$))}}else P=kt(P===L?P.splice(oe,P.length):P),x?x(null,L,P,U):a.apply(L,P)})}function Kt(l){for(var d,m,v,x=l.length,k=t.relative[l[0].type],A=k||t.relative[" "],L=k?1:0,E=wt(function(O){return O===d},A,!0),U=wt(function(O){return N.call(d,O)>-1},A,!0),H=[function(O,$,P){var J=!k&&(P||$!=i)||((d=$).nodeType?E(O,$,P):U(O,$,P));return d=null,J}];L<x;L++)if(m=t.relative[l[L].type])H=[wt(Yt(H),m)];else{if(m=t.filter[l[L].type].apply(null,l[L].matches),m[T]){for(v=++L;v<x&&!t.relative[l[v].type];v++);return Qt(L>1&&Yt(H),L>1&&Ct(l.slice(0,L-1).concat({value:l[L-2].type===" "?"*":""})).replace(tt,"$1"),m,L<v&&Kt(l.slice(L,v)),v<x&&Kt(l=l.slice(v)),v<x&&Ct(l))}H.push(m)}return Yt(H)}function Ir(l,d){var m=d.length>0,v=l.length>0,x=function(k,A,L,E,U){var H,O,$,P=0,J="0",he=k&&[],oe=[],ge=i,ke=k||v&&t.find.TAG("*",U),Je=y+=ge==null?1:Math.random()||.1,ue=ke.length;for(U&&(i=A==u||A||U);J!==ue&&(H=ke[J])!=null;J++){if(v&&H){for(O=0,!A&&H.ownerDocument!=u&&(Pe(H),L=!f);$=l[O++];)if($(H,A||u,L)){a.call(E,H);break}U&&(y=Je)}m&&((H=!$&&H)&&P--,k&&he.push(H))}if(P+=J,m&&J!==P){for(O=0;$=d[O++];)$(he,oe,A,L);if(k){if(P>0)for(;J--;)he[J]||oe[J]||(oe[J]=Rn.call(E));oe=kt(oe)}a.apply(E,oe),U&&!k&&oe.length>0&&P+d.length>1&&r.uniqueSort(E)}return U&&(y=Je,i=ge),he};return m?ye(x):x}function Jt(l,d){var m,v=[],x=[],k=W[l+" "];if(!k){for(d||(d=ht(l)),m=d.length;m--;)k=Kt(d[m]),k[T]?v.push(k):x.push(k);k=W(l,Ir(x,v)),k.selector=l}return k}function Vi(l,d,m,v){var x,k,A,L,E,U=typeof l=="function"&&l,H=!v&&ht(l=U.selector||l);if(m=m||[],H.length===1){if(k=H[0]=H[0].slice(0),k.length>2&&(A=k[0]).type==="ID"&&d.nodeType===9&&f&&t.relative[k[1].type]){if(d=(t.find.ID(A.matches[0].replace(Re,Le),d)||[])[0],d)U&&(d=d.parentNode);else return m;l=l.slice(k.shift().value.length)}for(x=we.needsContext.test(l)?0:k.length;x--&&(A=k[x],!t.relative[L=A.type]);)if((E=t.find[L])&&(v=E(A.matches[0].replace(Re,Le),Xt.test(k[0].type)&&Gt(d.parentNode)||d))){if(k.splice(x,1),l=v.length&&Ct(k),!l)return a.apply(m,v),m;break}}return(U||Jt(l,H))(v,d,!f,m,!d||Xt.test(l)&&Gt(d.parentNode)||d),m}M.sortStable=T.split("").sort(ie).join("")===T,Pe(),M.sortDetached=Ke(function(l){return l.compareDocumentPosition(u.createElement("fieldset"))&1}),r.find=Q,r.expr[":"]=r.expr.pseudos,r.unique=r.uniqueSort,Q.compile=Jt,Q.select=Vi,Q.setDocument=Pe,Q.tokenize=ht,Q.escape=r.escapeSelector,Q.getText=r.text,Q.isXML=r.isXMLDoc,Q.selectors=r.expr,Q.support=r.support,Q.uniqueSort=r.uniqueSort})();var Ve=function(e,t,i){for(var n=[],o=i!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(o&&r(e).is(i))break;n.push(e)}return n},ri=function(e,t){for(var i=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&i.push(e);return i},si=r.expr.match.needsContext,oi=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Rt(e,t,i){return q(t)?r.grep(e,function(n,o){return!!t.call(n,o,n)!==i}):t.nodeType?r.grep(e,function(n){return n===t!==i}):typeof t!="string"?r.grep(e,function(n){return N.call(t,n)>-1!==i}):r.filter(t,e,i)}r.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),t.length===1&&n.nodeType===1?r.find.matchesSelector(n,e)?[n]:[]:r.find.matches(e,r.grep(t,function(o){return o.nodeType===1}))},r.fn.extend({find:function(e){var t,i,n=this.length,o=this;if(typeof e!="string")return this.pushStack(r(e).filter(function(){for(t=0;t<n;t++)if(r.contains(o[t],this))return!0}));for(i=this.pushStack([]),t=0;t<n;t++)r.find(e,o[t],i);return n>1?r.uniqueSort(i):i},filter:function(e){return this.pushStack(Rt(this,e||[],!1))},not:function(e){return this.pushStack(Rt(this,e||[],!0))},is:function(e){return!!Rt(this,typeof e=="string"&&si.test(e)?r(e):e||[],!1).length}});var ai,In=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,qn=r.fn.init=function(e,t,i){var n,o;if(!e)return this;if(i=i||ai,typeof e=="string")if(e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?n=[null,e,null]:n=In.exec(e),n&&(n[1]||!t))if(n[1]){if(t=t instanceof r?t[0]:t,r.merge(this,r.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:j,!0)),oi.test(n[1])&&r.isPlainObject(t))for(n in t)q(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}else return o=j.getElementById(n[2]),o&&(this[0]=o,this.length=1),this;else return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);else{if(e.nodeType)return this[0]=e,this.length=1,this;if(q(e))return i.ready!==void 0?i.ready(e):e(r)}return r.makeArray(e,this)};qn.prototype=r.fn,ai=r(j);var jn=/^(?:parents|prev(?:Until|All))/,Hn={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(e){var t=r(e,this),i=t.length;return this.filter(function(){for(var n=0;n<i;n++)if(r.contains(this,t[n]))return!0})},closest:function(e,t){var i,n=0,o=this.length,a=[],u=typeof e!="string"&&r(e);if(!si.test(e)){for(;n<o;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(u?u.index(i)>-1:i.nodeType===1&&r.find.matchesSelector(i,e))){a.push(i);break}}return this.pushStack(a.length>1?r.uniqueSort(a):a)},index:function(e){return e?typeof e=="string"?N.call(r(e),this[0]):N.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function ui(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}r.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return Ve(e,"parentNode")},parentsUntil:function(e,t,i){return Ve(e,"parentNode",i)},next:function(e){return ui(e,"nextSibling")},prev:function(e){return ui(e,"previousSibling")},nextAll:function(e){return Ve(e,"nextSibling")},prevAll:function(e){return Ve(e,"previousSibling")},nextUntil:function(e,t,i){return Ve(e,"nextSibling",i)},prevUntil:function(e,t,i){return Ve(e,"previousSibling",i)},siblings:function(e){return ri((e.parentNode||{}).firstChild,e)},children:function(e){return ri(e.firstChild)},contents:function(e){return e.contentDocument!=null&&C(e.contentDocument)?e.contentDocument:(Z(e,"template")&&(e=e.content||e),r.merge([],e.childNodes))}},function(e,t){r.fn[e]=function(i,n){var o=r.map(this,t,i);return e.slice(-5)!=="Until"&&(n=i),n&&typeof n=="string"&&(o=r.filter(n,o)),this.length>1&&(Hn[e]||r.uniqueSort(o),jn.test(e)&&o.reverse()),this.pushStack(o)}});var be=/[^\x20\t\r\n\f]+/g;function Bn(e){var t={};return r.each(e.match(be)||[],function(i,n){t[n]=!0}),t}r.Callbacks=function(e){e=typeof e=="string"?Bn(e):r.extend({},e);var t,i,n,o,a=[],u=[],c=-1,f=function(){for(o=o||e.once,n=t=!0;u.length;c=-1)for(i=u.shift();++c<a.length;)a[c].apply(i[0],i[1])===!1&&e.stopOnFalse&&(c=a.length,i=!1);e.memory||(i=!1),t=!1,o&&(i?a=[]:a="")},p={add:function(){return a&&(i&&!t&&(c=a.length-1,u.push(i)),(function b(T){r.each(T,function(y,w){q(w)?(!e.unique||!p.has(w))&&a.push(w):w&&w.length&&_e(w)!=="string"&&b(w)})})(arguments),i&&!t&&f()),this},remove:function(){return r.each(arguments,function(b,T){for(var y;(y=r.inArray(T,a,y))>-1;)a.splice(y,1),y<=c&&c--}),this},has:function(b){return b?r.inArray(b,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=u=[],a=i="",this},disabled:function(){return!a},lock:function(){return o=u=[],!i&&!t&&(a=i=""),this},locked:function(){return!!o},fireWith:function(b,T){return o||(T=T||[],T=[b,T.slice?T.slice():T],u.push(T),t||f()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!n}};return p};function Ue(e){return e}function gt(e){throw e}function li(e,t,i,n){var o;try{e&&q(o=e.promise)?o.call(e).done(t).fail(i):e&&q(o=e.then)?o.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(a){i.apply(void 0,[a])}}r.extend({Deferred:function(e){var t=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(a){return n.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(u){r.each(t,function(c,f){var p=q(a[f[4]])&&a[f[4]];o[f[1]](function(){var b=p&&p.apply(this,arguments);b&&q(b.promise)?b.promise().progress(u.notify).done(u.resolve).fail(u.reject):u[f[0]+"With"](this,p?[b]:arguments)})}),a=null}).promise()},then:function(a,u,c){var f=0;function p(b,T,y,w){return function(){var B=this,X=arguments,W=function(){var ie,Te;if(!(b<f)){if(ie=y.apply(B,X),ie===T.promise())throw new TypeError("Thenable self-resolution");Te=ie&&(typeof ie=="object"||typeof ie=="function")&&ie.then,q(Te)?w?Te.call(ie,p(f,T,Ue,w),p(f,T,gt,w)):(f++,Te.call(ie,p(f,T,Ue,w),p(f,T,gt,w),p(f,T,Ue,T.notifyWith))):(y!==Ue&&(B=void 0,X=[ie]),(w||T.resolveWith)(B,X))}},re=w?W:function(){try{W()}catch(ie){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(ie,re.error),b+1>=f&&(y!==gt&&(B=void 0,X=[ie]),T.rejectWith(B,X))}};b?re():(r.Deferred.getErrorHook?re.error=r.Deferred.getErrorHook():r.Deferred.getStackHook&&(re.error=r.Deferred.getStackHook()),s.setTimeout(re))}}return r.Deferred(function(b){t[0][3].add(p(0,b,q(c)?c:Ue,b.notifyWith)),t[1][3].add(p(0,b,q(a)?a:Ue)),t[2][3].add(p(0,b,q(u)?u:gt))}).promise()},promise:function(a){return a!=null?r.extend(a,n):n}},o={};return r.each(t,function(a,u){var c=u[2],f=u[5];n[u[1]]=c.add,f&&c.add(function(){i=f},t[3-a][2].disable,t[3-a][3].disable,t[0][2].lock,t[0][3].lock),c.add(u[3].fire),o[u[0]]=function(){return o[u[0]+"With"](this===o?void 0:this,arguments),this},o[u[0]+"With"]=c.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,i=t,n=Array(i),o=S.call(arguments),a=r.Deferred(),u=function(c){return function(f){n[c]=this,o[c]=arguments.length>1?S.call(arguments):f,--t||a.resolveWith(n,o)}};if(t<=1&&(li(e,a.done(u(i)).resolve,a.reject,!t),a.state()==="pending"||q(o[i]&&o[i].then)))return a.then();for(;i--;)li(o[i],u(i),a.reject);return a.promise()}});var On=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(e,t){s.console&&s.console.warn&&e&&On.test(e.name)&&s.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},r.readyException=function(e){s.setTimeout(function(){throw e})};var Lt=r.Deferred();r.fn.ready=function(e){return Lt.then(e).catch(function(t){r.readyException(t)}),this},r.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--r.readyWait:r.isReady)||(r.isReady=!0,!(e!==!0&&--r.readyWait>0)&&Lt.resolveWith(j,[r]))}}),r.ready.then=Lt.then;function mt(){j.removeEventListener("DOMContentLoaded",mt),s.removeEventListener("load",mt),r.ready()}j.readyState==="complete"||j.readyState!=="loading"&&!j.documentElement.doScroll?s.setTimeout(r.ready):(j.addEventListener("DOMContentLoaded",mt),s.addEventListener("load",mt));var Ee=function(e,t,i,n,o,a,u){var c=0,f=e.length,p=i==null;if(_e(i)==="object"){o=!0;for(c in i)Ee(e,t,c,i[c],!0,a,u)}else if(n!==void 0&&(o=!0,q(n)||(u=!0),p&&(u?(t.call(e,n),t=null):(p=t,t=function(b,T,y){return p.call(r(b),y)})),t))for(;c<f;c++)t(e[c],i,u?n:n.call(e[c],c,t(e[c],i)));return o?e:p?t.call(e):f?t(e[0],i):a},Wn=/^-ms-/,_n=/-([a-z])/g;function Vn(e,t){return t.toUpperCase()}function xe(e){return e.replace(Wn,"ms-").replace(_n,Vn)}var it=function(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType};function nt(){this.expando=r.expando+nt.uid++}nt.uid=1,nt.prototype={cache:function(e){var t=e[this.expando];return t||(t={},it(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,o=this.cache(e);if(typeof t=="string")o[xe(t)]=i;else for(n in t)o[xe(n)]=t[n];return o},get:function(e,t){return t===void 0?this.cache(e):e[this.expando]&&e[this.expando][xe(t)]},access:function(e,t,i){return t===void 0||t&&typeof t=="string"&&i===void 0?this.get(e,t):(this.set(e,t,i),i!==void 0?i:t)},remove:function(e,t){var i,n=e[this.expando];if(n!==void 0){if(t!==void 0)for(Array.isArray(t)?t=t.map(xe):(t=xe(t),t=t in n?[t]:t.match(be)||[]),i=t.length;i--;)delete n[t[i]];(t===void 0||r.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==void 0&&!r.isEmptyObject(t)}};var F=new nt,le=new nt,Un=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$n=/[A-Z]/g;function zn(e){return e==="true"?!0:e==="false"?!1:e==="null"?null:e===+e+""?+e:Un.test(e)?JSON.parse(e):e}function fi(e,t,i){var n;if(i===void 0&&e.nodeType===1)if(n="data-"+t.replace($n,"-$&").toLowerCase(),i=e.getAttribute(n),typeof i=="string"){try{i=zn(i)}catch{}le.set(e,t,i)}else i=void 0;return i}r.extend({hasData:function(e){return le.hasData(e)||F.hasData(e)},data:function(e,t,i){return le.access(e,t,i)},removeData:function(e,t){le.remove(e,t)},_data:function(e,t,i){return F.access(e,t,i)},_removeData:function(e,t){F.remove(e,t)}}),r.fn.extend({data:function(e,t){var i,n,o,a=this[0],u=a&&a.attributes;if(e===void 0){if(this.length&&(o=le.get(a),a.nodeType===1&&!F.get(a,"hasDataAttrs"))){for(i=u.length;i--;)u[i]&&(n=u[i].name,n.indexOf("data-")===0&&(n=xe(n.slice(5)),fi(a,n,o[n])));F.set(a,"hasDataAttrs",!0)}return o}return typeof e=="object"?this.each(function(){le.set(this,e)}):Ee(this,function(c){var f;if(a&&c===void 0)return f=le.get(a,e),f!==void 0||(f=fi(a,e),f!==void 0)?f:void 0;this.each(function(){le.set(this,e,c)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){le.remove(this,e)})}}),r.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=F.get(e,t),i&&(!n||Array.isArray(i)?n=F.access(e,t,r.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=r.queue(e,t),n=i.length,o=i.shift(),a=r._queueHooks(e,t),u=function(){r.dequeue(e,t)};o==="inprogress"&&(o=i.shift(),n--),o&&(t==="fx"&&i.unshift("inprogress"),delete a.stop,o.call(e,u,a)),!n&&a&&a.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return F.get(e,i)||F.access(e,i,{empty:r.Callbacks("once memory").add(function(){F.remove(e,[t+"queue",i])})})}}),r.fn.extend({queue:function(e,t){var i=2;return typeof e!="string"&&(t=e,e="fx",i--),arguments.length<i?r.queue(this[0],e):t===void 0?this:this.each(function(){var n=r.queue(this,e,t);r._queueHooks(this,e),e==="fx"&&n[0]!=="inprogress"&&r.dequeue(this,e)})},dequeue:function(e){return this.each(function(){r.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,o=r.Deferred(),a=this,u=this.length,c=function(){--n||o.resolveWith(a,[a])};for(typeof e!="string"&&(t=e,e=void 0),e=e||"fx";u--;)i=F.get(a[u],e+"queueHooks"),i&&i.empty&&(n++,i.empty.add(c));return c(),o.promise(t)}});var ci=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,rt=new RegExp("^(?:([+-])=|)("+ci+")([a-z%]*)$","i"),Ne=["Top","Right","Bottom","Left"],qe=j.documentElement,$e=function(e){return r.contains(e.ownerDocument,e)},Xn={composed:!0};qe.getRootNode&&($e=function(e){return r.contains(e.ownerDocument,e)||e.getRootNode(Xn)===e.ownerDocument});var yt=function(e,t){return e=t||e,e.style.display==="none"||e.style.display===""&&$e(e)&&r.css(e,"display")==="none"};function hi(e,t,i,n){var o,a,u=20,c=n?function(){return n.cur()}:function(){return r.css(e,t,"")},f=c(),p=i&&i[3]||(r.cssNumber[t]?"":"px"),b=e.nodeType&&(r.cssNumber[t]||p!=="px"&&+f)&&rt.exec(r.css(e,t));if(b&&b[3]!==p){for(f=f/2,p=p||b[3],b=+f||1;u--;)r.style(e,t,b+p),(1-a)*(1-(a=c()/f||.5))<=0&&(u=0),b=b/a;b=b*2,r.style(e,t,b+p),i=i||[]}return i&&(b=+b||+f||0,o=i[1]?b+(i[1]+1)*i[2]:+i[2],n&&(n.unit=p,n.start=b,n.end=o)),o}var di={};function Gn(e){var t,i=e.ownerDocument,n=e.nodeName,o=di[n];return o||(t=i.body.appendChild(i.createElement(n)),o=r.css(t,"display"),t.parentNode.removeChild(t),o==="none"&&(o="block"),di[n]=o,o)}function ze(e,t){for(var i,n,o=[],a=0,u=e.length;a<u;a++)n=e[a],n.style&&(i=n.style.display,t?(i==="none"&&(o[a]=F.get(n,"display")||null,o[a]||(n.style.display="")),n.style.display===""&&yt(n)&&(o[a]=Gn(n))):i!=="none"&&(o[a]="none",F.set(n,"display",i)));for(a=0;a<u;a++)o[a]!=null&&(e[a].style.display=o[a]);return e}r.fn.extend({show:function(){return ze(this,!0)},hide:function(){return ze(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){yt(this)?r(this).show():r(this).hide()})}});var st=/^(?:checkbox|radio)$/i,pi=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gi=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=j.createDocumentFragment(),t=e.appendChild(j.createElement("div")),i=j.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),M.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",M.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="<option></option>",M.option=!!t.lastChild})();var de={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};de.tbody=de.tfoot=de.colgroup=de.caption=de.thead,de.th=de.td,M.option||(de.optgroup=de.option=[1,"<select multiple='multiple'>","</select>"]);function fe(e,t){var i;return typeof e.getElementsByTagName<"u"?i=e.getElementsByTagName(t||"*"):typeof e.querySelectorAll<"u"?i=e.querySelectorAll(t||"*"):i=[],t===void 0||t&&Z(e,t)?r.merge([e],i):i}function Ft(e,t){for(var i=0,n=e.length;i<n;i++)F.set(e[i],"globalEval",!t||F.get(t[i],"globalEval"))}var Yn=/<|&#?\w+;/;function mi(e,t,i,n,o){for(var a,u,c,f,p,b,T=t.createDocumentFragment(),y=[],w=0,B=e.length;w<B;w++)if(a=e[w],a||a===0)if(_e(a)==="object")r.merge(y,a.nodeType?[a]:a);else if(!Yn.test(a))y.push(t.createTextNode(a));else{for(u=u||T.appendChild(t.createElement("div")),c=(pi.exec(a)||["",""])[1].toLowerCase(),f=de[c]||de._default,u.innerHTML=f[1]+r.htmlPrefilter(a)+f[2],b=f[0];b--;)u=u.lastChild;r.merge(y,u.childNodes),u=T.firstChild,u.textContent=""}for(T.textContent="",w=0;a=y[w++];){if(n&&r.inArray(a,n)>-1){o&&o.push(a);continue}if(p=$e(a),u=fe(T.appendChild(a),"script"),p&&Ft(u),i)for(b=0;a=u[b++];)gi.test(a.type||"")&&i.push(a)}return T}var yi=/^([^.]*)(?:\.(.+)|)/;function Xe(){return!0}function Ge(){return!1}function Mt(e,t,i,n,o,a){var u,c;if(typeof t=="object"){typeof i!="string"&&(n=n||i,i=void 0);for(c in t)Mt(e,c,i,n,t[c],a);return e}if(n==null&&o==null?(o=i,n=i=void 0):o==null&&(typeof i=="string"?(o=n,n=void 0):(o=n,n=i,i=void 0)),o===!1)o=Ge;else if(!o)return e;return a===1&&(u=o,o=function(f){return r().off(f),u.apply(this,arguments)},o.guid=u.guid||(u.guid=r.guid++)),e.each(function(){r.event.add(this,t,o,n,i)})}r.event={global:{},add:function(e,t,i,n,o){var a,u,c,f,p,b,T,y,w,B,X,W=F.get(e);if(it(e))for(i.handler&&(a=i,i=a.handler,o=a.selector),o&&r.find.matchesSelector(qe,o),i.guid||(i.guid=r.guid++),(f=W.events)||(f=W.events=Object.create(null)),(u=W.handle)||(u=W.handle=function(re){return typeof r<"u"&&r.event.triggered!==re.type?r.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(be)||[""],p=t.length;p--;)c=yi.exec(t[p])||[],w=X=c[1],B=(c[2]||"").split(".").sort(),w&&(T=r.event.special[w]||{},w=(o?T.delegateType:T.bindType)||w,T=r.event.special[w]||{},b=r.extend({type:w,origType:X,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&r.expr.match.needsContext.test(o),namespace:B.join(".")},a),(y=f[w])||(y=f[w]=[],y.delegateCount=0,(!T.setup||T.setup.call(e,n,B,u)===!1)&&e.addEventListener&&e.addEventListener(w,u)),T.add&&(T.add.call(e,b),b.handler.guid||(b.handler.guid=i.guid)),o?y.splice(y.delegateCount++,0,b):y.push(b),r.event.global[w]=!0)},remove:function(e,t,i,n,o){var a,u,c,f,p,b,T,y,w,B,X,W=F.hasData(e)&&F.get(e);if(!(!W||!(f=W.events))){for(t=(t||"").match(be)||[""],p=t.length;p--;){if(c=yi.exec(t[p])||[],w=X=c[1],B=(c[2]||"").split(".").sort(),!w){for(w in f)r.event.remove(e,w+t[p],i,n,!0);continue}for(T=r.event.special[w]||{},w=(n?T.delegateType:T.bindType)||w,y=f[w]||[],c=c[2]&&new RegExp("(^|\\.)"+B.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=a=y.length;a--;)b=y[a],(o||X===b.origType)&&(!i||i.guid===b.guid)&&(!c||c.test(b.namespace))&&(!n||n===b.selector||n==="**"&&b.selector)&&(y.splice(a,1),b.selector&&y.delegateCount--,T.remove&&T.remove.call(e,b));u&&!y.length&&((!T.teardown||T.teardown.call(e,B,W.handle)===!1)&&r.removeEvent(e,w,W.handle),delete f[w])}r.isEmptyObject(f)&&F.remove(e,"handle events")}},dispatch:function(e){var t,i,n,o,a,u,c=new Array(arguments.length),f=r.event.fix(e),p=(F.get(this,"events")||Object.create(null))[f.type]||[],b=r.event.special[f.type]||{};for(c[0]=f,t=1;t<arguments.length;t++)c[t]=arguments[t];if(f.delegateTarget=this,!(b.preDispatch&&b.preDispatch.call(this,f)===!1)){for(u=r.event.handlers.call(this,f,p),t=0;(o=u[t++])&&!f.isPropagationStopped();)for(f.currentTarget=o.elem,i=0;(a=o.handlers[i++])&&!f.isImmediatePropagationStopped();)(!f.rnamespace||a.namespace===!1||f.rnamespace.test(a.namespace))&&(f.handleObj=a,f.data=a.data,n=((r.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,c),n!==void 0&&(f.result=n)===!1&&(f.preventDefault(),f.stopPropagation()));return b.postDispatch&&b.postDispatch.call(this,f),f.result}},handlers:function(e,t){var i,n,o,a,u,c=[],f=t.delegateCount,p=e.target;if(f&&p.nodeType&&!(e.type==="click"&&e.button>=1)){for(;p!==this;p=p.parentNode||this)if(p.nodeType===1&&!(e.type==="click"&&p.disabled===!0)){for(a=[],u={},i=0;i<f;i++)n=t[i],o=n.selector+" ",u[o]===void 0&&(u[o]=n.needsContext?r(o,this).index(p)>-1:r.find(o,this,null,[p]).length),u[o]&&a.push(n);a.length&&c.push({elem:p,handlers:a})}}return p=this,f<t.length&&c.push({elem:p,handlers:t.slice(f)}),c},addProp:function(e,t){Object.defineProperty(r.Event.prototype,e,{enumerable:!0,configurable:!0,get:q(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(i){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:i})}})},fix:function(e){return e[r.expando]?e:new r.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return st.test(t.type)&&t.click&&Z(t,"input")&&vt(t,"click",!0),!1},trigger:function(e){var t=this||e;return st.test(t.type)&&t.click&&Z(t,"input")&&vt(t,"click"),!0},_default:function(e){var t=e.target;return st.test(t.type)&&t.click&&Z(t,"input")&&F.get(t,"click")||Z(t,"a")}},beforeunload:{postDispatch:function(e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}};function vt(e,t,i){if(!i){F.get(e,t)===void 0&&r.event.add(e,t,Xe);return}F.set(e,t,!1),r.event.add(e,t,{namespace:!1,handler:function(n){var o,a=F.get(this,t);if(n.isTrigger&1&&this[t]){if(a)(r.event.special[t]||{}).delegateType&&n.stopPropagation();else if(a=S.call(arguments),F.set(this,t,a),this[t](),o=F.get(this,t),F.set(this,t,!1),a!==o)return n.stopImmediatePropagation(),n.preventDefault(),o}else a&&(F.set(this,t,r.event.trigger(a[0],a.slice(1),this)),n.stopPropagation(),n.isImmediatePropagationStopped=Xe)}})}r.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},r.Event=function(e,t){if(!(this instanceof r.Event))return new r.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===void 0&&e.returnValue===!1?Xe:Ge,this.target=e.target&&e.target.nodeType===3?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&r.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[r.expando]=!0},r.Event.prototype={constructor:r.Event,isDefaultPrevented:Ge,isPropagationStopped:Ge,isImmediatePropagationStopped:Ge,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Xe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Xe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Xe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},r.event.addProp),r.each({focus:"focusin",blur:"focusout"},function(e,t){function i(n){if(j.documentMode){var o=F.get(this,"handle"),a=r.event.fix(n);a.type=n.type==="focusin"?"focus":"blur",a.isSimulated=!0,o(n),a.target===a.currentTarget&&o(a)}else r.event.simulate(t,n.target,r.event.fix(n))}r.event.special[e]={setup:function(){var n;if(vt(this,e,!0),j.documentMode)n=F.get(this,t),n||this.addEventListener(t,i),F.set(this,t,(n||0)+1);else return!1},trigger:function(){return vt(this,e),!0},teardown:function(){var n;if(j.documentMode)n=F.get(this,t)-1,n?F.set(this,t,n):(this.removeEventListener(t,i),F.remove(this,t));else return!1},_default:function(n){return F.get(n.target,e)},delegateType:t},r.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,o=j.documentMode?this:n,a=F.get(o,t);a||(j.documentMode?this.addEventListener(t,i):n.addEventListener(e,i,!0)),F.set(o,t,(a||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,o=j.documentMode?this:n,a=F.get(o,t)-1;a?F.set(o,t,a):(j.documentMode?this.removeEventListener(t,i):n.removeEventListener(e,i,!0),F.remove(o,t))}}}),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){r.event.special[e]={delegateType:t,bindType:t,handle:function(i){var n,o=this,a=i.relatedTarget,u=i.handleObj;return(!a||a!==o&&!r.contains(o,a))&&(i.type=u.origType,n=u.handler.apply(this,arguments),i.type=t),n}}}),r.fn.extend({on:function(e,t,i,n){return Mt(this,e,t,i,n)},one:function(e,t,i,n){return Mt(this,e,t,i,n,1)},off:function(e,t,i){var n,o;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,r(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if(typeof e=="object"){for(o in e)this.off(o,t,e[o]);return this}return(t===!1||typeof t=="function")&&(i=t,t=void 0),i===!1&&(i=Ge),this.each(function(){r.event.remove(this,e,i,t)})}});var Qn=/<script|<style|<link/i,Kn=/checked\s*(?:[^=]|=\s*.checked.)/i,Jn=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function vi(e,t){return Z(e,"table")&&Z(t.nodeType!==11?t:t.firstChild,"tr")&&r(e).children("tbody")[0]||e}function Zn(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function er(e){return(e.type||"").slice(0,5)==="true/"?e.type=e.type.slice(5):e.removeAttribute("type"),e}function bi(e,t){var i,n,o,a,u,c,f;if(t.nodeType===1){if(F.hasData(e)&&(a=F.get(e),f=a.events,f)){F.remove(t,"handle events");for(o in f)for(i=0,n=f[o].length;i<n;i++)r.event.add(t,o,f[o][i])}le.hasData(e)&&(u=le.access(e),c=r.extend({},u),le.set(t,c))}}function tr(e,t){var i=t.nodeName.toLowerCase();i==="input"&&st.test(e.type)?t.checked=e.checked:(i==="input"||i==="textarea")&&(t.defaultValue=e.defaultValue)}function Ye(e,t,i,n){t=D(t);var o,a,u,c,f,p,b=0,T=e.length,y=T-1,w=t[0],B=q(w);if(B||T>1&&typeof w=="string"&&!M.checkClone&&Kn.test(w))return e.each(function(X){var W=e.eq(X);B&&(t[0]=w.call(this,X,W.html())),Ye(W,t,i,n)});if(T&&(o=mi(t,e[0].ownerDocument,!1,e,n),a=o.firstChild,o.childNodes.length===1&&(o=a),a||n)){for(u=r.map(fe(o,"script"),Zn),c=u.length;b<T;b++)f=o,b!==y&&(f=r.clone(f,!0,!0),c&&r.merge(u,fe(f,"script"))),i.call(e[b],f,b);if(c)for(p=u[u.length-1].ownerDocument,r.map(u,er),b=0;b<c;b++)f=u[b],gi.test(f.type||"")&&!F.access(f,"globalEval")&&r.contains(p,f)&&(f.src&&(f.type||"").toLowerCase()!=="module"?r._evalUrl&&!f.noModule&&r._evalUrl(f.src,{nonce:f.nonce||f.getAttribute("nonce")},p):pt(f.textContent.replace(Jn,""),f,p))}return e}function xi(e,t,i){for(var n,o=t?r.filter(t,e):e,a=0;(n=o[a])!=null;a++)!i&&n.nodeType===1&&r.cleanData(fe(n)),n.parentNode&&(i&&$e(n)&&Ft(fe(n,"script")),n.parentNode.removeChild(n));return e}r.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,o,a,u,c=e.cloneNode(!0),f=$e(e);if(!M.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!r.isXMLDoc(e))for(u=fe(c),a=fe(e),n=0,o=a.length;n<o;n++)tr(a[n],u[n]);if(t)if(i)for(a=a||fe(e),u=u||fe(c),n=0,o=a.length;n<o;n++)bi(a[n],u[n]);else bi(e,c);return u=fe(c,"script"),u.length>0&&Ft(u,!f&&fe(e,"script")),c},cleanData:function(e){for(var t,i,n,o=r.event.special,a=0;(i=e[a])!==void 0;a++)if(it(i)){if(t=i[F.expando]){if(t.events)for(n in t.events)o[n]?r.event.remove(i,n):r.removeEvent(i,n,t.handle);i[F.expando]=void 0}i[le.expando]&&(i[le.expando]=void 0)}}}),r.fn.extend({detach:function(e){return xi(this,e,!0)},remove:function(e){return xi(this,e)},text:function(e){return Ee(this,function(t){return t===void 0?r.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=t)})},null,e,arguments.length)},append:function(){return Ye(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=vi(this,e);t.appendChild(e)}})},prepend:function(){return Ye(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=vi(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ye(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ye(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(r.cleanData(fe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e??!1,t=t??e,this.map(function(){return r.clone(this,e,t)})},html:function(e){return Ee(this,function(t){var i=this[0]||{},n=0,o=this.length;if(t===void 0&&i.nodeType===1)return i.innerHTML;if(typeof t=="string"&&!Qn.test(t)&&!de[(pi.exec(t)||["",""])[1].toLowerCase()]){t=r.htmlPrefilter(t);try{for(;n<o;n++)i=this[n]||{},i.nodeType===1&&(r.cleanData(fe(i,!1)),i.innerHTML=t);i=0}catch{}}i&&this.empty().append(t)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ye(this,arguments,function(t){var i=this.parentNode;r.inArray(this,e)<0&&(r.cleanData(fe(this)),i&&i.replaceChild(t,this))},e)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){r.fn[e]=function(i){for(var n,o=[],a=r(i),u=a.length-1,c=0;c<=u;c++)n=c===u?this:this.clone(!0),r(a[c])[t](n),I.apply(o,n.get());return this.pushStack(o)}});var Pt=new RegExp("^("+ci+")(?!px)[a-z%]+$","i"),It=/^--/,bt=function(e){var t=e.ownerDocument.defaultView;return(!t||!t.opener)&&(t=s),t.getComputedStyle(e)},Ti=function(e,t,i){var n,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];n=i.call(e);for(o in t)e.style[o]=a[o];return n},ir=new RegExp(Ne.join("|"),"i");(function(){function e(){if(p){f.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",p.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",qe.appendChild(f).appendChild(p);var b=s.getComputedStyle(p);i=b.top!=="1%",c=t(b.marginLeft)===12,p.style.right="60%",a=t(b.right)===36,n=t(b.width)===36,p.style.position="absolute",o=t(p.offsetWidth/3)===12,qe.removeChild(f),p=null}}function t(b){return Math.round(parseFloat(b))}var i,n,o,a,u,c,f=j.createElement("div"),p=j.createElement("div");p.style&&(p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",M.clearCloneStyle=p.style.backgroundClip==="content-box",r.extend(M,{boxSizingReliable:function(){return e(),n},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var b,T,y,w;return u==null&&(b=j.createElement("table"),T=j.createElement("tr"),y=j.createElement("div"),b.style.cssText="position:absolute;left:-11111px;border-collapse:separate",T.style.cssText="box-sizing:content-box;border:1px solid",T.style.height="1px",y.style.height="9px",y.style.display="block",qe.appendChild(b).appendChild(T).appendChild(y),w=s.getComputedStyle(T),u=parseInt(w.height,10)+parseInt(w.borderTopWidth,10)+parseInt(w.borderBottomWidth,10)===T.offsetHeight,qe.removeChild(b)),u}}))})();function ot(e,t,i){var n,o,a,u,c=It.test(t),f=e.style;return i=i||bt(e),i&&(u=i.getPropertyValue(t)||i[t],c&&u&&(u=u.replace(tt,"$1")||void 0),u===""&&!$e(e)&&(u=r.style(e,t)),!M.pixelBoxStyles()&&Pt.test(u)&&ir.test(t)&&(n=f.width,o=f.minWidth,a=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=i.width,f.width=n,f.minWidth=o,f.maxWidth=a)),u!==void 0?u+"":u}function Si(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}var Ci=["Webkit","Moz","ms"],wi=j.createElement("div").style,ki={};function nr(e){for(var t=e[0].toUpperCase()+e.slice(1),i=Ci.length;i--;)if(e=Ci[i]+t,e in wi)return e}function qt(e){var t=r.cssProps[e]||ki[e];return t||(e in wi?e:ki[e]=nr(e)||e)}var rr=/^(none|table(?!-c[ea]).+)/,sr={position:"absolute",visibility:"hidden",display:"block"},Di={letterSpacing:"0",fontWeight:"400"};function Ai(e,t,i){var n=rt.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function jt(e,t,i,n,o,a){var u=t==="width"?1:0,c=0,f=0,p=0;if(i===(n?"border":"content"))return 0;for(;u<4;u+=2)i==="margin"&&(p+=r.css(e,i+Ne[u],!0,o)),n?(i==="content"&&(f-=r.css(e,"padding"+Ne[u],!0,o)),i!=="margin"&&(f-=r.css(e,"border"+Ne[u]+"Width",!0,o))):(f+=r.css(e,"padding"+Ne[u],!0,o),i!=="padding"?f+=r.css(e,"border"+Ne[u]+"Width",!0,o):c+=r.css(e,"border"+Ne[u]+"Width",!0,o));return!n&&a>=0&&(f+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-f-c-.5))||0),f+p}function Ei(e,t,i){var n=bt(e),o=!M.boxSizingReliable()||i,a=o&&r.css(e,"boxSizing",!1,n)==="border-box",u=a,c=ot(e,t,n),f="offset"+t[0].toUpperCase()+t.slice(1);if(Pt.test(c)){if(!i)return c;c="auto"}return(!M.boxSizingReliable()&&a||!M.reliableTrDimensions()&&Z(e,"tr")||c==="auto"||!parseFloat(c)&&r.css(e,"display",!1,n)==="inline")&&e.getClientRects().length&&(a=r.css(e,"boxSizing",!1,n)==="border-box",u=f in e,u&&(c=e[f])),c=parseFloat(c)||0,c+jt(e,t,i||(a?"border":"content"),u,n,c)+"px"}r.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=ot(e,"opacity");return i===""?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,i,n){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var o,a,u,c=xe(t),f=It.test(t),p=e.style;if(f||(t=qt(c)),u=r.cssHooks[t]||r.cssHooks[c],i!==void 0){if(a=typeof i,a==="string"&&(o=rt.exec(i))&&o[1]&&(i=hi(e,t,o),a="number"),i==null||i!==i)return;a==="number"&&!f&&(i+=o&&o[3]||(r.cssNumber[c]?"":"px")),!M.clearCloneStyle&&i===""&&t.indexOf("background")===0&&(p[t]="inherit"),(!u||!("set"in u)||(i=u.set(e,i,n))!==void 0)&&(f?p.setProperty(t,i):p[t]=i)}else return u&&"get"in u&&(o=u.get(e,!1,n))!==void 0?o:p[t]}},css:function(e,t,i,n){var o,a,u,c=xe(t),f=It.test(t);return f||(t=qt(c)),u=r.cssHooks[t]||r.cssHooks[c],u&&"get"in u&&(o=u.get(e,!0,i)),o===void 0&&(o=ot(e,t,n)),o==="normal"&&t in Di&&(o=Di[t]),i===""||i?(a=parseFloat(o),i===!0||isFinite(a)?a||0:o):o}}),r.each(["height","width"],function(e,t){r.cssHooks[t]={get:function(i,n,o){if(n)return rr.test(r.css(i,"display"))&&(!i.getClientRects().length||!i.getBoundingClientRect().width)?Ti(i,sr,function(){return Ei(i,t,o)}):Ei(i,t,o)},set:function(i,n,o){var a,u=bt(i),c=!M.scrollboxSize()&&u.position==="absolute",f=c||o,p=f&&r.css(i,"boxSizing",!1,u)==="border-box",b=o?jt(i,t,o,p,u):0;return p&&c&&(b-=Math.ceil(i["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(u[t])-jt(i,t,"border",!1,u)-.5)),b&&(a=rt.exec(n))&&(a[3]||"px")!=="px"&&(i.style[t]=n,n=r.css(i,t)),Ai(i,n,b)}}}),r.cssHooks.marginLeft=Si(M.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ot(e,"marginLeft"))||e.getBoundingClientRect().left-Ti(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(e,t){r.cssHooks[e+t]={expand:function(i){for(var n=0,o={},a=typeof i=="string"?i.split(" "):[i];n<4;n++)o[e+Ne[n]+t]=a[n]||a[n-2]||a[0];return o}},e!=="margin"&&(r.cssHooks[e+t].set=Ai)}),r.fn.extend({css:function(e,t){return Ee(this,function(i,n,o){var a,u,c={},f=0;if(Array.isArray(n)){for(a=bt(i),u=n.length;f<u;f++)c[n[f]]=r.css(i,n[f],!1,a);return c}return o!==void 0?r.style(i,n,o):r.css(i,n)},e,t,arguments.length>1)}});function ce(e,t,i,n,o){return new ce.prototype.init(e,t,i,n,o)}r.Tween=ce,ce.prototype={constructor:ce,init:function(e,t,i,n,o,a){this.elem=e,this.prop=i,this.easing=o||r.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=a||(r.cssNumber[i]?"":"px")},cur:function(){var e=ce.propHooks[this.prop];return e&&e.get?e.get(this):ce.propHooks._default.get(this)},run:function(e){var t,i=ce.propHooks[this.prop];return this.options.duration?this.pos=t=r.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ce.propHooks._default.set(this),this}},ce.prototype.init.prototype=ce.prototype,ce.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=r.css(e.elem,e.prop,""),!t||t==="auto"?0:t)},set:function(e){r.fx.step[e.prop]?r.fx.step[e.prop](e):e.elem.nodeType===1&&(r.cssHooks[e.prop]||e.elem.style[qt(e.prop)]!=null)?r.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},ce.propHooks.scrollTop=ce.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},r.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:"swing"},r.fx=ce.prototype.init,r.fx.step={};var Qe,xt,or=/^(?:toggle|show|hide)$/,ar=/queueHooks$/;function Ht(){xt&&(j.hidden===!1&&s.requestAnimationFrame?s.requestAnimationFrame(Ht):s.setTimeout(Ht,r.fx.interval),r.fx.tick())}function Ni(){return s.setTimeout(function(){Qe=void 0}),Qe=Date.now()}function Tt(e,t){var i,n=0,o={height:e};for(t=t?1:0;n<4;n+=2-t)i=Ne[n],o["margin"+i]=o["padding"+i]=e;return t&&(o.opacity=o.width=e),o}function Ri(e,t,i){for(var n,o=(me.tweeners[t]||[]).concat(me.tweeners["*"]),a=0,u=o.length;a<u;a++)if(n=o[a].call(i,t,e))return n}function ur(e,t,i){var n,o,a,u,c,f,p,b,T="width"in t||"height"in t,y=this,w={},B=e.style,X=e.nodeType&&yt(e),W=F.get(e,"fxshow");i.queue||(u=r._queueHooks(e,"fx"),u.unqueued==null&&(u.unqueued=0,c=u.empty.fire,u.empty.fire=function(){u.unqueued||c()}),u.unqueued++,y.always(function(){y.always(function(){u.unqueued--,r.queue(e,"fx").length||u.empty.fire()})}));for(n in t)if(o=t[n],or.test(o)){if(delete t[n],a=a||o==="toggle",o===(X?"hide":"show"))if(o==="show"&&W&&W[n]!==void 0)X=!0;else continue;w[n]=W&&W[n]||r.style(e,n)}if(f=!r.isEmptyObject(t),!(!f&&r.isEmptyObject(w))){T&&e.nodeType===1&&(i.overflow=[B.overflow,B.overflowX,B.overflowY],p=W&&W.display,p==null&&(p=F.get(e,"display")),b=r.css(e,"display"),b==="none"&&(p?b=p:(ze([e],!0),p=e.style.display||p,b=r.css(e,"display"),ze([e]))),(b==="inline"||b==="inline-block"&&p!=null)&&r.css(e,"float")==="none"&&(f||(y.done(function(){B.display=p}),p==null&&(b=B.display,p=b==="none"?"":b)),B.display="inline-block")),i.overflow&&(B.overflow="hidden",y.always(function(){B.overflow=i.overflow[0],B.overflowX=i.overflow[1],B.overflowY=i.overflow[2]})),f=!1;for(n in w)f||(W?"hidden"in W&&(X=W.hidden):W=F.access(e,"fxshow",{display:p}),a&&(W.hidden=!X),X&&ze([e],!0),y.done(function(){X||ze([e]),F.remove(e,"fxshow");for(n in w)r.style(e,n,w[n])})),f=Ri(X?W[n]:0,n,y),n in W||(W[n]=f.start,X&&(f.end=f.start,f.start=0))}}function lr(e,t){var i,n,o,a,u;for(i in e)if(n=xe(i),o=t[n],a=e[i],Array.isArray(a)&&(o=a[1],a=e[i]=a[0]),i!==n&&(e[n]=a,delete e[i]),u=r.cssHooks[n],u&&"expand"in u){a=u.expand(a),delete e[n];for(i in a)i in e||(e[i]=a[i],t[i]=o)}else t[n]=o}function me(e,t,i){var n,o,a=0,u=me.prefilters.length,c=r.Deferred().always(function(){delete f.elem}),f=function(){if(o)return!1;for(var T=Qe||Ni(),y=Math.max(0,p.startTime+p.duration-T),w=y/p.duration||0,B=1-w,X=0,W=p.tweens.length;X<W;X++)p.tweens[X].run(B);return c.notifyWith(e,[p,B,y]),B<1&&W?y:(W||c.notifyWith(e,[p,1,0]),c.resolveWith(e,[p]),!1)},p=c.promise({elem:e,props:r.extend({},t),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},i),originalProperties:t,originalOptions:i,startTime:Qe||Ni(),duration:i.duration,tweens:[],createTween:function(T,y){var w=r.Tween(e,p.opts,T,y,p.opts.specialEasing[T]||p.opts.easing);return p.tweens.push(w),w},stop:function(T){var y=0,w=T?p.tweens.length:0;if(o)return this;for(o=!0;y<w;y++)p.tweens[y].run(1);return T?(c.notifyWith(e,[p,1,0]),c.resolveWith(e,[p,T])):c.rejectWith(e,[p,T]),this}}),b=p.props;for(lr(b,p.opts.specialEasing);a<u;a++)if(n=me.prefilters[a].call(p,e,b,p.opts),n)return q(n.stop)&&(r._queueHooks(p.elem,p.opts.queue).stop=n.stop.bind(n)),n;return r.map(b,Ri,p),q(p.opts.start)&&p.opts.start.call(e,p),p.progress(p.opts.progress).done(p.opts.done,p.opts.complete).fail(p.opts.fail).always(p.opts.always),r.fx.timer(r.extend(f,{elem:e,anim:p,queue:p.opts.queue})),p}r.Animation=r.extend(me,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return hi(i.elem,e,rt.exec(t),i),i}]},tweener:function(e,t){q(e)?(t=e,e=["*"]):e=e.match(be);for(var i,n=0,o=e.length;n<o;n++)i=e[n],me.tweeners[i]=me.tweeners[i]||[],me.tweeners[i].unshift(t)},prefilters:[ur],prefilter:function(e,t){t?me.prefilters.unshift(e):me.prefilters.push(e)}}),r.speed=function(e,t,i){var n=e&&typeof e=="object"?r.extend({},e):{complete:i||!i&&t||q(e)&&e,duration:e,easing:i&&t||t&&!q(t)&&t};return r.fx.off?n.duration=0:typeof n.duration!="number"&&(n.duration in r.fx.speeds?n.duration=r.fx.speeds[n.duration]:n.duration=r.fx.speeds._default),(n.queue==null||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){q(n.old)&&n.old.call(this),n.queue&&r.dequeue(this,n.queue)},n},r.fn.extend({fadeTo:function(e,t,i,n){return this.filter(yt).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var o=r.isEmptyObject(e),a=r.speed(t,i,n),u=function(){var c=me(this,r.extend({},e),a);(o||F.get(this,"finish"))&&c.stop(!0)};return u.finish=u,o||a.queue===!1?this.each(u):this.queue(a.queue,u)},stop:function(e,t,i){var n=function(o){var a=o.stop;delete o.stop,a(i)};return typeof e!="string"&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var o=!0,a=e!=null&&e+"queueHooks",u=r.timers,c=F.get(this);if(a)c[a]&&c[a].stop&&n(c[a]);else for(a in c)c[a]&&c[a].stop&&ar.test(a)&&n(c[a]);for(a=u.length;a--;)u[a].elem===this&&(e==null||u[a].queue===e)&&(u[a].anim.stop(i),o=!1,u.splice(a,1));(o||!i)&&r.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,i=F.get(this),n=i[e+"queue"],o=i[e+"queueHooks"],a=r.timers,u=n?n.length:0;for(i.finish=!0,r.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<u;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),r.each(["toggle","show","hide"],function(e,t){var i=r.fn[t];r.fn[t]=function(n,o,a){return n==null||typeof n=="boolean"?i.apply(this,arguments):this.animate(Tt(t,!0),n,o,a)}}),r.each({slideDown:Tt("show"),slideUp:Tt("hide"),slideToggle:Tt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){r.fn[e]=function(i,n,o){return this.animate(t,i,n,o)}}),r.timers=[],r.fx.tick=function(){var e,t=0,i=r.timers;for(Qe=Date.now();t<i.length;t++)e=i[t],!e()&&i[t]===e&&i.splice(t--,1);i.length||r.fx.stop(),Qe=void 0},r.fx.timer=function(e){r.timers.push(e),r.fx.start()},r.fx.interval=13,r.fx.start=function(){xt||(xt=!0,Ht())},r.fx.stop=function(){xt=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(e,t){return e=r.fx&&r.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(i,n){var o=s.setTimeout(i,e);n.stop=function(){s.clearTimeout(o)}})},(function(){var e=j.createElement("input"),t=j.createElement("select"),i=t.appendChild(j.createElement("option"));e.type="checkbox",M.checkOn=e.value!=="",M.optSelected=i.selected,e=j.createElement("input"),e.value="t",e.type="radio",M.radioValue=e.value==="t"})();var Li,at=r.expr.attrHandle;r.fn.extend({attr:function(e,t){return Ee(this,r.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){r.removeAttr(this,e)})}}),r.extend({attr:function(e,t,i){var n,o,a=e.nodeType;if(!(a===3||a===8||a===2)){if(typeof e.getAttribute>"u")return r.prop(e,t,i);if((a!==1||!r.isXMLDoc(e))&&(o=r.attrHooks[t.toLowerCase()]||(r.expr.match.bool.test(t)?Li:void 0)),i!==void 0){if(i===null){r.removeAttr(e,t);return}return o&&"set"in o&&(n=o.set(e,i,t))!==void 0?n:(e.setAttribute(t,i+""),i)}return o&&"get"in o&&(n=o.get(e,t))!==null?n:(n=r.find.attr(e,t),n??void 0)}},attrHooks:{type:{set:function(e,t){if(!M.radioValue&&t==="radio"&&Z(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,o=t&&t.match(be);if(o&&e.nodeType===1)for(;i=o[n++];)e.removeAttribute(i)}}),Li={set:function(e,t,i){return t===!1?r.removeAttr(e,i):e.setAttribute(i,i),i}},r.each(r.expr.match.bool.source.match(/\w+/g),function(e,t){var i=at[t]||r.find.attr;at[t]=function(n,o,a){var u,c,f=o.toLowerCase();return a||(c=at[f],at[f]=u,u=i(n,o,a)!=null?f:null,at[f]=c),u}});var fr=/^(?:input|select|textarea|button)$/i,cr=/^(?:a|area)$/i;r.fn.extend({prop:function(e,t){return Ee(this,r.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[r.propFix[e]||e]})}}),r.extend({prop:function(e,t,i){var n,o,a=e.nodeType;if(!(a===3||a===8||a===2))return(a!==1||!r.isXMLDoc(e))&&(t=r.propFix[t]||t,o=r.propHooks[t]),i!==void 0?o&&"set"in o&&(n=o.set(e,i,t))!==void 0?n:e[t]=i:o&&"get"in o&&(n=o.get(e,t))!==null?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=r.find.attr(e,"tabindex");return t?parseInt(t,10):fr.test(e.nodeName)||cr.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),M.optSelected||(r.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function je(e){var t=e.match(be)||[];return t.join(" ")}function He(e){return e.getAttribute&&e.getAttribute("class")||""}function Bt(e){return Array.isArray(e)?e:typeof e=="string"?e.match(be)||[]:[]}r.fn.extend({addClass:function(e){var t,i,n,o,a,u;return q(e)?this.each(function(c){r(this).addClass(e.call(this,c,He(this)))}):(t=Bt(e),t.length?this.each(function(){if(n=He(this),i=this.nodeType===1&&" "+je(n)+" ",i){for(a=0;a<t.length;a++)o=t[a],i.indexOf(" "+o+" ")<0&&(i+=o+" ");u=je(i),n!==u&&this.setAttribute("class",u)}}):this)},removeClass:function(e){var t,i,n,o,a,u;return q(e)?this.each(function(c){r(this).removeClass(e.call(this,c,He(this)))}):arguments.length?(t=Bt(e),t.length?this.each(function(){if(n=He(this),i=this.nodeType===1&&" "+je(n)+" ",i){for(a=0;a<t.length;a++)for(o=t[a];i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");u=je(i),n!==u&&this.setAttribute("class",u)}}):this):this.attr("class","")},toggleClass:function(e,t){var i,n,o,a,u=typeof e,c=u==="string"||Array.isArray(e);return q(e)?this.each(function(f){r(this).toggleClass(e.call(this,f,He(this),t),t)}):typeof t=="boolean"&&c?t?this.addClass(e):this.removeClass(e):(i=Bt(e),this.each(function(){if(c)for(a=r(this),o=0;o<i.length;o++)n=i[o],a.hasClass(n)?a.removeClass(n):a.addClass(n);else(e===void 0||u==="boolean")&&(n=He(this),n&&F.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||e===!1?"":F.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(i.nodeType===1&&(" "+je(He(i))+" ").indexOf(t)>-1)return!0;return!1}});var hr=/\r/g;r.fn.extend({val:function(e){var t,i,n,o=this[0];return arguments.length?(n=q(e),this.each(function(a){var u;this.nodeType===1&&(n?u=e.call(this,a,r(this).val()):u=e,u==null?u="":typeof u=="number"?u+="":Array.isArray(u)&&(u=r.map(u,function(c){return c==null?"":c+""})),t=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],(!t||!("set"in t)||t.set(this,u,"value")===void 0)&&(this.value=u))})):o?(t=r.valHooks[o.type]||r.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&(i=t.get(o,"value"))!==void 0?i:(i=o.value,typeof i=="string"?i.replace(hr,""):i??"")):void 0}}),r.extend({valHooks:{option:{get:function(e){var t=r.find.attr(e,"value");return t??je(r.text(e))}},select:{get:function(e){var t,i,n,o=e.options,a=e.selectedIndex,u=e.type==="select-one",c=u?null:[],f=u?a+1:o.length;for(a<0?n=f:n=u?a:0;n<f;n++)if(i=o[n],(i.selected||n===a)&&!i.disabled&&(!i.parentNode.disabled||!Z(i.parentNode,"optgroup"))){if(t=r(i).val(),u)return t;c.push(t)}return c},set:function(e,t){for(var i,n,o=e.options,a=r.makeArray(t),u=o.length;u--;)n=o[u],(n.selected=r.inArray(r.valHooks.option.get(n),a)>-1)&&(i=!0);return i||(e.selectedIndex=-1),a}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=r.inArray(r(e).val(),t)>-1}},M.checkOn||(r.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})});var ut=s.location,Fi={guid:Date.now()},Ot=/\?/;r.parseXML=function(e){var t,i;if(!e||typeof e!="string")return null;try{t=new s.DOMParser().parseFromString(e,"text/xml")}catch{}return i=t&&t.getElementsByTagName("parsererror")[0],(!t||i)&&r.error("Invalid XML: "+(i?r.map(i.childNodes,function(n){return n.textContent}).join(`
4
+ `):e)),t};var Mi=/^(?:focusinfocus|focusoutblur)$/,Pi=function(e){e.stopPropagation()};r.extend(r.event,{trigger:function(e,t,i,n){var o,a,u,c,f,p,b,T,y=[i||j],w=ne.call(e,"type")?e.type:e,B=ne.call(e,"namespace")?e.namespace.split("."):[];if(a=T=u=i=i||j,!(i.nodeType===3||i.nodeType===8)&&!Mi.test(w+r.event.triggered)&&(w.indexOf(".")>-1&&(B=w.split("."),w=B.shift(),B.sort()),f=w.indexOf(":")<0&&"on"+w,e=e[r.expando]?e:new r.Event(w,typeof e=="object"&&e),e.isTrigger=n?2:3,e.namespace=B.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+B.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=t==null?[e]:r.makeArray(t,[e]),b=r.event.special[w]||{},!(!n&&b.trigger&&b.trigger.apply(i,t)===!1))){if(!n&&!b.noBubble&&!ae(i)){for(c=b.delegateType||w,Mi.test(c+w)||(a=a.parentNode);a;a=a.parentNode)y.push(a),u=a;u===(i.ownerDocument||j)&&y.push(u.defaultView||u.parentWindow||s)}for(o=0;(a=y[o++])&&!e.isPropagationStopped();)T=a,e.type=o>1?c:b.bindType||w,p=(F.get(a,"events")||Object.create(null))[e.type]&&F.get(a,"handle"),p&&p.apply(a,t),p=f&&a[f],p&&p.apply&&it(a)&&(e.result=p.apply(a,t),e.result===!1&&e.preventDefault());return e.type=w,!n&&!e.isDefaultPrevented()&&(!b._default||b._default.apply(y.pop(),t)===!1)&&it(i)&&f&&q(i[w])&&!ae(i)&&(u=i[f],u&&(i[f]=null),r.event.triggered=w,e.isPropagationStopped()&&T.addEventListener(w,Pi),i[w](),e.isPropagationStopped()&&T.removeEventListener(w,Pi),r.event.triggered=void 0,u&&(i[f]=u)),e.result}},simulate:function(e,t,i){var n=r.extend(new r.Event,i,{type:e,isSimulated:!0});r.event.trigger(n,null,t)}}),r.fn.extend({trigger:function(e,t){return this.each(function(){r.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return r.event.trigger(e,t,i,!0)}});var dr=/\[\]$/,Ii=/\r?\n/g,pr=/^(?:submit|button|image|reset|file)$/i,gr=/^(?:input|select|textarea|keygen)/i;function Wt(e,t,i,n){var o;if(Array.isArray(t))r.each(t,function(a,u){i||dr.test(e)?n(e,u):Wt(e+"["+(typeof u=="object"&&u!=null?a:"")+"]",u,i,n)});else if(!i&&_e(t)==="object")for(o in t)Wt(e+"["+o+"]",t[o],i,n);else n(e,t)}r.param=function(e,t){var i,n=[],o=function(a,u){var c=q(u)?u():u;n[n.length]=encodeURIComponent(a)+"="+encodeURIComponent(c??"")};if(e==null)return"";if(Array.isArray(e)||e.jquery&&!r.isPlainObject(e))r.each(e,function(){o(this.name,this.value)});else for(i in e)Wt(i,e[i],t,o);return n.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=r.prop(this,"elements");return e?r.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!r(this).is(":disabled")&&gr.test(this.nodeName)&&!pr.test(e)&&(this.checked||!st.test(e))}).map(function(e,t){var i=r(this).val();return i==null?null:Array.isArray(i)?r.map(i,function(n){return{name:t.name,value:n.replace(Ii,`\r
5
+ `)}}):{name:t.name,value:i.replace(Ii,`\r
6
+ `)}}).get()}});var mr=/%20/g,yr=/#.*$/,vr=/([?&])_=[^&]*/,br=/^(.*?):[ \t]*([^\r\n]*)$/mg,xr=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tr=/^(?:GET|HEAD)$/,Sr=/^\/\//,qi={},_t={},ji="*/".concat("*"),Vt=j.createElement("a");Vt.href=ut.href;function Hi(e){return function(t,i){typeof t!="string"&&(i=t,t="*");var n,o=0,a=t.toLowerCase().match(be)||[];if(q(i))for(;n=a[o++];)n[0]==="+"?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Bi(e,t,i,n){var o={},a=e===_t;function u(c){var f;return o[c]=!0,r.each(e[c]||[],function(p,b){var T=b(t,i,n);if(typeof T=="string"&&!a&&!o[T])return t.dataTypes.unshift(T),u(T),!1;if(a)return!(f=T)}),f}return u(t.dataTypes[0])||!o["*"]&&u("*")}function Ut(e,t){var i,n,o=r.ajaxSettings.flatOptions||{};for(i in t)t[i]!==void 0&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&r.extend(!0,e,n),e}function Cr(e,t,i){for(var n,o,a,u,c=e.contents,f=e.dataTypes;f[0]==="*";)f.shift(),n===void 0&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n){for(o in c)if(c[o]&&c[o].test(n)){f.unshift(o);break}}if(f[0]in i)a=f[0];else{for(o in i){if(!f[0]||e.converters[o+" "+f[0]]){a=o;break}u||(u=o)}a=a||u}if(a)return a!==f[0]&&f.unshift(a),i[a]}function wr(e,t,i,n){var o,a,u,c,f,p={},b=e.dataTypes.slice();if(b[1])for(u in e.converters)p[u.toLowerCase()]=e.converters[u];for(a=b.shift();a;)if(e.responseFields[a]&&(i[e.responseFields[a]]=t),!f&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),f=a,a=b.shift(),a){if(a==="*")a=f;else if(f!=="*"&&f!==a){if(u=p[f+" "+a]||p["* "+a],!u){for(o in p)if(c=o.split(" "),c[1]===a&&(u=p[f+" "+c[0]]||p["* "+c[0]],u)){u===!0?u=p[o]:p[o]!==!0&&(a=c[0],b.unshift(c[1]));break}}if(u!==!0)if(u&&e.throws)t=u(t);else try{t=u(t)}catch(T){return{state:"parsererror",error:u?T:"No conversion from "+f+" to "+a}}}}return{state:"success",data:t}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ut.href,type:"GET",isLocal:xr.test(ut.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ji,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,r.ajaxSettings),t):Ut(r.ajaxSettings,e)},ajaxPrefilter:Hi(qi),ajaxTransport:Hi(_t),ajax:function(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};var i,n,o,a,u,c,f,p,b,T,y=r.ajaxSetup({},t),w=y.context||y,B=y.context&&(w.nodeType||w.jquery)?r(w):r.event,X=r.Deferred(),W=r.Callbacks("once memory"),re=y.statusCode||{},ie={},Te={},Se="canceled",z={readyState:0,getResponseHeader:function(G){var te;if(f){if(!a)for(a={};te=br.exec(o);)a[te[1].toLowerCase()+" "]=(a[te[1].toLowerCase()+" "]||[]).concat(te[2]);te=a[G.toLowerCase()+" "]}return te==null?null:te.join(", ")},getAllResponseHeaders:function(){return f?o:null},setRequestHeader:function(G,te){return f==null&&(G=Te[G.toLowerCase()]=Te[G.toLowerCase()]||G,ie[G]=te),this},overrideMimeType:function(G){return f==null&&(y.mimeType=G),this},statusCode:function(G){var te;if(G)if(f)z.always(G[z.status]);else for(te in G)re[te]=[re[te],G[te]];return this},abort:function(G){var te=G||Se;return i&&i.abort(te),Be(0,te),this}};if(X.promise(z),y.url=((e||y.url||ut.href)+"").replace(Sr,ut.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(be)||[""],y.crossDomain==null){c=j.createElement("a");try{c.href=y.url,c.href=c.href,y.crossDomain=Vt.protocol+"//"+Vt.host!=c.protocol+"//"+c.host}catch{y.crossDomain=!0}}if(y.data&&y.processData&&typeof y.data!="string"&&(y.data=r.param(y.data,y.traditional)),Bi(qi,y,t,z),f)return z;p=r.event&&y.global,p&&r.active++===0&&r.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Tr.test(y.type),n=y.url.replace(yr,""),y.hasContent?y.data&&y.processData&&(y.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(y.data=y.data.replace(mr,"+")):(T=y.url.slice(n.length),y.data&&(y.processData||typeof y.data=="string")&&(n+=(Ot.test(n)?"&":"?")+y.data,delete y.data),y.cache===!1&&(n=n.replace(vr,"$1"),T=(Ot.test(n)?"&":"?")+"_="+Fi.guid+++T),y.url=n+T),y.ifModified&&(r.lastModified[n]&&z.setRequestHeader("If-Modified-Since",r.lastModified[n]),r.etag[n]&&z.setRequestHeader("If-None-Match",r.etag[n])),(y.data&&y.hasContent&&y.contentType!==!1||t.contentType)&&z.setRequestHeader("Content-Type",y.contentType),z.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+(y.dataTypes[0]!=="*"?", "+ji+"; q=0.01":""):y.accepts["*"]);for(b in y.headers)z.setRequestHeader(b,y.headers[b]);if(y.beforeSend&&(y.beforeSend.call(w,z,y)===!1||f))return z.abort();if(Se="abort",W.add(y.complete),z.done(y.success),z.fail(y.error),i=Bi(_t,y,t,z),!i)Be(-1,"No Transport");else{if(z.readyState=1,p&&B.trigger("ajaxSend",[z,y]),f)return z;y.async&&y.timeout>0&&(u=s.setTimeout(function(){z.abort("timeout")},y.timeout));try{f=!1,i.send(ie,Be)}catch(G){if(f)throw G;Be(-1,G)}}function Be(G,te,ft,zt){var Ce,ct,we,Fe,Me,pe=te;f||(f=!0,u&&s.clearTimeout(u),i=void 0,o=zt||"",z.readyState=G>0?4:0,Ce=G>=200&&G<300||G===304,ft&&(Fe=Cr(y,z,ft)),!Ce&&r.inArray("script",y.dataTypes)>-1&&r.inArray("json",y.dataTypes)<0&&(y.converters["text script"]=function(){}),Fe=wr(y,Fe,z,Ce),Ce?(y.ifModified&&(Me=z.getResponseHeader("Last-Modified"),Me&&(r.lastModified[n]=Me),Me=z.getResponseHeader("etag"),Me&&(r.etag[n]=Me)),G===204||y.type==="HEAD"?pe="nocontent":G===304?pe="notmodified":(pe=Fe.state,ct=Fe.data,we=Fe.error,Ce=!we)):(we=pe,(G||!pe)&&(pe="error",G<0&&(G=0))),z.status=G,z.statusText=(te||pe)+"",Ce?X.resolveWith(w,[ct,pe,z]):X.rejectWith(w,[z,pe,we]),z.statusCode(re),re=void 0,p&&B.trigger(Ce?"ajaxSuccess":"ajaxError",[z,y,Ce?ct:we]),W.fireWith(w,[z,pe]),p&&(B.trigger("ajaxComplete",[z,y]),--r.active||r.event.trigger("ajaxStop")))}return z},getJSON:function(e,t,i){return r.get(e,t,i,"json")},getScript:function(e,t){return r.get(e,void 0,t,"script")}}),r.each(["get","post"],function(e,t){r[t]=function(i,n,o,a){return q(n)&&(a=a||o,o=n,n=void 0),r.ajax(r.extend({url:i,type:t,dataType:a,data:n,success:o},r.isPlainObject(i)&&i))}}),r.ajaxPrefilter(function(e){var t;for(t in e.headers)t.toLowerCase()==="content-type"&&(e.contentType=e.headers[t]||"")}),r._evalUrl=function(e,t,i){return r.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(n){r.globalEval(n,t,i)}})},r.fn.extend({wrapAll:function(e){var t;return this[0]&&(q(e)&&(e=e.call(this[0])),t=r(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var i=this;i.firstElementChild;)i=i.firstElementChild;return i}).append(this)),this},wrapInner:function(e){return q(e)?this.each(function(t){r(this).wrapInner(e.call(this,t))}):this.each(function(){var t=r(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=q(e);return this.each(function(i){r(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(e){return!r.expr.pseudos.visible(e)},r.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new s.XMLHttpRequest}catch{}};var kr={0:200,1223:204},lt=r.ajaxSettings.xhr();M.cors=!!lt&&"withCredentials"in lt,M.ajax=lt=!!lt,r.ajaxTransport(function(e){var t,i;if(M.cors||lt&&!e.crossDomain)return{send:function(n,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),!e.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");for(a in n)u.setRequestHeader(a,n[a]);t=function(c){return function(){t&&(t=i=u.onload=u.onerror=u.onabort=u.ontimeout=u.onreadystatechange=null,c==="abort"?u.abort():c==="error"?typeof u.status!="number"?o(0,"error"):o(u.status,u.statusText):o(kr[u.status]||u.status,u.statusText,(u.responseType||"text")!=="text"||typeof u.responseText!="string"?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),i=u.onerror=u.ontimeout=t("error"),u.onabort!==void 0?u.onabort=i:u.onreadystatechange=function(){u.readyState===4&&s.setTimeout(function(){t&&i()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(c){if(t)throw c}},abort:function(){t&&t()}}}),r.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return r.globalEval(e),e}}}),r.ajaxPrefilter("script",function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),r.ajaxTransport("script",function(e){if(e.crossDomain||e.scriptAttrs){var t,i;return{send:function(n,o){t=r("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(a){t.remove(),i=null,a&&o(a.type==="error"?404:200,a.type)}),j.head.appendChild(t[0])},abort:function(){i&&i()}}}});var Oi=[],$t=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Oi.pop()||r.expando+"_"+Fi.guid++;return this[e]=!0,e}}),r.ajaxPrefilter("json jsonp",function(e,t,i){var n,o,a,u=e.jsonp!==!1&&($t.test(e.url)?"url":typeof e.data=="string"&&(e.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&$t.test(e.data)&&"data");if(u||e.dataTypes[0]==="jsonp")return n=e.jsonpCallback=q(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace($t,"$1"+n):e.jsonp!==!1&&(e.url+=(Ot.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return a||r.error(n+" was not called"),a[0]},e.dataTypes[0]="json",o=s[n],s[n]=function(){a=arguments},i.always(function(){o===void 0?r(s).removeProp(n):s[n]=o,e[n]&&(e.jsonpCallback=t.jsonpCallback,Oi.push(n)),a&&q(o)&&o(a[0]),a=o=void 0}),"script"}),M.createHTMLDocument=(function(){var e=j.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",e.childNodes.length===2})(),r.parseHTML=function(e,t,i){if(typeof e!="string")return[];typeof t=="boolean"&&(i=t,t=!1);var n,o,a;return t||(M.createHTMLDocument?(t=j.implementation.createHTMLDocument(""),n=t.createElement("base"),n.href=j.location.href,t.head.appendChild(n)):t=j),o=oi.exec(e),a=!i&&[],o?[t.createElement(o[1])]:(o=mi([e],t,a),a&&a.length&&r(a).remove(),r.merge([],o.childNodes))},r.fn.load=function(e,t,i){var n,o,a,u=this,c=e.indexOf(" ");return c>-1&&(n=je(e.slice(c)),e=e.slice(0,c)),q(t)?(i=t,t=void 0):t&&typeof t=="object"&&(o="POST"),u.length>0&&r.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(f){a=arguments,u.html(n?r("<div>").append(r.parseHTML(f)).find(n):f)}).always(i&&function(f,p){u.each(function(){i.apply(this,a||[f.responseText,p,f])})}),this},r.expr.pseudos.animated=function(e){return r.grep(r.timers,function(t){return e===t.elem}).length},r.offset={setOffset:function(e,t,i){var n,o,a,u,c,f,p,b=r.css(e,"position"),T=r(e),y={};b==="static"&&(e.style.position="relative"),c=T.offset(),a=r.css(e,"top"),f=r.css(e,"left"),p=(b==="absolute"||b==="fixed")&&(a+f).indexOf("auto")>-1,p?(n=T.position(),u=n.top,o=n.left):(u=parseFloat(a)||0,o=parseFloat(f)||0),q(t)&&(t=t.call(e,i,r.extend({},c))),t.top!=null&&(y.top=t.top-c.top+u),t.left!=null&&(y.left=t.left-c.left+o),"using"in t?t.using.call(e,y):T.css(y)}},r.fn.extend({offset:function(e){if(arguments.length)return e===void 0?this:this.each(function(o){r.offset.setOffset(this,e,o)});var t,i,n=this[0];if(n)return n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,i,n=this[0],o={top:0,left:0};if(r.css(n,"position")==="fixed")t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&r.css(e,"position")==="static";)e=e.parentNode;e&&e!==n&&e.nodeType===1&&(o=r(e).offset(),o.top+=r.css(e,"borderTopWidth",!0),o.left+=r.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-r.css(n,"marginTop",!0),left:t.left-o.left-r.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&r.css(e,"position")==="static";)e=e.offsetParent;return e||qe})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i=t==="pageYOffset";r.fn[e]=function(n){return Ee(this,function(o,a,u){var c;if(ae(o)?c=o:o.nodeType===9&&(c=o.defaultView),u===void 0)return c?c[t]:o[a];c?c.scrollTo(i?c.pageXOffset:u,i?u:c.pageYOffset):o[a]=u},e,n,arguments.length)}}),r.each(["top","left"],function(e,t){r.cssHooks[t]=Si(M.pixelPosition,function(i,n){if(n)return n=ot(i,t),Pt.test(n)?r(i).position()[t]+"px":n})}),r.each({Height:"height",Width:"width"},function(e,t){r.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){r.fn[n]=function(o,a){var u=arguments.length&&(i||typeof o!="boolean"),c=i||(o===!0||a===!0?"margin":"border");return Ee(this,function(f,p,b){var T;return ae(f)?n.indexOf("outer")===0?f["inner"+e]:f.document.documentElement["client"+e]:f.nodeType===9?(T=f.documentElement,Math.max(f.body["scroll"+e],T["scroll"+e],f.body["offset"+e],T["offset"+e],T["client"+e])):b===void 0?r.css(f,p,c):r.style(f,p,b,c)},t,u?o:void 0,u)}})}),r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){r.fn[t]=function(i){return this.on(t,i)}}),r.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){r.fn[t]=function(i,n){return arguments.length>0?this.on(t,null,i,n):this.trigger(t)}});var Dr=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;r.proxy=function(e,t){var i,n,o;if(typeof t=="string"&&(i=e[t],t=e,e=i),!!q(e))return n=S.call(arguments,2),o=function(){return e.apply(t||this,n.concat(S.call(arguments)))},o.guid=e.guid=e.guid||r.guid++,o},r.holdReady=function(e){e?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=Z,r.isFunction=q,r.isWindow=ae,r.camelCase=xe,r.type=_e,r.now=Date.now,r.isNumeric=function(e){var t=r.type(e);return(t==="number"||t==="string")&&!isNaN(e-parseFloat(e))},r.trim=function(e){return e==null?"":(e+"").replace(Dr,"$1")};var Ar=s.jQuery,Er=s.$;return r.noConflict=function(e){return s.$===r&&(s.$=Er),e&&s.jQuery===r&&(s.jQuery=Ar),r},typeof h>"u"&&(s.jQuery=s.$=r),r})})(dt)),dt.exports}var Dn=kn();const An=Cn(Dn),En="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20128%20128'%20style='enable-background:new%200%200%20128%20128;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%234C4C4C;}%20%3c/style%3e%3cg%3e%3cpath%20class='st0'%20d='M110.8,44L88.4,55.5l-2.9-5.2l25.2-13.2c2.9-1.7,5.7,0,5.7,3.4v47c0,3.4-2.9,5.2-5.7,3.4L86.1,78.4l2.9-5.2%20l21.8,11.5V44z%20M110.8,44L88.4,55.5l-2.9-5.2l25.2-13.2c2.9-1.7,5.7,0,5.7,3.4v47c0,3.4-2.9,5.2-5.7,3.4L86.1,78.4l2.9-5.2%20l21.8,11.5V44z%20M110.8,41.1'/%3e%3cpath%20class='st0'%20d='M17.2,41.4v45.3c0,3.4,2.3,5.7,5.7,5.7h55c3.4,0,5.7-2.3,5.7-5.7V41.4c0-3.4-2.3-5.7-5.7-5.7H23%20C19.5,35.6,17.2,37.9,17.2,41.4L17.2,41.4z%20M11.5,41.4c0-6.3,5.2-11.5,11.5-11.5h55c6.3,0,11.5,5.2,11.5,11.5v45.3%20c0,6.3-5.2,11.5-11.5,11.5H23c-6.3,0-11.5-5.2-11.5-11.5V41.4z%20M11.5,41.4'/%3e%3cg%3e%3cpath%20class='st0'%20d='M50.5,84.6c-11.4,0-20.6-9.2-20.6-20.6c0-11.4,9.2-20.6,20.6-20.6c11.4,0,20.6,9.2,20.6,20.6%20C71.1,75.4,61.9,84.6,50.5,84.6L50.5,84.6z%20M33.7,64c0,9.3,7.5,16.8,16.8,16.8c3.9,0,7.5-1.4,10.4-3.6L37.3,53.6%20C35.1,56.5,33.7,60.1,33.7,64L33.7,64z%20M50.5,47.2c-3.9,0-7.5,1.4-10.4,3.6l23.5,23.5c2.3-2.9,3.6-6.5,3.6-10.4%20C67.2,54.7,59.7,47.2,50.5,47.2L50.5,47.2z%20M50.5,47.2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";class ii{constructor(s="play"){this.canvasEl=null,this.playBtn=null,this.audioBtn=null,this.opt=null,this.el=null,this.$el=null,this.player=null,this.beginTime="",this.streamType=2,this.videoTime=0,this.isPlaying=!1,this.isPlayStart=!1,this.isEnableAudio=!1,this.currentSpeed=1,this.isFullscreen=!1,this.resizeObserver=null,this.outerWorker=null,this.noDataImg=null,this.showControlBar=!1,this.enableDoubleClickFullscreen=!0,this.id="",this.timeCallbackFn=()=>{},this.controlCallbackFn=()=>!0,this.debug=!1,this.debugEl=null,this.debugTimer=null,this.netSpeedKb=0,this.netSpeedCache=0,this.id=s}async isSupportHardDecode(){if(!("VideoDecoder"in window)||!("EncodedVideoChunk"in window))return!1;const s=["avc1.42001E","vp8","vp9","av1"];for(const h of s)try{if(await VideoDecoder.isConfigSupported({codec:h}))return!0}catch{}return!1}init(s){this.opt=s,this.showControlBar=s.showControlBar,this.debug=!!s.debug,this.el=s.el,this.$el=An(s.el),this.initDom(),this.opt.streamType!==void 0&&(this.streamType=this.opt.streamType),this.beginTime=this.opt.beginTime,this.showControlBar&&this.initControlDom(),this.player=new Sn(this.opt.phone,this.opt.channelNo,this.$el,this.canvasEl,this.opt.lang,this.opt.renderType),this.player.port=this.opt.port,this.player.host=this.opt.host,this.player.ws=this.opt.ws,this.player.userId=this.opt.userId,this.player.tenantId=this.opt.tenantId,this.player.token=this.opt.accessToken,this.player.id=this.id,this.outerWorker=s.outerWorker,this.player.onPlaying=()=>{this.playBtn&&(this.isPlaying=!0,this.playBtn.textContent="⏸")},this.player.onPaused=()=>{this.playBtn&&(this.isPlaying=!1,this.playBtn.textContent="▶")},this.outerWorker&&(this.player.outerWorker=this.outerWorker),this.player.timeCallback=h=>{this.videoTime=h,typeof this.timeCallbackFn=="function"&&this.timeCallbackFn(h)},this.player.netSpeedCallback=(h,g)=>{this.netSpeedKb=h,this.netSpeedCache=g?.len||0},this.player.restartCallback=this.restart.bind(this),this.debug&&this.initDebugDom()}initDom(){this.$el.css({position:"relative"}),this.el.classList.add("mn-video-container");let s=document.createElement("canvas");if(this.canvasEl=s,s.setAttribute("class","display"),!this.el)throw new Error("Element not initialized. Please call init() first.");let h=this.el.clientHeight,g=this.el.clientWidth,C=window.devicePixelRatio||1;s.style.height=h+"px",s.style.width=g+"px",s.style.position="absolute",s.height=h*C,s.width=g*C,this.el.innerHTML="",this.el.appendChild(s);let S=null;this.resizeObserver=new ResizeObserver(D=>{clearTimeout(S),S=setTimeout(()=>{for(const I of D)I.target===this.el&&this.resetCanvas(I.contentRect.width,I.contentRect.height)},50)}),this.el&&this.resizeObserver?.observe(this.el)}initControlDom(){if(!this.el)throw new Error("Element not initialized. Please call init() first.");if(this.enableDoubleClickFullscreen&&this.el.addEventListener("dblclick",Y=>{Y.stopPropagation(),Y.preventDefault(),Y.target===this.canvasEl&&(this.controlCallbackFn&&!this.controlCallbackFn("fullscreen")||(this.isFullscreen?document.exitFullscreen().then(()=>{this.isFullscreen=!1,se.textContent="⛶"}).catch(()=>{}):this.el.requestFullscreen().then(()=>{this.isFullscreen=!0,se.textContent="⛶"}).catch(()=>{})))}),this.el.querySelector(".mn-video-control-bar"))return;this.injectControlStyles();let s=document.createElement("div");s.setAttribute("class","mn-video-control-bar");let h=document.createElement("img");h.src=En,h.style.width="20%",h.style.height="20%",h.className="mn-video-no-data-btn",this.noDataImg=h,this.el.appendChild(h);let g=document.createElement("button");this.playBtn=g,g.className="mn-video-btn mn-video-play-btn",g.textContent="▶",g.onclick=()=>{if(this.isPlaying){if(this.controlCallbackFn&&!this.controlCallbackFn("stop"))return;this.player?.pause(),this.isPlaying=!1,g.textContent="▶"}else{if(this.controlCallbackFn&&!this.controlCallbackFn("play"))return;this.player&&this.isPlayStart?this.player.resume():this.play({beginTime:this.beginTime||"",streamType:this.streamType}),this.isPlaying=!0,g.textContent="⏸"}},s.appendChild(g);let C=document.createElement("button");if(this.audioBtn=C,C.className="mn-video-btn mn-video-audio-btn",C.textContent="🔇",C.onclick=()=>{this.player&&(this.controlCallbackFn&&!this.controlCallbackFn("audio")||(this.isEnableAudio=!this.isEnableAudio,this.player.enableAudio(this.isEnableAudio),C.textContent=this.isEnableAudio?"🔊":"🔇"))},s.appendChild(C),this.beginTime){const Y=[.5,1,2,4,8,16,32];let M=document.createElement("button");M.className="mn-video-btn mn-video-speed-dec-btn",M.textContent="<",M.onclick=()=>{if(!this.player||this.controlCallbackFn&&!this.controlCallbackFn("speedDec"))return;let ve=Y.indexOf(this.currentSpeed);ve=(ve-1+Y.length)%Y.length,this.currentSpeed=Y[ve],this.player.changeSpeed(this.currentSpeed),q.textContent=this.currentSpeed+"x"},s.appendChild(M);let q=document.createElement("span");q.className="mn-video-btn mn-video-speed-display",q.textContent="1x",s.appendChild(q);let ae=document.createElement("button");ae.className="mn-video-btn mn-video-speed-inc-btn",ae.textContent=">",ae.onclick=()=>{if(!this.player||this.controlCallbackFn&&!this.controlCallbackFn("speedInc"))return;let ve=Y.indexOf(this.currentSpeed);ve=(ve+1)%Y.length,this.currentSpeed=Y[ve],this.player.changeSpeed(this.currentSpeed),q.textContent=this.currentSpeed+"x"},s.appendChild(ae);let j=document.createElement("button");j.className="mn-video-btn mn-video-refresh-btn",j.textContent="↻",j.onclick=()=>{this.controlCallbackFn&&!this.controlCallbackFn("refresh")||this.restart()},s.appendChild(j)}const S=this.streamType;let D=document.createElement("div");D.className="mn-video-stream-wrap";let I=document.createElement("button");I.className="mn-video-btn mn-video-stream-btn";let N=document.createElement("ul");N.className="mn-video-stream-list";let V=[{label:"FHD",value:0},{label:"HD",value:1},{label:"SD",value:2}];this.beginTime?V=[{label:"HD",value:1},{label:"SD",value:2}]:V=[{label:"HD",value:0},{label:"SD",value:1}],I.textContent=V.find(Y=>Y.value===S)?.label||"SD",V.forEach(Y=>{let M=document.createElement("li");M.textContent=Y.label,M.dataset.value=String(Y.value),M.onclick=q=>{if(q.stopPropagation(),!this.player)return;let ae=Y.value;this.controlCallbackFn&&!this.controlCallbackFn("stream"+ae)||(this.streamType=ae,this.switchStream(ae),I.textContent=Y.label,N.classList.remove("mn-video-stream-list-open"))},N.appendChild(M)}),I.onclick=()=>{N.classList.toggle("mn-video-stream-list-open")},document.addEventListener("click",Y=>{D.contains(Y.target)||N.classList.remove("mn-video-stream-list-open")}),D.appendChild(I),D.appendChild(N),s.appendChild(D);let ee=document.createElement("button");ee.className="mn-video-btn mn-video-close-btn",ee.textContent="✕",ee.onclick=()=>{this.controlCallbackFn&&!this.controlCallbackFn("close")||(this.stop(),setTimeout(()=>{this.init(this.opt)},100))},s.appendChild(ee);let ne=document.createElement("span");ne.className="mn-video-spacer",s.appendChild(ne);let se=document.createElement("button");se.className="mn-video-btn mn-video-fullscreen-btn",se.textContent="⛶",se.onclick=()=>{this.el&&(this.controlCallbackFn&&!this.controlCallbackFn("fullscreen")||(this.isFullscreen?document.exitFullscreen().then(()=>{this.isFullscreen=!1,se.textContent="⛶"}).catch(()=>{}):this.el.requestFullscreen().then(()=>{this.isFullscreen=!0,se.textContent="⛶"}).catch(()=>{})))},document.addEventListener("fullscreenchange",()=>{document.fullscreenElement||(this.isFullscreen=!1)}),s.appendChild(se),this.el.appendChild(s)}injectControlStyles(){if(document.getElementById("mn-video-control-styles"))return;let s=document.createElement("style");s.id="mn-video-control-styles",s.textContent=`
7
+ .mn-video-control-bar {
8
+ position: absolute;
9
+ bottom: 0;
10
+ left: 0;
11
+ right: 0;
12
+ height: 20px;
13
+ background: rgba(0,0,0,0.6);
14
+ display: flex;
15
+ align-items: center;
16
+ padding: 0 4px;
17
+ gap: 2px;
18
+ opacity: 0;
19
+ transition: opacity 0.2s;
20
+ z-index: 10;
21
+ }
22
+ .mn-video-no-data-btn {
23
+ user-select: none;
24
+ pointer-events: none;
25
+ position: absolute;
26
+ top: 50%;
27
+ left: 50%;
28
+ transform: translate(-50%, -50%);
29
+ min-width: 20px;
30
+ min-height: 20px;
31
+ }
32
+ .mn-video-container:hover .mn-video-control-bar,
33
+ .mn-video-control-bar:hover {
34
+ opacity: 1;
35
+ }
36
+ .mn-video-btn {
37
+ background: transparent;
38
+ border: none;
39
+ color: #fff;
40
+ cursor: pointer;
41
+ font-size: 12px;
42
+ line-height: 20px;
43
+ padding: 0 4px;
44
+ white-space: nowrap;
45
+ outline: none;
46
+ user-select: none;
47
+ }
48
+ .mn-video-btn:hover {
49
+ background: rgba(255,255,255,0.2);
50
+ border-radius: 2px;
51
+ }
52
+ .mn-video-spacer {
53
+ flex: 1;
54
+ }
55
+ .mn-video-stream-wrap {
56
+ font-size: 0px;
57
+ position: relative;
58
+ }
59
+ .mn-video-stream-list {
60
+ display: none;
61
+ position: absolute;
62
+ bottom: 100%;
63
+ left: 50%;
64
+ transform: translateX(-50%);
65
+ margin: 0 0 2px 0;
66
+ padding: 2px 0;
67
+ list-style: none;
68
+ background: rgba(40,40,40,0.95);
69
+ border: 1px solid rgba(255,255,255,0.2);
70
+ border-radius: 3px;
71
+ min-width: 40px;
72
+ z-index: 20;
73
+ }
74
+ .mn-video-stream-list-open {
75
+ display: block;
76
+ }
77
+ .mn-video-stream-list li {
78
+ padding: 2px 12px;
79
+ color: #fff;
80
+ font-size: 12px;
81
+ cursor: pointer;
82
+ text-align: center;
83
+ white-space: nowrap;
84
+ }
85
+ .mn-video-stream-list li:hover {
86
+ background: rgba(255,255,255,0.15);
87
+ }
88
+ `,document.head.appendChild(s)}initDebugDom(){if(!this.el)return;this.debugTimer&&(clearInterval(this.debugTimer),this.debugTimer=null),this.debugEl&&(this.debugEl.remove(),this.debugEl=null),this.injectDebugStyles();let s=document.createElement("div");s.className="mn-video-debug",this.debugEl=s,this.el.appendChild(s),this.debugTimer=setInterval(()=>this.updateDebug(),1e3),this.updateDebug()}updateDebug(){if(!this.debugEl||!this.player)return;let s=0,h=0,g=0,C=0,S=0;if(this.player.timerCtrl){const D=this.player.timerCtrl.perfSnapshot();s=D.fps,h=D.avgLatency,g=D.maxLatency,C=D.frames,S=D.cache,this.player.timerCtrl.perfReset()}this.debugEl.innerHTML=`<div>时间:${this.formatDateTime(new Date(this.videoTime))}</div><div>fps:${s.toFixed(1)}</div><div>延迟:${h.toFixed(0)}ms(max ${g.toFixed(0)}ms)</div><div>网速:${this.netSpeedKb} KB/s 缓存:${this.netSpeedCache}</div><div>帧数:${C} 缓存队列:${S}</div><div>模式:${this.player.renderMode===1?"VideoDecoder":"wasm"}</div>`}injectDebugStyles(){if(document.getElementById("mn-video-debug-styles"))return;let s=document.createElement("style");s.id="mn-video-debug-styles",s.textContent=`
89
+ .mn-video-debug {
90
+ position: absolute;
91
+ top: 4px;
92
+ left: 4px;
93
+ z-index: 30;
94
+ background: rgba(0,0,0,0.55);
95
+ color: #0f0;
96
+ font: 12px/1.6 Consolas, monospace;
97
+ padding: 4px 8px;
98
+ border-radius: 3px;
99
+ pointer-events: none;
100
+ white-space: nowrap;
101
+ user-select: none;
102
+ }
103
+ `,document.head.appendChild(s)}resetCanvas(s,h){if(!this.canvasEl){console.error("Canvas not initialized. Please call init() first.");return}let g=this.el.clientHeight,C=this.el.clientWidth;s&&(C=s),h&&(g=h);let S=window.devicePixelRatio||1;this.canvasEl.style.height=g+"px",this.canvasEl.style.width=C+"px",this.canvasEl.height=g*S,this.canvasEl.width=C*S}removeDom(){this.debugTimer&&(clearInterval(this.debugTimer),this.debugTimer=null),this.debugEl&&(this.debugEl.remove(),this.debugEl=null),this.canvasEl&&(this.canvasEl.remove(),this.canvasEl=null,this.resizeObserver?.disconnect()),this.el&&(this.el.innerHTML="")}resetAudioOffset(s=0){this.player?.resetAudioOffset(s)}play(s){if(!this.opt)throw new Error("Options not initialized. Please call init() first.");s?.beginTime!==void 0&&(this.beginTime=s?.beginTime,this.opt.beginTime=s?.beginTime),this.player||this.init(this.opt);let h=s?.streamType!==void 0?s.streamType:1;s?.streamType===0&&(h=0),this.streamType=h,this.opt.streamType=h,this.player.play(0,h,this.beginTime),this.isPlayStart=!0,this.noDataImg?.remove(),this.noDataImg=null,this.playBtn&&(this.playBtn.textContent="⏸")}pause(){this.player&&this.player.pause(),this.playBtn&&(this.playBtn.textContent="▶")}resume(){this.player&&this.player.resume(),this.playBtn&&(this.playBtn.textContent="⏸")}stop(){this.player&&(this.player.stop(),this.player=null,this.isPlayStart=!1,this.isEnableAudio=!1,this.isPlaying=!1,this.currentSpeed=1,this.removeDom())}restart(){if(this.beginTime){if(this.stop(),this.opt){let s=new Date(this.beginTime);this.videoTime&&(s=new Date(this.videoTime)),this.play({streamType:this.streamType,beginTime:this.formatDateTime(s)}),this.enableAudio(this.isEnableAudio)}}else this.beginTime,this.videoTime}switchStream(s){this.streamType=s,this.opt&&(this.opt.streamType=s),this.player&&this.player.switchStream(s),this.beginTime&&this.showControlBar&&this.restart()}enableAudio(s){this.isEnableAudio=s,this.audioBtn&&(this.audioBtn.textContent=s?"🔊":"🔇"),this.player&&this.player.enableAudio(s)}timeCallBack(s){this.timeCallbackFn=s}changeSpeed(s){this.player&&this.player.changeSpeed(s)}formatDateTime(s){if(!(s instanceof Date)||isNaN(s.getTime()))return"";const h=g=>g.toString().padStart(2,"0");return s.getFullYear()+"-"+h(s.getMonth()+1)+"-"+h(s.getDate())+" "+h(s.getHours())+":"+h(s.getMinutes())+":"+h(s.getSeconds())}setSyncTime(s){let h=this.videoTime-s;this.player&&this.videoTime>1e3&&this.player.delayTime?.(h)}}Ie.MnVideoPlayer=ii,Ie.default=ii,Object.defineProperties(Ie,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
104
+ //# sourceMappingURL=mn-video-player-v2.umd.js.map