@ezuikit/player-ezopen 8.2.2-beta.3 → 8.2.2-beta.4

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.
@@ -1,8 +0,0 @@
1
- /*
2
- *
3
- * JsPlugin.js v8.2.2-beta.3
4
- * Copyright (c) 2025-11-17 Ezviz-OpenBiz
5
- * Released under MIT the License.
6
- *
7
- */
8
- import e from"deepmerge";import t from"@ezuikit/utils-logger";import a from"@ezuikit/utils-i18n";import{parseEzopenUrl as r,getStaticPath as n,isMobile as s}from"@ezuikit/utils-tools";import x from"@ezuikit/utils-service";import o from"ua-parser-js";import l from"eventemitter3";import _ from"dayjs";import h from"@ezuikit/player-plugin-record";var f=["attribute vec4 vertexPos;","attribute vec2 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos;","}"].join("\n"),c=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","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) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");window.SuperRender=function(){function e(e){this.canvasElement=document.getElementById(e),this.initContextGL(),this.contextGL&&(this.YUVProgram=this.initProgram(f,c),this.initBuffers(),this.initTextures())}return e.prototype.initContextGL=function(){var e=this.canvasElement,t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){t=null}t&&"function"==typeof t.getParameter||(t=null),this.contextGL=t},e.prototype.initProgram=function(e,t){var a=this.contextGL,r=a.createShader(a.VERTEX_SHADER);a.shaderSource(r,e),a.compileShader(r),a.getShaderParameter(r,a.COMPILE_STATUS);var i=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(i,t),a.compileShader(i),a.getShaderParameter(i,a.COMPILE_STATUS);var n=a.createProgram();return a.attachShader(n,r),a.attachShader(n,i),a.linkProgram(n),a.getProgramParameter(n,a.LINK_STATUS),a.deleteShader(r),a.deleteShader(i),n},e.prototype.initBuffers=function(){var e=this.contextGL,t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null);var a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),this.vertexPosBuffer=t,this.texturePosBuffer=a},e.prototype.initTexture=function(){var e=this.contextGL,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),t},e.prototype.initTextures=function(){var e=this.contextGL,t=this.YUVProgram;e.useProgram(t);var a=this.initTexture(),r=e.getUniformLocation(t,"ySampler");e.uniform1i(r,0),this.yTextureRef=a;var i=this.initTexture(),n=e.getUniformLocation(t,"uSampler");e.uniform1i(n,1),this.uTextureRef=i;var s=this.initTexture(),x=e.getUniformLocation(t,"vSampler");e.uniform1i(x,2),this.vTextureRef=s,e.useProgram(null)},e.prototype.SR_DisplayFrameData=function(e,t,a,r,i){if(!(e<=0||t<=0)){var n=this.contextGL;if(null==a)return n.clearColor(0,0,0,0),void n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);var s=this.canvasElement;this.nWindowWidth=s.width,this.nWindowHeight=s.height;var x=this.nWindowWidth,o=this.nWindowHeight;n.clearColor(.8,.8,1,1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.viewport(0,0,x,o),this.updateFrameData(e,t,a,r,i);var l=this.YUVProgram;n.useProgram(l);var _=this.vertexPosBuffer;n.bindBuffer(n.ARRAY_BUFFER,_);var h=n.getAttribLocation(l,"vertexPos");n.enableVertexAttribArray(h),n.vertexAttribPointer(h,2,n.FLOAT,!1,0,0),n.bindBuffer(n.ARRAY_BUFFER,null);var f=this.texturePosBuffer;n.bindBuffer(n.ARRAY_BUFFER,f);var c=n.getAttribLocation(l,"texturePos");n.enableVertexAttribArray(c),n.vertexAttribPointer(c,2,n.FLOAT,!1,0,0),n.bindBuffer(n.ARRAY_BUFFER,null),n.drawArrays(n.TRIANGLE_STRIP,0,4),n.disableVertexAttribArray(h),n.disableVertexAttribArray(c),n.useProgram(null)}},e.prototype.updateFrameData=function(e,t,a,r,i){var n=this.contextGL,s=this.yTextureRef,x=this.uTextureRef,o=this.vTextureRef,l=a;if(e==r&&t==i){var _=e*t,h=l.subarray(0,_);n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,s),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,e,t,0,n.LUMINANCE,n.UNSIGNED_BYTE,h);var f=e/2*t/2,c=l.subarray(e*t,e*t+f);n.activeTexture(n.TEXTURE2),n.bindTexture(n.TEXTURE_2D,o),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,e/2,t/2,0,n.LUMINANCE,n.UNSIGNED_BYTE,c);var u=f,d=l.subarray(e*t+e*t/4,e*t+e*t/4+u);n.activeTexture(n.TEXTURE1),n.bindTexture(n.TEXTURE_2D,x),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,e/2,t/2,0,n.LUMINANCE,n.UNSIGNED_BYTE,d)}else{_=r*i,h=new Uint8Array(_);for(var p=0;p<i;p++)for(var m=l.subarray(p*e,p*e+r),S=0;S<r;S++)h[p*r+S]=m[S];for(n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,s),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,r,i,0,n.LUMINANCE,n.UNSIGNED_BYTE,h),h=null,m=null,f=r/2*i/2,c=new Uint8Array(f),p=0;p<i/2;p++){var R=l.subarray(e*t+p*e/2,e*t+p*e/2+r/2);for(S=0;S<r/2;S++)c[p*r/2+S]=R[S]}for(n.activeTexture(n.TEXTURE2),n.bindTexture(n.TEXTURE_2D,o),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,r/2,i/2,0,n.LUMINANCE,n.UNSIGNED_BYTE,c),c=null,R=null,u=f,d=new Uint8Array(u),p=0;p<i/2;p++){var P=l.subarray(e*t*5/4+p*e/2,e*t*5/4+p*e/2+r/2);for(S=0;S<r/2;S++)d[p*r/2+S]=P[S]}n.activeTexture(n.TEXTURE1),n.bindTexture(n.TEXTURE_2D,x),n.texImage2D(n.TEXTURE_2D,0,n.LUMINANCE,r/2,i/2,0,n.LUMINANCE,n.UNSIGNED_BYTE,d),d=null,P=null}},e.prototype.SR_SetDisplayRect=function(e){var t=this.contextGL,a=this.nWindowWidth,r=this.nWindowHeight,i=null;if(e&&a>0&&r>0){var n=e.left/a,s=e.top/r,x=e.right/a,o=e.bottom/r;i=new Float32Array([x,s,n,s,x,o,n,o])}else i=new Float32Array([1,0,0,0,1,1,0,1]);var l=this.texturePosBuffer;t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferSubData(t.ARRAY_BUFFER,0,i),t.bindBuffer(t.ARRAY_BUFFER,null)},e.prototype.SR_Destroy=function(){var e=this.contextGL,t=this.YUVProgram;e.deleteProgram(t);var a=this.vertexPosBuffer,r=this.texturePosBuffer;e.deleteBuffer(a),e.deleteBuffer(r);var i=this.yTextureRef,n=this.uTextureRef,s=this.vTextureRef;e.deleteTexture(i),e.deleteTexture(n),e.deleteTexture(s)},e}(),function(){var e=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}();function t(e,t){if(a=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](a):a instanceof r))throw new TypeError("Cannot call a class as a function");var a,r}var a,r=(a=void 0,function(e){return e&&(a=e),a});function i(){if(t(this,i),r())return r();if(void 0!==i.unique)return i.unique;i.unique=this,this.oAudioContext=null,this.currentVolume=80,this.bSetVolume=!1,this.gainNode=null,this.iWndNum=-1,this.mVolumes=new Map;var e=window.AudioContext||window.webkitAudioContext;this.oAudioContext=new e,this.writeString=function(e,t,a){for(var r=0;r<a.length;r++)e.setUint8(t+r,a.charCodeAt(r))},this.setBufferToDataview=function(e,t,a){for(var r=0;r<a.length;r++,t++)e.setUint8(t,a[r])},r(this)}e(i,[{key:"Play",value:function(e,t,a){var r=new ArrayBuffer(44+t),i=new DataView(r),n=a.samplesPerSec,s=a.channels,x=a.bitsPerSample;this.writeString(i,0,"RIFF"),i.setUint32(4,32+2*t,!0),this.writeString(i,8,"WAVE"),this.writeString(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,s,!0),i.setUint32(24,n,!0),i.setUint32(28,2*n,!0),i.setUint16(32,s*x/8,!0),i.setUint16(34,x,!0),this.writeString(i,36,"data"),i.setUint32(40,t,!0),this.setBufferToDataview(i,44,e);var o=this;return this.oAudioContext.decodeAudioData(i.buffer,(function(e){var t=o.oAudioContext.createBufferSource();if(null==t)return-1;t.buffer=e,t.start(0),(null==o.gainNode||o.bSetVolume)&&(o.gainNode=o.oAudioContext.createGain(),o.bSetVolume=!1),o.gainNode.gain.value=o.currentVolume/100,o.gainNode.connect(o.oAudioContext.destination),t.connect(o.gainNode)}),(function(e){return-1})),0}},{key:"Stop",value:function(){return null!=this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),!0}},{key:"SetVolume",value:function(e){return this.bSetVolume=!0,this.currentVolume=e,this.mVolumes.set(this.iWndNum,this.currentVolume),!0}},{key:"SetWndNum",value:function(e){this.iWndNum=e;var t=this.mVolumes.get(e);return null==t&&(t=80),this.currentVolume=t,!0}},{key:"GetVolume",value:function(){var e=this.mVolumes.get(this.iWndNum);return null==e&&(e=80),e}}]),window.AudioRenderer=i}();var u={title:"title",name:"name {{name}}"},d={title:"标题",name:"姓名 {{name}}"};function p(e){return/^ezopen:\/\//.test(e)}var m={autoPlay:!0,decoderType:"auto",audio:!0,dpr:1,logger:{level:"INFO",name:"ezopen",showTime:!0},debugDownloadData:!1,disableRenderPrivateData:!1,streamInfoCBType:1};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function R(e,t,a,r,i,n,s){try{var x=e[n](s),o=x.value}catch(e){return void a(e)}x.done?t(o):Promise.resolve(o).then(r,i)}function P(e){return function(){var t=this,a=arguments;return new Promise((function(r,i){var n=e.apply(t,a);function s(e){R(n,r,i,s,x,"next",e)}function x(e){R(n,r,i,s,x,"throw",e)}s(void 0)}))}}function y(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return(a=a.call(e)).next.bind(a);if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return S(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?S(e,t):void 0}}(e))||t){a&&(e=a);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){var a,r,i,n,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function x(n){return function(x){return function(n){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],r=0}finally{a=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,x])}}}var E=function(){function e(e){this.plugins=new Map,this.context=e}var t=e.prototype;return t.usePlugins=function(e){var t=this;return P((function(){var a,r,i;return b(this,(function(n){switch(n.label){case 0:a=y(e),n.label=1;case 1:return(r=a()).done?[3,4]:(i=r.value,[4,t.use(i)]);case 2:n.sent(),n.label=3;case 3:return[3,1];case 4:return[2]}}))}))()},t.use=function(e){var t=this;return P((function(){var a;return b(this,(function(r){switch(r.label){case 0:return e.name?("function"==typeof(null==e?void 0:e.init)&&(null==e||e.init()),a=!0,(null==e?void 0:e.beforeExec)?[4,e.beforeExec(t.context)]:[3,2]):[3,3];case 1:a=r.sent(),r.label=2;case 2:return a&&e.exec(t.context),"function"==typeof(null==e?void 0:e.afterExec)&&(null==e||e.afterExec(t.context)),t.plugins.set(e.name.toLowerCase(),e),[3,4];case 3:r.label=4;case 4:return[2]}}))}))()},t.destroyByName=function(e){var t=this.plugins.get(e.toLowerCase());t&&"function"==typeof(null==t?void 0:t.destroy)&&t.destroy(),this.plugins.delete(e)},t.destroy=function(){var e=this;(this.plugins||[]).forEach((function(t,a){e.destroyByName(a)})),this.plugins=null},e}();function g(e,t,a){return{code:null!=t?t:0,data:e,msg:a}}function F(e,t,a,r){return{data:e,msg:t,source:a,target:r}}var C="playError",T="EVENT_CALLBACK",D={pluginErrorHandler:"pluginErrorHandler",getStreamHeaderCallback:"getStreamHeaderCallback",getVideoStreamCallback:"getVideoStreamCallback",appearFirstFrameCallback:"appearFirstFrameCallback",firstFrameCallback:"firstFrameCallback",averageStreamSuccessCallback:"averageStreamSuccessCallback",setRunTimeInfoCallBack:"setRunTimeInfoCallBack",setAdditionDataCallBack:"setAdditionDataCallBack",openStreamCallback:"openStreamCallback",stutterDetectedCallback:"stutterDetectedCallback"},A={initializing:"initializing",loadstart:"loadstart",abort:"abort",waiting:"waiting",canplay:"canplay",rateChange:"ratechange",volumeChange:"volumechange",debug:"debug",error:"error",videoInfo:"videoInfo",audioInfo:"audioInfo",decoder:"decoder",urlChange:"urlChange",API:{play:"play",pause:"pause",rateChange:"ratechange",volumeChange:"volumechange",destroy:"destroy",snapshot:"snapshot",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",resize:"resize",seek:"seek",resume:"resume"},NETWORK:{deviceCapacity:"network.deviceCapacity",deviceInfo:"network.deviceInfo",videoFragmentFiles:"network.videoFragmentFiles",error:{error:"network.error",deviceCapacity:"network.error.deviceCapacity",deviceInfo:"network.error.deviceInfo",realPlayUrl:"network.error.realPlayUrl",videoFragmentFiles:"network.error.videoFragmentFiles"}},SOCKET:{autoClose:"StreamClient.autoClose",openStream:"StreamClient.openStream",startPlay:"StreamClient.startPlay",stopAll:"StreamClient.stopAll",setPlayRate:"StreamClient.setPlayRate",seek:"StreamClient.seek",close:"StreamClient.close",error:"StreamClient.error"},CALLBACK:D,FECCorrect:{setFEC2DParam:"setFEC2DParam"},streamInfoCB:"streamInfoCB"};var I="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),M=new Uint8Array(16);function L(){if(!I)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(M)}var w=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var O=[],B=0;B<256;++B)O.push((B+256).toString(16).substr(1));function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(O[e[t+0]]+O[e[t+1]]+O[e[t+2]]+O[e[t+3]]+"-"+O[e[t+4]]+O[e[t+5]]+"-"+O[e[t+6]]+O[e[t+7]]+"-"+O[e[t+8]]+O[e[t+9]]+"-"+O[e[t+10]]+O[e[t+11]]+O[e[t+12]]+O[e[t+13]]+O[e[t+14]]+O[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&w.test(e)}(a))throw TypeError("Stringified UUID is invalid");return a}function N(e,t,a){var r=(e=e||{}).random||(e.rng||L)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,k(r)}var V=function(){function e(){}var t=e.prototype;return t.createClientObject=function(e,t,a,r){return{socket:e,id:t,iCurChannel:a,iCurStream:r,resolve:null,reject:null}},t.zeroPlayCmd=function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e+1,0,0,0,t,0,0,4,0])},t.playCmd=function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e,0,0,0,t,0,0,4,0])},t.playbackCmd=function(e,t,a,r){var i=e.split("T")[0],n=e.split("T")[1],s="0"+parseInt(i.substring(0,4),10).toString(16),x=parseInt(i.substring(4,6),10),o=parseInt(i.substring(6),10),l=parseInt(n.substring(0,2),10),_=parseInt(n.substring(2,4),10),h=parseInt(n.substring(4,6),10),f=t.split("T")[0],c=t.split("T")[1],u="0"+parseInt(f.substring(0,4),10).toString(16),d=parseInt(f.substring(4,6),10),p=parseInt(c.substring(0,2),10),m=parseInt(c.substring(2,4),10),S=parseInt(c.substring(4,6),10),R=[0,0,0,96,0,0,0,0,0,0,0,0,0,3,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a,0,0,parseInt(s.substring(0,2),16),parseInt(s.substring(2,4),16),0,0,0,x,0,0,0,o,0,0,0,l,0,0,0,_,0,0,0,h,0,0,parseInt(u.substring(0,2),16),parseInt(u.substring(2,4),16),0,0,0,d,0,0,0,o,0,0,0,p,0,0,0,m,0,0,0,S,0,0,0,0,0,0,0,0,r,0,0,0];return new Uint8Array(R)},t.playRateCmd=function(e){for(var t=(parseInt(e,10)>>>0).toString(16).toLocaleUpperCase().toString(16),a=t.length;a<8;a++)t="0"+t;for(var r=[0,0,0,0],i=0,n=t.length;i<n;i+=2)r[Math.floor(i/2)]=parseInt(t.substring(i,i+2),16);var s=[0,0,0,36,0,0,0,0,0,0,0,0,0,3,1,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r[0],r[1],r[2],r[3]];return new Uint8Array(s)},t.pauseCmd=function(){return new Uint8Array([0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])},t.resumeCmd=function(){return new Uint8Array([0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])},e}(),U=function(){function e(){}var t=e.prototype;return t.createClientObject=function(e,t,a){return{socket:e,id:t,playURL:a,resolve:null,reject:null}},t.getMediaFromSdp=function(e){for(var t=e.indexOf("MEDIAINFO=")+10,a=e.slice(t,t+80),r=[],i=0,n=a.length/2;i<n;i++)r[i]=parseInt(a.slice(2*i,2*i+2),16);return new Uint8Array(r)},t.playCmd=function(e){var t={sequence:0,cmd:"realplay",url:e};return JSON.stringify(t)},t.playbackCmd=function(e,t,a){var r={sequence:0,cmd:"playback",url:a,startTime:e,endTime:t};return JSON.stringify(r)},t.playRateCmd=function(e){var t={sequence:0,cmd:"changespeed",speed:e};return JSON.stringify(t)},t.pauseCmd=function(){return JSON.stringify({sequence:0,cmd:"pause"})},t.resumeCmd=function(){return JSON.stringify({sequence:0,cmd:"resume"})},t.getError=function(e){var t=3001;return e&&(6===parseInt(e.statusCode,10)&&"streamLimit"===e.subStatusCode?t=3002:4===parseInt(e.statusCode,10)&&"badAuthorization"===e.subStatusCode&&(t=3003)),{iErrorNum:t,oError:e}},e}();function H(e,t,a){null!=e&&("number"==typeof e?this.fromNumber(e,t,a):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function W(){return new H(null)}H.prototype.am=function(e,t,a,r,i,n){var s=16383&t;for(t>>=14;--n>=0;){var x=16383&this[e],o=this[e++]>>14,l=t*x+o*s;i=((x=s*x+((16383&l)<<14)+a[r]+i)>>28)+(l>>14)+t*o;a[r++]=268435455&x}return i},H.prototype.DB=28,H.prototype.DM=268435455,H.prototype.DV=1<<28;H.prototype.FV=Math.pow(2,52),H.prototype.F1=24,H.prototype.F2=4;var Y,G,X=[];for(Y="0".charCodeAt(0),G=0;G<=9;++G)X[Y++]=G;for(Y="a".charCodeAt(0),G=10;G<36;++G)X[Y++]=G;for(Y="A".charCodeAt(0),G=10;G<36;++G)X[Y++]=G;function J(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function Z(e,t){var a=X[e.charCodeAt(t)];return null==a?-1:a}function j(e){var t=W();return t.fromInt(e),t}function z(e){var t,a=1;return 0!=(t=e>>>16)&&(e=t,a+=16),0!=(t=e>>8)&&(e=t,a+=8),0!=(t=e>>4)&&(e=t,a+=4),0!=(t=e>>2)&&(e=t,a+=2),e>>1&&(a+=1),a}function K(e){this.m=e}function q(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function Q(e,t){return e&t}function $(e,t){return e|t}function ee(e,t){return e^t}function te(e,t){return e&~t}function ae(e){if(0==e)return-1;var t=0;return!(65535&e)&&(e>>=16,t+=16),!(255&e)&&(e>>=8,t+=8),!(15&e)&&(e>>=4,t+=4),!(3&e)&&(e>>=2,t+=2),!(1&e)&&++t,t}function re(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function ie(){}function ne(e){return e}function se(e){this.r2=W(),this.q3=W(),H.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}K.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},K.prototype.revert=function(e){return e},K.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},K.prototype.mulTo=function(e,t,a){e.multiplyTo(t,a),this.reduce(a)},K.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},q.prototype.convert=function(e){var t=W();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(H.ZERO)>0&&this.m.subTo(t,t),t},q.prototype.revert=function(e){var t=W();return e.copyTo(t),this.reduce(t),t},q.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var a,r=(a=32767&e[t])*this.mpl+((a*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[a=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[a]>=e.DV;)e[a]-=e.DV,e[++a]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},q.prototype.mulTo=function(e,t,a){e.multiplyTo(t,a),this.reduce(a)},q.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},H.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},H.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+DV:this.t=0},H.prototype.fromString=function(e,t){var a;if(16==t)a=4;else if(8==t)a=3;else if(256==t)a=8;else if(2==t)a=1;else if(32==t)a=5;else{if(4!=t)return void this.fromRadix(e,t);a=2}this.s=this.t=0;for(var r=e.length,i=!1,n=0;--r>=0;){var s=8==a?255&e[r]:Z(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==n?this[this.t++]=s:n+a>this.DB?(this[this.t-1]|=(s&(1<<this.DB-n)-1)<<n,this[this.t++]=s>>this.DB-n):this[this.t-1]|=s<<n,(n+=a)>=this.DB&&(n-=this.DB))}8==a&&128&e[0]&&(this.s=-1,n>0&&(this[this.t-1]|=(1<<this.DB-n)-1<<n)),this.clamp(),i&&H.ZERO.subTo(this,this)},H.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},H.prototype.dlShiftTo=function(e,t){var a;for(a=this.t-1;a>=0;--a)t[a+e]=this[a];for(a=e-1;a>=0;--a)t[a]=0;t.t=this.t+e,t.s=this.s},H.prototype.drShiftTo=function(e,t){for(var a=e;a<this.t;++a)t[a-e]=this[a];t.t=Math.max(this.t-e,0),t.s=this.s},H.prototype.lShiftTo=function(e,t){var a,r=e%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(e/this.DB),x=this.s<<r&this.DM;for(a=this.t-1;a>=0;--a)t[a+s+1]=this[a]>>i|x,x=(this[a]&n)<<r;for(a=s-1;a>=0;--a)t[a]=0;t[s]=x,t.t=this.t+s+1,t.s=this.s,t.clamp()},H.prototype.rShiftTo=function(e,t){t.s=this.s;var a=Math.floor(e/this.DB);if(a>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,n=(1<<r)-1;t[0]=this[a]>>r;for(var s=a+1;s<this.t;++s)t[s-a-1]|=(this[s]&n)<<i,t[s-a]=this[s]>>r;r>0&&(t[this.t-a-1]|=(this.s&n)<<i),t.t=this.t-a,t.clamp()}},H.prototype.subTo=function(e,t){for(var a=0,r=0,i=Math.min(e.t,this.t);a<i;)r+=this[a]-e[a],t[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;a<this.t;)r+=this[a],t[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r-=e[a],t[a++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[a++]=this.DV+r:r>0&&(t[a++]=r),t.t=a,t.clamp()},H.prototype.multiplyTo=function(e,t){var a=this.abs(),r=e.abs(),i=a.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+a.t]=a.am(0,r[i],t,i,0,a.t);t.s=0,t.clamp(),this.s!=e.s&&H.ZERO.subTo(t,t)},H.prototype.squareTo=function(e){for(var t=this.abs(),a=e.t=2*t.t;--a>=0;)e[a]=0;for(a=0;a<t.t-1;++a){var r=t.am(a,t[a],e,2*a,0,1);(e[a+t.t]+=t.am(a+1,2*t[a],e,2*a+1,r,t.t-a-1))>=t.DV&&(e[a+t.t]-=t.DV,e[a+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(a,t[a],e,2*a,0,1)),e.s=0,e.clamp()},H.prototype.divRemTo=function(e,t,a){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)null!=t&&t.fromInt(0),null!=a&&this.copyTo(a);else{null==a&&(a=W());var n=W(),s=this.s,x=(e=e.s,this.DB-z(r[r.t-1]));if(x>0?(r.lShiftTo(x,n),i.lShiftTo(x,a)):(r.copyTo(n),i.copyTo(a)),0!=(i=n[(r=n.t)-1])){var o=i*(1<<this.F1)+(r>1?n[r-2]>>this.F2:0),l=this.FV/o,_=(o=(1<<this.F1)/o,1<<this.F2),h=a.t,f=h-r,c=null==t?W():t;for(n.dlShiftTo(f,c),a.compareTo(c)>=0&&(a[a.t++]=1,a.subTo(c,a)),H.ONE.dlShiftTo(r,c),c.subTo(n,n);n.t<r;)n[n.t++]=0;for(;--f>=0;){var u=a[--h]==i?this.DM:Math.floor(a[h]*l+(a[h-1]+_)*o);if((a[h]+=n.am(0,u,a,f,0,r))<u)for(n.dlShiftTo(f,c),a.subTo(c,a);a[h]<--u;)a.subTo(c,a)}null!=t&&(a.drShiftTo(r,t),s!=e&&H.ZERO.subTo(t,t)),a.t=r,a.clamp(),x>0&&a.rShiftTo(x,a),s<0&&H.ZERO.subTo(a,a)}}}},H.prototype.invDigit=function(){if(this.t<1)return 0;var e,t=this[0];return 1&t?(e=(e=(e=(e=(e=3&t)*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e:0},H.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},H.prototype.exp=function(e,t){if(e>4294967295||e<1)return H.ONE;var a=W(),r=W(),i=t.convert(this),n=z(e)-1;for(i.copyTo(a);--n>=0;)if(t.sqrTo(a,r),(e&1<<n)>0)t.mulTo(r,i,a);else{var s=a;a=r,r=s}return t.revert(a)},H.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else if(64==e)e=6;else{if(4!=e)return this.toRadix(e);e=2}var t,a=(1<<e)-1,r=!1,i="",n=this.t,s=this.DB-n*this.DB%e;if(n-- >0)for(s<this.DB&&(t=this[n]>>s)>0&&(r=!0,i=J(t));n>=0;)s<e?(t=(this[n]&(1<<s)-1)<<e-s,t|=this[--n]>>(s+=this.DB-e)):(t=this[n]>>(s-=e)&a,s<=0&&(s+=this.DB,--n)),t>0&&(r=!0),r&&(i+=J(t));return r?i:"0"},H.prototype.negate=function(){var e=W();return H.ZERO.subTo(this,e),e},H.prototype.abs=function(){return this.s<0?this.negate():this},H.prototype.compareTo=function(e){if(0!=(t=this.s-e.s))return t;var t,a=this.t;if(0!=(t=a-e.t))return t;for(;--a>=0;)if(0!=(t=this[a]-e[a]))return t;return 0},H.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+z(this[this.t-1]^this.s&this.DM)},H.prototype.mod=function(e){var t=W();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(H.ZERO)>0&&e.subTo(t,t),t},H.prototype.modPowInt=function(e,t){var a;return a=e<256||t.isEven()?new K(t):new q(t),this.exp(e,a)},H.ZERO=j(0),H.ONE=j(1),ie.prototype.convert=ne,ie.prototype.revert=ne,ie.prototype.mulTo=function(e,t,a){e.multiplyTo(t,a)},ie.prototype.sqrTo=function(e,t){e.squareTo(t)},se.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=W();return e.copyTo(t),this.reduce(t),t},se.prototype.revert=function(e){return e},se.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},se.prototype.mulTo=function(e,t,a){e.multiplyTo(t,a),this.reduce(a)},se.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var xe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],oe=67108864/xe[xe.length-1];function le(){}function _e(){this.j=this.i=0,this.S=[]}H.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},H.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),a=j(t=Math.pow(e,t)),r=W(),i=W(),n="";for(this.divRemTo(a,r,i);r.signum()>0;)n=(t+i.intValue()).toString(e).substr(1)+n,r.divRemTo(a,r,i);return i.intValue().toString(e)+n},H.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var a=this.chunkSize(t),r=Math.pow(t,a),i=!1,n=0,s=0,x=0;x<e.length;++x){var o=Z(e,x);o<0?"-"==e.charAt(x)&&0==this.signum()&&(i=!0):(s=t*s+o,++n>=a&&(this.dMultiply(r),this.dAddOffset(s,0),s=n=0))}n>0&&(this.dMultiply(Math.pow(t,n)),this.dAddOffset(s,0)),i&&H.ZERO.subTo(this,this)},H.prototype.fromNumber=function(e,t,a){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,a),this.testBit(e-1)||this.bitwiseTo(H.ONE.shiftLeft(e-1),$,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(H.ONE.shiftLeft(e-1),this);else{var r=7&e;(a=[]).length=1+(e>>3),t.nextBytes(a),r>0?a[0]&=(1<<r)-1:a[0]=0,this.fromString(a,256)}},H.prototype.bitwiseTo=function(e,t,a){var r,i,n=Math.min(e.t,this.t);for(r=0;r<n;++r)a[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=n;r<this.t;++r)a[r]=t(this[r],i);a.t=this.t}else{for(i=this.s&this.DM,r=n;r<e.t;++r)a[r]=t(i,e[r]);a.t=e.t}a.s=t(this.s,e.s),a.clamp()},H.prototype.changeBit=function(e,t){var a=H.ONE.shiftLeft(e);return this.bitwiseTo(a,t,a),a},H.prototype.addTo=function(e,t){for(var a=0,r=0,i=Math.min(e.t,this.t);a<i;)r+=this[a]+e[a],t[a++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;a<this.t;)r+=this[a],t[a++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;a<e.t;)r+=e[a],t[a++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[a++]=r:r<-1&&(t[a++]=this.DV+r),t.t=a,t.clamp()},H.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},H.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},H.prototype.multiplyLowerTo=function(e,t,a){var r,i=Math.min(this.t+e.t,t);for(a.s=0,a.t=i;i>0;)a[--i]=0;for(r=a.t-this.t;i<r;++i)a[i+this.t]=this.am(0,e[i],a,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],a,i,0,t-i);a.clamp()},H.prototype.multiplyUpperTo=function(e,t,a){--t;var r=a.t=this.t+e.t-t;for(a.s=0;--r>=0;)a[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)a[this.t+r-t]=this.am(t-r,e[r],a,0,0,this.t+r-t);a.clamp(),a.drShiftTo(1,a)},H.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,a=this.s<0?e-1:0;if(this.t>0)if(0==t)a=this[0]%e;else for(var r=this.t-1;r>=0;--r)a=(t*a+this[r])%e;return a},H.prototype.millerRabin=function(e){var t=this.subtract(H.ONE),a=t.getLowestSetBit();if(a<=0)return!1;var r=t.shiftRight(a);(e=e+1>>1)>xe.length&&(e=xe.length);for(var i=W(),n=0;n<e;++n){i.fromInt(xe[Math.floor(Math.random()*xe.length)]);var s=i.modPow(r,this);if(0!=s.compareTo(H.ONE)&&0!=s.compareTo(t)){for(var x=1;x++<a&&0!=s.compareTo(t);)if(0==(s=s.modPowInt(2,this)).compareTo(H.ONE))return!1;if(0!=s.compareTo(t))return!1}}return!0},H.prototype.clone=function(){var e=W();return this.copyTo(e),e},H.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},H.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},H.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},H.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},H.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var a,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(a=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=a|this.s<<this.DB-r);e>=0;)r<8?(a=(this[e]&(1<<r)-1)<<8-r,a|=this[--e]>>(r+=this.DB-8)):(a=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),!!(128&a)&&(a|=-256),0==i&&(128&this.s)!=(128&a)&&++i,(i>0||a!=this.s)&&(t[i++]=a);return t},H.prototype.equals=function(e){return 0==this.compareTo(e)},H.prototype.min=function(e){return this.compareTo(e)<0?this:e},H.prototype.max=function(e){return this.compareTo(e)>0?this:e},H.prototype.and=function(e){var t=W();return this.bitwiseTo(e,Q,t),t},H.prototype.or=function(e){var t=W();return this.bitwiseTo(e,$,t),t},H.prototype.xor=function(e){var t=W();return this.bitwiseTo(e,ee,t),t},H.prototype.andNot=function(e){var t=W();return this.bitwiseTo(e,te,t),t},H.prototype.not=function(){for(var e=W(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},H.prototype.shiftLeft=function(e){var t=W();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},H.prototype.shiftRight=function(e){var t=W();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},H.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+ae(this[e]);return this.s<0?this.t*this.DB:-1},H.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,a=0;a<this.t;++a)e+=re(this[a]^t);return e},H.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},H.prototype.setBit=function(e){return this.changeBit(e,$)},H.prototype.clearBit=function(e){return this.changeBit(e,te)},H.prototype.flipBit=function(e){return this.changeBit(e,ee)},H.prototype.add=function(e){var t=W();return this.addTo(e,t),t},H.prototype.subtract=function(e){var t=W();return this.subTo(e,t),t},H.prototype.multiply=function(e){var t=W();return this.multiplyTo(e,t),t},H.prototype.divide=function(e){var t=W();return this.divRemTo(e,t,null),t},H.prototype.remainder=function(e){var t=W();return this.divRemTo(e,null,t),t},H.prototype.divideAndRemainder=function(e){var t=W(),a=W();return this.divRemTo(e,t,a),[t,a]},H.prototype.modPow=function(e,t){var a,r,i=e.bitLength(),n=j(1);if(i<=0)return n;a=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new K(t):t.isEven()?new se(t):new q(t);var s=[],x=3,o=a-1,l=(1<<a)-1;if(s[1]=r.convert(this),a>1)for(i=W(),r.sqrTo(s[1],i);x<=l;)s[x]=W(),r.mulTo(i,s[x-2],s[x]),x+=2;var _,h=e.t-1,f=!0,c=W();for(i=z(e[h])-1;h>=0;){for(i>=o?_=e[h]>>i-o&l:(_=(e[h]&(1<<i+1)-1)<<o-i,h>0&&(_|=e[h-1]>>this.DB+i-o)),x=a;!(1&_);)_>>=1,--x;if((i-=x)<0&&(i+=this.DB,--h),f)s[_].copyTo(n),f=!1;else{for(;x>1;)r.sqrTo(n,c),r.sqrTo(c,n),x-=2;x>0?r.sqrTo(n,c):(x=n,n=c,c=x),r.mulTo(c,s[_],n)}for(;h>=0&&!(e[h]&1<<i);)r.sqrTo(n,c),x=n,n=c,c=x,--i<0&&(i=this.DB-1,--h)}return r.revert(n)},H.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return H.ZERO;for(var a=e.clone(),r=this.clone(),i=j(1),n=j(0),s=j(0),x=j(1);0!=a.signum();){for(;a.isEven();)a.rShiftTo(1,a),t?(i.isEven()&&n.isEven()||(i.addTo(this,i),n.subTo(e,n)),i.rShiftTo(1,i)):n.isEven()||n.subTo(e,n),n.rShiftTo(1,n);for(;r.isEven();)r.rShiftTo(1,r),t?(s.isEven()&&x.isEven()||(s.addTo(this,s),x.subTo(e,x)),s.rShiftTo(1,s)):x.isEven()||x.subTo(e,x),x.rShiftTo(1,x);a.compareTo(r)>=0?(a.subTo(r,a),t&&i.subTo(s,i),n.subTo(x,n)):(r.subTo(a,r),t&&s.subTo(i,s),x.subTo(n,x))}return 0!=r.compareTo(H.ONE)?H.ZERO:x.compareTo(e)>=0?x.subtract(e):x.signum()<0?(x.addTo(e,x),x.signum()<0?x.add(e):x):x},H.prototype.pow=function(e){return this.exp(e,new ie)},H.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone();if(e=e.s<0?e.negate():e.clone(),t.compareTo(e)<0){var a=t;t=e,e=a}a=t.getLowestSetBit();var r=e.getLowestSetBit();if(r<0)return t;for(a<r&&(r=a),r>0&&(t.rShiftTo(r,t),e.rShiftTo(r,e));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=e.getLowestSetBit())>0&&e.rShiftTo(a,e),t.compareTo(e)>=0?(t.subTo(e,t),t.rShiftTo(1,t)):(e.subTo(t,e),e.rShiftTo(1,e));return r>0&&e.lShiftTo(r,e),e},H.prototype.isProbablePrime=function(e){var t,a=this.abs();if(1==a.t&&a[0]<=xe[xe.length-1]){for(t=0;t<xe.length;++t)if(a[0]==xe[t])return!0;return!1}if(a.isEven())return!1;for(t=1;t<xe.length;){for(var r=xe[t],i=t+1;i<xe.length&&r<oe;)r*=xe[i++];for(r=a.modInt(r);t<i;)if(r%xe[t++]==0)return!1}return a.millerRabin(e)},H.prototype.square=function(){var e=W();return this.squareTo(e),e},function(e,t,a,r,i,n,s){function x(e){var t,r,i=this,n=e.length,s=0,x=i.i=i.j=i.m=0;for(i.S=[],i.c=[],n||(e=[n++]);s<a;)i.S[s]=s++;for(s=0;s<a;s++)x=x+(t=i.S[s])+e[s%n]&255,r=i.S[x],i.S[s]=r,i.S[x]=t;i.g=function(e){var t=i.S,r=i.i+1&255,n=t[r],s=i.j+n&255,x=t[s];t[r]=x,t[s]=n;for(var o=t[n+x&255];--e;)x=t[s=s+(n=t[r=r+1&255])&255],t[r]=x,t[s]=n,o=o*a+t[n+x&255];return i.i=r,i.j=s,o},i.g(a)}function o(e,t,a,r,i){var n;if(a=[],i=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n,t&&"object"==i)for(r in e)if(r.indexOf("S")<5)try{a.push(o(e[r],t-1))}catch(e){}return a.length?a:e+("string"!=i?"\0":"")}function l(e,t,a,r){for(e+="",r=a=0;r<e.length;r++){var i=t,n=255&r,s=(a^=19*t[255&r])+e.charCodeAt(r);i[n]=255&s}for(r in e="",t)e+=String.fromCharCode(t[r]);return e}t.seedrandom=function(r,_){var h,f=[];r=l(o(_?[r,e]:arguments.length?r:[(new Date).getTime(),e,window],3),f);return l((h=new x(f)).S,e),t.random=function(){for(var e=h.g(6),t=s,r=0;e<i;)e=(e+r)*a,t*=a,r=h.g(1);for(;e>=n;)e/=2,t/=2,r>>>=1;return(e+r)/t},r},s=t.pow(a,6),i=t.pow(2,i),n=2*i,l(t.random(),e)}([],Math,256,0,52),le.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random())},_e.prototype.init=function(e){var t,a,r;for(t=0;t<256;++t)this.S[t]=t;for(t=a=0;t<256;++t)a=a+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[a],this.S[a]=r;this.j=this.i=0},_e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var he,fe,ce;function ue(){var e;e=(new Date).getTime(),fe[ce++]^=255&e,fe[ce++]^=e>>8&255,fe[ce++]^=e>>16&255,fe[ce++]^=e>>24&255,ce>=256&&(ce-=256)}if(null==fe){var de;for(fe=[],ce=0;ce<256;)de=Math.floor(65536*Math.random()),fe[ce++]=de>>>8,fe[ce++]=255&de;ce=0,ue()}function pe(){if(null==he){for(ue(),(he=new _e).init(fe),ce=0;ce<fe.length;++ce)fe[ce]=0;ce=0}return he.next()}function me(){}me.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=pe()};var Se=function(e){return function(e){function t(e,t){var a=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(a>>16)<<16|65535&a}function a(e,t){return e>>>t|e<<32-t}return e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",a=0;a<e.length;a++){var r=e.charCodeAt(a);r<128?t+=String.fromCharCode(r):(r>127&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e),function(e){for(var t="",a=0;a<4*e.length;a++)t+="0123456789abcdef".charAt(e[a>>2]>>8*(3-a%4)+4&15)+"0123456789abcdef".charAt(e[a>>2]>>8*(3-a%4)&15);return t}(function(e,r){var i,n,s,x,o,l,_,h,f,c,u,d,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],S=Array(64);for(e[r>>5]|=128<<24-r%32,e[15+(r+64>>9<<4)]=r,f=0;f<e.length;f+=16){for(i=m[0],n=m[1],s=m[2],x=m[3],o=m[4],l=m[5],_=m[6],h=m[7],c=0;c<64;c++)S[c]=c<16?e[c+f]:t(t(t(a(S[c-2],17)^a(S[c-2],19)^S[c-2]>>>10,S[c-7]),a(S[c-15],7)^a(S[c-15],18)^S[c-15]>>>3),S[c-16]),u=t(t(t(t(h,a(o,6)^a(o,11)^a(o,25)),o&l^~o&_),p[c]),S[c]),d=t(a(i,2)^a(i,13)^a(i,22),i&n^i&s^n&s),h=_,_=l,l=o,o=t(x,u),x=s,s=n,n=i,i=t(u,d);m[0]=t(i,m[0]),m[1]=t(n,m[1]),m[2]=t(s,m[2]),m[3]=t(x,m[3]),m[4]=t(o,m[4]),m[5]=t(l,m[5]),m[6]=t(_,m[6]),m[7]=t(h,m[7])}return m}(function(e){for(var t=[],a=0;a<8*e.length;a+=8)t[a>>5]|=(255&e.charCodeAt(a/8))<<24-a%32;return t}(e),8*e.length))}(e)};var Re=function(e){return function(e){function t(e,t){return e<<t|e>>>32-t}function a(e){var t,a="";for(t=7;t>=0;t--)a+=(e>>>4*t&15).toString(16);return a}var r,i,n,s,x,o,l,_=Array(80),h=1732584193,f=4023233417,c=2562383102,u=271733878,d=3285377520;e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",a=0;a<e.length;a++){var r=e.charCodeAt(a);r<128?t+=String.fromCharCode(r):(r>127&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e),n=e.length;var p=[];for(r=0;r<n-3;r+=4)i=e.charCodeAt(r)<<24|e.charCodeAt(r+1)<<16|e.charCodeAt(r+2)<<8|e.charCodeAt(r+3),p.push(i);switch(n%4){case 0:r=2147483648;break;case 1:r=e.charCodeAt(n-1)<<24|8388608;break;case 2:r=e.charCodeAt(n-2)<<24|e.charCodeAt(n-1)<<16|32768;break;case 3:r=e.charCodeAt(n-3)<<24|e.charCodeAt(n-2)<<16|e.charCodeAt(n-1)<<8|128}for(p.push(r);p.length%16!=14;)p.push(0);for(p.push(n>>>29),p.push(n<<3&4294967295),e=0;e<p.length;e+=16){for(r=0;r<16;r++)_[r]=p[e+r];for(r=16;r<=79;r++)_[r]=t(_[r-3]^_[r-8]^_[r-14]^_[r-16],1);for(i=h,n=f,s=c,x=u,o=d,r=0;r<=19;r++)l=t(i,5)+(n&s|~n&x)+o+_[r]+1518500249&4294967295,o=x,x=s,s=t(n,30),n=i,i=l;for(r=20;r<=39;r++)l=t(i,5)+(n^s^x)+o+_[r]+1859775393&4294967295,o=x,x=s,s=t(n,30),n=i,i=l;for(r=40;r<=59;r++)l=t(i,5)+(n&s|n&x|s&x)+o+_[r]+2400959708&4294967295,o=x,x=s,s=t(n,30),n=i,i=l;for(r=60;r<=79;r++)l=t(i,5)+(n^s^x)+o+_[r]+3395469782&4294967295,o=x,x=s,s=t(n,30),n=i,i=l;h=h+i&4294967295,f=f+n&4294967295,c=c+s&4294967295,u=u+x&4294967295,d=d+o&4294967295}return(l=a(h)+a(f)+a(c)+a(u)+a(d)).toLowerCase()}(e)};function Pe(e,t){return new H(e,t)}function ye(){this.n=null,this.e=0,this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}ye.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},ye.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Pe(e,16),this.e=parseInt(t,16)):alert("Invalid RSA public key")},ye.prototype.encrypt=function(e){return null==(e=function(e,t){if(t<e.length+11)throw"Message too long for RSA (n="+t+", l="+e.length+")";for(var a=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?a[--t]=i:i>127&&i<2048?(a[--t]=63&i|128,a[--t]=i>>6|192):(a[--t]=63&i|128,a[--t]=i>>6&63|128,a[--t]=i>>12|224)}for(a[--t]=0,r=new me,i=[];t>2;){for(i[0]=0;0==i[0];)r.nextBytes(i);a[--t]=i[0]}return a[--t]=2,a[--t]=0,new H(a)}(e,this.n.bitLength()+7>>3))||null==(e=this.doPublic(e))?null:1&(e=e.toString(16)).length?"0"+e:e},ye.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);var t=e.mod(this.p).modPow(this.dmp1,this.p);for(e=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(e)<0;)t=t.add(this.p);return t.subtract(e).multiply(this.coeff).mod(this.p).multiply(this.q).add(e)},ye.prototype.setPrivate=function(e,t,a){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Pe(e,16),this.e=parseInt(t,16),this.d=Pe(a,16)):alert("Invalid RSA private key")},ye.prototype.setPrivateEx=function(e,t,a,r,i,n,s,x){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=Pe(e,16),this.e=parseInt(t,16),this.d=Pe(a,16),this.p=Pe(r,16),this.q=Pe(i,16),this.dmp1=Pe(n,16),this.dmq1=Pe(s,16),this.coeff=Pe(x,16)):alert("Invalid RSA private key")},ye.prototype.generate=function(e,t){var a=new le,r=e>>1;this.e=parseInt(t,16);for(var i=new H(t,16);;){for(;this.p=new H(e-r,1,a),0!=this.p.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.p.isProbablePrime(10););for(;this.q=new H(r,1,a),0!=this.q.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}n=this.p.subtract(H.ONE);var s=this.q.subtract(H.ONE),x=n.multiply(s);if(0==x.gcd(i).compareTo(H.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(x),this.dmp1=this.d.mod(n),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},ye.prototype.decrypt=function(e){return null==(e=this.doPrivate(Pe(e,16)))?null:function(e,t){for(var a=e.toByteArray(),r=0;r<a.length&&0==a[r];)++r;if(a.length-r!=t-1||2!=a[r])return null;for(++r;0!=a[r];)if(++r>=a.length)return null;for(var i="";++r<a.length;){var n=255&a[r];n<128?i+=String.fromCharCode(n):n>191&&n<224?(i+=String.fromCharCode((31&n)<<6|63&a[r+1]),++r):(i+=String.fromCharCode((15&n)<<12|(63&a[r+1])<<6|63&a[r+2]),r+=2)}return i}(e,this.n.bitLength()+7>>3)};var be=[];be.sha1="3021300906052b0e03021a05000414",be.sha256="3031300d060960864801650304020105000420";var Ee=[];function ge(e,t,a){t/=4;e=(0,Ee[a])(e),a="00"+be[a]+e,e="",t=t-4-a.length;for(var r=0;r<t;r+=2)e+="ff";return sPaddedMessageHex="0001"+e+a}function Fe(e,t,a){return function(e,t,a){var r=new ye;return r.setPublic(t,a),r.doPublic(e)}(e,t,a).toString(16).replace(/^1f+00/,"")}function Ce(e){for(var t in be){var a=be[t],r=a.length;if(e.substring(0,r)==a)return[t,e.substring(r)]}return[]}Ee.sha1=Re,Ee.sha256=Se,ye.prototype.signString=function(e,t){var a=ge(e,this.n.bitLength(),t);return this.doPrivate(Pe(a,16)).toString(16)},ye.prototype.signStringWithSHA1=function(e){return e=ge(e,this.n.bitLength(),"sha1"),this.doPrivate(Pe(e,16)).toString(16)},ye.prototype.signStringWithSHA256=function(e){return e=ge(e,this.n.bitLength(),"sha256"),this.doPrivate(Pe(e,16)).toString(16)},ye.prototype.verifyString=function(e,t){t=t.replace(/[ \n]+/g,"");var a=this.doPublic(Pe(t,16)).toString(16).replace(/^1f+00/,""),r=Ce(a);return 0!=r.length&&(a=r[1])==(r=(0,Ee[r[0]])(e))},ye.prototype.verifyHexSignatureForMessage=function(e,t){return function(e,t,a,r){return 0!=(a=Ce(t=Fe(t,a,r))).length&&(t=a[1])==(0,Ee[a[0]])(e)}(t,Pe(e,16),this.n.toString(16),this.e.toString(16))};var ve,Te,De,Ae=(ve={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],Init:function(){ve.Sbox_Inv=Array(256);for(var e=0;e<256;e++)ve.Sbox_Inv[ve.Sbox[e]]=e;for(ve.ShiftRowTab_Inv=Array(16),e=0;e<16;e++)ve.ShiftRowTab_Inv[ve.ShiftRowTab[e]]=e;for(ve.xtime=Array(256),e=0;e<128;e++)ve.xtime[e]=e<<1,ve.xtime[128+e]=e<<1^27},Done:function(){delete ve.Sbox_Inv,delete ve.ShiftRowTab_Inv,delete ve.xtime},ExpandKey:function(e){var t,a=e.length,r=1;switch(a){case 16:t=176;break;case 24:t=208;break;case 32:t=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var i=a;i<t;i+=4){var n=e.slice(i-4,i);i%a==0?(n=[ve.Sbox[n[1]]^r,ve.Sbox[n[2]],ve.Sbox[n[3]],ve.Sbox[n[0]]],(r<<=1)>=256&&(r^=283)):a>24&&i%a==16&&(n=[ve.Sbox[n[0]],ve.Sbox[n[1]],ve.Sbox[n[2]],ve.Sbox[n[3]]]);for(var s=0;s<4;s++)e[i+s]=e[i+s-a]^n[s]}},Encrypt:function(e,t){var a=t.length;ve.AddRoundKey(e,t.slice(0,16));for(var r=16;r<a-16;r+=16)ve.SubBytes(e,ve.Sbox),ve.ShiftRows(e,ve.ShiftRowTab),ve.MixColumns(e),ve.AddRoundKey(e,t.slice(r,r+16));ve.SubBytes(e,ve.Sbox),ve.ShiftRows(e,ve.ShiftRowTab),ve.AddRoundKey(e,t.slice(r,a))},Decrypt:function(e,t){var a=t.length;for(ve.AddRoundKey(e,t.slice(a-16,a)),ve.ShiftRows(e,ve.ShiftRowTab_Inv),ve.SubBytes(e,ve.Sbox_Inv),a-=32;a>=16;a-=16)ve.AddRoundKey(e,t.slice(a,a+16)),ve.MixColumns_Inv(e),ve.ShiftRows(e,ve.ShiftRowTab_Inv),ve.SubBytes(e,ve.Sbox_Inv);ve.AddRoundKey(e,t.slice(0,16))},SubBytes:function(e,t){for(var a=0;a<16;a++)e[a]=t[e[a]]},AddRoundKey:function(e,t){for(var a=0;a<16;a++)e[a]^=t[a]},ShiftRows:function(e,t){for(var a=[].concat(e),r=0;r<16;r++)e[r]=a[t[r]]},MixColumns:function(e){for(var t=0;t<16;t+=4){var a=e[t+0],r=e[t+1],i=e[t+2],n=e[t+3],s=a^r^i^n;e[t+0]^=s^ve.xtime[a^r],e[t+1]^=s^ve.xtime[r^i],e[t+2]^=s^ve.xtime[i^n],e[t+3]^=s^ve.xtime[n^a]}},MixColumns_Inv:function(e){for(var t=0;t<16;t+=4){var a=e[t+0],r=e[t+1],i=e[t+2],n=e[t+3],s=a^r^i^n,x=ve.xtime[s],o=ve.xtime[ve.xtime[x^a^i]]^s;s^=ve.xtime[ve.xtime[x^r^n]],e[t+0]^=o^ve.xtime[a^r],e[t+1]^=s^ve.xtime[r^i],e[t+2]^=o^ve.xtime[i^n],e[t+3]^=s^ve.xtime[n^a]}}},ve),Ie=function(){var e={};return Ae.Init(),e.b256to64=function(e){var t,a,r,i="",n=0,s=e.length;for(r=0;r<s;r++)a=e.charCodeAt(r),0==n?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>2&63),t=(3&a)<<4):1==n?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|a>>4&15),t=(15&a)<<2):2==n&&(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|a>>6&3),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&a)),3==(n+=1)&&(n=0);return n>0&&(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t),i+="="),1==n&&(i+="="),i},e.b64to256=function(e){var t,a,r="",i=0,n=0,s=e.length;for(a=0;a<s;a++)(t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(a)))>=0&&(i&&(r+=String.fromCharCode(n|t>>6-i&255)),n=t<<(i=i+2&7)&255);return r},e.b16to64=function(e){var t,a,r="";for(e.length%2==1&&(e="0"+e),t=0;t+3<=e.length;t+=3)a=parseInt(e.substring(t,t+3),16),r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&a);for(t+1==e.length?(a=parseInt(e.substring(t,t+1),16),r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a<<2)):t+2==e.length&&(a=parseInt(e.substring(t,t+2),16),r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((3&a)<<4));(3&r.length)>0;)r+="=";return r},e.b64to16=function(e){var t,a,r="",i=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t)v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t)),v<0||(0==i?(r+=J(v>>2),a=3&v,i=1):1==i?(r+=J(a<<2|v>>4),a=15&v,i=2):2==i?(r+=J(a),r+=J(v>>2),a=3&v,i=3):(r+=J(a<<2|v>>4),r+=J(15&v),i=0));return 1==i&&(r+=J(a<<2)),r},e.string2bytes=function(e){for(var t=[],a=0;a<e.length;a++)t.push(e.charCodeAt(a));return t},e.bytes2string=function(e){for(var t="",a=0;a<e.length;a++)t+=String.fromCharCode(e[a]);return t},e.blockXOR=function(e,t){for(var a=Array(16),r=0;r<16;r++)a[r]=e[r]^t[r];return a},e.blockIV=function(){var e=new me,t=Array(16);return e.nextBytes(t),t},e.pad16=function(e){var t=e.slice(0),a=(16-e.length%16)%16;for(i=e.length;i<e.length+a;i++)t.push(0);return t},e.depad=function(e){for(e=e.slice(0);0==e[e.length-1];)e=e.slice(0,e.length-1);return e},e.encryptAESCBC=function(t,a){var r=a.slice(0);Ae.ExpandKey(r);for(var i=e.string2bytes(t),n=(i=e.pad16(i),e.blockIV()),s=0;s<i.length/16;s++){var x=i.slice(16*s,16*s+16),o=n.slice(16*s,16*s+16);x=e.blockXOR(o,x);Ae.Encrypt(x,r),n=n.concat(x)}return r=e.bytes2string(n),e.b256to64(r)},e.decryptAESCBC=function(t,a){var r=a.slice(0);Ae.ExpandKey(r);t=e.b64to256(t);for(var i=e.string2bytes(t),n=[],s=1;s<i.length/16;s++){var x=i.slice(16*s,16*s+16),o=i.slice(16*(s-1),16*(s-1)+16);Ae.Decrypt(x,r),x=e.blockXOR(o,x),n=n.concat(x)}return n=e.depad(n),e.bytes2string(n)},e.wrap60=function(e){for(var t="",a=0;a<e.length;a++)a%60==0&&0!=a&&(t+="\n"),t+=e[a];return t},e.generateAESKey=function(){var e=Array(16);return(new me).nextBytes(e),e},e.generateRSAKey=function(e,t){Math.seedrandom(Se(e));var a=new ye;return a.generate(t,"10001"),a},e.publicKeyString=function(e){return pubkey=e.n.toString(16)},e.publicKeyID=function(e){return function(e){function t(e,t){var a,r,i,n,s;return i=2147483648&e,n=2147483648&t,s=(1073741823&e)+(1073741823&t),(a=1073741824&e)&(r=1073741824&t)?2147483648^s^i^n:a|r?1073741824&s?3221225472^s^i^n:1073741824^s^i^n:s^i^n}function a(e,a,r,i,n,s,x){return e=t(e,t(t(a&r|~a&i,n),x)),t(e<<s|e>>>32-s,a)}function r(e,a,r,i,n,s,x){return e=t(e,t(t(a&i|r&~i,n),x)),t(e<<s|e>>>32-s,a)}function i(e,a,r,i,n,s,x){return e=t(e,t(t(a^r^i,n),x)),t(e<<s|e>>>32-s,a)}function n(e,a,r,i,n,s,x){return e=t(e,t(t(r^(a|~i),n),x)),t(e<<s|e>>>32-s,a)}function s(e){var t,a="",r="";for(t=0;t<=3;t++)a+=(r="0"+(r=e>>>8*t&255).toString(16)).substr(r.length-2,2);return a}var x,o,l,_,h,f,c,u,d=function(e){for(var t,a=e.length,r=16*(((t=a+8)-t%64)/64+1),i=Array(r-1),n=0,s=0;s<a;)n=s%4*8,i[t=(s-s%4)/4]|=e.charCodeAt(s)<<n,s++;return i[(s-s%4)/4]|=128<<s%4*8,i[r-2]=a<<3,i[r-1]=a>>>29,i}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",a=0;a<e.length;a++){var r=e.charCodeAt(a);r<128?t+=String.fromCharCode(r):(r>127&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e));for(h=1732584193,f=4023233417,c=2562383102,u=271733878,e=0;e<d.length;e+=16)x=h,o=f,l=c,_=u,h=a(h,f,c,u,d[e+0],7,3614090360),u=a(u,h,f,c,d[e+1],12,3905402710),c=a(c,u,h,f,d[e+2],17,606105819),f=a(f,c,u,h,d[e+3],22,3250441966),h=a(h,f,c,u,d[e+4],7,4118548399),u=a(u,h,f,c,d[e+5],12,1200080426),c=a(c,u,h,f,d[e+6],17,2821735955),f=a(f,c,u,h,d[e+7],22,4249261313),h=a(h,f,c,u,d[e+8],7,1770035416),u=a(u,h,f,c,d[e+9],12,2336552879),c=a(c,u,h,f,d[e+10],17,4294925233),f=a(f,c,u,h,d[e+11],22,2304563134),h=a(h,f,c,u,d[e+12],7,1804603682),u=a(u,h,f,c,d[e+13],12,4254626195),c=a(c,u,h,f,d[e+14],17,2792965006),h=r(h,f=a(f,c,u,h,d[e+15],22,1236535329),c,u,d[e+1],5,4129170786),u=r(u,h,f,c,d[e+6],9,3225465664),c=r(c,u,h,f,d[e+11],14,643717713),f=r(f,c,u,h,d[e+0],20,3921069994),h=r(h,f,c,u,d[e+5],5,3593408605),u=r(u,h,f,c,d[e+10],9,38016083),c=r(c,u,h,f,d[e+15],14,3634488961),f=r(f,c,u,h,d[e+4],20,3889429448),h=r(h,f,c,u,d[e+9],5,568446438),u=r(u,h,f,c,d[e+14],9,3275163606),c=r(c,u,h,f,d[e+3],14,4107603335),f=r(f,c,u,h,d[e+8],20,1163531501),h=r(h,f,c,u,d[e+13],5,2850285829),u=r(u,h,f,c,d[e+2],9,4243563512),c=r(c,u,h,f,d[e+7],14,1735328473),h=i(h,f=r(f,c,u,h,d[e+12],20,2368359562),c,u,d[e+5],4,4294588738),u=i(u,h,f,c,d[e+8],11,2272392833),c=i(c,u,h,f,d[e+11],16,1839030562),f=i(f,c,u,h,d[e+14],23,4259657740),h=i(h,f,c,u,d[e+1],4,2763975236),u=i(u,h,f,c,d[e+4],11,1272893353),c=i(c,u,h,f,d[e+7],16,4139469664),f=i(f,c,u,h,d[e+10],23,3200236656),h=i(h,f,c,u,d[e+13],4,681279174),u=i(u,h,f,c,d[e+0],11,3936430074),c=i(c,u,h,f,d[e+3],16,3572445317),f=i(f,c,u,h,d[e+6],23,76029189),h=i(h,f,c,u,d[e+9],4,3654602809),u=i(u,h,f,c,d[e+12],11,3873151461),c=i(c,u,h,f,d[e+15],16,530742520),h=n(h,f=i(f,c,u,h,d[e+2],23,3299628645),c,u,d[e+0],6,4096336452),u=n(u,h,f,c,d[e+7],10,1126891415),c=n(c,u,h,f,d[e+14],15,2878612391),f=n(f,c,u,h,d[e+5],21,4237533241),h=n(h,f,c,u,d[e+12],6,1700485571),u=n(u,h,f,c,d[e+3],10,2399980690),c=n(c,u,h,f,d[e+10],15,4293915773),f=n(f,c,u,h,d[e+1],21,2240044497),h=n(h,f,c,u,d[e+8],6,1873313359),u=n(u,h,f,c,d[e+15],10,4264355552),c=n(c,u,h,f,d[e+6],15,2734768916),f=n(f,c,u,h,d[e+13],21,1309151649),h=n(h,f,c,u,d[e+4],6,4149444226),u=n(u,h,f,c,d[e+11],10,3174756917),c=n(c,u,h,f,d[e+2],15,718787259),f=n(f,c,u,h,d[e+9],21,3951481745),h=t(h,x),f=t(f,o),c=t(c,l),u=t(u,_);return(s(h)+s(f)+s(c)+s(u)).toLowerCase()}(e)},e.publicKeyFromString=function(e){e=e.split("|")[0];var t=new ye;return t.setPublic(e,"10001"),t},e.encrypt=function(t,a,r){var i="";try{i+=e.publicKeyFromString(a).encrypt(t)+"?"}catch(e){return{status:"Invalid public key"}}return{status:"success",cipher:i}},e.decrypt=function(e,t){var a=e.split("?");return{status:"success",plaintext:t.decrypt(a[0]),signature:"unsigned"}},e}(),Me=Me||function(e){var t={},a=t.lib={},r=function(){},i=a.Base={extend:function(e){r.prototype=this;var t=new r;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},n=a.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||x).stringify(this)},concat:function(e){var t=this.words,a=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(a[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<a.length)for(i=0;i<e;i+=4)t[r+i>>>2]=a[i>>>2];else t.push.apply(t,a);return this.sigBytes+=e,this},clamp:function(){var t=this.words,a=this.sigBytes;t[a>>>2]&=4294967295<<32-a%4*8,t.length=e.ceil(a/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var a=[],r=0;r<t;r+=4)a.push(4294967296*e.random()|0);return new n.init(a,t)}}),s=t.enc={},x=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var a=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;a.push((i>>>4).toString(16)),a.push((15&i).toString(16))}return a.join("")},parse:function(e){for(var t=e.length,a=[],r=0;r<t;r+=2)a[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new n.init(a,t/2)}},o=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var a=[],r=0;r<e;r++)a.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return a.join("")},parse:function(e){for(var t=e.length,a=[],r=0;r<t;r++)a[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new n.init(a,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(o.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return o.parse(unescape(encodeURIComponent(e)))}},_=a.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var a=this._data,r=a.words,i=a.sigBytes,s=this.blockSize,x=i/(4*s);if(t=(x=t?e.ceil(x):e.max((0|x)-this._minBufferSize,0))*s,i=e.min(4*t,i),t){for(var o=0;o<t;o+=s)this._doProcessBlock(r,o);o=r.splice(0,t),a.sigBytes-=i}return new n.init(o,i)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=_.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,a){return new e.init(a).finalize(t)}},_createHmacHelper:function(e){return function(t,a){return new h.HMAC.init(e,a).finalize(t)}}});var h=t.algo={};return t}(Math);De=(Te=Me).lib.WordArray,Te.enc.Base64={stringify:function(e){var t=e.words,a=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<a;i+=3)for(var n=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s<a;s++)e.push(r.charAt(n>>>6*(3-s)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,a=this._map;(r=a.charAt(64))&&-1!=(r=e.indexOf(r))&&(t=r);for(var r=[],i=0,n=0;n<t;n++)if(n%4){var s=a.indexOf(e.charAt(n-1))<<n%4*2,x=a.indexOf(e.charAt(n))>>>6-n%4*2;r[i>>>2]|=(s|x)<<24-i%4*8,i++}return De.create(r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,a,r,i,n,s){return((e=e+(t&a|~t&r)+i+s)<<n|e>>>32-n)+t}function a(e,t,a,r,i,n,s){return((e=e+(t&r|a&~r)+i+s)<<n|e>>>32-n)+t}function r(e,t,a,r,i,n,s){return((e=e+(t^a^r)+i+s)<<n|e>>>32-n)+t}function i(e,t,a,r,i,n,s){return((e=e+(a^(t|~r))+i+s)<<n|e>>>32-n)+t}for(var n=Me,s=(o=n.lib).WordArray,x=o.Hasher,o=n.algo,l=[],_=0;64>_;_++)l[_]=4294967296*e.abs(e.sin(_+1))|0;o=o.MD5=x.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var s=0;16>s;s++){var x=e[o=n+s];e[o]=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8)}s=this._hash.words;var o=e[n+0],_=(x=e[n+1],e[n+2]),h=e[n+3],f=e[n+4],c=e[n+5],u=e[n+6],d=e[n+7],p=e[n+8],m=e[n+9],S=e[n+10],R=e[n+11],P=e[n+12],y=e[n+13],b=e[n+14],E=e[n+15],g=t(g=s[0],v=s[1],C=s[2],F=s[3],o,7,l[0]),F=t(F,g,v,C,x,12,l[1]),C=t(C,F,g,v,_,17,l[2]),v=t(v,C,F,g,h,22,l[3]);g=t(g,v,C,F,f,7,l[4]),F=t(F,g,v,C,c,12,l[5]),C=t(C,F,g,v,u,17,l[6]),v=t(v,C,F,g,d,22,l[7]),g=t(g,v,C,F,p,7,l[8]),F=t(F,g,v,C,m,12,l[9]),C=t(C,F,g,v,S,17,l[10]),v=t(v,C,F,g,R,22,l[11]),g=t(g,v,C,F,P,7,l[12]),F=t(F,g,v,C,y,12,l[13]),C=t(C,F,g,v,b,17,l[14]),g=a(g,v=t(v,C,F,g,E,22,l[15]),C,F,x,5,l[16]),F=a(F,g,v,C,u,9,l[17]),C=a(C,F,g,v,R,14,l[18]),v=a(v,C,F,g,o,20,l[19]),g=a(g,v,C,F,c,5,l[20]),F=a(F,g,v,C,S,9,l[21]),C=a(C,F,g,v,E,14,l[22]),v=a(v,C,F,g,f,20,l[23]),g=a(g,v,C,F,m,5,l[24]),F=a(F,g,v,C,b,9,l[25]),C=a(C,F,g,v,h,14,l[26]),v=a(v,C,F,g,p,20,l[27]),g=a(g,v,C,F,y,5,l[28]),F=a(F,g,v,C,_,9,l[29]),C=a(C,F,g,v,d,14,l[30]),g=r(g,v=a(v,C,F,g,P,20,l[31]),C,F,c,4,l[32]),F=r(F,g,v,C,p,11,l[33]),C=r(C,F,g,v,R,16,l[34]),v=r(v,C,F,g,b,23,l[35]),g=r(g,v,C,F,x,4,l[36]),F=r(F,g,v,C,f,11,l[37]),C=r(C,F,g,v,d,16,l[38]),v=r(v,C,F,g,S,23,l[39]),g=r(g,v,C,F,y,4,l[40]),F=r(F,g,v,C,o,11,l[41]),C=r(C,F,g,v,h,16,l[42]),v=r(v,C,F,g,u,23,l[43]),g=r(g,v,C,F,m,4,l[44]),F=r(F,g,v,C,P,11,l[45]),C=r(C,F,g,v,E,16,l[46]),g=i(g,v=r(v,C,F,g,_,23,l[47]),C,F,o,6,l[48]),F=i(F,g,v,C,d,10,l[49]),C=i(C,F,g,v,b,15,l[50]),v=i(v,C,F,g,c,21,l[51]),g=i(g,v,C,F,P,6,l[52]),F=i(F,g,v,C,h,10,l[53]),C=i(C,F,g,v,S,15,l[54]),v=i(v,C,F,g,x,21,l[55]),g=i(g,v,C,F,p,6,l[56]),F=i(F,g,v,C,E,10,l[57]),C=i(C,F,g,v,u,15,l[58]),v=i(v,C,F,g,y,21,l[59]),g=i(g,v,C,F,f,6,l[60]),F=i(F,g,v,C,R,10,l[61]),C=i(C,F,g,v,_,15,l[62]),v=i(v,C,F,g,m,21,l[63]);s[0]=s[0]+g|0,s[1]=s[1]+v|0,s[2]=s[2]+C|0,s[3]=s[3]+F|0},_doFinalize:function(){var t=this._data,a=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;a[i>>>5]|=128<<24-i%32;var n=e.floor(r/4294967296);for(a[15+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(a.length+1),this._process(),a=(t=this._hash).words,r=0;4>r;r++)i=a[r],a[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=x.clone.call(this);return e._hash=this._hash.clone(),e}}),n.MD5=x._createHelper(o),n.HmacMD5=x._createHmacHelper(o)}(Math),function(){var e,t=Me,a=(e=t.lib).Base,r=e.WordArray,i=(e=t.algo).EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var a=(x=this.cfg).hasher.create(),i=r.create(),n=i.words,s=x.keySize,x=x.iterations;n.length<s;){o&&a.update(o);var o=a.update(e).finalize(t);a.reset();for(var l=1;l<x;l++)o=a.finalize(o),a.reset();i.concat(o)}return i.sigBytes=4*s,i}});t.EvpKDF=function(e,t,a){return i.create(a).compute(e,t)}}(),Me.lib.Cipher||function(){var e=(f=Me).lib,t=e.Base,a=e.WordArray,r=e.BufferedBlockAlgorithm,i=f.enc.Base64,n=f.algo.EvpKDF,s=e.Cipher=r.extend({cfg:t.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,a){this.cfg=this.cfg.extend(a),this._xformMode=e,this._key=t,this.reset()},reset:function(){r.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,a,r){return("string"==typeof a?c:h).encrypt(e,t,a,r)},decrypt:function(t,a,r){return("string"==typeof a?c:h).decrypt(e,t,a,r)}}}});e.StreamCipher=s.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var x=f.mode={},o=function(e,t,a){var r=this._iv;r?this._iv=undefined:r=this._prevBlock;for(var i=0;i<a;i++)e[t+i]^=r[i]},l=(e.BlockCipherMode=t.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();l.Encryptor=l.extend({processBlock:function(e,t){var a=this._cipher,r=a.blockSize;o.call(this,e,t,r),a.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),l.Decryptor=l.extend({processBlock:function(e,t){var a=this._cipher,r=a.blockSize,i=e.slice(t,t+r);a.decryptBlock(e,t),o.call(this,e,t,r),this._prevBlock=i}}),x=x.CBC=l,l=(f.pad={}).Pkcs7={pad:function(e,t){for(var r,i=(r=(r=4*t)-e.sigBytes%r)<<24|r<<16|r<<8|r,n=[],s=0;s<r;s+=4)n.push(i);r=a.create(n,r),e.concat(r)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.BlockCipher=s.extend({cfg:s.cfg.extend({mode:x,padding:l}),reset:function(){s.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var a=t.createEncryptor;else a=t.createDecryptor,this._minBufferSize=1;this._mode=a.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var _=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(x=(f.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?a.create([1398893684,1701076831]).concat(e).concat(t):t).toString(i)},parse:function(e){var t=(e=i.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var r=a.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return _.create({ciphertext:e,salt:r})}},e.SerializableCipher=t.extend({cfg:t.extend({format:x}),encrypt:function(e,t,a,r){r=this.cfg.extend(r);var i=e.createEncryptor(a,r);return t=i.finalize(t),i=i.cfg,_.create({ciphertext:t,key:a,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,a,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(a,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),f=(f.kdf={}).OpenSSL={execute:function(e,t,r,i){return i||(i=a.random(8)),e=n.create({keySize:t+r}).compute(e,i),r=a.create(e.words.slice(t),4*r),e.sigBytes=4*t,_.create({key:e,iv:r,salt:i})}},c=e.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:f}),encrypt:function(e,t,a,r){return a=(r=this.cfg.extend(r)).kdf.execute(a,e.keySize,e.ivSize),r.iv=a.iv,(e=h.encrypt.call(this,e,t,a.key,r)).mixIn(a),e},decrypt:function(e,t,a,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),a=r.kdf.execute(a,e.keySize,e.ivSize,t.salt),r.iv=a.iv,h.decrypt.call(this,e,t,a.key,r)}})}(),function(){for(var e=Me,t=e.lib.BlockCipher,a=e.algo,r=[],i=[],n=[],s=[],x=[],o=[],l=[],_=[],h=[],f=[],c=[],u=0;256>u;u++)c[u]=128>u?u<<1:u<<1^283;var d=0,p=0;for(u=0;256>u;u++){var m=(m=p^p<<1^p<<2^p<<3^p<<4)>>>8^255&m^99;r[d]=m,i[m]=d;var S=c[d],R=c[S],P=c[R],y=257*c[m]^16843008*m;n[d]=y<<24|y>>>8,s[d]=y<<16|y>>>16,x[d]=y<<8|y>>>24,o[d]=y,y=16843009*P^65537*R^257*S^16843008*d,l[m]=y<<24|y>>>8,_[m]=y<<16|y>>>16,h[m]=y<<8|y>>>24,f[m]=y,d?(d=S^c[c[c[P^S]]],p^=c[c[p]]):d=p=1}var b=[0,1,2,4,8,16,32,64,128,27,54];a=a.AES=t.extend({_doReset:function(){for(var e=(a=this._key).words,t=a.sigBytes/4,a=4*((this._nRounds=t+6)+1),i=this._keySchedule=[],n=0;n<a;n++)if(n<t)i[n]=e[n];else{var s=i[n-1];n%t?6<t&&4==n%t&&(s=r[s>>>24]<<24|r[s>>>16&255]<<16|r[s>>>8&255]<<8|r[255&s]):(s=r[(s=s<<8|s>>>24)>>>24]<<24|r[s>>>16&255]<<16|r[s>>>8&255]<<8|r[255&s],s^=b[n/t|0]<<24),i[n]=i[n-t]^s}for(e=this._invKeySchedule=[],t=0;t<a;t++)n=a-t,s=t%4?i[n]:i[n-4],e[t]=4>t||4>=n?s:l[r[s>>>24]]^_[r[s>>>16&255]]^h[r[s>>>8&255]]^f[r[255&s]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,n,s,x,o,r)},decryptBlock:function(e,t){var a=e[t+1];e[t+1]=e[t+3],e[t+3]=a,this._doCryptBlock(e,t,this._invKeySchedule,l,_,h,f,i),a=e[t+1],e[t+1]=e[t+3],e[t+3]=a},_doCryptBlock:function(e,t,a,r,i,n,s,x){for(var o=this._nRounds,l=e[t]^a[0],_=e[t+1]^a[1],h=e[t+2]^a[2],f=e[t+3]^a[3],c=4,u=1;u<o;u++){var d=r[l>>>24]^i[_>>>16&255]^n[h>>>8&255]^s[255&f]^a[c++],p=r[_>>>24]^i[h>>>16&255]^n[f>>>8&255]^s[255&l]^a[c++],m=r[h>>>24]^i[f>>>16&255]^n[l>>>8&255]^s[255&_]^a[c++];f=r[f>>>24]^i[l>>>16&255]^n[_>>>8&255]^s[255&h]^a[c++],l=d,_=p,h=m}d=(x[l>>>24]<<24|x[_>>>16&255]<<16|x[h>>>8&255]<<8|x[255&f])^a[c++],p=(x[_>>>24]<<24|x[h>>>16&255]<<16|x[f>>>8&255]<<8|x[255&l])^a[c++],m=(x[h>>>24]<<24|x[f>>>16&255]<<16|x[l>>>8&255]<<8|x[255&_])^a[c++],f=(x[f>>>24]<<24|x[l>>>16&255]<<16|x[_>>>8&255]<<8|x[255&h])^a[c++],e[t]=d,e[t+1]=p,e[t+2]=m,e[t+3]=f},keySize:8});e.AES=t._createHelper(a)}();var Le=function(){function e(){}var t=e.prototype;return t.createClientObject=function(e,t,a,r,i){var n=Me.AES.encrypt((new Date).getTime().toString(),Me.enc.Hex.parse("1234567891234567123456789123456712345678912345671234567891234567"),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse("12345678912345671234567891234567"),padding:Me.pad.Pkcs7}).ciphertext.toString();n.length<64&&(n+=n);var s=Me.AES.encrypt((new Date).getTime().toString(),Me.enc.Hex.parse("12345678912345671234567891234567"),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse("12345678912345671234567891234567"),padding:Me.pad.Pkcs7}).ciphertext.toString();return{socket:e,id:t,PKD:a,rand:r,playURL:i.playURL||"",auth:i.auth||"",token:i.token||"",key:n,iv:s,resolve:null,reject:null}},t.playCmd=function(e){var t={sequence:0,cmd:"realplay",url:e.playURL,key:Ie.encrypt(e.iv+":"+e.key,e.PKD).cipher.split("?")[0],authorization:Me.AES.encrypt(e.rand+":"+e.auth,Me.enc.Hex.parse(e.key),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse(e.iv),padding:Me.pad.Pkcs7}).ciphertext.toString(),token:Me.AES.encrypt(e.token,Me.enc.Hex.parse(e.key),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse(e.iv),padding:Me.pad.Pkcs7}).ciphertext.toString()};return JSON.stringify(t)},t.playbackCmd=function(e,t,a){var r={sequence:0,cmd:"playback",url:e.playURL,key:Ie.encrypt(e.iv+":"+e.key,e.PKD).cipher.split("?")[0],authorization:Me.AES.encrypt(e.rand+":"+e.auth,Me.enc.Hex.parse(e.key),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse(e.iv),padding:Me.pad.Pkcs7}).ciphertext.toString(),token:Me.AES.encrypt(e.token,Me.enc.Hex.parse(e.key),{mode:Me.mode.CBC,iv:Me.enc.Hex.parse(e.iv),padding:Me.pad.Pkcs7}).ciphertext.toString(),startTime:t,endTime:a};return JSON.stringify(r)},t.seekCmd=function(e,t){var a={sequence:0,cmd:"seek",startTime:e,endTime:t};return JSON.stringify(a)},e}(),we=function(){function e(){}var t=e.prototype;return t.createClientObject=function(e,t,a,r){return{socket:e,id:t,playURL:a,deviceSerial:r.deviceSerial||"",verificationCode:r.verificationCode||"",resolve:null,reject:null}},t.playCmd=function(e){var t={sequence:0,cmd:"realplay",deviceSerial:e.deviceSerial,verificationCode:e.verificationCode,url:e.playURL};return JSON.stringify(t)},t.playbackCmd=function(e,t,a){var r={sequence:0,cmd:"playback",deviceSerial:e.deviceSerial,verificationCode:e.verificationCode,url:e.playURL,startTime:t,endTime:a};return JSON.stringify(r)},e}(),Oe=Symbol("WEBSOCKET"),Be=Symbol("GETINDEX"),ke=Symbol("PROTOCOLVERSION"),Ne=Symbol("CIPHERSUITES"),Ve=new V,Ue=new U,He=new Le,We=new we,Ye=function(){function e(){this[ke]="0.1",this[Ne]=0,this[Oe]=[],this.ERRORS={},this[Be]=function(e){for(var t=-1,a=0,r=this[Oe].length;a<r;a++)if(this[Oe][a].id===e){t=a;break}return t}}var t=e.prototype;return t.openStream=function(e,t,a,r,i){var n=!1;e.indexOf("[")>-1&&(n=!0);var s=this,x=e.split("://"),o=x[0],l="",_=7681,h=1,f=0,c=!1;if(n)l=x[1].split("]:")[0]+"]",_=Math.floor(x[1].split("]:")[1].split("/")[0]),h=Math.floor(x[1].split("]:")[1].split("/")[1]/100),f=Math.floor(x[1].split("]:")[1].split("/")[1]%100)-1;else{l=x[1].split(":")[0],_=Math.floor(x[1].split(":")[1].split("/")[0]),h=Math.floor(x[1].split(":")[1].split("/")[1]/100),f=Math.floor(x[1].split(":")[1].split("/")[1]%100)-1;var u=x[1].split(":")[1].split("/")[2];""!==u&&"webSocketVideoCtrlProxy"===u&&(c=!0)}0===h&&(f=0);var d="&sessionID=";(t=t||{}).token&&!t.playURL&&(d="&token=");var p=t.sessionID||t.session||(t.playURL?"":t.token)||"",m=new window.WebSocket(o+"://"+l+":"+_+(t.mode?"/"+t.mode:"")+(c?"/webSocketVideoCtrlProxy":"")+"?version="+s[ke]+"&cipherSuites="+s[Ne]+d+p+(t.proxy?"&proxy="+t.proxy:""));m.binaryType="arraybuffer";var S=N(),R=-1;return new Promise((function(e,n){m.onopen=function(){t.playURL||t.sessionID||t.deviceSerial||t.token||(s[Oe].push(Ve.createClientObject(m,S,h,f)),e(S))},m.onmessage=function(r){if("string"==typeof r.data){var i=JSON.parse(r.data),x=s[Be](S);if(i&&i.version&&i.cipherSuite){if(s[ke]=i.version,s[Ne]=parseInt(i.cipherSuite,10),i&&i.PKD&&i.rand)s[Oe].push(He.createClientObject(m,S,i.PKD,i.rand,t));else{var o="live://"+l+":"+_+"/"+h+"/"+f;-1===s[Ne]?s[Oe].push(We.createClientObject(m,S,o,t)):s[Oe].push(Ue.createClientObject(m,S,o))}return void e(S)}if(i&&i.sdp){var c=Ue.getMediaFromSdp(i.sdp);a({bHead:!0,buf:c})}if(i&&i.cmd&&"end"===i.cmd&&a({type:"exception",cmd:i.cmd}),i&&i.statusString&&("ok"===i.statusString.toLowerCase()&&s[Oe][x].resolve&&s[Oe][x].resolve(i),"ok"!==i.statusString.toLowerCase())){var u=Ue.getError(i);x>-1?s[Oe][x].reject&&s[Oe][x].reject(u):n(u)}i&&i.errorCode&&a(i)}else{var d={},p=new Uint8Array(r.data);if(R++,64===p.byteLength||40===p.byteLength){for(var P=-1,y=p.byteLength,b=0;b<y;b++)if(73===p[b]&&77===p[b+1]&&75===p[b+2]&&72===p[b+3]){P=b;break}if(-1!==P)d={bHead:!0,buf:p.slice(P,P+40)};else d={bHead:!1,buf:p};a(d)}else R>0&&a(d={bHead:!1,buf:p});p=null,d=null,r=null}},m.onclose=function(){for(var e=0,t=s[Oe].length;e<t;e++)if(s[Oe][e].id===S){s[Oe][e].resolve(),s[Oe].splice(e,1),setTimeout((function(){r(S)}),200);break}n()},m.onerror=function(e){var t,a;[null==(t=window.WebSocket)?void 0:t.CLOSED,null==(a=window.WebSocket)?void 0:a.CLOSING].includes(e.target.readyState)||i(S,e)}}))},t.startPlay=function(e,t,a){var r=this,i=this[Be](e);return t&&a&&"0.1"===r[ke]&&(t=t.replace(/-/g,"").replace(/:/g,""),a=a.replace(/-/g,"").replace(/:/g,"")),new Promise((function(e,n){if(i>-1){r[Oe][i].resolve=e,r[Oe][i].reject=n;var s=null;t&&a?"0.1"!==r[ke]?0===r[Ne]?s=He.playbackCmd(r[Oe][i],t,a):1===r[Ne]?s=Ue.playbackCmd(t,a,r[Oe][i].playURL):-1===r[Ne]&&(s=We.playbackCmd(r[Oe][i],t,a)):s=Ve.playbackCmd(t,a,r[Oe][i].iCurChannel,r[Oe][i].iCurStream):0===r[Oe][i].iCurChannel&&"0.1"===r[ke]?s=Ve.zeroPlayCmd(r[Oe][i].iCurChannel,r[Oe][i].iCurStream):"0.1"!==r[ke]?0===r[Ne]?s=He.playCmd(r[Oe][i]):1===r[Ne]?s=Ue.playCmd(r[Oe][i].playURL):-1===r[Ne]&&(s=We.playCmd(r[Oe][i])):s=Ve.playCmd(r[Oe][i].iCurChannel,r[Oe][i].iCurStream),r[Oe][i].socket.send(s),"0.1"===r[ke]&&e()}else"0.1"===r[ke]&&n()}))},t.singleFrame=function(){},t.setPlayRate=function(e,t){var a=this;return new Promise((function(r,i){for(var n=0,s=a[Oe].length;n<s;n++)if(a[Oe][n].id===e){if("0.1"===a[ke]){var x=Ve.playRateCmd(t);a[Oe][n].socket.send(x),r();break}a[Oe][n].resolve=r,a[Oe][n].reject=i;var o=Ue.playRateCmd(t);a[Oe][n].socket.send(o)}}))},t.seek=function(e,t,a){var r=this;return new Promise((function(i,n){for(var s=0,x=r[Oe].length;s<x;s++)if(r[Oe][s].id===e){r[Oe][s].resolve=i,r[Oe][s].reject=n;var o=He.seekCmd(t,a);r[Oe][s].socket.send(o)}}))},t.pause=function(e){var t=this;return new Promise((function(a,r){for(var i=0,n=t[Oe].length;i<n;i++)if(t[Oe][i].id===e){if("0.1"===t[ke]){var s=Ve.pauseCmd();t[Oe][i].socket.send(s),a();break}t[Oe][i].resolve=a,t[Oe][i].reject=r;var x=Ue.pauseCmd();t[Oe][i].socket.send(x)}}))},t.transmission=function(e,t){var a=this;return new Promise((function(r,i){for(var n=0,s=a[Oe].length;n<s;n++)a[Oe][n].id===e&&(a[Oe][n].resolve=r,a[Oe][n].reject=i,a[Oe][n].socket.send(t))}))},t.resume=function(e){var t=this;return new Promise((function(a,r){for(var i=0,n=t[Oe].length;i<n;i++)if(t[Oe][i].id===e){if("0.1"===t[ke]){var s=Ve.resumeCmd();t[Oe][i].socket.send(s),a();break}t[Oe][i].resolve=a,t[Oe][i].reject=r;var x=Ue.resumeCmd();t[Oe][i].socket.send(x)}}))},t.stop=function(e){var t=this;return new Promise((function(a,r){if(e){for(var i=-1,n=0,s=t[Oe].length;n<s;n++)if(t[Oe][n].id===e){i=n,t[Oe][n].resolve=a,t[Oe][n].socket.close(1e3,"CLOSE");break}-1===i&&r()}else r()}))},t.stopAll=function(){var e=this;return new Promise((function(t,a){for(var r=0,i=e[Oe].length;r<i;r++){var n,s,x;if([null==(n=window.WebSocket)?void 0:n.CLOSING,null==(s=window.WebSocket)?void 0:s.CLOSED].includes(null==(x=e[Oe][r].socket)?void 0:x.readyState))t();else try{var o,l;null==(l=e[Oe][r])||null==(o=l.socket)||o.close(1e3,"CLOSE")}catch(e){}}t()}))},e}(),Ge=function(){function e(e){this._streamUUID=null,this._player=e,this._streamClient=new Ye}var t=e.prototype;return t.openStream=function(e,t,a,r,i){var n=this;return this._streamClient.openStream(e,t,a,r,i).then((function(a){var r;n._streamUUID=a;try{n._player.logger.log("["+A.SOCKET.openStream+"] url: ",e,"oParams: ",JSON.stringify(t))}catch(e){}return null==(r=n._player)||r.emit(""+A.SOCKET.openStream,F(a)),a}))},t.startPlay=function(e){var t=this;return e=null!=e?e:this._streamUUID,this._streamClient.startPlay(e).then((function(){var a,r,i;null==(r=t._player)||null==(a=r.logger)||a.log("["+A.SOCKET.startPlay+"] StreamUUID: ",e),null==(i=t._player)||i.emit(""+A.SOCKET.startPlay,F(e))}))},t.setPlayRate=function(e,t){var a=this;return t=null!=t?t:this._streamUUID,this._streamClient.setPlayRate(t,e).then((function(){var r,i,n;null==(i=a._player)||null==(r=i.logger)||r.log("["+A.SOCKET.setPlayRate+"] StreamUUID: ",t," rate: ",e),null==(n=a._player)||n.emit(""+A.SOCKET.startPlay,F({id:t,rate:e}))}))},t.seek=function(e,t,a){var r=this;return a=null!=a?a:this._streamUUID,this._streamClient.seek(a,e,t).then((function(){var i;r._player.logger.log("["+A.SOCKET.seek+"] StreamUUID: ",a," startTime: ",e," stopTime:",t),null==(i=r._player)||i.emit(""+A.SOCKET.seek,F({id:a,startTime:e,stopTime:t}))}))},t.stopAll=function(){var e=this;return this._streamClient.stopAll().then((function(){e._player.logger.log("["+A.SOCKET.stopAll+"]"),e._player.emit(A.SOCKET.stopAll,F(void 0)),e._streamUUID=null}))},t.destroy=function(){var e=this;this.stopAll().then((function(){e._streamUUID=null,e._streamClient=null}))},e}();function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},Je.apply(this,arguments)}function Ze(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return(a=a.call(e)).next.bind(a);if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Xe(e,t):void 0}}(e))||t){a&&(e=a);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var je,ze,Ke=768,qe={port:0,start:{x:0,y:0},total:{x:0,y:0},diff:{x:0,y:0},startPTZPosition:{x:0,y:0},lastCorrdsY:0,param2d:{upDateType:4,fValue:0,fPTZParam:{fPTZPositionX:0,fPTZPositionY:0},fPTZZoom:0}},Qe=function(){function e(e){this._canvasFECSubPort=new Map,this._correctType=null,this._player=e,this.init()}var t=e.prototype;return t._supportFEC=function(){return this._player._decoderStatus.bSupHardOrSoft},t.init=function(){var e=this;this._player.logger.log("FECSplitIds.init"),this._player.on("JSPlayM4_Play_Before",(function(){e._player.logger.log("JSPlayM4_Play_Before event: _FECSplitIds = ",e._FECSplitIds),e._FECSplitIds&&e._supportFEC()&&e._player.wasmplayer.JSPlayM4_FEC_SetCanvasID(e._FECSplitIds)})),this._player.on("JSPlayM4_Play_After",(function(){e._player.logger.log("JSPlayM4_Play_After event: _FECSplitIds = ",e._FECSplitIds),e._FECSplitIds&&e._supportFEC()&&e._canvasFECSubPort.set(e._player._playerWindow.canvasId,Je({},qe))})),this._player.on("PlayM4_openStream",(function(){e._FECSplitIds&&e._supportFEC()&&e._player.wasmplayer.JSPlayM4_SetDecodeEngine(0)})),this._player.on("JSPlayM4_Stop",(function(){e._closeFECAllSubWnd()})),this._player.on(A.API.destroy,(function(){e._closeFECAllSubWnd()})),this._player.logger.log("FECCorrect init")},t.setFECCorrectType=function(e,t){var a=this;return this._supportFEC()?(this._FECSplitIds=t,this._correctType=e,new Promise((function(r,i){var n=a._createSplitCanvas(e,t),s=n.find((function(e){return-1===e.code}));a._player.emit("FECCorrect.setFECCorrectType",F({type:e,ids:t})),s||0===n.length?i(n):r(n)}))):Promise.reject()},t.setFEC2DParam=function(e,t){if(this._supportFEC())return this._player.emit("FECCorrect.setFEC2DParam",F({port:e,param2d:t})),this._player.wasmplayer.JSPlayM4_FEC_SetParam(e,t)},t.setFEC3DViewParam=function(e){if(!this._supportFEC())return Promise.reject(!1);var t=this._player.wasmplayer;if(this._FECSplitIds&&this._canvasFECSubPort&&this._correctType){var a=t.JSPlayM4_FEC_SetViewParam(e.port,e.upDateType,e.fValue);return this._player.emit("FECCorrect.setFEC3DViewParam",F({param:e})),1===a?Promise.resolve(!0):Promise.reject(!1)}return Promise.reject(void 0)},t.get3DViewParam=function(e){var t=this;if(!this._supportFEC())return Promise.reject(!1);var a=this._player.wasmplayer;return new Promise((function(r,i){if(t._FECSplitIds&&t._canvasFECSubPort&&t._correctType&&1!==a.JSPlayM4_FEC_GetViewParam(e.port,e.upDateType,(function(a){t._player.emit("FECCorrect.get3DViewParam",F({param:e})),r(a)})))return i(!1);return i(void 0)}))},t.getFECSubPortMap=function(){var e=this._canvasFECSubPort;return this._player.emit("FECCorrect.getFECSubPortMap",F(e)),e},t._createSplitCanvas=function(e,t){var a=this._player._playerWindow.canvasId,r=(t=a+t?","+this._FECSplitIds:"")?t.split(","):[],i=this._player.wasmplayer,n=[],s=this;if(e.correctList&&e.correctList.length>0){for(var x=0;x<e.correctList.length;x++)if(0!==x||!e.correctList[x].hidden)if(0!==x){var o=document.getElementById(r[x]);if(!r[x]||!o||"CANVAS"!==o.nodeName)return this._player.logger.error("Canvas element is null"),[];var l=i.JSPlayM4_FEC_GetPort(e.place,e.correctList[x].correctType),_=i.JSPlayM4_FEC_Enable(l),h=i.JSPlayM4_FEC_SetWnd(l,r[x]),f={upDateType:this._matchUpDateType(e.correctList[x].correctType),fValue:0,fPTZParam:{fPTZPositionX:e.correctList[x].x||0,fPTZPositionY:e.correctList[x].y||0},fPTZZoom:1e-5};this.setFEC2DParam(l,f),0===_||0===h?n.push({code:-1,msg:"失败",port:l,id:r[x]}):(n.push({code:0,msg:"成功",port:l,id:r[x]}),this._canvasFECSubPort.set(r[x],Je({},qe,{port:l,param2d:f,startPTZPosition:{x:f.fPTZParam.fPTZPositionX,y:f.fPTZParam.fPTZPositionY}})),o.setAttribute("data-port",l+""),this._spliceCanvasMouseEvents(r[x],e.correctList[x]))}else c(e.correctList[0])}else c(e);function c(t){var r={upDateType:s._matchUpDateType(t.correctType),fValue:0,fPTZParam:{fPTZPositionX:t.x||0,fPTZPositionY:t.y||0},fPTZZoom:1e-5},x=s._canvasFECSubPort.get(a).port;if(void 0===x)return n;1===i.JSPlayM4_FEC_ResetCorrectType(x,e.place,t.correctType)?(n.push({code:0,msg:"成功",port:x,id:a}),t.correctType<=Ke?s.setFEC2DParam(x,r):t.viewParam&&setTimeout((function(){"number"==typeof t.viewParam.x&&"number"==typeof t.viewParam.y&&(i.JSPlayM4_FEC_SetViewParam(x,2,t.viewParam.x),i.JSPlayM4_FEC_SetViewParam(x,1,t.viewParam.y)),"number"==typeof t.viewParam.zoom&&i.JSPlayM4_FEC_SetViewParam(x,3,t.viewParam.zoom)}),200),s._canvasFECSubPort.set(a,Je({},qe,{port:x,param2d:r,startPTZPosition:{x:r.fPTZParam.fPTZPositionX,y:r.fPTZParam.fPTZPositionY}})),s._spliceCanvasMouseEvents(a,t)):n.push({code:-1,msg:"失败",port:x,id:a})}return n},t._matchUpDateType=function(e){switch(e){case Ke:return 4;case 256:return 8}return 2},t._spliceCanvasMouseEvents=function(e,t){if(void 0!==e){var a=document.getElementById(e);if(null!==a){var r=this._player.wasmplayer,i=a.getAttribute("id"),n=this._canvasFECSubPort.get(i);if(void 0!==n.port){var s=a.width,x=a.height,o=function(e){};a.addEventListener("mousedown",(function(e){n.start.x=e.pageX,n.start.y=e.pageY,n.lastCorrdsY=e.pageY,o=function(e){!function(e){var a=[e.clientX,e.clientY];n.diff.y=a[1]-n.start.y;var i=(n.total.y+n.diff.y)/x*2*Math.PI,o=(a[1]-n.lastCorrdsY)/(2*x),l=Math.atan2(n.startPTZPosition.y-.5,n.startPTZPosition.x-.5),_=n.startPTZPosition.x+o*Math.cos(l),h=n.startPTZPosition.y+o*Math.sin(l);n.diff.x=a[0]-n.start.x;var f=(n.total.x+n.diff.x)/s*2*Math.PI,c=Math.sqrt(Math.pow(_-.5,2)+Math.pow(h-.5,2)),u=-f,d=.5+c*Math.cos(u),p=.5+c*Math.sin(u);if(t.correctType<=Ke){switch(t.correctType){case Ke:case 512:n.param2d.upDateType=4;break;case 256:if(n.param2d.upDateType=8,Math.sqrt(Math.pow(d-.5,2)+Math.pow(p-.5,2))>.4)return}n.param2d.fValue=f,n.param2d.fPTZParam.fPTZPositionX=d,n.param2d.fPTZParam.fPTZPositionY=p,r.JSPlayM4_FEC_SetParam(n.port,n.param2d)}else 1536===t.correctType&&(r.JSPlayM4_FEC_SetViewParam(n.port,2,f),r.JSPlayM4_FEC_SetViewParam(n.port,1,i))}(e)},a.addEventListener("mousemove",o)}));var l=function(){null!==o&&(a.removeEventListener("mousemove",o),o=null,n.total.x+=n.diff.x,n.total.y+=n.diff.y)};a.addEventListener("mouseup",l),a.addEventListener("mouseleave",l),a.addEventListener("mouseout",l)}}}},t._closeFECAllSubWnd=function(){if(this._FECSplitIds&&this._canvasFECSubPort&&this._supportFEC())for(var e,t=Ze(this._FECSplitIds.split(","));!(e=t()).done;){var a=e.value;if(a){var r=this._canvasFECSubPort.get(a);if(void 0===r||void 0===r.port)continue;this._canvasFECSubPort.delete(a);var i=this._player.wasmplayer;i.JSPlayM4_FEC_Disable(r.port,!0),i.JSPlayM4_FEC_DelPort(r.port)}}},e}(),$e=(null==(ze=new o)||null==(je=ze.getResult)?void 0:je.call(ze))||{};function et(e,t){return new Promise((function(a,r){e.service.getVideoByTime(t).then((function(r){e.emit(A.NETWORK.videoFragmentFiles,F(r.data||[],"根据时间获取存储文件信息",t.recType+"")),a(r)})).catch((function(t){e.emit(A.NETWORK.error.error,F(t)),e.emit(A.NETWORK.error.videoFragmentFiles,F(t)),r(t)}))}))}function tt(i,n){if(i._options=e.all([{},m,i._options||{},n],{clone:!1}),!i._options.id)throw new Error("id is required");if(!document.getElementById(i._options.id))throw new Error("#"+i._options.id+" node does not exist");if(i.pluginManager||(i.pluginManager=new E(i)),"string"!=typeof i._options.id)throw new Error("id is required and only support string");if(i.$container=i._options.container||document.getElementById(i._options.id),i._options.width){var s="";/\d/.test(i._options.width+"")?s+=";width: "+i._options.width+"px;":s+=";width: "+i._options.width+";",i.$container&&(i.$container.style.cssText+=s)}if(i._options.height){var o="";/\d/.test(i._options.height+"")?o+=";height: "+i._options.height+"px;":o+=";height: "+i._options.height+";",i.$container&&(i.$container.style.cssText+=o)}if(i.$container.style.cssText+=";position: relative;",i._width=i.$container.clientWidth,i._height=i.$container.clientHeight,i._oStreamClient||(i._oStreamClient=new Ge(i)),i.logger||(i.logger=t(i._options.logger)),i.logger.log("[version] ",pa.version),i.logger.log("[Browser Info] ",JSON.stringify($e)),i.logger.log("[options] ",JSON.stringify(i._options)),i.i18n||(i.i18n=new a({en:u,zh:d})),i.fECCorrect||(i.fECCorrect=new Qe(i)),i._options.accessToken&&p(i._options.url)){var l,_,h,f=null==(l=i.urlInfo)?void 0:l.deviceSerial;if(i.urlInfo=r(i._options.url),!i.urlInfo.deviceSerial||!i._options.accessToken)throw new Error("deviceSerial is required!");i.service=new x({deviceSerial:i.urlInfo.deviceSerial,accessToken:i._options.accessToken,domain:null==(h=i._options)||null==(_=h.env)?void 0:_.domain,extraParams:i._options.extraParams}),f!==i.urlInfo.deviceSerial&&(function(e){e.service.getDeviceCapacity().then((function(t){200==+t.code?(e.deviceCapacity=t.data,e.emit(A.NETWORK.deviceCapacity,F(t.data))):e.logger.error("getDeviceCapacity error: ",t)})).catch((function(t){e.emit(A.NETWORK.error.error,F(t)),e.emit(A.NETWORK.error.deviceCapacity,F(t)),e.logger.error("getDeviceCapacity error: ",t)}))}(i),function(e){e.emit(A.NETWORK.deviceInfo,F({})),e.service.getDeviceInfo().then((function(t){200==+t.code?(e.deviceInfo=t.data,e.emit(A.NETWORK.deviceInfo,F(t.data))):e.logger.error("deviceInfo error: ",t)})).catch((function(t){e.emit(A.NETWORK.error.error,F(t)),e.emit(A.NETWORK.error.deviceInfo,F(t)),e.logger.error("deviceInfo error: ",t)}))}(i)),i&&f&&(i.logger.log("play url change "+i._options.url),i.emit(A.urlChange,F(i._options.url)))}}var at={0:void 0,1:"H264",2:"MPEG2",3:"MPEG4",4:"MotionJpeg",5:"H265",256:"H264"},rt={0:void 0,4096:"ADPCM",8192:"MPEG",8193:"AAC",8194:"AACLD",12290:"OPUS",28944:"G711U",28945:"G711A",29217:"G722.1",29233:"G723.1",29280:"G726U",29281:"G726A",29328:"G729"},it={dpr:1},nt=function(){function t(t){this._options=e(it,t,{clone:!1}),this._$container=t.container,this.dpr=this._options.dpr||1,this._player=this._options.player,this._canvasWidth=Math.floor(this._$container.clientWidth),this._canvasHeight=Math.floor(this._$container.clientHeight)}var a=t.prototype;return a._render=function(){var e;this._removeCanvas(),this.canvasId=this._options.id+"-player",this.$canvas=document.createElement("canvas"),this.$canvas.classList.add("ezplayer-canvas"),this.$canvas.style.cssText+="width: 100%; height: 100%; pointer-events: none; user-select: none;",this.$canvas.setAttribute("id",this.canvasId),this.$canvas.setAttribute("width",this._canvasWidth*this.dpr+"px"),this.$canvas.setAttribute("height",this._canvasHeight*this.dpr+"px"),null==(e=this._$container)||e.appendChild(this.$canvas)},a.hide=function(){var e,t=null==(e=this._$container)?void 0:e.querySelector("#"+this.canvasId);t&&(t.style.display="none")},a.destroy=function(){this._removeCanvas(),this.width=0,this.height=0},a._removeCanvas=function(){var e=this._$container.querySelector("#"+this.canvasId);e&&(e.remove(),e=null,this.$canvas.remove(),this.$canvas=null)},a.resize=function(e,t){var a=this._$container.querySelector("#"+this.canvasId);if(a&&(this._canvasWidth!==e||this._canvasHeight!==t)){var r,i,n,s;this._canvasWidth=e,this._canvasHeight=t;try{a.width=this._canvasWidth*this.dpr,a.height=this._canvasHeight*this.dpr}catch(e){}if(null==(r=this._player)?void 0:r.wasmplayer)null==(s=this._player)||null==(n=s.wasmplayer)||null==(i=n.JSPlayM4_SetCanvasSize)||i.call(n,this._canvasWidth*this.dpr,this._canvasHeight*this.dpr)}},a.reRenderCanvas=function(e){e&&this._render()},t}(),st={exports:{}};!function(e,t){function a(e,t,a,r,i,n,s){try{var x=e[n](s),o=x.value}catch(e){return void a(e)}x.done?t(o):Promise.resolve(o).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var s=e.apply(t,r);function x(e){a(s,i,n,x,o,"next",e)}function o(e){a(s,i,n,x,o,"throw",e)}x(void 0)}))}}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function n(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function s(e,t){var a,r,i,n,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function x(n){return function(x){return function(n){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],r=0}finally{a=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,x])}}}!function(a,r){if("object"==n(t)&&"object"==n(e))e.exports=r();else{var i=r();for(var s in i)("object"==n(t)?t:a)[s]=i[s]}}(self,(function(){return function(){var e={477:function(e){e.exports=function(e,t,a,r){var i=self||window;try{try{var n;try{n=new i.Blob([e])}catch(t){(n=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),n=n.getBlob()}var s=i.URL||i.webkitURL,x=s.createObjectURL(n),o=new i[t](x,a);return s.revokeObjectURL(x),o}catch(r){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),a)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new i[t](r,a)}}},61:function(e,t,a){var r=a(698).default;function n(){e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,s=a.hasOwnProperty,x="function"==typeof Symbol?Symbol:{},o=x.iterator||"@@iterator",l=x.asyncIterator||"@@asyncIterator",_=x.toStringTag||"@@toStringTag";function h(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,a){return e[t]=a}}function f(e,t,a,r){var n,s,x,o,l=t&&i(t.prototype,d)?t:d,_=Object.create(l.prototype),h=new v(r||[]);return _._invoke=(n=e,s=a,x=h,o="suspendedStart",function(e,t){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===e)throw t;return{value:void 0,done:!0}}for(x.method=e,x.arg=t;;){var a=x.delegate;if(a){var r=g(a,x);if(r){if(r===u)continue;return r}}if("next"===x.method)x.sent=x._sent=x.arg;else if("throw"===x.method){if("suspendedStart"===o)throw o="completed",x.arg;x.dispatchException(x.arg)}else"return"===x.method&&x.abrupt("return",x.arg);o="executing";var i=c(n,s,x);if("normal"===i.type){if(o=x.done?"completed":"suspendedYield",i.arg===u)continue;return{value:i.arg,done:x.done}}"throw"===i.type&&(o="completed",x.method="throw",x.arg=i.arg)}}),_}function c(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var u={};function d(){}function p(){}function m(){}var S={};h(S,o,(function(){return this}));var R=Object.getPrototypeOf,P=R&&R(R(T([])));P&&P!==a&&s.call(P,o)&&(S=P);var y=m.prototype=d.prototype=Object.create(S);function b(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function a(i,n,x,o){var l=c(e[i],e,n);if("throw"!==l.type){var _=l.arg,h=_.value;return h&&"object"==r(h)&&s.call(h,"__await")?t.resolve(h.__await).then((function(e){a("next",e,x,o)}),(function(e){a("throw",e,x,o)})):t.resolve(h).then((function(e){_.value=e,x(_)}),(function(e){return a("throw",e,x,o)}))}o(l.arg)}var i;this._invoke=function(e,r){function n(){return new t((function(t,i){a(e,r,t,i)}))}return i=i?i.then(n,n):n()}}function g(e,t){var a=e.iterator[t.method];if(void 0===a){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function v(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(s.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:D}}function D(){return{value:void 0,done:!0}}return p.prototype=m,h(y,"constructor",m),h(m,"constructor",p),p.displayName=h(m,_,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,h(e,_,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},b(E.prototype),h(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,a,r,i,n){void 0===n&&(n=Promise);var s=new E(f(e,a,r,i),n);return t.isGeneratorFunction(a)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},b(y),h(y,_,"Generator"),h(y,o,(function(){return this})),h(y,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},t.values=T,v.prototype={constructor:v,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return n.type="throw",n.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],n=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var x=s.call(i,"catchLoc"),o=s.call(i,"finallyLoc");if(x&&o){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(x){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var n=i?i.completion:{};return n.type=e,n.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(n)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var i=r.arg;C(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:T(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),u}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},698:function(e){function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e,t,a){var r=a(61)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function a(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,a),n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};return function(){var e=function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")},t=function(e,t,a){return t&&function(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e},o=function(e,t,a,r,i,n,s){try{var x=e[n](s),o=x.value}catch(e){return void a(e)}x.done?t(o):Promise.resolve(o).then(r,i)},l=function(e){return function(){var t=this,a=arguments;return new Promise((function(r,i){var n=e.apply(t,a);function s(e){o(n,r,i,s,x,"next",e)}function x(e){o(n,r,i,s,x,"throw",e)}s(void 0)}))}},_=function(){return xe()("((()=>{var _0xae8de9={0x3d:(_0x42db72,_0x34a747,_0x4dff4d)=>{var _0x5f25ea=_0x4dff4d(0x2ba)['default'];function _0x281627(){'use strict';_0x42db72['exports']=_0x281627=function(){return _0x33c0e0;},_0x42db72['exports']['__esModule']=!0x0,_0x42db72['exports']['default']=_0x42db72['exports'];var _0x33c0e0={},_0x5c6bc7=Object['prototype'],_0x2c9f95=_0x5c6bc7['hasOwnProperty'],_0x524493='function'==typeof Symbol?Symbol:{},_0x2e8c72=_0x524493['iterator']||'@@iterator',_0x58cf55=_0x524493['asyncIterator']||'@@asyncIterator',_0x5d9c15=_0x524493['toStringTag']||'@@toStringTag';function _0x4c10ff(_0x55e696,_0x2ceaa9,_0x588bf0){return Object['defineProperty'](_0x55e696,_0x2ceaa9,{'value':_0x588bf0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}),_0x55e696[_0x2ceaa9];}try{_0x4c10ff({},'');}catch(_0x5cbfd9){_0x4c10ff=function(_0x289600,_0xe320b1,_0xcb940a){return _0x289600[_0xe320b1]=_0xcb940a;};}function _0x4f57d6(_0x380518,_0x187ab0,_0x36019c,_0x7e713c){var _0x9f7960=_0x187ab0&&_0x187ab0['prototype']instanceof _0x475d69?_0x187ab0:_0x475d69,_0x1b4d88=Object['create'](_0x9f7960['prototype']),_0x3e7c4a=new _0x46a438(_0x7e713c||[]);return _0x1b4d88['_invoke']=function(_0x40b051,_0x4f5c69,_0x5336b8){var _0x5930e3='suspendedStart';return function(_0x1cf3d5,_0x27ffc0){if('executing'===_0x5930e3)throw new Error('Generator\\x20is\\x20already\\x20running');if('completed'===_0x5930e3){if('throw'===_0x1cf3d5)throw _0x27ffc0;return _0x8ce3e2();}for(_0x5336b8['method']=_0x1cf3d5,_0x5336b8['arg']=_0x27ffc0;;){var _0x1eecea=_0x5336b8['delegate'];if(_0x1eecea){var _0x240791=_0x14e9c3(_0x1eecea,_0x5336b8);if(_0x240791){if(_0x240791===_0x4257e9)continue;return _0x240791;}}if('next'===_0x5336b8['method'])_0x5336b8['sent']=_0x5336b8['_sent']=_0x5336b8['arg'];else{if('throw'===_0x5336b8['method']){if('suspendedStart'===_0x5930e3)throw _0x5930e3='completed',_0x5336b8['arg'];_0x5336b8['dispatchException'](_0x5336b8['arg']);}else'return'===_0x5336b8['method']&&_0x5336b8['abrupt']('return',_0x5336b8['arg']);}_0x5930e3='executing';var _0x1a57ab=_0x2c9e85(_0x40b051,_0x4f5c69,_0x5336b8);if('normal'===_0x1a57ab['type']){if(_0x5930e3=_0x5336b8['done']?'completed':'suspendedYield',_0x1a57ab['arg']===_0x4257e9)continue;return{'value':_0x1a57ab['arg'],'done':_0x5336b8['done']};}'throw'===_0x1a57ab['type']&&(_0x5930e3='completed',_0x5336b8['method']='throw',_0x5336b8['arg']=_0x1a57ab['arg']);}};}(_0x380518,_0x36019c,_0x3e7c4a),_0x1b4d88;}function _0x2c9e85(_0x304583,_0x302904,_0x20ddb0){try{return{'type':'normal','arg':_0x304583['call'](_0x302904,_0x20ddb0)};}catch(_0x3eb53b){return{'type':'throw','arg':_0x3eb53b};}}_0x33c0e0['wrap']=_0x4f57d6;var _0x4257e9={};function _0x475d69(){}function _0x4e18ee(){}function _0x294087(){}var _0xf5cb63={};_0x4c10ff(_0xf5cb63,_0x2e8c72,function(){return this;});var _0x31b349=Object['getPrototypeOf'],_0x148be7=_0x31b349&&_0x31b349(_0x31b349(_0x4e4794([])));_0x148be7&&_0x148be7!==_0x5c6bc7&&_0x2c9f95['call'](_0x148be7,_0x2e8c72)&&(_0xf5cb63=_0x148be7);var _0x593b9b=_0x294087['prototype']=_0x475d69['prototype']=Object['create'](_0xf5cb63);function _0x426189(_0x18e276){['next','throw','return']['forEach'](function(_0x589f3b){_0x4c10ff(_0x18e276,_0x589f3b,function(_0x5c0715){return this['_invoke'](_0x589f3b,_0x5c0715);});});}function _0x863369(_0x15643e,_0x2c1956){function _0x1beac9(_0x3ea7ff,_0x587ad9,_0x31f7e6,_0x4a14e2){var _0x5693e7=_0x2c9e85(_0x15643e[_0x3ea7ff],_0x15643e,_0x587ad9);if('throw'!==_0x5693e7['type']){var _0x74cc92=_0x5693e7['arg'],_0x14aa66=_0x74cc92['value'];return _0x14aa66&&'object'==_0x5f25ea(_0x14aa66)&&_0x2c9f95['call'](_0x14aa66,'__await')?_0x2c1956['resolve'](_0x14aa66['__await'])['then'](function(_0x4d3a78){_0x1beac9('next',_0x4d3a78,_0x31f7e6,_0x4a14e2);},function(_0x183340){_0x1beac9('throw',_0x183340,_0x31f7e6,_0x4a14e2);}):_0x2c1956['resolve'](_0x14aa66)['then'](function(_0x308fe3){_0x74cc92['value']=_0x308fe3,_0x31f7e6(_0x74cc92);},function(_0x42da61){return _0x1beac9('throw',_0x42da61,_0x31f7e6,_0x4a14e2);});}_0x4a14e2(_0x5693e7['arg']);}var _0x244136;this['_invoke']=function(_0x2ae764,_0x1a1935){function _0x4c1534(){return new _0x2c1956(function(_0x15cce1,_0x578aa4){_0x1beac9(_0x2ae764,_0x1a1935,_0x15cce1,_0x578aa4);});}return _0x244136=_0x244136?_0x244136['then'](_0x4c1534,_0x4c1534):_0x4c1534();};}function _0x14e9c3(_0x559ec6,_0xfb0fca){var _0x4e9bde=_0x559ec6['iterator'][_0xfb0fca['method']];if(void 0x0===_0x4e9bde){if(_0xfb0fca['delegate']=null,'throw'===_0xfb0fca['method']){if(_0x559ec6['iterator']['return']&&(_0xfb0fca['method']='return',_0xfb0fca['arg']=void 0x0,_0x14e9c3(_0x559ec6,_0xfb0fca),'throw'===_0xfb0fca['method']))return _0x4257e9;_0xfb0fca['method']='throw',_0xfb0fca['arg']=new TypeError('The\\x20iterator\\x20does\\x20not\\x20provide\\x20a\\x20\\x27throw\\x27\\x20method');}return _0x4257e9;}var _0x526e36=_0x2c9e85(_0x4e9bde,_0x559ec6['iterator'],_0xfb0fca['arg']);if('throw'===_0x526e36['type'])return _0xfb0fca['method']='throw',_0xfb0fca['arg']=_0x526e36['arg'],_0xfb0fca['delegate']=null,_0x4257e9;var _0x4fa001=_0x526e36['arg'];return _0x4fa001?_0x4fa001['done']?(_0xfb0fca[_0x559ec6['resultName']]=_0x4fa001['value'],_0xfb0fca['next']=_0x559ec6['nextLoc'],'return'!==_0xfb0fca['method']&&(_0xfb0fca['method']='next',_0xfb0fca['arg']=void 0x0),_0xfb0fca['delegate']=null,_0x4257e9):_0x4fa001:(_0xfb0fca['method']='throw',_0xfb0fca['arg']=new TypeError('iterator\\x20result\\x20is\\x20not\\x20an\\x20object'),_0xfb0fca['delegate']=null,_0x4257e9);}function _0xafc5bd(_0x5c596c){var _0x13378e={'tryLoc':_0x5c596c[0x0]};0x1 in _0x5c596c&&(_0x13378e['catchLoc']=_0x5c596c[0x1]),0x2 in _0x5c596c&&(_0x13378e['finallyLoc']=_0x5c596c[0x2],_0x13378e['afterLoc']=_0x5c596c[0x3]),this['tryEntries']['push'](_0x13378e);}function _0x3f32b7(_0x5509d9){var _0x800a06=_0x5509d9['completion']||{};_0x800a06['type']='normal',delete _0x800a06['arg'],_0x5509d9['completion']=_0x800a06;}function _0x46a438(_0x3247a2){this['tryEntries']=[{'tryLoc':'root'}],_0x3247a2['forEach'](_0xafc5bd,this),this['reset'](!0x0);}function _0x4e4794(_0x289aeb){if(_0x289aeb){var _0xbf0627=_0x289aeb[_0x2e8c72];if(_0xbf0627)return _0xbf0627['call'](_0x289aeb);if('function'==typeof _0x289aeb['next'])return _0x289aeb;if(!isNaN(_0x289aeb['length'])){var _0x3297d8=-0x1,_0x3a95f9=function _0x257c4b(){for(;++_0x3297d8<_0x289aeb['length'];)if(_0x2c9f95['call'](_0x289aeb,_0x3297d8))return _0x257c4b['value']=_0x289aeb[_0x3297d8],_0x257c4b['done']=!0x1,_0x257c4b;return _0x257c4b['value']=void 0x0,_0x257c4b['done']=!0x0,_0x257c4b;};return _0x3a95f9['next']=_0x3a95f9;}}return{'next':_0x8ce3e2};}function _0x8ce3e2(){return{'value':void 0x0,'done':!0x0};}return _0x4e18ee['prototype']=_0x294087,_0x4c10ff(_0x593b9b,'constructor',_0x294087),_0x4c10ff(_0x294087,'constructor',_0x4e18ee),_0x4e18ee['displayName']=_0x4c10ff(_0x294087,_0x5d9c15,'GeneratorFunction'),_0x33c0e0['isGeneratorFunction']=function(_0x5898c3){var _0x3832d6='function'==typeof _0x5898c3&&_0x5898c3['constructor'];return!!_0x3832d6&&(_0x3832d6===_0x4e18ee||'GeneratorFunction'===(_0x3832d6['displayName']||_0x3832d6['name']));},_0x33c0e0['mark']=function(_0x586769){return Object['setPrototypeOf']?Object['setPrototypeOf'](_0x586769,_0x294087):(_0x586769['__proto__']=_0x294087,_0x4c10ff(_0x586769,_0x5d9c15,'GeneratorFunction')),_0x586769['prototype']=Object['create'](_0x593b9b),_0x586769;},_0x33c0e0['awrap']=function(_0x3c9094){return{'__await':_0x3c9094};},_0x426189(_0x863369['prototype']),_0x4c10ff(_0x863369['prototype'],_0x58cf55,function(){return this;}),_0x33c0e0['AsyncIterator']=_0x863369,_0x33c0e0['async']=function(_0x531f20,_0x301564,_0x2bb297,_0x4e84d7,_0x36b86f){void 0x0===_0x36b86f&&(_0x36b86f=Promise);var _0x9ff135=new _0x863369(_0x4f57d6(_0x531f20,_0x301564,_0x2bb297,_0x4e84d7),_0x36b86f);return _0x33c0e0['isGeneratorFunction'](_0x301564)?_0x9ff135:_0x9ff135['next']()['then'](function(_0x422a4f){return _0x422a4f['done']?_0x422a4f['value']:_0x9ff135['next']();});},_0x426189(_0x593b9b),_0x4c10ff(_0x593b9b,_0x5d9c15,'Generator'),_0x4c10ff(_0x593b9b,_0x2e8c72,function(){return this;}),_0x4c10ff(_0x593b9b,'toString',function(){return'[object\\x20Generator]';}),_0x33c0e0['keys']=function(_0x224dbb){var _0x209f3a=[];for(var _0x2213d2 in _0x224dbb)_0x209f3a['push'](_0x2213d2);return _0x209f3a['reverse'](),function _0x35c9fe(){for(;_0x209f3a['length'];){var _0x528983=_0x209f3a['pop']();if(_0x528983 in _0x224dbb)return _0x35c9fe['value']=_0x528983,_0x35c9fe['done']=!0x1,_0x35c9fe;}return _0x35c9fe['done']=!0x0,_0x35c9fe;};},_0x33c0e0['values']=_0x4e4794,_0x46a438['prototype']={'constructor':_0x46a438,'reset':function(_0xc02ed4){if(this['prev']=0x0,this['next']=0x0,this['sent']=this['_sent']=void 0x0,this['done']=!0x1,this['delegate']=null,this['method']='next',this['arg']=void 0x0,this['tryEntries']['forEach'](_0x3f32b7),!_0xc02ed4){for(var _0x5c538d in this)'t'===_0x5c538d['charAt'](0x0)&&_0x2c9f95['call'](this,_0x5c538d)&&!isNaN(+_0x5c538d['slice'](0x1))&&(this[_0x5c538d]=void 0x0);}},'stop':function(){this['done']=!0x0;var _0x527989=this['tryEntries'][0x0]['completion'];if('throw'===_0x527989['type'])throw _0x527989['arg'];return this['rval'];},'dispatchException':function(_0x403fdf){if(this['done'])throw _0x403fdf;var _0x1cbe8c=this;function _0xa852ea(_0x117e55,_0x59b7ab){return _0x20c169['type']='throw',_0x20c169['arg']=_0x403fdf,_0x1cbe8c['next']=_0x117e55,_0x59b7ab&&(_0x1cbe8c['method']='next',_0x1cbe8c['arg']=void 0x0),!!_0x59b7ab;}for(var _0x448a73=this['tryEntries']['length']-0x1;_0x448a73>=0x0;--_0x448a73){var _0x1fc3f3=this['tryEntries'][_0x448a73],_0x20c169=_0x1fc3f3['completion'];if('root'===_0x1fc3f3['tryLoc'])return _0xa852ea('end');if(_0x1fc3f3['tryLoc']<=this['prev']){var _0x3cd4b6=_0x2c9f95['call'](_0x1fc3f3,'catchLoc'),_0x4ab950=_0x2c9f95['call'](_0x1fc3f3,'finallyLoc');if(_0x3cd4b6&&_0x4ab950){if(this['prev']<_0x1fc3f3['catchLoc'])return _0xa852ea(_0x1fc3f3['catchLoc'],!0x0);if(this['prev']<_0x1fc3f3['finallyLoc'])return _0xa852ea(_0x1fc3f3['finallyLoc']);}else{if(_0x3cd4b6){if(this['prev']<_0x1fc3f3['catchLoc'])return _0xa852ea(_0x1fc3f3['catchLoc'],!0x0);}else{if(!_0x4ab950)throw new Error('try\\x20statement\\x20without\\x20catch\\x20or\\x20finally');if(this['prev']<_0x1fc3f3['finallyLoc'])return _0xa852ea(_0x1fc3f3['finallyLoc']);}}}}},'abrupt':function(_0xcb1d36,_0x5b6e6e){for(var _0xdc17a5=this['tryEntries']['length']-0x1;_0xdc17a5>=0x0;--_0xdc17a5){var _0xbfcf0a=this['tryEntries'][_0xdc17a5];if(_0xbfcf0a['tryLoc']<=this['prev']&&_0x2c9f95['call'](_0xbfcf0a,'finallyLoc')&&this['prev']<_0xbfcf0a['finallyLoc']){var _0x2d64a0=_0xbfcf0a;break;}}_0x2d64a0&&('break'===_0xcb1d36||'continue'===_0xcb1d36)&&_0x2d64a0['tryLoc']<=_0x5b6e6e&&_0x5b6e6e<=_0x2d64a0['finallyLoc']&&(_0x2d64a0=null);var _0x55964f=_0x2d64a0?_0x2d64a0['completion']:{};return _0x55964f['type']=_0xcb1d36,_0x55964f['arg']=_0x5b6e6e,_0x2d64a0?(this['method']='next',this['next']=_0x2d64a0['finallyLoc'],_0x4257e9):this['complete'](_0x55964f);},'complete':function(_0x4275e3,_0x4b1e00){if('throw'===_0x4275e3['type'])throw _0x4275e3['arg'];return'break'===_0x4275e3['type']||'continue'===_0x4275e3['type']?this['next']=_0x4275e3['arg']:'return'===_0x4275e3['type']?(this['rval']=this['arg']=_0x4275e3['arg'],this['method']='return',this['next']='end'):'normal'===_0x4275e3['type']&&_0x4b1e00&&(this['next']=_0x4b1e00),_0x4257e9;},'finish':function(_0x40eb66){for(var _0x5d058f=this['tryEntries']['length']-0x1;_0x5d058f>=0x0;--_0x5d058f){var _0x546907=this['tryEntries'][_0x5d058f];if(_0x546907['finallyLoc']===_0x40eb66)return this['complete'](_0x546907['completion'],_0x546907['afterLoc']),_0x3f32b7(_0x546907),_0x4257e9;}},'catch':function(_0x19c03a){for(var _0x92497c=this['tryEntries']['length']-0x1;_0x92497c>=0x0;--_0x92497c){var _0x3728e2=this['tryEntries'][_0x92497c];if(_0x3728e2['tryLoc']===_0x19c03a){var _0x5e5db0=_0x3728e2['completion'];if('throw'===_0x5e5db0['type']){var _0x308208=_0x5e5db0['arg'];_0x3f32b7(_0x3728e2);}return _0x308208;}}throw new Error('illegal\\x20catch\\x20attempt');},'delegateYield':function(_0x8dccb1,_0x20d0bf,_0x123639){return this['delegate']={'iterator':_0x4e4794(_0x8dccb1),'resultName':_0x20d0bf,'nextLoc':_0x123639},'next'===this['method']&&(this['arg']=void 0x0),_0x4257e9;}},_0x33c0e0;}_0x42db72['exports']=_0x281627,_0x42db72['exports']['__esModule']=!0x0,_0x42db72['exports']['default']=_0x42db72['exports'];},0x2ba:_0x2f8669=>{function _0x4cafda(_0x814e18){return _0x2f8669['exports']=_0x4cafda='function'==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x83d824){return typeof _0x83d824;}:function(_0x1320d7){return _0x1320d7&&'function'==typeof Symbol&&_0x1320d7['constructor']===Symbol&&_0x1320d7!==Symbol['prototype']?'symbol':typeof _0x1320d7;},_0x2f8669['exports']['__esModule']=!0x0,_0x2f8669['exports']['default']=_0x2f8669['exports'],_0x4cafda(_0x814e18);}_0x2f8669['exports']=_0x4cafda,_0x2f8669['exports']['__esModule']=!0x0,_0x2f8669['exports']['default']=_0x2f8669['exports'];},0x2af:(_0x5e1c4f,_0xf64df6,_0x423f35)=>{var _0xc1bb=_0x423f35(0x3d)();_0x5e1c4f['exports']=_0xc1bb;try{regeneratorRuntime=_0xc1bb;}catch(_0xd376ef){'object'==typeof globalThis?globalThis['regeneratorRuntime']=_0xc1bb:Function('r','regeneratorRuntime\\x20=\\x20r')(_0xc1bb);}}},_0x24ab1e={};function _0x78e9a5(_0x1a6218){var _0x4ce8aa=_0x24ab1e[_0x1a6218];if(void 0x0!==_0x4ce8aa)return _0x4ce8aa['exports'];var _0x567fa5=_0x24ab1e[_0x1a6218]={'exports':{}};return _0xae8de9[_0x1a6218](_0x567fa5,_0x567fa5['exports'],_0x78e9a5),_0x567fa5['exports'];}_0x78e9a5['n']=_0x245ed7=>{var _0x1118a1=_0x245ed7&&_0x245ed7['__esModule']?()=>_0x245ed7['default']:()=>_0x245ed7;return _0x78e9a5['d'](_0x1118a1,{'a':_0x1118a1}),_0x1118a1;},_0x78e9a5['d']=(_0x20deab,_0x12594e)=>{for(var _0x263047 in _0x12594e)_0x78e9a5['o'](_0x12594e,_0x263047)&&!_0x78e9a5['o'](_0x20deab,_0x263047)&&Object['defineProperty'](_0x20deab,_0x263047,{'enumerable':!0x0,'get':_0x12594e[_0x263047]});},_0x78e9a5['o']=(_0x4d4eed,_0x2b5cd3)=>Object['prototype']['hasOwnProperty']['call'](_0x4d4eed,_0x2b5cd3),((()=>{'use strict';function _0x3521ed(_0x4332f4){return _0x3521ed='function'==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x260d5f){return typeof _0x260d5f;}:function(_0x1e8ba9){return _0x1e8ba9&&'function'==typeof Symbol&&_0x1e8ba9['constructor']===Symbol&&_0x1e8ba9!==Symbol['prototype']?'symbol':typeof _0x1e8ba9;},_0x3521ed(_0x4332f4);}function _0x212e39(_0x382aa2,_0x735f87,_0x7a4b53,_0x2c1a03,_0x50d4d6,_0xc89b03,_0x2639f4){try{var _0x80af12=_0x382aa2[_0xc89b03](_0x2639f4),_0x177927=_0x80af12['value'];}catch(_0xa8c61c){return void _0x7a4b53(_0xa8c61c);}_0x80af12['done']?_0x735f87(_0x177927):Promise['resolve'](_0x177927)['then'](_0x2c1a03,_0x50d4d6);}function _0x465afd(_0x179677){return function(){var _0x3e4ac0=this,_0x54de1c=arguments;return new Promise(function(_0x482368,_0xe0cafc){var _0x318482=_0x179677['apply'](_0x3e4ac0,_0x54de1c);function _0x2f4abf(_0x4076a2){_0x212e39(_0x318482,_0x482368,_0xe0cafc,_0x2f4abf,_0x47637d,'next',_0x4076a2);}function _0x47637d(_0x21aa5d){_0x212e39(_0x318482,_0x482368,_0xe0cafc,_0x2f4abf,_0x47637d,'throw',_0x21aa5d);}_0x2f4abf(void 0x0);});};}function _0x1d88b2(_0x4c6274,_0x87413a){if(!(_0x4c6274 instanceof _0x87413a))throw new TypeError('Cannot\\x20call\\x20a\\x20class\\x20as\\x20a\\x20function');}function _0x7cc4f5(_0x5eda3f,_0x409999){for(var _0x59b295=0x0;_0x59b295<_0x409999['length'];_0x59b295++){var _0x2b7690=_0x409999[_0x59b295];_0x2b7690['enumerable']=_0x2b7690['enumerable']||!0x1,_0x2b7690['configurable']=!0x0,'value'in _0x2b7690&&(_0x2b7690['writable']=!0x0),Object['defineProperty'](_0x5eda3f,_0x2b7690['key'],_0x2b7690);}}function _0x4e686c(_0x347506,_0x337fe4,_0x185e36){return _0x337fe4&&_0x7cc4f5(_0x347506['prototype'],_0x337fe4),_0x185e36&&_0x7cc4f5(_0x347506,_0x185e36),Object['defineProperty'](_0x347506,'prototype',{'writable':!0x1}),_0x347506;}var _0x3328a3=_0x78e9a5(0x2af),_0x171d88=_0x78e9a5['n'](_0x3328a3),_0x1e1231=0x501,_0x421a67=0x502,_0x42e372=0x505,_0xd0cb66=0x507,_0x4c9d86=0x508,_0x36522d=0x509,_0x1dae8d=0x512,_0x604e00=0x516,_0x10787f=0x1,_0x1adf2b=0x2,_0x5904b1=0x3,_0xf6e73b=0x0,_0x2bd62a=0x100,_0x340cf3=0x200,_0x3c6685=0x300,_0x56a1c6=0x400,_0xefb8fa=0x500,_0x39a314=0x600,_0xe75a42=0x700,_0x102fcd=0x800,_0x1f9056=0x900,_0x406210=0xa00,_0x11584b=0x1,_0x587f78=0x2,_0x5ceb2d=0x4,_0x4b7d75=0x8,_0x58b6d9=0x10,_0xab921a=0x20,_0xf6b282=0x15000001,_0x3c737d=0x1f000001,_0x596305=0x1f800000;function _0x416216(_0x4d5991,_0x450719){(null==_0x450719||_0x450719>_0x4d5991['length'])&&(_0x450719=_0x4d5991['length']);for(var _0x37a460=0x0,_0x53ccf0=new Array(_0x450719);_0x37a460<_0x450719;_0x37a460++)_0x53ccf0[_0x37a460]=_0x4d5991[_0x37a460];return _0x53ccf0;}function _0x195f37(_0xff8d1d){return function(_0x43a5b5){if(Array['isArray'](_0x43a5b5))return _0x416216(_0x43a5b5);}(_0xff8d1d)||function(_0x5ebfdf){if('undefined'!=typeof Symbol&&null!=_0x5ebfdf[Symbol['iterator']]||null!=_0x5ebfdf['@@iterator'])return Array['from'](_0x5ebfdf);}(_0xff8d1d)||function(_0x4cd1f8,_0x1a17a1){if(_0x4cd1f8){if('string'==typeof _0x4cd1f8)return _0x416216(_0x4cd1f8,_0x1a17a1);var _0x4bb830=Object['prototype']['toString']['call'](_0x4cd1f8)['slice'](0x8,-0x1);return'Object'===_0x4bb830&&_0x4cd1f8['constructor']&&(_0x4bb830=_0x4cd1f8['constructor']['name']),'Map'===_0x4bb830||'Set'===_0x4bb830?Array['from'](_0x4cd1f8):'Arguments'===_0x4bb830||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/['test'](_0x4bb830)?_0x416216(_0x4cd1f8,_0x1a17a1):void 0x0;}}(_0xff8d1d)||(function(){throw new TypeError('Invalid\\x20attempt\\x20to\\x20spread\\x20non-iterable\\x20instance.\\x0aIn\\x20order\\x20to\\x20be\\x20iterable,\\x20non-array\\x20objects\\x20must\\x20have\\x20a\\x20[Symbol.iterator]()\\x20method.');}());}var _0x5bde94=(function(){function _0x23d860(){_0x1d88b2(this,_0x23d860),this['startTime']=0x0,this['curTime']=0x0,this['timeWalk']=0x0,this['preTimerStamp']=0x0;}return _0x4e686c(_0x23d860,[{'key':'Init','value':function(){this['startTime']=this['GetCurTime']();}},{'key':'GetCurTime','value':function(){return this['curTime']=0x18*new Date()['getDate']()*0x3c*0x3c*0x3e8+0x3c*new Date()['getHours']()*0x3c*0x3e8+0x3c*new Date()['getMinutes']()*0x3e8+0x3e8*new Date()['getSeconds']()+new Date()['getMilliseconds'](),this['curTime'];}},{'key':'GetTimerWalk','value':function(){return this['timeWalk']=this['GetCurTime']()-this['startTime'],this['timeWalk']<0x0&&(this['timeWalk']=0x0),this['timeWalk'];}},{'key':'timerReset','value':function(){this['startTime']=0x0,this['curTime']=0x0,this['timeWalk']=0x0,this['preTimerStamp']=0x0;}}]),_0x23d860;}());function _0x121715(_0x1bfab1,_0x3e5bd5){var _0x1729fa='undefined'!=typeof Symbol&&_0x1bfab1[Symbol['iterator']]||_0x1bfab1['@@iterator'];if(!_0x1729fa){if(Array['isArray'](_0x1bfab1)||(_0x1729fa=function(_0xa814fc,_0x115214){if(!_0xa814fc)return;if('string'==typeof _0xa814fc)return _0x44c961(_0xa814fc,_0x115214);var _0x4e2124=Object['prototype']['toString']['call'](_0xa814fc)['slice'](0x8,-0x1);'Object'===_0x4e2124&&_0xa814fc['constructor']&&(_0x4e2124=_0xa814fc['constructor']['name']);if('Map'===_0x4e2124||'Set'===_0x4e2124)return Array['from'](_0xa814fc);if('Arguments'===_0x4e2124||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/['test'](_0x4e2124))return _0x44c961(_0xa814fc,_0x115214);}(_0x1bfab1))||_0x3e5bd5&&_0x1bfab1&&'number'==typeof _0x1bfab1['length']){_0x1729fa&&(_0x1bfab1=_0x1729fa);var _0xb5d472=0x0,_0x143383=function(){};return{'s':_0x143383,'n':function(){return _0xb5d472>=_0x1bfab1['length']?{'done':!0x0}:{'done':!0x1,'value':_0x1bfab1[_0xb5d472++]};},'e':function(_0x5c5771){throw _0x5c5771;},'f':_0x143383};}throw new TypeError('Invalid\\x20attempt\\x20to\\x20iterate\\x20non-iterable\\x20instance.\\x0aIn\\x20order\\x20to\\x20be\\x20iterable,\\x20non-array\\x20objects\\x20must\\x20have\\x20a\\x20[Symbol.iterator]()\\x20method.');}var _0x3a9f06,_0x411176=!0x0,_0xc4c754=!0x1;return{'s':function(){_0x1729fa=_0x1729fa['call'](_0x1bfab1);},'n':function(){var _0x18efbe=_0x1729fa['next']();return _0x411176=_0x18efbe['done'],_0x18efbe;},'e':function(_0x12a5b4){_0xc4c754=!0x0,_0x3a9f06=_0x12a5b4;},'f':function(){try{_0x411176||null==_0x1729fa['return']||_0x1729fa['return']();}finally{if(_0xc4c754)throw _0x3a9f06;}}};}function _0x44c961(_0x52eab2,_0x28e4c6){(null==_0x28e4c6||_0x28e4c6>_0x52eab2['length'])&&(_0x28e4c6=_0x52eab2['length']);for(var _0x4d9b9c=0x0,_0x338639=new Array(_0x28e4c6);_0x4d9b9c<_0x28e4c6;_0x4d9b9c++)_0x338639[_0x4d9b9c]=_0x52eab2[_0x4d9b9c];return _0x338639;}var _0xd61466=(function(){function _0x532c69(_0x4cd3fa,_0x1980c3,_0x169b64,_0x286588){_0x1d88b2(this,_0x532c69),this['width']=0x0,this['height']=0x0,this['decoderObj']=null,this['FirstFrame']=!0x0,this['ready_frames']=[],this['underflow']=!0x0,this['sab']=_0x4cd3fa,this['frameRate']=0x1e,this['needSetPreSoft']=!0x1,this['decoderCurStatus']=0x2,this['decoderOutSuccess']=!0x1,this['decoderObjNeedReset']=!0x1,this['oVideoRenderHandle']=_0x1980c3,this['output']=this['output']['bind'](this),this['reportError']=this['reportError']['bind'](this),this['player']=null,null!=_0x169b64&&(this['player']=_0x169b64),this['curFrame']=null,this['printfFlag']=this['oVideoRenderHandle']['printfFlag'],this['nGetTotalFrameNum']=0x0,this['nAverageDecodeTime']=0x0,this['oDecodeTimer']=null,this['runtimeInfoCBFun']=null,this['pstRuntimeInfo']={'nRunTimeModule':0x0,'nStrVersion':0x0,'nFrameTimeStamp':0x0,'nFrameNum':0x0,'nErrorCode':0x0,'nInputDataInterval':0x0,'nFrameNumInterval':0x0,'nAverageDecodeTime':0x0,'nSystemFormat':0x0,'nDetectRes':0x0,'nMp4FileTime':0x0,'nMp4TotalFrameNum':0x0,'AbsTimeYear':0x0,'AbsTimeMonth':0x0,'AbsTimeDay':0x0,'AbsTimeHour':0x0,'AbsTimeMinute':0x0,'AbsTimeSecond':0x0,'AbsTimeMilliseconds':0x0},this['HardDecFrameCount']=0x0,this['canvas']=_0x286588,this['bSetStreamEnd']=!0x1,this['bVisibility']=!0x0,this['back_ready_frames']=[],this['StartFrameTime']=0x0,this['WaitForFrameFlag']=0x0;}return _0x4e686c(_0x532c69,[{'key':'initDecoder','value':function(){if(null==this['decoderObj'])try{var _0x5ecddb={'output':this['output'],'error':this['reportError']};this['decoderObj']=new VideoDecoder(_0x5ecddb);}catch(_0x37ecd1){0x0==this['oVideoRenderHandle']['firstFrame']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','color:\\x20red'));}''!=this['canvas']&&null!=this['canvas']&&(this['underflow']&&(this['underflow']=!0x1,this['oVideoRenderHandle']['RenderFrame']()['then'](function(){})),this['oVideoRenderHandle']['displayRunning']=!0x0),this['decoderCurStatus']=0x2,this['FirstFrame']=!0x0;}},{'key':'inputData','value':function(_0x307751,_0x5b00e5){null!=this['decoderObj']&&(this['printfFlag']>0x0&&console['log']('VideoDecoder.js\\x20inputData\\x20videoInfo.timeStamp:'+_0x5b00e5['timeStamp']+',decodeQueueSize:'+this['decoderObj']['decodeQueueSize']+',frameLength:'+this['ready_frames']['length']),('configured'==this['decoderObj']['state']||this['FirstFrame'])&&this['decodeProcess'](_0x307751,_0x5b00e5),(this['ready_frames']['length']>0x64||this['decoderObj']['decodeQueueSize']>0x64)&&(this['player']?this['player']['JSPlayM4_GetDecodeBufferSize'](this['decoderObj']['decodeQueueSize'],this['ready_frames']['length']):postMessage({'function':'GetDecodeBufferSize','rawSize':this['decoderObj']['decodeQueueSize'],'frameSize':this['ready_frames']['length']})),_0x5b00e5['nStreamEnd']&&this['SetStreamEnd']());}},{'key':'concatenate','value':function(_0x2600ac){for(var _0x1570b6=0x0,_0x4879b5=arguments['length'],_0x293716=new Array(_0x4879b5>0x1?_0x4879b5-0x1:0x0),_0x4cd4d4=0x1;_0x4cd4d4<_0x4879b5;_0x4cd4d4++)_0x293716[_0x4cd4d4-0x1]=arguments[_0x4cd4d4];for(var _0x360417=0x0,_0x4c7801=_0x293716;_0x360417<_0x4c7801['length'];_0x360417++){var _0x64f6ca=_0x4c7801[_0x360417];_0x1570b6+=_0x64f6ca['length'];}for(var _0x33482a=new _0x2600ac(_0x1570b6),_0x188275=0x0,_0x197b8a=0x0,_0x182c5a=_0x293716;_0x197b8a<_0x182c5a['length'];_0x197b8a++){var _0x3762ec=_0x182c5a[_0x197b8a];_0x33482a['set'](_0x3762ec,_0x188275),_0x188275+=_0x3762ec['length'];}return _0x33482a;}},{'key':'processData','value':function(_0x53c931){for(var _0x41c443=null,_0x1e6e4c=null,_0x1696f2=null,_0x2a722a=!0x1,_0x4825f9=!0x1,_0xb8d808=0x0,_0x47eebd=0x0;_0x47eebd<_0x53c931['length']-0x4;_0x47eebd++){if(0x0!=_0x53c931[_0x47eebd]||0x0!=_0x53c931[_0x47eebd+0x1]||0x0!=_0x53c931[_0x47eebd+0x2]||0x1!=_0x53c931[_0x47eebd+0x3]||0x67!=_0x53c931[_0x47eebd+0x4]&&0x27!=_0x53c931[_0x47eebd+0x4]||(0x0!=_0x47eebd?(_0x4825f9=!0x0,_0x41c443=_0x53c931['slice'](_0x47eebd),_0xb8d808=_0x47eebd):_0x41c443=_0x53c931),0x0==_0x53c931[_0x47eebd]&&0x0==_0x53c931[_0x47eebd+0x1]&&0x0==_0x53c931[_0x47eebd+0x2]&&0x1==_0x53c931[_0x47eebd+0x3]&&(0x9==_0x53c931[_0x47eebd+0x4]||0x6==_0x53c931[_0x47eebd+0x4])){if(null==_0x41c443)continue;null==_0x1e6e4c&&(_0x1e6e4c=_0x53c931['slice'](_0xb8d808,_0x47eebd),_0x2a722a=!0x0);}if(0x0==_0x53c931[_0x47eebd]&&0x0==_0x53c931[_0x47eebd+0x1]&&0x0==_0x53c931[_0x47eebd+0x2]&&0x1==_0x53c931[_0x47eebd+0x3]&&(0x65==_0x53c931[_0x47eebd+0x4]||0x25==_0x53c931[_0x47eebd+0x4])){_0x2a722a&&(_0x1696f2=_0x53c931['slice'](_0x47eebd));break;}}return _0x2a722a?this['concatenate'](Uint8Array,_0x1e6e4c,_0x1696f2):_0x4825f9?_0x41c443:_0x53c931;}},{'key':'processData1','value':function(_0x3ad75c){return 0x0!=_0x3ad75c[0x0]||0x0!=_0x3ad75c[0x1]||0x0!=_0x3ad75c[0x2]||0x1!=_0x3ad75c[0x3]||0x9!=_0x3ad75c[0x4]&&0x6!=_0x3ad75c[0x4]?_0x3ad75c:_0x3ad75c['slice'](0x5);}},{'key':'formatVideoDecoderConfigure','value':function(_0x3af474,_0x45520a,_0x232798,_0x1bb198){var _0x369a8c='';0x5==_0x45520a?(_0x369a8c='hvc1.1.6.L123.00',this['printfFlag']>=0x0&&console['log']('265\\x20hard\\x20decoder')):0x100==_0x45520a?(_0x369a8c='avc1.42001f',this['printfFlag']>=0x0&&console['log']('264\\x20hard\\x20decoder')):console['log']('Support\\x20Error:\\x20hard\\x20decoder\\x20only\\x20support\\x20264\\x20and\\x20265\\x20!!!');var _0x164a51={'codec':_0x369a8c,'hardwareAcceleration':'prefer-hardware','optimizeForLatency':0x1};return 0x5!=_0x45520a&&this['needSetPreSoft']&&(_0x164a51['hardwareAcceleration']='prefer-software'),_0x164a51;}},{'key':'decodeProcess','value':function(_0x169710,_0x34a7f5){this['frameRate']!=_0x34a7f5['frameRate']&&(this['frameRate']=_0x34a7f5['frameRate']),this['width']!=_0x34a7f5['width']&&(this['width']=_0x34a7f5['width']),this['height']!=_0x34a7f5['height']&&(this['height']=_0x34a7f5['height']),_0x34a7f5['needSetPreSoft']&&(this['needSetPreSoft']=_0x34a7f5['needSetPreSoft']);var _0x54435e=_0x169710;if(0x4!=this['decoderCurStatus']&&null!=this['decoderObj']){if(this['printfFlag']>0x0&&console['log']('VideoDecoder.js\\x20Decoder\\x20this.decoderObj.state:'+this['decoderObj']['state']),'configured'==this['decoderObj']['state']){var _0x4c2218=new EncodedVideoChunk({'data':_0x54435e,'timestamp':_0x34a7f5['timeStamp'],'type':_0x34a7f5['isKeyFrame']?'key':'delta'});try{this['decoderObj']['decode'](_0x4c2218);}catch(_0x429a6a){0x0==this['oVideoRenderHandle']['firstFrame']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','color:\\x20red'));}_0x54435e=null,_0x169710=null,_0x4c2218=null,_0x34a7f5['frameType'];}else{if(_0x34a7f5['isKeyFrame']&&'unconfigured'==this['decoderObj']['state']){var _0xdad05f=this['formatVideoDecoderConfigure'](_0x169710,_0x34a7f5['codecType'],_0x34a7f5['width'],_0x34a7f5['height']);if(''==_0xdad05f['codec'])return-0x1;if(null!==this['decoderObj']){try{this['decoderObj']['configure'](_0xdad05f);}catch(_0x5bd8be){0x0==this['oVideoRenderHandle']['firstFrame']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','color:\\x20red'));}_0x54435e=this['processData'](_0x169710),this['FirstFrame']=!0x1;var _0x33ca53=new EncodedVideoChunk({'data':_0x54435e,'timestamp':_0x34a7f5['timeStamp'],'type':_0x34a7f5['isKeyFrame']?'key':'delta'});try{this['decoderObj']['decode'](_0x33ca53);}catch(_0xf91d9f){0x0==this['oVideoRenderHandle']['firstFrame']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','color:\\x20red'));}_0xdad05f=null,_0x54435e=null,_0x169710=null;}}}}}},{'key':'checkY','value':function(_0x216d96,_0x308777,_0x54d169){Uint8Array['prototype']['compare']=function(_0xc4dbdf,_0x38dbd1,_0x435992){for(var _0x2c7944=0x0;_0x2c7944<_0x435992;_0x2c7944++)if(this[_0xc4dbdf+_0x2c7944]!==this[_0x38dbd1+_0x2c7944])return-0x1;return 0x0;};for(var _0xebda2f=0x0,_0xbac383=new Uint8Array(_0x216d96),_0x2bf315=(_0x54d169-0x8)*_0x308777,_0x340f45=0x0;_0x340f45<0x8;_0x340f45++)for(var _0x42990c=_0x2bf315+_0x340f45*_0x308777,_0x181715=0x0;_0x181715<_0x308777-0x10;_0x181715+=0x18){var _0x584859=_0xbac383['compare'](_0x42990c+_0x181715,_0x42990c+_0x181715+0x8,0x8),_0x581cc7=_0xbac383['compare'](_0x42990c+_0x181715+0x8,_0x42990c+_0x181715+0x10,0x8);0x0===_0x584859&&0x0===_0x581cc7&&(_0xbac383[_0x42990c+_0x181715]>0x7a&&_0xbac383[_0x42990c+_0x181715]<=0x80||0x0===_0xbac383[_0x42990c+_0x181715])&&_0xebda2f++;}return!(_0xebda2f>0x64);}},{'key':'output','value':function(_0x184d9d){var _0x4e8aab=this;if(this['printfFlag']>0x0&&console['log']('VideoDecoder.js\\x20output\\x20timestamp:'+_0x184d9d['timestamp']+',decodeQueueSize:'+this['decoderObj']['decodeQueueSize']+',length:'+this['ready_frames']['length']),null!==this['decoderObj']){if('configured'==this['decoderObj']['state']&&this['bVisibility']){var _0x533424=_0x184d9d['timestamp'];if(this['oVideoRenderHandle']['VideoPrivateInfoMap']['size']>0x0){var _0x403922=this['oVideoRenderHandle']['VideoPrivateInfoMap']['get'](_0x533424);if(null!=_0x403922){for(;_0x403922['linesInfo']['length']>0x0||_0x403922['fontInfo']['length']>0x0||_0x403922['imageInfo']['length']>0x0;)this['oVideoRenderHandle']['oVideoRender']['InputPrivateInfo'](_0x403922['linesInfo']['shift'](),_0x403922['fontInfo']['shift'](),_0x403922['imageInfo']['shift']());this['oVideoRenderHandle']['VideoPrivateInfoMap']['delete'](_0x533424);}}if(this['printfFlag']>0x0&&console['log']('output1\\x20cb\\x20decodeQueueSize:'+this['decoderObj']['decodeQueueSize']+',length:'+this['ready_frames']['length']+',timestamp:'+_0x533424+',systime:'+new Date()['getHours']()+':'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds']()),this['oVideoRenderHandle']['DecodeTypeFlagMap']['size']>0x0){var _0xb619a4,_0x15898d=_0x121715(this['oVideoRenderHandle']['DecodeTypeFlagMap']['keys']());try{for(_0x15898d['s']();!(_0xb619a4=_0x15898d['n']())['done'];){var _0x3ec28c=_0xb619a4['value'];if(_0x3ec28c==_0xf6b282){if(0x1==this['oVideoRenderHandle']['DecodeTypeFlagMap']['get'](_0x3ec28c)&&null!=this['runtimeInfoCBFun']&&null!=this['oDecodeTimer']){var _0x645ed9=this['oDecodeTimer']['GetTimerWalk']();_0x645ed9<=0x0||_0x645ed9>0x989680||this['nGetTotalFrameNum']>0x186a0?(this['nGetTotalFrameNum']=0x0,this['oDecodeTimer']['Init']()):(this['nGetTotalFrameNum']++,this['nAverageDecodeTime']=_0x645ed9/this['nGetTotalFrameNum'],null!=this['runtimeInfoCBFun']&&(this['pstRuntimeInfo']['nRunTimeModule']=0x2,this['pstRuntimeInfo']['nStrVersion']=0x1,this['pstRuntimeInfo']['nFrameTimeStamp']=_0x533424,this['pstRuntimeInfo']['nFrameNum']=0x0,this['pstRuntimeInfo']['nErrorCode']=_0xf6b282,this['pstRuntimeInfo']['nInputDataInterval']=0x0,this['pstRuntimeInfo']['nFrameNumInterval']=0x0,this['pstRuntimeInfo']['nAverageDecodeTime']=this['nAverageDecodeTime'],this['runtimeInfoCBFun'](this['pstRuntimeInfo'])));}}}}catch(_0x296b56){_0x15898d['e'](_0x296b56);}finally{_0x15898d['f']();}}if(null!=this['player']&&null!=this['player']['HardDecToJpegCBFun']){++this['HardDecFrameCount'];var _0x4c52ce=_0x184d9d['displayWidth'],_0x46b3d2=_0x184d9d['displayHeight'];(this['HardDecFrameCount']-0x1)%this['player']['HardDecToJpegInterval']==0x0&&createImageBitmap(_0x184d9d)['then'](function(_0x2227e1){_0x4e8aab['player']?_0x4e8aab['player']['_GetImage'](_0x2227e1,'jpeg',0x0,0x0,_0x4c52ce,_0x46b3d2,_0x4e8aab['HardDecFrameCount']):postMessage({'function':'bitmap','value':_0x2227e1,'type':'jpeg','sx':0x0,'sy':0x0,'sw':_0x184d9d['displayWidth'],'sh':_0x184d9d['displayHeight'],'framenum':_0x4e8aab['HardDecFrameCount']});});}if(''!=this['canvas']&&null!=this['canvas']){if(this['printfFlag']>0x0&&console['log']('VideoDecoder.js\\x20WaitForFrameFlag:'+this['WaitForFrameFlag']+',frame.timestamp:'+_0x184d9d['timestamp']+',StartFrameTime:'+this['StartFrameTime']),0x2==this['WaitForFrameFlag']&&_0x184d9d['timestamp']>this['StartFrameTime']&&0x0!=this['StartFrameTime'])return _0x184d9d['close'](),0x1;if(0x1==this['WaitForFrameFlag']&&_0x184d9d['timestamp']<this['StartFrameTime']&&0x0!=this['StartFrameTime'])return _0x184d9d['close'](),0x1;if(0x6==this['decoderCurStatus']){if(this['back_ready_frames']['length']>0xc8)_0x184d9d['close']();else{var _0x32a0d8;new Object();if(this['oVideoRenderHandle']['findFramebyTime'](_0x184d9d['timestamp'],0x0)['isKeyFrame'])this['back_ready_frames']['reverse'](),(_0x32a0d8=this['ready_frames'])['push']['apply'](_0x32a0d8,_0x195f37(this['back_ready_frames'])),this['back_ready_frames']['splice'](0x0,this['back_ready_frames']['length']),createImageBitmap(_0x184d9d)['then'](function(_0x7170ae){_0x4e8aab['back_ready_frames']['push']({'image':_0x7170ae,'timestamp':_0x184d9d['timestamp'],'displayWidth':_0x184d9d['displayWidth'],'displayHeight':_0x184d9d['displayHeight']}),_0x184d9d['close']();});else createImageBitmap(_0x184d9d)['then'](function(_0x27e32b){_0x4e8aab['back_ready_frames']['push']({'image':_0x27e32b,'timestamp':_0x184d9d['timestamp'],'displayWidth':_0x184d9d['displayWidth'],'displayHeight':_0x184d9d['displayHeight']}),_0x184d9d['close']();}),this['decoderOutSuccess']||(this['decoderOutSuccess']=!0x0),this['decoderObj']['decodeQueueSize']<=0x1&&this['back_ready_frames']['length']<=0x1&&(this['player']?this['player']['JSPlayM4_GetRawData']():postMessage({'function':'GetRawData'}));}}else this['ready_frames']['length']>0x64?_0x184d9d['close']():(this['ready_frames']['push'](_0x184d9d),this['decoderOutSuccess']||(this['decoderOutSuccess']=!0x0),this['decoderObj']['decodeQueueSize']<=0x1&&this['ready_frames']['length']<=0x1&&(this['player']?this['player']['JSPlayM4_GetRawData']():postMessage({'function':'GetRawData'})));}else{if(_0x184d9d['close'](),null!=this['player']&&null!=this['player']['runtimeCBFun']&&0x1==this['GetStreamEnd']()&&0x1==this['bSetStreamEnd']){var _0xadba0f={'nRunTimeModule':0x0,'nStrVersion':0x0,'nFrameTimeStamp':0x0,'nFrameNum':0x0,'nErrorCode':0x9};this['player']['runtimeCBFun'](_0xadba0f),this['bSetStreamEnd']=!0x1;}}}else _0x184d9d['close']();}}},{'key':'output2','value':function(_0x3fba78){var _0x3749d5=this;_0x3fba78['timestamp'],createImageBitmap(_0x3fba78)['then'](function(_0xce44bf){_0x3fba78['close'](),_0x3749d5['ready_frames']['push'](_0xce44bf);});}},{'key':'reportError','value':function(_0x3302d4){if(this['oVideoRenderHandle']['DecodeTypeFlagMap']['size']>0x0){var _0x3307ad,_0x143d54=_0x121715(this['oVideoRenderHandle']['DecodeTypeFlagMap']['keys']());try{for(_0x143d54['s']();!(_0x3307ad=_0x143d54['n']())['done'];){var _0x49cb4a=_0x3307ad['value'];if(0x80==_0x49cb4a)0x1==this['oVideoRenderHandle']['DecodeTypeFlagMap']['get'](_0x49cb4a)&&null!=this['runtimeInfoCBFun']&&(this['pstRuntimeInfo']['nRunTimeModule']=0x2,this['pstRuntimeInfo']['nStrVersion']=0x1,this['pstRuntimeInfo']['nFrameTimeStamp']=timestamp,this['pstRuntimeInfo']['nFrameNum']=0x0,this['pstRuntimeInfo']['nErrorCode']=0x80,this['runtimeInfoCBFun'](this['pstRuntimeInfo']));}}catch(_0x8f5814){_0x143d54['e'](_0x8f5814);}finally{_0x143d54['f']();}}console['log']('hardDecode\\x20reportError:'+_0x3302d4['message']+',state:'+this['decoderObj']['state']+',frameRate:'+this['frameRate']+'this.ready_frames.length:'+this['ready_frames']['length']),0x0==this['oVideoRenderHandle']['firstFrame']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','color:\\x20red'));}},{'key':'destroyDecoder','value':function(){var _0x51717b=this;return new Promise(function(_0x25fcb1,_0x43d69b){_0x51717b['clearDecoderObjBuffer'](),null!=_0x51717b['decoderObj']&&('closed'!=_0x51717b['decoderObj']['state']&&_0x51717b['decoderObj']['close'](),_0x51717b['printfFlag']>=0x0&&console['log']('>>>JS\\x2001\\x20destroy\\x20decoderObj'),_0x51717b['decoderObj']=null),_0x51717b['decoderCurStatus']=0x4,_0x51717b['decoderOutSuccess']=!0x1,_0x51717b['FirstFrame']=!0x0,_0x51717b['needSetPreSoft']=!0x1,_0x51717b['decoderObjNeedReset']=!0x1,_0x51717b['curFrame']=null,null!==_0x51717b['oDecodeTimer']&&(_0x51717b['oDecodeTimer']['timerReset'](),_0x51717b['oDecodeTimer']=null),_0x25fcb1();});}},{'key':'resetDecoder','value':function(){var _0x5a7b6a=this;return new Promise(function(_0x4f47de,_0x2c4fbf){_0x5a7b6a['destroyDecoder']()['then'](function(){_0x5a7b6a['initDecoder'](),console['log']('%c\\x20reset\\x20hard\\x20decoder','color:red'),_0x4f47de();},function(){_0x2c4fbf();});});}},{'key':'clearDecoderObjBuffer','value':function(){if(0x6==this['decoderCurStatus']){for(var _0x5e2d5a=this['ready_frames']['length'],_0x502451=0x0;_0x502451<_0x5e2d5a;_0x502451++){var _0x2ca1dc=this['ready_frames']['shift']();null!=_0x2ca1dc['image']&&null!=_0x2ca1dc['image']&&_0x2ca1dc['image']['close']();}this['ready_frames']['splice'](0x0,this['ready_frames']['length']);for(var _0xdd54=this['back_ready_frames']['length'],_0x24fdd3=0x0;_0x24fdd3<_0xdd54;_0x24fdd3++){var _0x479d9a=this['back_ready_frames']['shift']();null!=_0x479d9a['image']&&null!=_0x479d9a['image']&&_0x479d9a['image']['close']();}this['back_ready_frames']['splice'](0x0,this['back_ready_frames']['length']);}else{for(var _0x33bb83=this['ready_frames']['length'],_0x3bfadc=0x0;_0x3bfadc<_0x33bb83;_0x3bfadc++){this['ready_frames']['shift']()['close']();}this['ready_frames']['splice'](0x0,this['ready_frames']['length']);}this['resetDecoderObj']();}},{'key':'resetDecoderObj','value':function(){null!=this['decoderObj']&&'configured'==this['decoderObj']['state']&&(this['decoderObj']['reset'](),this['FirstFrame']=!0x0);}},{'key':'SetStreamEnd','value':function(){return null!=this['decoderObj']&&0x0==this['decoderObj']['decodeQueueSize']&&0x0==this['ready_frames']['length']&&(this['decoderObj']['flush'](),console['log']('flush')),this['bSetStreamEnd']=!0x0,0x1;}},{'key':'GetStreamEnd','value':function(){return null!=this['decoderObj']&&(0x0==this['decoderObj']['decodeQueueSize']&&0x0==this['ready_frames']['length']||void 0x0);}},{'key':'NotifyBackPlay','value':function(_0x1a5b13,_0x2e29f7,_0x23ac9d){var _0x5237b6=this;return 0x0!=_0x2e29f7?this['resetDecoder']()['then'](function(){_0x5237b6['decoderCurStatus']=_0x1a5b13?0x6:0x2,_0x5237b6['StartFrameTime']=_0x2e29f7,_0x5237b6['WaitForFrameFlag']=_0x23ac9d;}):(this['decoderCurStatus']=_0x1a5b13?0x6:0x2,this['StartFrameTime']=_0x2e29f7,this['WaitForFrameFlag']=_0x23ac9d),0x1;}},{'key':'GetFrame','value':function(){var _0x5b147d=this;return new Promise(function(_0x1d2460,_0x927731){if(null!=_0x5b147d['curFrame']){var _0x2d8e54=_0x5b147d['ready_frames']['shift']();0x6==_0x5b147d['decoderCurStatus']?null!=_0x2d8e54['image']&&null!=_0x2d8e54['image']&&_0x2d8e54['image']['close']():_0x2d8e54['close'](),_0x2d8e54=null,_0x5b147d['curFrame']=null;}0x0!=_0x5b147d['ready_frames']['length']?(_0x5b147d['curFrame']=_0x5b147d['ready_frames'][0x0],_0x1d2460(_0x5b147d['curFrame'])):(_0x5b147d['curFrame']=null,_0x1d2460(null));});}},{'key':'GetFrameBufferLength','value':function(){return this['ready_frames']['length'];}},{'key':'GetImageYUV','value':function(_0x1b5770,_0x30347b,_0x23c1a4,_0x1f21b9,_0x2ccba6){var _0x1b2d42=this;return new Promise(function(_0xe96363,_0x45cac1){var _0x42c732=null;if(null!=_0x1b2d42['curFrame']?_0x42c732=_0x1b2d42['curFrame']:0x0!=_0x1b2d42['ready_frames']['length']&&(_0x42c732=_0x1b2d42['ready_frames'][0x0]),null!=_0x42c732){var _0x533c60=_0x42c732['displayWidth'],_0x27b020=_0x42c732['displayHeight'],_0x231c6c=_0x42c732;0x6==_0x1b2d42['decoderCurStatus']&&(_0x231c6c=_0x42c732['image']),0x0==_0x30347b&&0x0==_0x23c1a4&&0x0==_0x1f21b9&&0x0==_0x2ccba6&&(_0x1f21b9=_0x533c60,_0x2ccba6=_0x27b020),createImageBitmap(_0x231c6c)['then'](function(_0x13a46b){_0x1b2d42['player']?_0x1b2d42['player']['_GetImage'](_0x13a46b,_0x1b5770,_0x30347b,_0x23c1a4,_0x1f21b9,_0x2ccba6,0x0):postMessage({'function':'bitmap','value':_0x13a46b,'type':_0x1b5770,'sx':_0x30347b,'sy':_0x23c1a4,'sw':_0x1f21b9,'sh':_0x2ccba6,'framenum':0x0});}),_0x45cac1();}else _0xe96363({'yuvFrameBuffer':-0x1,'yuvLength':-0x1,'displayWidth':-0x1,'displayHeight':-0x1,'yuvType':-0x1});});}},{'key':'SetPrintLogFlag','value':function(_0x3214d7){return this['printfFlag']=_0x3214d7,0x1;}},{'key':'SetRunTimeInfoCallBackFun','value':function(_0x56a51d,_0x4b51a6){return this['runtimeInfoCBFun']=_0x4b51a6,0x1;}},{'key':'SetRunTimeInfoCallbackType','value':function(_0x27f920,_0x68d1b6,_0x239f65){return _0x68d1b6==_0xf6b282&&(this['nGetTotalFrameNum']=0x0,_0x239f65?null==this['oDecodeTimer']&&(this['oDecodeTimer']=new _0x5bde94(),this['oDecodeTimer']['Init']()):null!==this['oDecodeTimer']&&(this['oDecodeTimer']['timerReset'](),this['oDecodeTimer']=null)),0x1;}},{'key':'IsVisible','value':function(_0x157b66){return this['bVisibility']=_0x157b66,0x1;}}]),_0x532c69;}());function _0x5ba299(_0x1d3b2f,_0x1c7a23,_0x4a7fa6){return _0x1c7a23 in _0x1d3b2f?Object['defineProperty'](_0x1d3b2f,_0x1c7a23,{'value':_0x4a7fa6,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1d3b2f[_0x1c7a23]=_0x4a7fa6,_0x1d3b2f;}var _0x43f926={'d':function(_0x2c46ed,_0x24455f){for(var _0x543a9d in _0x24455f)_0x43f926['o'](_0x24455f,_0x543a9d)&&!_0x43f926['o'](_0x2c46ed,_0x543a9d)&&Object['defineProperty'](_0x2c46ed,_0x543a9d,{'enumerable':!0x0,'get':_0x24455f[_0x543a9d]});},'o':function(_0x3337f0,_0x5d376b){return Object['prototype']['hasOwnProperty']['call'](_0x3337f0,_0x5d376b);},'r':function(_0x1966fd){'undefined'!=typeof Symbol&&Symbol['toStringTag']&&Object['defineProperty'](_0x1966fd,Symbol['toStringTag'],{'value':'Module'}),Object['defineProperty'](_0x1966fd,'__esModule',{'value':!0x0});}},_0x39fedc={};_0x43f926['d'](_0x39fedc,{'Dv':function(){return _0x5b51cb;},'CF':function(){return _0x25eff0;},'bC':function(){return _0x47b7bd;}});var _0x47b7bd={};function _0x3a92c7(_0xc50662,_0x42ca23){if(!(_0xc50662 instanceof _0x42ca23))throw new TypeError('Cannot\\x20call\\x20a\\x20class\\x20as\\x20a\\x20function');}function _0x8b359d(_0x6f4c84,_0x47ca05){for(var _0x17d324=0x0;_0x17d324<_0x47ca05['length'];_0x17d324++){var _0xe38cf9=_0x47ca05[_0x17d324];_0xe38cf9['enumerable']=_0xe38cf9['enumerable']||!0x1,_0xe38cf9['configurable']=!0x0,'value'in _0xe38cf9&&(_0xe38cf9['writable']=!0x0),Object['defineProperty'](_0x6f4c84,_0xe38cf9['key'],_0xe38cf9);}}function _0x30be4b(_0x8a864e,_0x479941,_0x18ca8d){return _0x479941&&_0x8b359d(_0x8a864e['prototype'],_0x479941),_0x18ca8d&&_0x8b359d(_0x8a864e,_0x18ca8d),Object['defineProperty'](_0x8a864e,'prototype',{'writable':!0x1}),_0x8a864e;}_0x43f926['r'](_0x47b7bd),_0x43f926['d'](_0x47b7bd,{'ERRCODE':function(){return _0x12eada;},'SRCALLBACKTYPE':function(){return _0x1386af;},'SRDISPLAYEFFECT':function(){return _0x4d466f;},'SRFISHPARAMTYPE':function(){return _0x1a6379;},'SRIMAGEROTATEANGLE':function(){return _0x1dca5a;},'SRPIXELFORMAT':function(){return _0x459b97;},'SRPOSTPROCTYPE':function(){return _0x22a3de;},'SRPTZDISPLAYMODE':function(){return _0x3b7ab3;},'SRRENDERSTATETYPE':function(){return _0x23df7b;},'SRSETRECTTYPE':function(){return _0x2a07c0;},'SRVIEWTYPE':function(){return _0x3bfb8f;}});var _0x645d1a=3.1415926,_0x3b2c52=0.78539815,_0x12eada={'SR_OK':0x1,'SR_ERR_NOT_SUPPORT':0x80000001,'SR_ERR_SUBPORT':0x80000002,'SR_ERR_ALLOC_MEMORY':0x80000003,'SR_ERR_CALL_ORDER':0x80000004,'SR_ERR_PARAM':0x80000005,'SR_ERR_CAPTURE':0x80000006,'SR_ERR_SUBPORT_FULL':0x80000007,'SR_ERR_SHADER':0x80000008,'SR_ERR_3D_MODEL':0x80000009,'SR_ERR_FONT':0x8000000a,'SR_ERR_MEMORY_LIMIT':0x8000000b,'SR_ERR_WEBGPU_RESOURCE':0x8000000c,'SR_ERR_WEBGL_RESOURCE':0x8000000d,'SR_ERR_CANVAS':0x8000000e},_0x2a07c0={'SR_SRT_NULL':0x0,'SR_SRT_SRC':0x1,'SR_SRT_DST':0x2},_0x4d466f={'SR_DE_NULL':0x0,'SR_DE_FISH_ORIGINAL':0x1,'SR_DE_FISH_PTZ_CEILING':0x2,'SR_DE_FISH_PTZ_FLOOR':0x3,'SR_DE_FISH_PTZ_WALL':0x4,'SR_DE_FISH_PANORAMA_CEILING_360':0x5,'SR_DE_FISH_PANORAMA_CEILING_180':0x6,'SR_DE_FISH_PANORAMA_FLOOR_360':0x7,'SR_DE_FISH_PANORAMA_FLOOR_180':0x8,'SR_DE_FISH_PANORAMA_WALL':0x9,'SR_DE_FISH_SEMISPHERE':0xa,'SR_DE_EAGLEEYE_SEMISPHERE':0xb,'SR_DE_EAGLEEYE_PLANE':0xc,'SR_DE_FISH_CYLINDER_CEILING':0xd,'SR_DE_FISH_CYLINDER_FLOOR':0xe,'SR_DE_FISH_CYLINDER_SPLIT_CEILING':0xf,'SR_DE_FISH_CYLINDER_SPLIT_FLOOR':0x10,'SR_DE_FISH_PLANET':0x11,'SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL':0x12,'SR_DE_FISH_ARCSPHERE_VERTICAL_WALL':0x13,'SR_DE_FISH_ANIMATION_SWITCH_CEILING':0x14,'SR_DE_FISH_ANIMATION_SWITCH_FLOOR':0x15,'SR_DE_PANORAMA_SPHERE':0x16,'SR_DE_PANORAMA_PLANET':0x17},_0x459b97={'SR_PF_NULL':0x0,'SR_PF_YV12':0x1,'SR_PF_NV12':0x2,'SR_PF_I420':0x3,'SR_PF_RGB565':0x4,'SR_PF_RGBA32':0x5,'SR_PF_NV21':0x6,'SR_PF_SURFACE':0x100},_0x1a6379={'SR_FPT_NULL':0x0,'SR_FPT_CENTER':0x1,'SR_FPT_ANGLE':0x2,'SR_FPT_ZOOM':0x3,'SR_FPT_PTZ':0x4},_0x3b7ab3={'SR_DM_NULL':0x0,'SR_DM_RECT':0x1,'SR_DM_RANGE':0x2},_0x3bfb8f={'SR_VT_NULL':0x0,'SR_VT_ROTATION_X':0x1,'SR_VT_ROTATION_Y':0x2,'SR_VT_SCALE':0x3},_0x1386af={'SR_CBT_NULL':0x0,'SR_CBT_OUT':0x1},_0x23df7b={'SR_RST_NULL':0x0,'SR_RST_VERTICALFLIP':0x1,'SR_RST_BACK_CULL':0x2,'SR_RST_IMAGE_ROTATE':0x3},_0x22a3de={'SR_PPT_NULL':0x0,'SR_PPT_BRIGHTNESS':0x1,'SR_PPT_HUE':0x2,'SR_PPT_SATURATION':0x3,'SR_PPT_CONTRAST':0x4,'SR_PPT_SHARPNESS':0x5},_0x1dca5a={'SR_IRA_0':0x1,'SR_IRA_90':0x2,'SR_IRA_180':0x3,'SR_IRA_270':0x4},_0x377384=0.000001,_0x224f7f='undefined'!=typeof Float32Array?Float32Array:Array;function _0x43ac42(){var _0x77e497=new _0x224f7f(0x10);return _0x224f7f!=Float32Array&&(_0x77e497[0x1]=0x0,_0x77e497[0x2]=0x0,_0x77e497[0x3]=0x0,_0x77e497[0x4]=0x0,_0x77e497[0x6]=0x0,_0x77e497[0x7]=0x0,_0x77e497[0x8]=0x0,_0x77e497[0x9]=0x0,_0x77e497[0xb]=0x0,_0x77e497[0xc]=0x0,_0x77e497[0xd]=0x0,_0x77e497[0xe]=0x0),_0x77e497[0x0]=0x1,_0x77e497[0x5]=0x1,_0x77e497[0xa]=0x1,_0x77e497[0xf]=0x1,_0x77e497;}function _0x52b8d2(_0x1b9258){return _0x1b9258[0x0]=0x1,_0x1b9258[0x1]=0x0,_0x1b9258[0x2]=0x0,_0x1b9258[0x3]=0x0,_0x1b9258[0x4]=0x0,_0x1b9258[0x5]=0x1,_0x1b9258[0x6]=0x0,_0x1b9258[0x7]=0x0,_0x1b9258[0x8]=0x0,_0x1b9258[0x9]=0x0,_0x1b9258[0xa]=0x1,_0x1b9258[0xb]=0x0,_0x1b9258[0xc]=0x0,_0x1b9258[0xd]=0x0,_0x1b9258[0xe]=0x0,_0x1b9258[0xf]=0x1,_0x1b9258;}function _0x1bc788(_0x32e5bc,_0x5c2673,_0x24afb3){var _0x46f587=_0x5c2673[0x0],_0x395a90=_0x5c2673[0x1],_0x2ac5f3=_0x5c2673[0x2],_0x5449b1=_0x5c2673[0x3],_0x3c2d0c=_0x5c2673[0x4],_0x106d46=_0x5c2673[0x5],_0x227a14=_0x5c2673[0x6],_0xf72eb4=_0x5c2673[0x7],_0x3c002c=_0x5c2673[0x8],_0x37232f=_0x5c2673[0x9],_0x452af9=_0x5c2673[0xa],_0x335e9b=_0x5c2673[0xb],_0x440948=_0x5c2673[0xc],_0x4f341e=_0x5c2673[0xd],_0x182496=_0x5c2673[0xe],_0x35b9de=_0x5c2673[0xf],_0x57b7c6=_0x24afb3[0x0],_0x53d0ed=_0x24afb3[0x1],_0x19773e=_0x24afb3[0x2],_0x1fa7f8=_0x24afb3[0x3];return _0x32e5bc[0x0]=_0x57b7c6*_0x46f587+_0x53d0ed*_0x3c2d0c+_0x19773e*_0x3c002c+_0x1fa7f8*_0x440948,_0x32e5bc[0x1]=_0x57b7c6*_0x395a90+_0x53d0ed*_0x106d46+_0x19773e*_0x37232f+_0x1fa7f8*_0x4f341e,_0x32e5bc[0x2]=_0x57b7c6*_0x2ac5f3+_0x53d0ed*_0x227a14+_0x19773e*_0x452af9+_0x1fa7f8*_0x182496,_0x32e5bc[0x3]=_0x57b7c6*_0x5449b1+_0x53d0ed*_0xf72eb4+_0x19773e*_0x335e9b+_0x1fa7f8*_0x35b9de,_0x57b7c6=_0x24afb3[0x4],_0x53d0ed=_0x24afb3[0x5],_0x19773e=_0x24afb3[0x6],_0x1fa7f8=_0x24afb3[0x7],_0x32e5bc[0x4]=_0x57b7c6*_0x46f587+_0x53d0ed*_0x3c2d0c+_0x19773e*_0x3c002c+_0x1fa7f8*_0x440948,_0x32e5bc[0x5]=_0x57b7c6*_0x395a90+_0x53d0ed*_0x106d46+_0x19773e*_0x37232f+_0x1fa7f8*_0x4f341e,_0x32e5bc[0x6]=_0x57b7c6*_0x2ac5f3+_0x53d0ed*_0x227a14+_0x19773e*_0x452af9+_0x1fa7f8*_0x182496,_0x32e5bc[0x7]=_0x57b7c6*_0x5449b1+_0x53d0ed*_0xf72eb4+_0x19773e*_0x335e9b+_0x1fa7f8*_0x35b9de,_0x57b7c6=_0x24afb3[0x8],_0x53d0ed=_0x24afb3[0x9],_0x19773e=_0x24afb3[0xa],_0x1fa7f8=_0x24afb3[0xb],_0x32e5bc[0x8]=_0x57b7c6*_0x46f587+_0x53d0ed*_0x3c2d0c+_0x19773e*_0x3c002c+_0x1fa7f8*_0x440948,_0x32e5bc[0x9]=_0x57b7c6*_0x395a90+_0x53d0ed*_0x106d46+_0x19773e*_0x37232f+_0x1fa7f8*_0x4f341e,_0x32e5bc[0xa]=_0x57b7c6*_0x2ac5f3+_0x53d0ed*_0x227a14+_0x19773e*_0x452af9+_0x1fa7f8*_0x182496,_0x32e5bc[0xb]=_0x57b7c6*_0x5449b1+_0x53d0ed*_0xf72eb4+_0x19773e*_0x335e9b+_0x1fa7f8*_0x35b9de,_0x57b7c6=_0x24afb3[0xc],_0x53d0ed=_0x24afb3[0xd],_0x19773e=_0x24afb3[0xe],_0x1fa7f8=_0x24afb3[0xf],_0x32e5bc[0xc]=_0x57b7c6*_0x46f587+_0x53d0ed*_0x3c2d0c+_0x19773e*_0x3c002c+_0x1fa7f8*_0x440948,_0x32e5bc[0xd]=_0x57b7c6*_0x395a90+_0x53d0ed*_0x106d46+_0x19773e*_0x37232f+_0x1fa7f8*_0x4f341e,_0x32e5bc[0xe]=_0x57b7c6*_0x2ac5f3+_0x53d0ed*_0x227a14+_0x19773e*_0x452af9+_0x1fa7f8*_0x182496,_0x32e5bc[0xf]=_0x57b7c6*_0x5449b1+_0x53d0ed*_0xf72eb4+_0x19773e*_0x335e9b+_0x1fa7f8*_0x35b9de,_0x32e5bc;}function _0x4ddcd0(_0x49c1e4,_0x1afe5b,_0x15d48e,_0x3cadec){var _0x18eda6,_0x4dd95b,_0x1f5039,_0x1f4e73,_0x5e0eed,_0x2b9b33,_0x1f3b35,_0x498bb1,_0x1c5982,_0x26cccf,_0x1e224c,_0x846956,_0x398329,_0x4301f2,_0x135e4f,_0x35e622,_0x99e92a,_0x433e56,_0x3669af,_0x4af837,_0x50f0bb,_0x5ce1c8,_0x1a388f,_0x5c0e5e,_0x52e323=_0x3cadec[0x0],_0x239486=_0x3cadec[0x1],_0xf06f77=_0x3cadec[0x2],_0x519cd4=Math['hypot'](_0x52e323,_0x239486,_0xf06f77);return _0x519cd4<_0x377384?null:(_0x52e323*=_0x519cd4=0x1/_0x519cd4,_0x239486*=_0x519cd4,_0xf06f77*=_0x519cd4,_0x18eda6=Math['sin'](_0x15d48e),_0x1f5039=0x1-(_0x4dd95b=Math['cos'](_0x15d48e)),_0x1f4e73=_0x1afe5b[0x0],_0x5e0eed=_0x1afe5b[0x1],_0x2b9b33=_0x1afe5b[0x2],_0x1f3b35=_0x1afe5b[0x3],_0x498bb1=_0x1afe5b[0x4],_0x1c5982=_0x1afe5b[0x5],_0x26cccf=_0x1afe5b[0x6],_0x1e224c=_0x1afe5b[0x7],_0x846956=_0x1afe5b[0x8],_0x398329=_0x1afe5b[0x9],_0x4301f2=_0x1afe5b[0xa],_0x135e4f=_0x1afe5b[0xb],_0x35e622=_0x52e323*_0x52e323*_0x1f5039+_0x4dd95b,_0x99e92a=_0x239486*_0x52e323*_0x1f5039+_0xf06f77*_0x18eda6,_0x433e56=_0xf06f77*_0x52e323*_0x1f5039-_0x239486*_0x18eda6,_0x3669af=_0x52e323*_0x239486*_0x1f5039-_0xf06f77*_0x18eda6,_0x4af837=_0x239486*_0x239486*_0x1f5039+_0x4dd95b,_0x50f0bb=_0xf06f77*_0x239486*_0x1f5039+_0x52e323*_0x18eda6,_0x5ce1c8=_0x52e323*_0xf06f77*_0x1f5039+_0x239486*_0x18eda6,_0x1a388f=_0x239486*_0xf06f77*_0x1f5039-_0x52e323*_0x18eda6,_0x5c0e5e=_0xf06f77*_0xf06f77*_0x1f5039+_0x4dd95b,_0x49c1e4[0x0]=_0x1f4e73*_0x35e622+_0x498bb1*_0x99e92a+_0x846956*_0x433e56,_0x49c1e4[0x1]=_0x5e0eed*_0x35e622+_0x1c5982*_0x99e92a+_0x398329*_0x433e56,_0x49c1e4[0x2]=_0x2b9b33*_0x35e622+_0x26cccf*_0x99e92a+_0x4301f2*_0x433e56,_0x49c1e4[0x3]=_0x1f3b35*_0x35e622+_0x1e224c*_0x99e92a+_0x135e4f*_0x433e56,_0x49c1e4[0x4]=_0x1f4e73*_0x3669af+_0x498bb1*_0x4af837+_0x846956*_0x50f0bb,_0x49c1e4[0x5]=_0x5e0eed*_0x3669af+_0x1c5982*_0x4af837+_0x398329*_0x50f0bb,_0x49c1e4[0x6]=_0x2b9b33*_0x3669af+_0x26cccf*_0x4af837+_0x4301f2*_0x50f0bb,_0x49c1e4[0x7]=_0x1f3b35*_0x3669af+_0x1e224c*_0x4af837+_0x135e4f*_0x50f0bb,_0x49c1e4[0x8]=_0x1f4e73*_0x5ce1c8+_0x498bb1*_0x1a388f+_0x846956*_0x5c0e5e,_0x49c1e4[0x9]=_0x5e0eed*_0x5ce1c8+_0x1c5982*_0x1a388f+_0x398329*_0x5c0e5e,_0x49c1e4[0xa]=_0x2b9b33*_0x5ce1c8+_0x26cccf*_0x1a388f+_0x4301f2*_0x5c0e5e,_0x49c1e4[0xb]=_0x1f3b35*_0x5ce1c8+_0x1e224c*_0x1a388f+_0x135e4f*_0x5c0e5e,_0x1afe5b!==_0x49c1e4&&(_0x49c1e4[0xc]=_0x1afe5b[0xc],_0x49c1e4[0xd]=_0x1afe5b[0xd],_0x49c1e4[0xe]=_0x1afe5b[0xe],_0x49c1e4[0xf]=_0x1afe5b[0xf]),_0x49c1e4);}Math['random'],Math['PI'],Math['hypot']||(Math['hypot']=function(){for(var _0xbc71ce=0x0,_0x54875a=arguments['length'];_0x54875a--;)_0xbc71ce+=arguments[_0x54875a]*arguments[_0x54875a];return Math['sqrt'](_0xbc71ce);});var _0x3374fb=function(_0x44e30c,_0x3fb675,_0x47cd74,_0x2e0c53,_0x57925d){var _0x5d0920=0x1/Math['tan'](_0x3fb675/0x2);if(_0x44e30c[0x0]=_0x5d0920/_0x47cd74,_0x44e30c[0x1]=0x0,_0x44e30c[0x2]=0x0,_0x44e30c[0x3]=0x0,_0x44e30c[0x4]=0x0,_0x44e30c[0x5]=_0x5d0920,_0x44e30c[0x6]=0x0,_0x44e30c[0x7]=0x0,_0x44e30c[0x8]=0x0,_0x44e30c[0x9]=0x0,_0x44e30c[0xb]=-0x1,_0x44e30c[0xc]=0x0,_0x44e30c[0xd]=0x0,_0x44e30c[0xf]=0x0,null!=_0x57925d&&_0x57925d!==0x1/0x0){var _0x38aee6=0x1/(_0x2e0c53-_0x57925d);_0x44e30c[0xa]=(_0x57925d+_0x2e0c53)*_0x38aee6,_0x44e30c[0xe]=0x2*_0x57925d*_0x2e0c53*_0x38aee6;}else _0x44e30c[0xa]=-0x1,_0x44e30c[0xe]=-0x2*_0x2e0c53;return _0x44e30c;};function _0x40630e(_0x4510c3,_0x145019,_0x3a0013,_0x39a6f8){var _0x47c170,_0x5c9f96,_0x42fc8e,_0x2abc9b,_0xa153a3,_0x314e95,_0x318512,_0x5985a1,_0x533f7e,_0x378889,_0x59284f=_0x145019[0x0],_0x526542=_0x145019[0x1],_0x4e4736=_0x145019[0x2],_0x232e16=_0x39a6f8[0x0],_0x4db26a=_0x39a6f8[0x1],_0x3b3f42=_0x39a6f8[0x2],_0x2ca9fc=_0x3a0013[0x0],_0xda532f=_0x3a0013[0x1],_0x34e580=_0x3a0013[0x2];return Math['abs'](_0x59284f-_0x2ca9fc)<_0x377384&&Math['abs'](_0x526542-_0xda532f)<_0x377384&&Math['abs'](_0x4e4736-_0x34e580)<_0x377384?_0x52b8d2(_0x4510c3):(_0x318512=_0x59284f-_0x2ca9fc,_0x5985a1=_0x526542-_0xda532f,_0x533f7e=_0x4e4736-_0x34e580,_0x47c170=_0x4db26a*(_0x533f7e*=_0x378889=0x1/Math['hypot'](_0x318512,_0x5985a1,_0x533f7e))-_0x3b3f42*(_0x5985a1*=_0x378889),_0x5c9f96=_0x3b3f42*(_0x318512*=_0x378889)-_0x232e16*_0x533f7e,_0x42fc8e=_0x232e16*_0x5985a1-_0x4db26a*_0x318512,(_0x378889=Math['hypot'](_0x47c170,_0x5c9f96,_0x42fc8e))?(_0x47c170*=_0x378889=0x1/_0x378889,_0x5c9f96*=_0x378889,_0x42fc8e*=_0x378889):(_0x47c170=0x0,_0x5c9f96=0x0,_0x42fc8e=0x0),_0x2abc9b=_0x5985a1*_0x42fc8e-_0x533f7e*_0x5c9f96,_0xa153a3=_0x533f7e*_0x47c170-_0x318512*_0x42fc8e,_0x314e95=_0x318512*_0x5c9f96-_0x5985a1*_0x47c170,(_0x378889=Math['hypot'](_0x2abc9b,_0xa153a3,_0x314e95))?(_0x2abc9b*=_0x378889=0x1/_0x378889,_0xa153a3*=_0x378889,_0x314e95*=_0x378889):(_0x2abc9b=0x0,_0xa153a3=0x0,_0x314e95=0x0),_0x4510c3[0x0]=_0x47c170,_0x4510c3[0x1]=_0x2abc9b,_0x4510c3[0x2]=_0x318512,_0x4510c3[0x3]=0x0,_0x4510c3[0x4]=_0x5c9f96,_0x4510c3[0x5]=_0xa153a3,_0x4510c3[0x6]=_0x5985a1,_0x4510c3[0x7]=0x0,_0x4510c3[0x8]=_0x42fc8e,_0x4510c3[0x9]=_0x314e95,_0x4510c3[0xa]=_0x533f7e,_0x4510c3[0xb]=0x0,_0x4510c3[0xc]=-(_0x47c170*_0x59284f+_0x5c9f96*_0x526542+_0x42fc8e*_0x4e4736),_0x4510c3[0xd]=-(_0x2abc9b*_0x59284f+_0xa153a3*_0x526542+_0x314e95*_0x4e4736),_0x4510c3[0xe]=-(_0x318512*_0x59284f+_0x5985a1*_0x526542+_0x533f7e*_0x4e4736),_0x4510c3[0xf]=0x1,_0x4510c3);}function _0x1a03b4(){var _0x3c25a0=new _0x224f7f(0x3);return _0x224f7f!=Float32Array&&(_0x3c25a0[0x0]=0x0,_0x3c25a0[0x1]=0x0,_0x3c25a0[0x2]=0x0),_0x3c25a0;}function _0x2ba13b(_0x109330,_0x4473aa,_0x50446a){var _0x59a550=new _0x224f7f(0x3);return _0x59a550[0x0]=_0x109330,_0x59a550[0x1]=_0x4473aa,_0x59a550[0x2]=_0x50446a,_0x59a550;}function _0x565b46(){var _0x37452d=new _0x224f7f(0x4);return _0x224f7f!=Float32Array&&(_0x37452d[0x0]=0x0,_0x37452d[0x1]=0x0,_0x37452d[0x2]=0x0),_0x37452d[0x3]=0x1,_0x37452d;}_0x1a03b4(),(function(){var _0x51501e;_0x51501e=new _0x224f7f(0x4),_0x224f7f!=Float32Array&&(_0x51501e[0x0]=0x0,_0x51501e[0x1]=0x0,_0x51501e[0x2]=0x0,_0x51501e[0x3]=0x0);}());var _0x275653;_0x1a03b4(),_0x2ba13b(0x1,0x0,0x0),_0x2ba13b(0x0,0x1,0x0),_0x565b46(),_0x565b46(),_0x275653=new _0x224f7f(0x9),_0x224f7f!=Float32Array&&(_0x275653[0x1]=0x0,_0x275653[0x2]=0x0,_0x275653[0x3]=0x0,_0x275653[0x5]=0x0,_0x275653[0x6]=0x0,_0x275653[0x7]=0x0),_0x275653[0x0]=0x1,_0x275653[0x4]=0x1,_0x275653[0x8]=0x1,(function(){var _0x4d61c6=new _0x224f7f(0x2);_0x224f7f!=Float32Array&&(_0x4d61c6[0x0]=0x0,_0x4d61c6[0x1]=0x0);}());var _0x359c6e='\\x0aattribute\\x20vec4\\x20position;\\x20\\x0aattribute\\x20vec4\\x20texCoord;\\x20\\x0avarying\\x20vec4\\x20pp;\\x20\\x0auniform\\x20int\\x20bCapture;\\x20\\x0a\\x0avoid\\x20main(void)\\x20{\\x0a\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20position;\\x0a\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-position.y;\\x0a\\x20\\x20}\\x0a\\x20\\x20else\\x0a\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20position;\\x0a\\x20\\x20}\\x0a\\x20\\x20pp\\x20=\\x20texCoord;\\x0a}\\x0a',_0x1cafd1='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec4\\x20pp;\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20int\\x20bDataFormat;\\x0auniform\\x20float\\x20fAlpha;\\x0auniform\\x20int\\x20bDrawImage;\\x0a\\x0avoid\\x20main(void)\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor=vec4(r,\\x20g,\\x20b,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(Ytexture,\\x20pp.st);\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20if(bDrawImage\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20*=\\x20fAlpha;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a}\\x0a',_0x46ffab='\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20mediump\\x20float\\x20pp;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20lowp\\x20vec4\\x20\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20mediump\\x20float\\x20fx\\x20=\\x20abs(pp);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(fx\\x20>\\x200.2)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20=\\x20colorOut.a*(1.25\\x20-\\x201.25*fx);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a',_0x1e683e='\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20texCoord;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20\\x20\\x20mat4\\x20\\x20\\x20matRotate;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.x\\x20\\x20=\\x20position.x;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20\\x20=\\x20position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.z\\x20\\x20=\\x200.1;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.w\\x20\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20matRotate\\x20*\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x3bc606='\\x0a\\x20\\x20\\x20\\x20varying\\x20lowp\\x20vec4\\x20pp;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20pp.st);\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x235883='\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20position;\\x20\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20\\x20\\x20mat4\\x20\\x20\\x20matRotate;\\x20\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x20\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20position\\x20*\\x20matRotate;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20\\x20-gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a',_0x30cc3b='\\x0a\\x20\\x20\\x20\\x20precision\\x20mediump\\x20float;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20varying\\x20lowp\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAlpha;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20pp.st);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20*=\\x20fAlpha;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a',_0x3298a7=(function(){function _0x17b4ee(){_0x3a92c7(this,_0x17b4ee),this['fFov']=1.57,this['fAspect']=0x1,this['fNear']=0.1,this['fFar']=0x3e8,this['fTheta']=0x0,this['fAlpha']=0x0,this['fBeta']=0x0,this['fScale']=0x1,this['bOrtho']=!0x1,this['matView']=_0x43ac42(),this['matProj']=_0x43ac42(),this['vecEye']=_0x2ba13b(0x0,0x0,0x0),this['vecCenter']=_0x2ba13b(0x0,0x0,0x64),this['vecUp']=_0x2ba13b(0x0,0x1,0x0);}return _0x30be4b(_0x17b4ee,[{'key':'SetYaw','value':function(_0x329c84){this['fTheta']=_0x329c84;}},{'key':'GetYaw','value':function(){return this['fTheta'];}},{'key':'SetPitch','value':function(_0x479400){this['fAlpha']=_0x479400;}},{'key':'GetPitch','value':function(){return this['fAlpha'];}},{'key':'SetRoll','value':function(_0x3dba84){this['fBeta']=_0x3dba84;}},{'key':'GetRoll','value':function(){return this['fBeta'];}},{'key':'SetScale','value':function(_0x586fe4){this['fScale']=_0x586fe4;}},{'key':'GetScale','value':function(){return this['fScale'];}},{'key':'SetFov','value':function(_0x32eff3){this['fFov']=_0x32eff3;}},{'key':'SetAspect','value':function(_0x1e6675){this['fAspect']=_0x1e6675;}},{'key':'SetNear','value':function(_0x266cef){this['fNear']=_0x266cef;}},{'key':'SetFar','value':function(_0x4a5850){this['fFar']=_0x4a5850;}},{'key':'SetOrtho','value':function(_0x41cf36){this['bOrtho']=_0x41cf36;}},{'key':'UpdateCamera','value':function(_0x2144f3,_0x1fba58){if(!(_0x2144f3<=0x0||_0x1fba58<=0x0)){0x1==this['bOrtho']?(function(_0x3970b5,_0x430332,_0x5a2080,_0x3b9b20,_0x4f2d0f,_0xf44c4f,_0x5da3cf){var _0x2dfb71=0x1/(_0x430332-_0x5a2080),_0x455787=0x1/(_0x3b9b20-_0x4f2d0f),_0x45ff1e=0x1/(_0xf44c4f-_0x5da3cf);_0x3970b5[0x0]=-0x2*_0x2dfb71,_0x3970b5[0x1]=0x0,_0x3970b5[0x2]=0x0,_0x3970b5[0x3]=0x0,_0x3970b5[0x4]=0x0,_0x3970b5[0x5]=-0x2*_0x455787,_0x3970b5[0x6]=0x0,_0x3970b5[0x7]=0x0,_0x3970b5[0x8]=0x0,_0x3970b5[0x9]=0x0,_0x3970b5[0xa]=0x2*_0x45ff1e,_0x3970b5[0xb]=0x0,_0x3970b5[0xc]=(_0x430332+_0x5a2080)*_0x2dfb71,_0x3970b5[0xd]=(_0x4f2d0f+_0x3b9b20)*_0x455787,_0x3970b5[0xe]=(_0x5da3cf+_0xf44c4f)*_0x45ff1e,_0x3970b5[0xf]=0x1;}(this['matProj'],0x0,(0x2-1.5*this['fAlpha'])*(_0x2144f3/_0x1fba58),0x0,0x2-1.5*this['fAlpha'],this['fNear'],this['fFar']),this['matProj'][0xc]=0x0,this['matProj'][0xd]=0x0):_0x3374fb(this['matProj'],this['fFov'],_0x2144f3/_0x1fba58,this['fNear'],this['fFar']),this['vecEye']=_0x2ba13b(0x0,0x0,this['fScale']),this['vecCenter']=_0x2ba13b(0x0,0x0,-0x64),this['vecUp']=_0x2ba13b(0x0,0x1,0x0);var _0x4c68a5=_0x2ba13b(0x1,0x0,0x0),_0x14ac75=_0x2ba13b(0x0,0x1,0x0),_0x6a4eb3=_0x2ba13b(0x0,0x0,0x1),_0x7d4ff5=_0x43ac42();_0x40630e(_0x7d4ff5,this['vecEye'],this['vecCenter'],this['vecUp']);var _0x5b2085=_0x43ac42(),_0x3b05b0=_0x43ac42(),_0xb19f01=_0x43ac42(),_0x16cd12=_0x43ac42();_0x4ddcd0(_0x3b05b0,_0x5b2085,-this['fAlpha'],_0x4c68a5),_0x4ddcd0(_0xb19f01,_0x3b05b0,-this['fTheta'],_0x14ac75),_0x4ddcd0(_0x16cd12,_0xb19f01,-this['fBeta'],_0x6a4eb3),_0x1bc788(this['matView'],_0x7d4ff5,_0x16cd12);}}},{'key':'GetView','value':function(){return this['matView'];}},{'key':'GetProj','value':function(){return this['matProj'];}}]),_0x17b4ee;}()),_0x5e5ca3=(function(){function _0x3edebc(){_0x3a92c7(this,_0x3edebc),this['fFov']=1.57,this['fAspect']=0x1,this['fNear']=0.1,this['fFar']=0x3e8,this['fAlpha']=0x0,this['fTheta']=0x0,this['fScale']=0x1,this['bPano']=!0x1,this['matView']=_0x43ac42(),this['matProj']=_0x43ac42(),this['vecEye']=_0x2ba13b(0x0,0x0,0.99),this['vecCenter']=_0x2ba13b(0x0,0x0,-0x64),this['vecUp']=_0x2ba13b(0x0,0x1,0x0);}return _0x30be4b(_0x3edebc,[{'key':'SetPitch','value':function(_0x198537){this['fAlpha']=_0x198537;}},{'key':'GetPitch','value':function(){return this['fAlpha'];}},{'key':'SetYaw','value':function(_0x3bdcaf){this['fTheta']=_0x3bdcaf;}},{'key':'GetYaw','value':function(){return this['fTheta'];}},{'key':'SetScale','value':function(_0x2c3e81){this['fScale']=_0x2c3e81;}},{'key':'GetScale','value':function(){return this['fScale'];}},{'key':'SetFov','value':function(_0x2ea7cf){this['fFov']=_0x2ea7cf;}},{'key':'SetAspect','value':function(_0x2b7ed7){this['fAspect']=_0x2b7ed7;}},{'key':'SetNear','value':function(_0x2f5727){this['fNear']=_0x2f5727;}},{'key':'SetPano','value':function(_0x55c034){this['bPano']=_0x55c034;}},{'key':'SetFar','value':function(_0x49b492){this['fFar']=_0x49b492;}},{'key':'UpdateCamera','value':function(_0x20101c,_0x2cbed6){if(!(_0x20101c<=0x0||_0x2cbed6<=0x0)){var _0x293dff=_0x20101c/_0x2cbed6;0x1==this['bPano']?(_0x3374fb(this['matProj'],this['fScale'],_0x293dff,this['fNear'],this['fFar']),this['matProj'][0x0]=-0x1*this['matProj'][0x0],this['matProj'][0x5]*=-0x1):(_0x3374fb(this['matProj'],this['fFov']+this['fScale']-0x1,_0x293dff,this['fNear'],this['fFar']),this['matProj'][0x0]=this['matProj'][0x0]*((this['fAlpha']- -1.57)/_0x645d1a*0.5-0x1),this['matProj'][0x5]=this['matProj'][0x0]*_0x293dff);var _0x539f00=_0x2ba13b(0x1,0x0,0x0),_0x13eee6=_0x2ba13b(0x0,0x1,0x0),_0x35581e=_0x43ac42();_0x40630e(_0x35581e,this['vecEye'],this['vecCenter'],this['vecUp']);var _0x3f2442=_0x43ac42(),_0x3de062=_0x43ac42(),_0x33528c=_0x43ac42();_0x4ddcd0(_0x3de062,_0x3f2442,-this['fAlpha'],_0x539f00),_0x4ddcd0(_0x33528c,_0x3de062,-this['fTheta'],_0x13eee6),_0x1bc788(this['matView'],_0x35581e,_0x33528c);}}},{'key':'GetView','value':function(){return this['matView'];}},{'key':'GetProj','value':function(){return this['matProj'];}}]),_0x3edebc;}()),_0x2779f7=(function(){function _0x408baa(){_0x3a92c7(this,_0x408baa),this['onlySupportedWebGL1']=!0x1,this['videoShaderProgram']=0x0,this['vertexPosBuffer']=0x0,this['texturePosBuffer']=0x0,this['indicesPosBuffer']=0x0,this['ctx']=null,this['enPixelFormat']=_0x459b97['SR_PF_NULL'],this['nTextureNum']=0x0,this['nSurfaceTexture']=[],this['nSurfaceTexture'][0x0]=0x0,this['nSurfaceTexture'][0x1]=0x0,this['nSurfaceTexture'][0x2]=0x0,this['frameDisplayWidth']=0x0,this['frameDisplayHeight']=0x0,this['bSrcRect']=!0x1,this['fSrcUseLeft']=0x0,this['fSrcUseRight']=0x1,this['fSrcUseTop']=0x0,this['fSrcUseBottom']=0x1,this['fDstUseLeft']=0x0,this['fDstUseRight']=0x1,this['fDstUseTop']=0x0,this['fDstUseBottom']=0x1,this['nPostProc']=0x0,this['fBrightness']=0x0,this['fHue']=0x0,this['fSaturation']=0x0,this['fContrast']=0x0,this['fSharpness']=0x0,this['nWndWidth']=0x0,this['nWndHeight']=0x0,this['bCullBack']=!0x1,this['nImageRotateAngle']=_0x1dca5a['SR_IRA_0'],this['matRotate']=_0x43ac42(),this['bIsCapturing']=!0x1,this['nCaptureWidth']=0x0,this['nCaptureHeight']=0x0,this['nCaptureRTTex']=0x0,this['nCaptureFBO']=0x0,this['nCaptureFBOWidth']=0x0,this['nCaptureFBOHeight']=0x0,this['nCaptureDepthbuffer']=0x0,this['bCaptureResInit']=!0x1,this['pFishParamManager']=null,this['nFECPort']=-0x1,this['pstFishParam']=[],this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['b3DPort']=!0x1,this['pCamera']=null,this['fRotateX']=0x0,this['fRotateY']=0x0,this['fScale']=0x0,this['fRotateLimitX']=0x0,this['fRotateLimitY']=0x0,this['pSemiSpherePos']=null,this['pSemiSphereTex']=null,this['nSemiSpherePosNum']=0x0,this['nSemiSpherePosSize']=0x0,this['nSemiSphereTexSize']=0x0,this['pSpherePos']=null,this['pSphereTex']=null,this['pSphereInd']=null,this['nSpherePosNum']=0x0,this['nSpherePosSize']=0x0,this['nSphereTexSize']=0x0,this['pCylinderPos']=null,this['pCylinderTex']=null,this['nCylinderPosNum']=0x0,this['nCylinderPosSize']=0x0,this['nCylinderTexSize']=0x0,this['fCylinderHeight']=0x0,this['fCylinderRadius']=0x0,this['pArcSpherePos']=null,this['pArcSphereTex']=null,this['nArcSpherePosNum']=0x0,this['nArcSpherePosSize']=0x0,this['nArcSphereTexSize']=0x0,this['fImageWidth']=0x1,this['fImageHeight']=0x1,this['fTexCenterX']=0.5,this['fTexCenterY']=0.5,this['fTexRadius']=0.5,this['pfuncCBIn']=null,this['pUserIn']=null,this['pfuncCBOut']=null,this['pUserOut']=null,this['nMosaicShaderProgram']=0x0,this['nLineShaderProgram']=0x0,this['nMaxPointNum']=0x0,this['pLinePosVertices']=null,this['pLineClrVertices']=null,this['glLinePosBuffer']=0x0,this['glLineClrBuffer']=0x0,this['nLineTriangleNum']=0x0,this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=0x0,this['glBlockPosBuffer']=0x0,this['glBlockClrBuffer']=0x0,this['nBlockShaderProgram']=0x0,this['textCanvas']=null,this['textCanvasCtx']=null,this['nDrawFontWidth']=0x0,this['nDrawFontHeight']=0x0,this['nFontColorTexture']=0x0,this['pFontColorBuffer']=0x0,this['nFontShaderProgram']=0x0,this['nFontBGNum']=0x0,this['pstFontBGLines']=[],this['pFontPosVertices']=null,this['glFontVertexPosBuffer']=0x0,this['glFontTexturePosBuffer']=0x0,this['nImageShaderProgram']=0x0,this['pImagePosVertices']=null,this['pImageClrVertices']=null,this['glImagePosBuffer']=0x0,this['glImageClrBuffer']=0x0,this['nImageColorTexture']=null,this['nDrawImageWidth']=0x0,this['nDrawImageHeight']=0x0,this['nImageColorTextures']=[],this['nImageColorTextures'][0x0]=0x0,this['nImageColorTextures'][0x1]=0x0,this['nImageColorTextures'][0x2]=0x0,this['bFirstDrawImage']=!0x0,this['bAntialias']=!0x1,this['bRenderToTex']=!0x1,this['msaaFrameBuffer']=0x0,this['renderBuffer']=0x0,this['stOriginalDisplayRect']={},this['bCaptureOriginal']=!0x1;}return _0x30be4b(_0x408baa,[{'key':'SetCanvasSize','value':function(_0x2d2e1c,_0x503221){return _0x2d2e1c<=0x0||_0x503221<=0x0?_0x12eada['SR_ERR_PARAM']:(this['nWndWidth']=_0x2d2e1c,this['nWndHeight']=_0x503221,_0x12eada['SR_OK']);}},{'key':'Init','value':function(_0x4f175e,_0x1a66e6,_0x1acdd3,_0x5176ce){if(null==_0x4f175e)return _0x12eada['SR_ERR_PARAM'];if(null==this['ctx']&&(this['ctx']=_0x4f175e),_0x1a66e6==_0x459b97['SR_PF_NULL'])return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x297464=_0x12eada['SR_OK'];return _0x1acdd3!=_0x4d466f['SR_DE_FISH_SEMISPHERE']&&_0x1acdd3!=_0x4d466f['SR_DE_PANORAMA_SPHERE']&&_0x1acdd3!=_0x4d466f['SR_DE_PANORAMA_PLANET']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_PLANET']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']||(this['b3DPort']=!0x0,this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0)),_0x297464=this['_InitVideoVertex'](_0x1a66e6,_0x1acdd3,_0x5176ce),_0x12eada['SR_OK']!=_0x297464?_0x297464:(_0x297464=this['_InitVideoShader'](_0x1a66e6,_0x1acdd3),_0x12eada['SR_OK']!=_0x297464?_0x297464:(_0x297464=this['_InitCamera'](_0x1acdd3),_0x12eada['SR_OK']!=_0x297464?_0x297464:(this['enPixelFormat']=_0x1a66e6,this['enDisplayEffect']=_0x1acdd3,_0x1acdd3!=_0x4d466f['SR_DE_FISH_SEMISPHERE']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']&&_0x1acdd3!=_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']||this['ctx']['enable'](this['ctx']['CULL_FACE']),_0x12eada['SR_OK'])));}},{'key':'DeInit','value':function(){}},{'key':'SetTextureNum','value':function(_0x52fba6){return this['nTextureNum']=_0x52fba6,_0x12eada['SR_OK'];}},{'key':'SetTextures','value':function(_0x359e22,_0x1d1d24){return this['nSurfaceTexture'][_0x359e22]=_0x1d1d24,_0x12eada['SR_OK'];}},{'key':'SetWndResolution','value':function(_0x599388,_0x487e39){return _0x599388<=0x0||_0x487e39<=0x0?_0x12eada['SR_ERR_PARAM']:(this['nWndWidth']=_0x599388,this['nWndHeight']=_0x487e39,_0x12eada['SR_OK']);}},{'key':'GetWndResolution','value':function(_0x544d78){return _0x544d78['nWndWidth']=this['nWndWidth'],_0x544d78['nWndHeight']=this['nWndHeight'],_0x12eada['SR_OK'];}},{'key':'SetDisplayRect','value':function(_0x45c2ae,_0x2d168a,_0x297c8b,_0x29210a,_0x38c8a7){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x50a311=_0x45c2ae,_0x22e436=_0x2d168a,_0x182917=_0x45c2ae+_0x297c8b,_0x25e8e3=_0x2d168a+_0x29210a,_0x2ebc1a=null,_0x2ea016=null;switch(_0x38c8a7){case _0x2a07c0['SR_SRT_SRC']:if(this['frameDisplayWidth']>0x0&&this['frameDisplayHeight']>0x0){if(this['fSrcUseLeft']=_0x50a311/this['frameDisplayWidth'],this['fSrcUseLeft']<0x0?this['fSrcUseLeft']=0x0:this['fSrcUseLeft']>0x1&&(this['fSrcUseLeft']=0x1),this['fSrcUseTop']=_0x22e436/this['frameDisplayHeight'],this['fSrcUseTop']<0x0?this['fSrcUseTop']=0x0:this['fSrcUseTop']>0x1&&(this['fSrcUseTop']=0x1),this['fSrcUseRight']=_0x182917/this['frameDisplayWidth'],this['fSrcUseRight']<0x0?this['fSrcUseRight']=0x0:this['fSrcUseRight']>0x1&&(this['fSrcUseRight']=0x1),this['fSrcUseBottom']=_0x25e8e3/this['frameDisplayHeight'],this['fSrcUseBottom']<0x0?this['fSrcUseBottom']=0x0:this['fSrcUseBottom']>0x1&&(this['fSrcUseBottom']=0x1),this['fSrcUseLeft']>=this['fSrcUseRight']||this['fSrcUseTop']>=this['fSrcUseBottom'])return _0x12eada['SR_ERR_PARAM'];if(_0x1dca5a['SR_IRA_0']==this['nImageRotateAngle'])_0x2ebc1a=new Float32Array([this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom']]);else{if(_0x1dca5a['SR_IRA_90']==this['nImageRotateAngle']){var _0x1821a8=this['fSrcUseTop'],_0x393d23=this['fSrcUseBottom'],_0x176c8c=0x1-this['fSrcUseRight'],_0xb5c9c6=0x1-this['fSrcUseLeft'];this['fSrcUseLeft']=_0x1821a8,this['fSrcUseRight']=_0x393d23,this['fSrcUseTop']=_0x176c8c,this['fSrcUseBottom']=_0xb5c9c6,_0x2ebc1a=new Float32Array([this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop']]);}else{if(_0x1dca5a['SR_IRA_180']==this['nImageRotateAngle']){var _0x28c681=0x1-this['fSrcUseRight'],_0x1d98eb=0x1-this['fSrcUseLeft'],_0x5a865f=0x1-this['fSrcUseBottom'],_0x10d4d6=0x1-this['fSrcUseTop'];this['fSrcUseLeft']=_0x28c681,this['fSrcUseRight']=_0x1d98eb,this['fSrcUseTop']=_0x5a865f,this['fSrcUseBottom']=_0x10d4d6,_0x2ebc1a=new Float32Array([this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop']]);}else{if(_0x1dca5a['SR_IRA_270']==this['nImageRotateAngle']){var _0x5b2922=0x1-this['fSrcUseBottom'],_0x3663cf=0x1-this['fSrcUseTop'],_0x370b1a=this['fSrcUseLeft'],_0x2a1bc5=this['fSrcUseRight'];this['fSrcUseLeft']=_0x5b2922,this['fSrcUseRight']=_0x3663cf,this['fSrcUseTop']=_0x370b1a,this['fSrcUseBottom']=_0x2a1bc5,_0x2ebc1a=new Float32Array([this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom']]);}}}}this['bSrcRect']=!0x0;}else _0x2ebc1a=new Float32Array([this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom']]),this['bSrcRect']=!0x1;this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']),this['ctx']['bufferSubData'](this['ctx']['ARRAY_BUFFER'],0x0,_0x2ebc1a),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),_0x2ebc1a=null;break;case _0x2a07c0['SR_SRT_DST']:if(this['frameDisplayWidth']>0x0&&this['frameDisplayHeight']>0x0){if(this['fDstUseLeft']=_0x50a311/this['frameDisplayWidth'],this['fDstUseLeft']<0x0?this['fDstUseLeft']=0x0:this['fDstUseLeft']>0x1&&(this['fDstUseLeft']=0x1),this['fDstUseTop']=_0x22e436/this['frameDisplayHeight'],this['fDstUseTop']<0x0?this['fDstUseTop']=0x0:this['fDstUseTop']>0x1&&(this['fDstUseTop']=0x1),this['fDstUseRight']=_0x182917/this['frameDisplayWidth'],this['fDstUseRight']<0x0?this['fDstUseRight']=0x0:this['fDstUseRight']>0x1&&(this['fDstUseRight']=0x1),this['fDstUseBottom']=_0x25e8e3/this['frameDisplayHeight'],this['fDstUseBottom']<0x0?this['fDstUseBottom']=0x0:this['fDstUseBottom']>0x1&&(this['fDstUseBottom']=0x1),this['fDstUseLeft']>=this['fDstUseRight']||this['fDstUseTop']>=this['fDstUseBottom'])return _0x12eada['SR_ERR_PARAM'];(_0x2ea016=new Float32Array(0xc))[0x0]=0x2*this['fDstUseLeft']-0x1,_0x2ea016[0x1]=0x1-0x2*this['fDstUseTop'],_0x2ea016[0x2]=0x2*this['fDstUseLeft']-0x1,_0x2ea016[0x3]=0x1-0x2*this['fDstUseBottom'],_0x2ea016[0x4]=0x2*this['fDstUseRight']-0x1,_0x2ea016[0x5]=0x1-0x2*this['fDstUseTop'],_0x2ea016[0x6]=0x2*this['fDstUseRight']-0x1,_0x2ea016[0x7]=0x1-0x2*this['fDstUseTop'],_0x2ea016[0x8]=0x2*this['fDstUseLeft']-0x1,_0x2ea016[0x9]=0x1-0x2*this['fDstUseBottom'],_0x2ea016[0xa]=0x2*this['fDstUseRight']-0x1,_0x2ea016[0xb]=0x1-0x2*this['fDstUseBottom'],this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']),this['ctx']['bufferSubData'](this['ctx']['ARRAY_BUFFER'],0x0,_0x2ea016),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),_0x2ea016=null;}break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'SetImagePostProcess','value':function(_0x1b9b32,_0x1c7b8d){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(_0x22a3de['SR_PPT_SHARPNESS']==_0x1b9b32||_0x22a3de['SR_PPT_HUE']==_0x1b9b32){if(0x0-_0x1c7b8d>0.000001||_0x1c7b8d-0x1>0.000001)return _0x12eada['SR_ERR_PARAM'];}else{if((_0x22a3de['SR_PPT_BRIGHTNESS']==_0x1b9b32||_0x22a3de['SR_PPT_SATURATION']==_0x1b9b32||_0x22a3de['SR_PPT_CONTRAST']==_0x1b9b32)&&(-0x1-_0x1c7b8d>0.000001||_0x1c7b8d-0x1>0.000001))return _0x12eada['SR_ERR_PARAM'];}switch(_0x1b9b32){case _0x22a3de['SR_PPT_BRIGHTNESS']:this['fBrightness']=_0x1c7b8d;break;case _0x22a3de['SR_PPT_HUE']:this['fHue']=_0x1c7b8d;break;case _0x22a3de['SR_PPT_SATURATION']:this['fSaturation']=_0x1c7b8d;break;case _0x22a3de['SR_PPT_CONTRAST']:this['fContrast']=_0x1c7b8d;break;case _0x22a3de['SR_PPT_SHARPNESS']:this['fSharpness']=_0x1c7b8d;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return Math['abs'](this['fBrightness']-0x0)<0.000001&&Math['abs'](this['fHue']-0x0)<0.000001&&Math['abs'](this['fSaturation']-0x0)<0.000001&&Math['abs'](this['fContrast']-0x0)<0.000001&&Math['abs'](this['fSharpness']-0x0)<0.000001?this['nPostProc']=0x0:this['nPostProc']=0x1,_0x12eada['SR_OK'];}},{'key':'SetRenderState','value':function(_0x69797,_0x51232e){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];switch(_0x69797){case _0x23df7b['SR_RST_VERTICALFLIP']:if(this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];break;case _0x23df7b['SR_RST_BACK_CULL']:if(!this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];Math['abs'](_0x51232e-0x0)<0.000001?this['bCullBack']=!0x1:this['bCullBack']=!0x0;break;case _0x23df7b['SR_RST_IMAGE_ROTATE']:if(this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x33ca69=null,_0x123071=_0x1dca5a['SR_IRA_0'],_0x183f2c=_0x2ba13b(0x0,0x0,0x1),_0x4db1e1=_0x43ac42();if(Math['abs'](_0x51232e-0x0)<0.000001){if(this['nImageRotateAngle']==_0x123071)break;_0x33ca69=this['bSrcRect']?new Float32Array([this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom']]):new Float32Array([0x0,0x0,0x0,0x1,0x1,0x0,0x1,0x0,0x0,0x1,0x1,0x1]),_0x52b8d2(this['matRotate']);}else{if(Math['abs'](_0x51232e-0x5a)<0.000001){if(_0x123071=_0x1dca5a['SR_IRA_90'],this['nImageRotateAngle']==_0x123071)break;_0x33ca69=this['bSrcRect']?new Float32Array([this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop']]):new Float32Array([0x0,0x1,0x1,0x1,0x0,0x0,0x0,0x0,0x1,0x1,0x1,0x0]),_0x4ddcd0(this['matRotate'],_0x4db1e1,1.5707963,_0x183f2c);}else{if(Math['abs'](_0x51232e-0xb4)<0.000001){if(_0x123071=_0x1dca5a['SR_IRA_180'],this['nImageRotateAngle']==_0x123071)break;_0x33ca69=this['bSrcRect']?new Float32Array([this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop']]):new Float32Array([0x1,0x1,0x1,0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x0,0x0]),_0x4ddcd0(this['matRotate'],_0x4db1e1,_0x645d1a,_0x183f2c);}else{if(!(Math['abs'](_0x51232e-0x10e)<0.000001))return _0x12eada['SR_ERR_PARAM'];if(_0x123071=_0x1dca5a['SR_IRA_270'],this['nImageRotateAngle']==_0x123071)break;_0x33ca69=this['bSrcRect']?new Float32Array([this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseRight'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseLeft'],this['fSrcUseBottom']]):new Float32Array([0x1,0x0,0x0,0x0,0x1,0x1,0x1,0x1,0x0,0x0,0x0,0x1]),_0x4ddcd0(this['matRotate'],_0x4db1e1,0x3*_0x645d1a/0x2,_0x183f2c);}}}if(null==_0x33ca69)return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x487c88=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x487c88),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x33ca69,this['ctx']['STATIC_DRAW']),this['texturePosBuffer']=_0x487c88,this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['nImageRotateAngle']=_0x123071;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'SetVideoResolution','value':function(_0x3dac97,_0x24e06a){return null==this['ctx']||_0x3dac97<=0x0||_0x24e06a<=0x0?_0x12eada['SR_ERR_CALL_ORDER']:(this['frameDisplayWidth']=_0x3dac97,this['frameDisplayHeight']=_0x24e06a,_0x12eada['SR_OK']);}},{'key':'GetCaptureSize','value':function(_0x4563e5){var _0x331ce8=arguments['length']>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x4563e5['nWidth']||null==_0x4563e5['nWidth']||null==_0x4563e5['nHeight']||null==_0x4563e5['nHeight'])return _0x12eada['SR_ERR_PARAM'];if(0x1==_0x331ce8&&this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x2e6760=0x0,_0x58fbcb=0x0;if(0x0==_0x4563e5['nWidth']&&0x0==_0x4563e5['nHeight'])switch(this['enDisplayEffect']){case _0x4d466f['SR_DE_FISH_PTZ_WALL']:case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:_0x2e6760=Math['round'](0x5*this['frameDisplayHeight']/0x8),_0x58fbcb=Math['round'](0x3*_0x2e6760/0x4);break;case _0x4d466f['SR_DE_NULL']:_0x331ce8?(_0x2e6760=Math['round'](this['frameDisplayWidth']),_0x58fbcb=Math['round'](this['frameDisplayHeight'])):(_0x2e6760=Math['round']((this['fSrcUseRight']-this['fSrcUseLeft'])*this['frameDisplayWidth']),_0x58fbcb=Math['round']((this['fSrcUseBottom']-this['fSrcUseTop'])*this['frameDisplayHeight']));break;case _0x4d466f['SR_DE_FISH_ORIGINAL']:case _0x4d466f['SR_DE_FISH_SEMISPHERE']:case _0x4d466f['SR_DE_PANORAMA_SPHERE']:case _0x4d466f['SR_DE_PANORAMA_PLANET']:case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:case _0x4d466f['SR_DE_FISH_PLANET']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:_0x2e6760=Math['round'](this['frameDisplayWidth']),_0x58fbcb=Math['round'](this['frameDisplayHeight']);break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:this['frameDisplayHeight']>=0x800?(_0x2e6760=0x1800,_0x58fbcb=0x360):this['frameDisplayHeight']>=0x600&&0x800>this['frameDisplayHeight']?(_0x2e6760=0x1000,_0x58fbcb=0x240):(_0x2e6760=Math['round'](3.14*this['frameDisplayHeight']/1.6),_0x58fbcb=Math['round'](0x9*this['frameDisplayWidth']/0x10),_0x2e6760=Math['round'](0x2*_0x2e6760),_0x58fbcb=Math['round'](_0x58fbcb/0x2));break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:this['frameDisplayHeight']>=0xc00?(_0x2e6760=0x1000,_0x58fbcb=0x900):this['frameDisplayHeight']>=0x800&&0xc00>this['frameDisplayHeight']?(_0x2e6760=0xc00,_0x58fbcb=0x6c0):this['frameDisplayHeight']>=0x600&&0x800>this['frameDisplayHeight']?(_0x2e6760=0x800,_0x58fbcb=0x480):(_0x2e6760=Math['round'](3.14*this['frameDisplayHeight']/1.6),_0x58fbcb=Math['round'](0x9*_0x2e6760/0x10));break;case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:_0x2e6760=Math['round'](this['frameDisplayHeight']),_0x58fbcb=Math['round'](0x9*_0x2e6760/0x10);break;default:return _0x12eada['SR_ERR_PARAM'];}else _0x2e6760=Math['round'](_0x4563e5['nWidth']),_0x58fbcb=Math['round'](_0x4563e5['nHeight']);return _0x2e6760<0x10||_0x58fbcb<0x10?_0x12eada['SR_ERR_PARAM']:(this['nCaptureWidth']=0x4*Math['round'](_0x2e6760/0x4),this['nCaptureHeight']=Math['round'](_0x58fbcb),_0x4563e5['nWidth']=this['nCaptureWidth'],_0x4563e5['nHeight']=this['nCaptureHeight'],_0x4563e5['nBufferLen']=this['nCaptureWidth']*this['nCaptureHeight']*0x4,this['bCaptureOriginal']=_0x331ce8,_0x12eada['SR_OK']);}},{'key':'CaptureScreen','value':function(_0x24b43b,_0x331e7a){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x137f26=_0x12eada['SR_OK'];if(_0x137f26=this['_BeginCapture'](),_0x12eada['SR_OK']!=_0x137f26)return this['bIsCapturing']=!0x1,_0x137f26;if(0x1==this['bCaptureOriginal']&&(this['stOriginalDisplayRect']['fLeft']=this['fSrcUseLeft']*this['frameDisplayWidth'],this['stOriginalDisplayRect']['fTop']=this['fSrcUseTop']*this['frameDisplayHeight'],this['stOriginalDisplayRect']['fWidth']=(this['fSrcUseRight']-this['fSrcUseLeft'])*this['frameDisplayWidth'],this['stOriginalDisplayRect']['fHeight']=(this['fSrcUseBottom']-this['fSrcUseTop'])*this['frameDisplayHeight'],_0x137f26=this['SetDisplayRect'](0x0,0x0,this['frameDisplayWidth'],this['frameDisplayHeight'],_0x2a07c0['SR_SRT_SRC']),_0x12eada['SR_OK']!=_0x137f26))return this['bIsCapturing']=!0x1,_0x137f26;if(0x0==this['videoShaderProgram']||0x0==this['vertexPosBuffer']||0x0==this['texturePosBuffer'])return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['useProgram'](this['videoShaderProgram']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x5687e2=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'position');if(_0x5687e2<0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['b3DPort']?this['ctx']['vertexAttribPointer'](_0x5687e2,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0):this['ctx']['vertexAttribPointer'](_0x5687e2,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x5687e2),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x417458=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'texCoord');if(_0x417458<0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['vertexAttribPointer'](_0x417458,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x417458),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null);var _0x5b79f1=this['enDisplayEffect'],_0xefe088=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCapture');if(_0xefe088<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0xefe088,0x1);var _0x266632=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bDataFormat');if(_0x266632<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];switch(this['enPixelFormat']){case _0x459b97['SR_PF_YV12']:case _0x459b97['SR_PF_I420']:this['ctx']['uniform1i'](_0x266632,0x0);break;case _0x459b97['SR_PF_NV12']:break;case _0x459b97['SR_PF_RGBA32']:case _0x459b97['SR_PF_SURFACE']:this['ctx']['uniform1i'](_0x266632,0x1);break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}var _0x158ae0=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bDrawImage');this['ctx']['uniform1i'](_0x158ae0,0x0);var _0x40e944=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAlpha');switch(this['ctx']['uniform1f'](_0x40e944,0x0),_0x5b79f1){case _0x4d466f['SR_DE_NULL']:break;case _0x4d466f['SR_DE_FISH_ORIGINAL']:case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:case _0x4d466f['SR_DE_FISH_PTZ_WALL']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:if(null==this['pFishParamManager'])return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];var _0x5a516d={},_0x48b558=_0x12eada['SR_OK'];if(_0x48b558=this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x5a516d),_0x12eada['SR_OK']!=_0x48b558)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x48b558;if(_0x4d466f['SR_DE_FISH_ORIGINAL']==_0x5b79f1){var _0x9f7f66=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bBlack');if(_0x9f7f66<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0x9f7f66,_0x5a516d['bBlack']);var _0x962731=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCut');if(_0x962731<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0x962731,_0x5a516d['bCut']);}if(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==_0x5b79f1||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==_0x5b79f1||_0x4d466f['SR_DE_FISH_PTZ_WALL']==_0x5b79f1){var _0x3ecb7e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleCos');if(_0x3ecb7e<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3ecb7e,_0x5a516d['fCosH']);var _0x53a12a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleSin');if(_0x53a12a<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x53a12a,_0x5a516d['fSinH']);var _0x56e34e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleCos');if(_0x56e34e<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x56e34e,_0x5a516d['fCosV']);var _0x241f38=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleSin');if(_0x241f38<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x241f38,_0x5a516d['fSinV']);var _0x25722a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fZoom');if(_0x25722a<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x25722a,_0x5a516d['fZoom']);}if(_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']==_0x5b79f1||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']==_0x5b79f1||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']==_0x5b79f1||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x5b79f1){var _0x19678f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAngle');if(_0x19678f<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x19678f,_0x5a516d['fAngle']);}var _0x77260d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x77260d<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x77260d,_0x5a516d['fRXLeft']);var _0x5812d6=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0x5812d6<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x5812d6,_0x5a516d['fRXRight']);var _0x41a20c=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x41a20c<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x41a20c,_0x5a516d['fRYTop']);var _0x151b8a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x151b8a<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x151b8a,_0x5a516d['fRYBottom']);break;case _0x4d466f['SR_DE_FISH_SEMISPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x5f0f44=this['pCamera']['GetView'](),_0x44f8c6=this['pCamera']['GetProj'](),_0x38c608=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x38c608<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x38c608,!0x1,_0x5f0f44);var _0x3623f5=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x3623f5<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x3623f5,!0x1,_0x44f8c6);break;case _0x4d466f['SR_DE_PANORAMA_SPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x104085=this['pCamera']['GetView'](),_0x5e7f20=this['pCamera']['GetProj'](),_0x132449=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x132449<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x132449,!0x1,_0x104085);var _0x141854=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x141854<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x141854,!0x1,_0x5e7f20);break;case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x5e4244=this['pCamera']['GetView'](),_0x244edc=this['pCamera']['GetProj'](),_0x581bcc=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x581bcc<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x581bcc,!0x1,_0x5e4244);var _0x4bebe7=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x4bebe7<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x4bebe7,!0x1,_0x244edc);break;case _0x4d466f['SR_DE_FISH_PLANET']:case _0x4d466f['SR_DE_PANORAMA_PLANET']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](this['fRotateX']),this['pCamera']['SetYaw'](3.14+this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x3d95e8=this['pCamera']['GetView'](),_0x23ba6e=this['pCamera']['GetProj'](),_0x2f7700=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x2f7700<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x2f7700,!0x1,_0x3d95e8);var _0xfd45d9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0xfd45d9<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0xfd45d9,!0x1,_0x23ba6e);break;case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:if(null==this['pFishParamManager'])return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];var _0x1cb0b6={},_0x7158af=_0x12eada['SR_OK'];if(_0x7158af=this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x1cb0b6),_0x12eada['SR_OK']!=_0x7158af)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x7158af;this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x34f807=this['pCamera']['GetView'](),_0xda7be2=this['pCamera']['GetProj'](),_0x427b83=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x427b83<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x427b83,!0x1,_0x34f807);var _0x89734f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x89734f<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x89734f,!0x1,_0xda7be2);var _0x36f1ae;_0x36f1ae=Math['abs'](0.785-this['fRotateX'])<0.0025?0.785:this['fRotateX'];var _0xaec049=new Float32Array([0x0,0x1,0x0,0x2*-_0x36f1ae]),_0x5e2d7b=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'vecCylinderParam');if(_0x5e2d7b<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['uniform4f'](_0x5e2d7b,_0xaec049[0x0],_0xaec049[0x1],_0xaec049[0x2],_0xaec049[0x3]),_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']==this['enDisplayEffect']){var _0x1b95f3=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fTextureOffset');if(_0x1b95f3<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x1b95f3,this['fRotateY']);}else{var _0x5b2361=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fTextureOffset');if(_0x5b2361<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x5b2361,-this['fRotateY']);}var _0x6b2648=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x6b2648<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x6b2648,_0x1cb0b6['fRXLeft']);var _0x4f661d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0x4f661d<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4f661d,_0x1cb0b6['fRXRight']);var _0x1eeb07=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x1eeb07<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x1eeb07,_0x1cb0b6['fRYTop']);var _0x36c605=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x36c605<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x36c605,_0x1cb0b6['fRYBottom']);break;default:return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_NOT_SUPPORT'];}if(this['nCaptureWidth']<=0x0||this['nCaptureHeight']<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CANVAS'];if(this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']),this['ctx']['clearColor'](0x0,0x0,0x0,0x1),this['ctx']['clear'](this['ctx']['COLOR_BUFFER_BIT']|this['ctx']['DEPTH_BUFFER_BIT']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),this['enPixelFormat']==_0x459b97['SR_PF_RGBA32']||this['enPixelFormat']==_0x459b97['SR_PF_SURFACE']){this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x4eb782=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Ytexture');this['ctx']['uniform1i'](_0x4eb782,0x0);}else{if(this['enPixelFormat']!=_0x459b97['SR_PF_YV12']&&this['enPixelFormat']!=_0x459b97['SR_PF_I420'])return _0x12eada['SR_ERR_NOT_SUPPORT'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x27c73c=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Ytexture');this['ctx']['uniform1i'](_0x27c73c,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE1']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x213b33=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Utexture');this['ctx']['uniform1i'](_0x213b33,0x1),this['ctx']['activeTexture'](this['ctx']['TEXTURE2']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x26e1c6=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Vtexture');this['ctx']['uniform1i'](_0x26e1c6,0x2);}if(this['onlySupportedWebGL1']||this['ctx']['clearBufferfi'](this['ctx']['DEPTH_STENCIL'],0x0,0x1,0x0),0x0==this['b3DPort'])this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6);else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_SEMISPHERE']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_PLANET']){if(this['nSemiSpherePosNum']<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nSemiSpherePosNum']);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_SPHERE']||this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_PLANET']){if(this['nSpherePosNum']<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['bindBuffer'](this['ctx']['ELEMENT_ARRAY_BUFFER'],this['indicesPosBuffer']),this['ctx']['drawElements'](this['ctx']['TRIANGLES'],0x6*this['nSpherePosNum'],this['ctx']['UNSIGNED_SHORT'],0x0),this['ctx']['bindBuffer'](this['ctx']['ELEMENT_ARRAY_BUFFER'],null);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']){if(this['nCylinderPosNum']<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nCylinderPosNum']);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']){if(this['nArcSpherePosNum']<=0x0)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nArcSpherePosNum']);}}}}}if(this['ctx']['useProgram'](null),_0x331e7a||this['DoCallBack'](),0x1==this['bCaptureOriginal']){var _0x4b44a6=this['nImageRotateAngle'];if(this['bSrcRect']=!0x1,_0x137f26=this['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],0x0),_0x12eada['SR_OK']!=_0x137f26)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x137f26;if(_0x137f26=this['SetDisplayRect'](this['stOriginalDisplayRect']['fLeft'],this['stOriginalDisplayRect']['fTop'],this['stOriginalDisplayRect']['fWidth'],this['stOriginalDisplayRect']['fHeight'],_0x2a07c0['SR_SRT_SRC']),_0x12eada['SR_OK']!=_0x137f26)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x137f26;switch(this['bSrcRect']=!0x0,_0x4b44a6){case _0x1dca5a['SR_IRA_0']:_0x137f26=this['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],0x0);break;case _0x1dca5a['SR_IRA_90']:_0x137f26=this['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],0x5a);break;case _0x1dca5a['SR_IRA_180']:_0x137f26=this['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],0xb4);break;case _0x1dca5a['SR_IRA_270']:_0x137f26=this['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],0x10e);break;default:return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_NOT_SUPPORT'];}if(_0x12eada['SR_OK']!=_0x137f26)return this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x137f26;}return _0x137f26=this['_EndCapture'](_0x24b43b),_0x12eada['SR_OK']!=_0x137f26?_0x137f26:_0x12eada['SR_OK'];}},{'key':'SetWebGL2Support','value':function(_0x10ebdd){return this['onlySupportedWebGL1']=_0x10ebdd,_0x12eada['SR_OK'];}},{'key':'SetFishParamManager','value':function(_0x52508e){return this['pFishParamManager']=_0x52508e,_0x12eada['SR_OK'];}},{'key':'SetFECPort','value':function(_0x3b02c0){return this['nFECPort']=_0x3b02c0,_0x12eada['SR_OK'];}},{'key':'Render','value':function(_0x21128d){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];switch(this['ctx']['useProgram'](this['videoShaderProgram']),this['enPixelFormat']){case _0x459b97['SR_PF_YV12']:case _0x459b97['SR_PF_I420']:this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0xe611a2=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Ytexture');this['ctx']['uniform1i'](_0xe611a2,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE1']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x30b299=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Utexture');this['ctx']['uniform1i'](_0x30b299,0x1),this['ctx']['activeTexture'](this['ctx']['TEXTURE2']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x259dbe=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Vtexture');this['ctx']['uniform1i'](_0x259dbe,0x2);break;case _0x459b97['SR_PF_SURFACE']:this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),!this['onlySupportedWebGL1']&&this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);var _0x1822e0=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Ytexture');this['ctx']['uniform1i'](_0x1822e0,0x0);break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}var _0x210c5a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCapture');if(_0x210c5a<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0x210c5a,0x0);var _0x2f292e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bDataFormat');if(_0x2f292e<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];switch(this['enPixelFormat']){case _0x459b97['SR_PF_YV12']:case _0x459b97['SR_PF_I420']:this['ctx']['uniform1i'](_0x2f292e,0x0);break;case _0x459b97['SR_PF_NV12']:break;case _0x459b97['SR_PF_RGBA32']:case _0x459b97['SR_PF_SURFACE']:this['ctx']['uniform1i'](_0x2f292e,0x1);}switch(this['enDisplayEffect']){case _0x4d466f['SR_DE_NULL']:if(this['nPostProc']){var _0x2570c4=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fBrightness');if(_0x2570c4<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x2570c4,this['fBrightness']);var _0x27329a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHue');if(_0x27329a<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x27329a,this['fHue']);var _0x1ee1ba=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fSaturation');if(_0x1ee1ba<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x1ee1ba,this['fSaturation']);var _0x16b2c7=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fContrast');if(_0x16b2c7<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x16b2c7,this['fContrast']);var _0x191a57=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fSharpness');if(_0x191a57<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x191a57,this['fSharpness']);var _0x2c3dbe=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fWndWidth');if(_0x2c3dbe<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x2c3dbe,this['nWndWidth']);var _0x2b974a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fWndHeight');if(_0x2b974a<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x2b974a,this['nWndHeight']);}var _0x142b85=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'nPostProc');this['ctx']['uniform1i'](_0x142b85,this['nPostProc']);break;case _0x4d466f['SR_DE_FISH_ORIGINAL']:case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:case _0x4d466f['SR_DE_FISH_PTZ_WALL']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:if(_0x4d466f['SR_DE_FISH_ORIGINAL']==this['enDisplayEffect']){var _0xe26e5=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bBlack');if(_0xe26e5<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0xe26e5,this['pstFishParam']['bBlack']);var _0x4a1d91=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCut');if(_0x4a1d91<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0x4a1d91,this['pstFishParam']['bCut']);}if(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['enDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['enDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_WALL']==this['enDisplayEffect']){var _0xe50053=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleCos');if(_0xe50053<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0xe50053,this['pstFishParam']['fCosH']);var _0x4341b9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleSin');if(_0x4341b9<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4341b9,this['pstFishParam']['fSinH']);var _0x1d2619=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleCos');if(_0x1d2619<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x1d2619,this['pstFishParam']['fCosV']);var _0x4502d1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleSin');if(_0x4502d1<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4502d1,this['pstFishParam']['fSinV']);var _0x125719=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fZoom');if(_0x125719<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x125719,this['pstFishParam']['fZoom']);}if(_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']==this['enDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']==this['enDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']==this['enDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==this['enDisplayEffect']){var _0x5e80d3=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAngle');if(_0x5e80d3<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x5e80d3,this['pstFishParam']['fAngle']);}var _0x3637f2=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x3637f2<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3637f2,this['pstFishParam']['fRXLeft']);var _0x29b4a3=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0x29b4a3<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x29b4a3,this['pstFishParam']['fRXRight']);var _0x31e983=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x31e983<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x31e983,this['pstFishParam']['fRYTop']);var _0x59aa03=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x59aa03<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x59aa03,this['pstFishParam']['fRYBottom']);break;case _0x4d466f['SR_DE_FISH_SEMISPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x500208=this['pCamera']['GetView'](),_0x35ccfe=this['pCamera']['GetProj'](),_0x54fef9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x54fef9<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x54fef9,!0x1,_0x500208);var _0x31eff9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x31eff9<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x31eff9,!0x1,_0x35ccfe);break;case _0x4d466f['SR_DE_PANORAMA_SPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x1a0751=this['pCamera']['GetView'](),_0xf39081=this['pCamera']['GetProj'](),_0x1b143b=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x1b143b<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x1b143b,!0x1,_0x1a0751);var _0x564a69=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x564a69<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x564a69,!0x1,_0xf39081);break;case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x134e36=this['pCamera']['GetView'](),_0x7c5d2=this['pCamera']['GetProj'](),_0x597e66=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x597e66<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x597e66,!0x1,_0x134e36);var _0x57d14e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x57d14e<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x57d14e,!0x1,_0x7c5d2);break;case _0x4d466f['SR_DE_FISH_PLANET']:case _0x4d466f['SR_DE_PANORAMA_PLANET']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](this['fRotateX']),this['pCamera']['SetYaw'](3.14+this['fRotateY']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x148bf6=this['pCamera']['GetView'](),_0x4589c8=this['pCamera']['GetProj'](),_0x35218d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x35218d<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x35218d,!0x1,_0x148bf6);var _0x3b7b4f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x3b7b4f<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x3b7b4f,!0x1,_0x4589c8);var _0xeb4987=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bDrawImage');if(_0xeb4987<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0xeb4987,0x0);var _0xb3cfa6=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAlpha');if(_0xb3cfa6<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0xb3cfa6,0x0);break;case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:if(null==this['pFishParamManager'])return _0x12eada['SR_ERR_CALL_ORDER'];this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['UpdateCamera'](this['nWndWidth'],this['nWndHeight']);var _0x315cf5=this['pCamera']['GetView'](),_0x1069fa=this['pCamera']['GetProj'](),_0x5c6434=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x5c6434<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x5c6434,!0x1,_0x315cf5);var _0x5c7721=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x5c7721<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x5c7721,!0x1,_0x1069fa);var _0x6641d0;_0x6641d0=Math['abs'](0.785-this['fRotateX'])<0.0025?0.785:this['fRotateX'];var _0x5e17af=new Float32Array([0x0,0x1,0x0,0x2*-_0x6641d0]),_0x33e14d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'vecCylinderParam');if(_0x33e14d<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['uniform4f'](_0x33e14d,_0x5e17af[0x0],_0x5e17af[0x1],_0x5e17af[0x2],_0x5e17af[0x3]),_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']==this['enDisplayEffect']){var _0x3a1dd2=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fTextureOffset');if(_0x3a1dd2<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3a1dd2,this['fRotateY']);}else{var _0x5554c4=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fTextureOffset');if(_0x5554c4<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x5554c4,-this['fRotateY']);}var _0x25432b={},_0x529f55=_0x12eada['SR_OK'];if(_0x529f55=this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x25432b),_0x12eada['SR_OK']!=_0x529f55)return _0x529f55;var _0x52a871=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x52a871<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x52a871,_0x25432b['fRXLeft']);var _0xed745e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0xed745e<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0xed745e,_0x25432b['fRXRight']);var _0x27398d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x27398d<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x27398d,_0x25432b['fRYTop']);var _0x3176cd=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x3176cd<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3176cd,_0x25432b['fRYBottom']);var _0x23adfe=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bDrawImage');if(_0x23adfe<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1i'](_0x23adfe,0x0);var _0x39a0d7=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAlpha');if(_0x39a0d7<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x39a0d7,0x0);break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x3a6244=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'position');if(_0x3a6244<0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['b3DPort']?this['ctx']['vertexAttribPointer'](_0x3a6244,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0):this['ctx']['vertexAttribPointer'](_0x3a6244,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x3a6244),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x97e6c9=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'texCoord');if(_0x97e6c9<0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['vertexAttribPointer'](_0x97e6c9,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x97e6c9),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['viewport'](0x0,0x0,this['nWndWidth'],this['nWndHeight']),this['onlySupportedWebGL1']||this['ctx']['clearBufferfi'](this['ctx']['DEPTH_STENCIL'],0x0,0x1,0x0),this['ctx']['clearColor'](0x0,0x0,0x0,0x1),this['ctx']['clear'](this['ctx']['COLOR_BUFFER_BIT']|this['ctx']['DEPTH_BUFFER_BIT']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),0x0==this['b3DPort'])this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6);else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_SEMISPHERE']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_PLANET']){if(this['nSemiSpherePosNum']<=0x0)return _0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nSemiSpherePosNum']);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_SPHERE']||this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_PLANET']){if(this['nSpherePosNum']<=0x0)return _0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['bindBuffer'](this['ctx']['ELEMENT_ARRAY_BUFFER'],this['indicesPosBuffer']),this['ctx']['drawElements'](this['ctx']['TRIANGLES'],0x6*this['nSpherePosNum'],this['ctx']['UNSIGNED_SHORT'],0x0),this['ctx']['bindBuffer'](this['ctx']['ELEMENT_ARRAY_BUFFER'],null);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']){if(this['nCylinderPosNum']<=0x0)return _0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nCylinderPosNum']);}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']){if(this['nArcSpherePosNum']<=0x0)return _0x12eada['SR_ERR_CALL_ORDER'];this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nArcSpherePosNum']);}}}}}return this['ctx']['useProgram'](null),_0x12eada['SR_OK'];}},{'key':'SetAntialias','value':function(_0x7fb285){return null==this['ctx']?_0x12eada['SR_ERR_CALL_ORDER']:(this['bAntialias']=_0x7fb285,_0x12eada['SR_OK']);}},{'key':'DelSubPort','value':function(){return null==this['ctx']?_0x12eada['SR_ERR_CALL_ORDER']:(0x0!=this['videoShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['videoShaderProgram']),this['videoShaderProgram']=0x0),0x0!=this['vertexPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['vertexPosBuffer']),this['vertexPosBuffer']=0x0),0x0!=this['texturePosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['texturePosBuffer']),this['texturePosBuffer']=0x0),0x0!=this['indicesPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['indicesPosBuffer']),this['indicesPosBuffer']=0x0),this['nMaxPointNum']=0x0,this['pLinePosVertices']=null,this['pLineClrVertices']=null,0x0!=this['glLinePosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glLinePosBuffer']),this['glLinePosBuffer']=0x0),this['nLineTriangleNum']=0x0,0x0!=this['nLineShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nLineShaderProgram']),this['nLineShaderProgram']=0x0),this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=0x0,0x0!=this['glBlockPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glBlockPosBuffer']),this['glBlockPosBuffer']=0x0),0x0!=this['glBlockClrBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glBlockClrBuffer']),this['glBlockClrBuffer']=0x0),0x0!=this['nBlockShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nBlockShaderProgram']),this['nBlockShaderProgram']=0x0),this['nDrawFontWidth']=0x0,this['nDrawFontHeight']=0x0,0x0!=this['nFontColorTexture']&&null!=this['ctx']&&(this['ctx']['deleteTexture'](this['nFontColorTexture']),this['nFontColorTexture']=0x0),this['pFontColorBuffer']=0x0,0x0!=this['nFontShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nFontShaderProgram']),this['nFontShaderProgram']=0x0),this['pFontPosVertices']=null,0x0!=this['glFontTexturePosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glFontTexturePosBuffer']),this['glFontTexturePosBuffer']=0x0),0x0!=this['glFontVertexPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glFontVertexPosBuffer']),this['glFontVertexPosBuffer']=0x0),0x0!=this['nCaptureRTTex']&&(this['ctx']['deleteTexture'](this['nCaptureRTTex']),this['nCaptureRTTex']=0x0),0x0!=this['nCaptureFBO']&&(this['ctx']['deleteFramebuffer'](this['nCaptureFBO']),this['nCaptureFBO']=0x0),0x0!=this['nCaptureDepthbuffer']&&(this['ctx']['deleteRenderbuffer'](this['nCaptureDepthbuffer']),this['nCaptureDepthbuffer']=0x0),this['bCaptureResInit']=!0x1,this['pSemiSpherePos']=null,this['pSemiSphereTex']=null,this['nSemiSpherePosNum']=0x0,this['nSemiSpherePosSize']=0x0,this['nSemiSphereTexSize']=0x0,this['pSpherePos']=null,this['pSphereTex']=null,this['pSphereInd']=null,this['nSpherePosNum']=0x0,this['nSpherePosSize']=0x0,this['nSphereTexSize']=0x0,this['pCylinderPos']=null,this['pCylinderTex']=null,this['nCylinderPosNum']=0x0,this['nCylinderPosSize']=0x0,this['nCylinderTexSize']=0x0,this['fCylinderHeight']=0x0,this['fCylinderRadius']=0x0,this['pArcSpherePos']=null,this['pArcSphereTex']=null,this['nArcSpherePosNum']=0x0,this['nArcSpherePosSize']=0x0,this['nArcSphereTexSize']=0x0,this['b3DPort']=!0x1,this['pCamera']=null,this['fRotateX']=0x0,this['fRotateY']=0x0,this['fScale']=0x0,this['pfuncCBIn']=null,this['pfuncCBOut']=null,this['pUserIn']=null,this['pUserOut']=null,this['ctx']['disable'](this['ctx']['CULL_FACE']),this['ctx']['disable'](this['ctx']['DEPTH_TEST']),_0x12eada['SR_OK']);}},{'key':'SetFishParam','value':function(_0x1cd8bd){return null==_0x1cd8bd?_0x12eada['SR_ERR_PARAM']:(this['pstFishParam']=_0x1cd8bd,_0x12eada['SR_OK']);}},{'key':'DrawLines','value':function(_0x2d40ca,_0x1958b9,_0x431e5c,_0x4855dd,_0x3bae21,_0x583b72){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x232d85=[],_0x25a849={};return _0x25a849['pstPoints']=_0x2d40ca,_0x25a849['nPointNum']=_0x1958b9,_0x25a849['bLoop']=_0x431e5c,_0x25a849['pstColor']=_0x4855dd,_0x25a849['nLineWidth']=_0x3bae21,_0x232d85['push'](_0x25a849),this['DrawLinesEx'](_0x232d85,0x1,_0x1958b9,_0x583b72);}},{'key':'DrawLinesEx','value':function(_0x3bf92b,_0x16dff8,_0x6802f5,_0x523b92){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x3bf92b||_0x16dff8<0x1||_0x6802f5<0x2)return _0x12eada['SR_ERR_PARAM'];if(0x0==this['nLineShaderProgram']){var _0x321f8e=this['CompileProgram']('\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec3\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20\\x20color;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20float\\x20\\x20pp;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20vec4\\x20\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20\\x20\\x20mat4\\x20\\x20\\x20matRotate;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20vec4(position.x,\\x20position.y,\\x200.0,\\x201.0)\\x20*\\x20matRotate;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20vec4(position.x,\\x20position.y,\\x200.0,\\x201.0)\\x20*\\x20matRotate;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20position.z;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20colorOut\\x20=\\x20color;\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x46ffab);if(_0x321f8e<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['nLineShaderProgram']=_0x321f8e;}if(0x1==_0x523b92)return this['DrawFillBlock'](_0x3bf92b,_0x16dff8,_0x6802f5);for(var _0x3bafb4=0x0,_0x5e3297=0x0;_0x5e3297<_0x16dff8;++_0x5e3297){if(null==_0x3bf92b[_0x5e3297]['pstPoints']||_0x3bf92b[_0x5e3297]['nPointNum']<=0x1||_0x3bf92b[_0x5e3297]['nPointNum']>=0x400||_0x3bf92b[_0x5e3297]['nLineWidth']<=0x0||null==_0x3bf92b[_0x5e3297]['pstColor'])return _0x12eada['SR_ERR_PARAM'];_0x3bafb4+=_0x3bf92b[_0x5e3297]['nPointNum'];}if(_0x3bafb4!=_0x6802f5)return _0x12eada['SR_ERR_PARAM'];if((_0x3bafb4+=_0x16dff8)>this['nMaxPointNum']&&(this['nMaxPointNum']=_0x3bafb4,this['pLinePosVertices']=null,this['pLineClrVertices']=null),null==this['pLinePosVertices']&&(this['pLinePosVertices']=new Float32Array(0x6*this['nMaxPointNum']*0x3),null==this['pLinePosVertices']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];if(this['pLinePosVertices']['fill'](0x0),null==this['pLineClrVertices']&&(this['pLineClrVertices']=new Float32Array(0x6*this['nMaxPointNum']*0x4),null==this['pLineClrVertices']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];if(this['pLineClrVertices']['fill'](0x0),0x0==this['glLinePosBuffer']&&(this['glLinePosBuffer']=this['ctx']['createBuffer'](),0x0==this['glLinePosBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(0x0==this['glLineClrBuffer']&&(this['glLineClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glLineClrBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];var _0x2fdffd=this['ComputeLinePoint'](_0x3bf92b,_0x16dff8);if(_0x12eada['SR_OK']!=_0x2fdffd)return _0x2fdffd;this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFuncSeparate'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA'],this['ctx']['ONE'],this['ctx']['ONE_MINUS_SRC_ALPHA']);var _0x38c59d=this['nLineShaderProgram'];this['ctx']['useProgram'](_0x38c59d);var _0x36a456=this['ctx']['getUniformLocation'](this['nLineShaderProgram'],'bCapture');if(_0x36a456<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x36a456,0x1):this['ctx']['uniform1i'](_0x36a456,0x0);var _0x201606=this['glLinePosBuffer'],_0x1dd040=this['glLineClrBuffer'],_0x4e6665=this['nLineTriangleNum'],_0xd932=this['pLinePosVertices'],_0x4abcf7=this['pLineClrVertices'];this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x201606),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0xd932,this['ctx']['STATIC_DRAW']);var _0x5de6d1=this['ctx']['getAttribLocation'](_0x38c59d,'position');this['ctx']['enableVertexAttribArray'](_0x5de6d1),this['ctx']['vertexAttribPointer'](_0x5de6d1,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x1dd040),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x4abcf7,this['ctx']['STATIC_DRAW']);var _0x2c4f3f=this['ctx']['getAttribLocation'](_0x38c59d,'color');this['ctx']['enableVertexAttribArray'](_0x2c4f3f),this['ctx']['vertexAttribPointer'](_0x2c4f3f,0x4,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null);var _0x5a40e6=this['ctx']['getUniformLocation'](_0x38c59d,'matRotate');return _0x5a40e6<=0x0?_0x12eada['SR_ERR_WEBGL_RESOURCE']:(this['ctx']['uniformMatrix4fv'](_0x5a40e6,!0x1,this['matRotate']),0x1==this['bIsCapturing']?this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']):this['ctx']['viewport'](0x0,0x0,this['nWndWidth'],this['nWndHeight']),this['ctx']['disable'](this['ctx']['DEPTH_TEST']),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x3*_0x4e6665),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),_0x12eada['SR_OK']);}},{'key':'DrawFillBlock','value':function(_0x2b5d53,_0x18cf58,_0x1d355c){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x2b5d53||_0x18cf58<0x1||_0x1d355c<0x2)return _0x12eada['SR_ERR_PARAM'];for(var _0x3d520c=0x0,_0x3dd075=0x0;_0x3dd075<_0x18cf58;++_0x3dd075){if(null==_0x2b5d53[_0x3dd075]['pstPoints']||_0x2b5d53[_0x3dd075]['nPointNum']<0x3||0x1!=_0x2b5d53[_0x3dd075]['bLoop']||null==_0x2b5d53[_0x3dd075]['pstColor'])return _0x12eada['SR_ERR_PARAM'];_0x3d520c+=_0x2b5d53[_0x3dd075]['nPointNum'];}if(_0x3d520c!==_0x1d355c)return _0x12eada['SR_ERR_PARAM'];var _0x495f52=_0x1d355c-0x2*_0x18cf58;if(_0x495f52>this['nMaxFillBlockTriNum']&&(this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=_0x495f52),0x0==this['glBlockPosBuffer']&&(this['glBlockPosBuffer']=this['ctx']['createBuffer'](),0x0==this['glBlockPosBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(0x0==this['glBlockClrBuffer']&&(this['glBlockClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glBlockClrBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(null==this['pFillBlockPosVertices']){var _0x171602=this['nMaxFillBlockTriNum'];if(this['pFillBlockPosVertices']=new Float32Array(0x3*_0x171602*0x3),null==this['pFillBlockPosVertices'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];}if(this['pFillBlockPosVertices']['fill'](0x0),null==this['pFillBlockClrVertices']){var _0x2fcc7a=this['nMaxFillBlockTriNum'];if(this['pFillBlockClrVertices']=new Float32Array(0x4*_0x2fcc7a*0x3),null==this['pFillBlockClrVertices'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];}this['pFillBlockClrVertices']['fill'](0x0);for(var _0x526c1f=0x0,_0x16bf06=0x0,_0x215378=0x0,_0x2d96b0=null,_0x3b7e34=null,_0x48f5bb={},_0x4b65a1={},_0x35a9e2={},_0x174620=0x0;_0x174620<_0x18cf58;++_0x174620){_0x215378=_0x2b5d53[_0x174620]['nPointNum'],_0x2d96b0=_0x2b5d53[_0x174620]['pstPoints'],_0x3b7e34=_0x2b5d53[_0x174620]['pstColor'],_0x48f5bb['fX']=(_0x2d96b0[0x0]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x48f5bb['fX']=this['fDstUseLeft']+_0x48f5bb['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x48f5bb['fX']=0x2*_0x48f5bb['fX']-0x1,_0x48f5bb['fY']=(_0x2d96b0[0x0]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x48f5bb['fY']=this['fDstUseTop']+_0x48f5bb['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x48f5bb['fY']=0x1-0x2*_0x48f5bb['fY'];for(var _0x5974ba=0x1;_0x5974ba<_0x215378-0x1;_0x5974ba++)_0x4b65a1['fX']=(_0x2d96b0[_0x5974ba]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x4b65a1['fX']=this['fDstUseLeft']+_0x4b65a1['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x4b65a1['fX']=0x2*_0x4b65a1['fX']-0x1,_0x4b65a1['fY']=(_0x2d96b0[_0x5974ba]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x4b65a1['fY']=this['fDstUseTop']+_0x4b65a1['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x4b65a1['fY']=0x1-0x2*_0x4b65a1['fY'],_0x35a9e2['fX']=(_0x2d96b0[_0x5974ba+0x1]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x35a9e2['fX']=this['fDstUseLeft']+_0x35a9e2['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x35a9e2['fX']=0x2*_0x35a9e2['fX']-0x1,_0x35a9e2['fY']=(_0x2d96b0[_0x5974ba+0x1]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x35a9e2['fY']=this['fDstUseTop']+_0x35a9e2['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x35a9e2['fY']=0x1-0x2*_0x35a9e2['fY'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x48f5bb['fX'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x48f5bb['fY'],this['pFillBlockPosVertices'][_0x526c1f++]=0x0,this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fR'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fG'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fB'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fA'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x4b65a1['fX'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x4b65a1['fY'],this['pFillBlockPosVertices'][_0x526c1f++]=0x0,this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fR'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fG'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fB'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fA'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x35a9e2['fX'],this['pFillBlockPosVertices'][_0x526c1f++]=_0x35a9e2['fY'],this['pFillBlockPosVertices'][_0x526c1f++]=0x0,this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fR'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fG'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fB'],this['pFillBlockClrVertices'][_0x16bf06++]=_0x3b7e34['fA'];}if(0x0==this['nBlockShaderProgram']&&(this['nBlockShaderProgram']=this['CompileProgram']('\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec3\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20\\x20color;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20float\\x20\\x20pp;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20vec4\\x20\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20vec4(position.x,\\x20position.y,\\x200.0,\\x201.0);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20vec4(position.x,\\x20position.y,\\x200.0,\\x201.0);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20position.z;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20colorOut\\x20=\\x20color;\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x46ffab),this['nBlockShaderProgram']<=0x0))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFuncSeparate'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA'],this['ctx']['ONE'],this['ctx']['ONE_MINUS_SRC_ALPHA']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockPosBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pFillBlockPosVertices'],this['ctx']['STATIC_DRAW']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockClrBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pFillBlockClrVertices'],this['ctx']['STATIC_DRAW']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['useProgram'](this['nBlockShaderProgram']);var _0x1d1398=this['ctx']['getUniformLocation'](this['nBlockShaderProgram'],'bCapture');if(_0x1d1398<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x1d1398,0x1):this['ctx']['uniform1i'](_0x1d1398,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockPosBuffer']);var _0x2b28b1=this['ctx']['getAttribLocation'](this['nBlockShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x2b28b1),this['ctx']['vertexAttribPointer'](_0x2b28b1,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockClrBuffer']);var _0x102c03=this['ctx']['getAttribLocation'](this['nBlockShaderProgram'],'color');return this['ctx']['enableVertexAttribArray'](_0x102c03),this['ctx']['vertexAttribPointer'](_0x102c03,0x4,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x3*_0x495f52),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x12eada['SR_OK'];}},{'key':'ComputeLinePoint','value':function(_0x73c080,_0x589195){if(null==_0x73c080||_0x589195<0x1)return _0x12eada['SR_ERR_PARAM'];if(null==this['pLinePosVertices']||null==this['pLineClrVertices'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x4599bb=0x0,_0x3f165=0x0;0x1==this['bIsCapturing']?(_0x4599bb=(this['fDstUseRight']-this['fDstUseLeft'])*this['nCaptureWidth'],_0x3f165=(this['fDstUseBottom']-this['fDstUseTop'])*this['nCaptureHeight']):(_0x4599bb=(this['fDstUseRight']-this['fDstUseLeft'])*this['nWndWidth'],_0x3f165=(this['fDstUseBottom']-this['fDstUseTop'])*this['nWndHeight']);for(var _0x205895=0x0,_0x3dd7fe=0x0,_0x285ae6=0x0,_0x2d828c=0x0,_0x18b7ea=0x0,_0x571d74=0x0,_0x12d40b=0x0,_0x294edf=0x0,_0x1da81e=0x0,_0x45ce60=0x0,_0x1498be=0x0,_0x1bccef=0x0;_0x1bccef<_0x589195;++_0x1bccef){var _0x3122e7=[];if(!((_0x1498be=_0x73c080[_0x1bccef]['nPointNum'])<=0x0)){for(var _0x114d02=0x0;_0x114d02<_0x1498be;++_0x114d02){var _0x3c13a6={};_0x3c13a6['fX']=(_0x73c080[_0x1bccef]['pstPoints'][_0x114d02]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x3c13a6['fX']=this['fDstUseLeft']+_0x3c13a6['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x3c13a6['fX']=0x2*_0x3c13a6['fX']-0x1,_0x3c13a6['fY']=(_0x73c080[_0x1bccef]['pstPoints'][_0x114d02]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x3c13a6['fY']=this['fDstUseTop']+_0x3c13a6['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x3c13a6['fY']=0x1-0x2*_0x3c13a6['fY'],_0x3122e7['push'](_0x3c13a6);}if(this['nWndWidth']<=0x0||this['nWndHeight']<=0x0)return _0x12eada['SR_ERR_CANVAS'];if(_0x571d74=3.5*_0x73c080[_0x1bccef]['nLineWidth']/_0x4599bb,_0x12d40b=3.5*_0x73c080[_0x1bccef]['nLineWidth']/_0x3f165,_0x571d74<=0x0||_0x12d40b<=0x0)return _0x12eada['SR_ERR_PARAM'];var _0xad0d2d=_0x73c080[_0x1bccef]['pstColor'];if(null==_0xad0d2d||null==_0xad0d2d)return _0x12eada['SR_ERR_PARAM'];for(var _0x591b45=0x0;_0x591b45<_0x1498be-0x1;++_0x591b45)_0x3dd7fe=_0x3122e7[_0x591b45+0x1]['fX']-_0x3122e7[_0x591b45]['fX'],_0x285ae6=_0x3122e7[_0x591b45+0x1]['fY']-_0x3122e7[_0x591b45]['fY'],_0x205895=Math['sqrt'](_0x3dd7fe*_0x3dd7fe+_0x285ae6*_0x285ae6),Math['abs'](_0x205895-0x0)<0.000001||(_0x2d828c=-_0x571d74*_0x285ae6/_0x205895/0x2,_0x18b7ea=_0x12d40b*_0x3dd7fe/_0x205895/0x2,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x591b45+0x1]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],_0x294edf+=0x2);0x1==_0x73c080[_0x1bccef]['bLoop']&&0x2<_0x1498be&&(_0x3dd7fe=_0x3122e7[_0x1498be-0x1]['fX']-_0x3122e7[0x0]['fX'],_0x285ae6=_0x3122e7[_0x1498be-0x1]['fY']-_0x3122e7[0x0]['fY'],_0x205895=Math['sqrt'](_0x3dd7fe*_0x3dd7fe+_0x285ae6*_0x285ae6),Math['abs'](_0x205895-0x0)>0.000001&&(_0x2d828c=-_0x571d74*_0x285ae6/_0x205895/0x2,_0x18b7ea=_0x12d40b*_0x3dd7fe/_0x205895/0x2,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[0x0]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fX']+_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fY']+_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=-0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fX']-_0x2d828c,this['pLinePosVertices'][_0x1da81e++]=_0x3122e7[_0x1498be-0x1]['fY']-_0x18b7ea,this['pLinePosVertices'][_0x1da81e++]=0x1,this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fR'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fG'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fB'],this['pLineClrVertices'][_0x45ce60++]=_0xad0d2d['fA'],_0x294edf+=0x2));}}return 0x0==_0x294edf?_0x12eada['SR_ERR_PARAM']:(this['nLineTriangleNum']=_0x294edf,_0x12eada['SR_OK']);}},{'key':'DrawFont','value':function(_0xf4791f,_0x2f32a7,_0x15b1a8,_0x2f6797,_0x1f2b5a,_0x42046f,_0x296904,_0x2a8f6a,_0x462b69,_0xe1ec99,_0x46cf09){return _0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'DrawFontEx','value':function(_0x7f2828,_0x4c0be0){var _0x4e9245=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0xbfb534=arguments['length']>0x3?arguments[0x3]:void 0x0;if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(0x0>_0x4c0be0||null==_0x7f2828)return _0x12eada['SR_ERR_PARAM'];var _0x2fdfcc,_0x1a6f3a,_0x2ac3e8=0x0,_0x6bba28=0x0;if(0x1==this['bIsCapturing']){if(0x0==this['nCaptureWidth']||0x0==this['nCaptureHeight'])return _0x12eada['SR_ERR_CALL_ORDER'];_0x2ac3e8=Math['round']((this['fDstUseRight']-this['fDstUseLeft'])*this['nCaptureWidth']),_0x6bba28=Math['round']((this['fDstUseBottom']-this['fDstUseTop'])*this['nCaptureHeight']);}else _0x2ac3e8=Math['round']((this['fDstUseRight']-this['fDstUseLeft'])*this['nWndWidth']),_0x6bba28=Math['round']((this['fDstUseBottom']-this['fDstUseTop'])*this['nWndHeight']);if(this['nDrawFontWidth']==_0x2ac3e8&&this['nDrawFontHeight']==_0x6bba28||(this['pFontColorBuffer']=null,this['nFontColorTexture']=0x0,this['nDrawFontWidth']=_0x2ac3e8,this['nDrawFontHeight']=_0x6bba28),0x0==this['nFontColorTexture']){if(this['nFontColorTexture']=this['ctx']['createTexture'](),0x0==this['nFontColorTexture'])return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(null==this['textCanvas']){if(this['textCanvas']=_0xbfb534,null==this['textCanvas'])return _0x12eada['SR_ERR_FONT'];if(this['textCanvasCtx']=this['textCanvas']['getContext']('2d'),null==this['textCanvasCtx'])return _0x12eada['SR_ERR_FONT'];}this['textCanvasCtx']['canvas']['width']=this['nDrawFontWidth'],this['textCanvasCtx']['canvas']['height']=this['nDrawFontHeight'],this['textCanvasCtx']['clearRect'](0x0,0x0,this['nDrawFontWidth'],this['nDrawFontHeight']);for(var _0x4a6391=0x0;_0x4a6391<_0x4c0be0;++_0x4a6391){var _0x56289a=_0x7f2828[_0x4a6391]['nFontWidth'],_0x3b453b=_0x7f2828[_0x4a6391]['nFontHeight'];0x1==this['bIsCapturing']&&(_0x56289a=Math['round'](this['nCaptureWidth']/this['nWndWidth']*_0x56289a),_0x3b453b=Math['round'](this['nCaptureHeight']/this['nWndHeight']*_0x3b453b));var _0x46fa07=_0x56289a<_0x3b453b?_0x56289a:_0x3b453b;this['textCanvasCtx']['font']=''['concat'](_0x46fa07,'px\\x20')['concat'](_0x7f2828[_0x4a6391]['pFontFamily']),this['textCanvasCtx']['textAlign']=_0x7f2828[_0x4a6391]['textAlign']||'left',this['textCanvasCtx']['textBaseline']=_0x7f2828[_0x4a6391]['textBaseline']||'top',this['textCanvasCtx']['save']();var _0x4db746=_0x7f2828[_0x4a6391]['pstStartPos']['fX']*this['nDrawFontWidth'],_0x3e6b14=_0x7f2828[_0x4a6391]['pstStartPos']['fY']*this['nDrawFontHeight'];if(this['textCanvasCtx']['translate'](_0x4db746,_0x3e6b14),this['textCanvasCtx']['rotate'](_0x7f2828[_0x4a6391]['fRotateAngle']*Math['PI']/0xb4),_0x7f2828[_0x4a6391]['bBackGround']){var _0xfdf62c=_0x7f2828[_0x4a6391]['pstStartPos']['fX'],_0x5b8269=_0x7f2828[_0x4a6391]['pstStartPos']['fY'],_0x5bd070=this['textCanvasCtx']['measureText'](_0x7f2828[_0x4a6391]['pString'])['width'],_0x38aec1=_0x46fa07;switch(this['textCanvasCtx']['textAlign']){case'center':_0xfdf62c-=_0x5bd070/0x2;break;case'right':case'end':_0xfdf62c-=_0x5bd070;}switch(this['textCanvasCtx']['textBaseline']){case'top':case'hanging':break;case'middle':_0x5b8269-=_0x38aec1/0x2;break;default:_0x5b8269-=_0x38aec1;}var _0x1580ee=_0x7f2828[_0x4a6391]['pstBGColor'];this['textCanvasCtx']['fillStyle']='rgb('['concat'](0xff*_0x1580ee['fR'],',\\x20')['concat'](0xff*_0x1580ee['fG'],',\\x20')['concat'](0xff*_0x1580ee['fB'],')'),this['textCanvasCtx']['globalAlpha']=_0x1580ee['fA'],this['textCanvasCtx']['fillRect'](_0xfdf62c,_0x5b8269,_0x5bd070,_0x38aec1);}var _0x14605a=_0x7f2828[_0x4a6391]['pstFontColor'];this['textCanvasCtx']['fillStyle']='rgb('['concat'](0xff*_0x14605a['fR'],',\\x20')['concat'](0xff*_0x14605a['fG'],',\\x20')['concat'](0xff*_0x14605a['fB'],')'),this['textCanvasCtx']['globalAlpha']=_0x7f2828[_0x4a6391]['pstFontColor']['fA'],this['textCanvasCtx']['fillText'](_0x7f2828[_0x4a6391]['pString'],0x0,0x0),this['textCanvasCtx']['restore']();}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],this['textCanvasCtx']['canvas']),0x0==this['nFontShaderProgram']&&(this['nFontShaderProgram']=this['CompileProgram'](_0x1e683e,_0x3bc606),this['nFontShaderProgram']<=0x0))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(0x1==this['bIsCapturing']?(_0x2fdfcc=this['nCaptureWidth'],_0x1a6f3a=this['nCaptureHeight']):(_0x2fdfcc=this['nWndWidth'],_0x1a6f3a=this['nWndHeight']),0x1==_0x4e9245){if(0x0==this['glFontVertexPosBuffer']){var _0x234ec6=new Float32Array([-0x1,-0x1,0x0,0x1,-0x1,0x0,0x1,0x1,0x0,-0x1,0x1,0x0]),_0x497915=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x497915),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x234ec6,this['ctx']['STATIC_DRAW']),this['glFontVertexPosBuffer']=_0x497915,_0x234ec6=0x0;}if(0x0==this['glFontTexturePosBuffer']){var _0x40bc9d=new Float32Array([0x0,0x1,0x1,0x1,0x1,0x0,0x0,0x0]),_0x877652=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x877652),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x40bc9d,this['ctx']['STATIC_DRAW']),this['glFontTexturePosBuffer']=_0x877652,_0x40bc9d=0x0;}}this['ctx']['viewport'](0x0,0x0,_0x2fdfcc,_0x1a6f3a),this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFuncSeparate'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA'],this['ctx']['ONE'],this['ctx']['ONE_MINUS_SRC_ALPHA']),this['ctx']['useProgram'](this['nFontShaderProgram']);var _0x4f76ad=this['ctx']['getUniformLocation'](this['nFontShaderProgram'],'bCapture');if(_0x4f76ad<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x4f76ad,0x1):this['ctx']['uniform1i'](_0x4f76ad,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']);var _0x3937f8=this['ctx']['getUniformLocation'](this['nFontShaderProgram'],'texture');this['ctx']['uniform1i'](_0x3937f8,0x0);var _0x5b6488=_0x43ac42(),_0x32e7ab=_0x43ac42(),_0x2ec702=_0x43ac42();_0x1bc788(_0x2ec702,_0x5b6488,_0x32e7ab);var _0x5ad99f=this['ctx']['getUniformLocation'](this['nFontShaderProgram'],'matRotate');if(_0x5ad99f<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0x5ad99f,!0x1,_0x2ec702),0x1==_0x4e9245?this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glFontVertexPosBuffer']):this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x27b001=this['ctx']['getAttribLocation'](this['nFontShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x27b001),0x1==_0x4e9245?this['ctx']['vertexAttribPointer'](_0x27b001,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0):this['ctx']['vertexAttribPointer'](_0x27b001,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),0x1==_0x4e9245?this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glFontTexturePosBuffer']):this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x52d814=this['ctx']['getAttribLocation'](this['nFontShaderProgram'],'texCoord');return this['ctx']['enableVertexAttribArray'](_0x52d814),this['ctx']['vertexAttribPointer'](_0x52d814,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['disable'](this['ctx']['DEPTH_TEST']),0x1==_0x4e9245?this['ctx']['drawArrays'](this['ctx']['TRIANGLE_FAN'],0x0,0x4):this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],null),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),_0x12eada['SR_OK'];}},{'key':'DrawImage','value':function(_0x2482df,_0x31dc92,_0x3f2762,_0x1c0520,_0x3f795d,_0x2eef72){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x2482df||_0x31dc92<=0x0||_0x3f2762<=0x0||null==_0x1c0520||_0x2eef72<0x0||_0x2eef72>0x1)return _0x12eada['SR_ERR_PARAM'];if(this['nDrawImageWidth']=_0x31dc92,this['nDrawImageHeight']=_0x3f2762,0x0==this['glImagePosBuffer']&&(this['glImagePosBuffer']=this['ctx']['createBuffer'](),0x0==this['glImagePosBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(0x0==this['glImageClrBuffer']&&(this['glImageClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glImageClrBuffer']))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(null==this['pImageClrVertices']){if(this['pImageClrVertices']=new Float32Array(0xc),null==this['pImageClrVertices'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pImageClrVertices'][0x0]=0x0,this['pImageClrVertices'][0x1]=0x0,this['pImageClrVertices'][0x2]=0x0,this['pImageClrVertices'][0x3]=0x1,this['pImageClrVertices'][0x4]=0x1,this['pImageClrVertices'][0x5]=0x0,this['pImageClrVertices'][0x6]=0x1,this['pImageClrVertices'][0x7]=0x0,this['pImageClrVertices'][0x8]=0x0,this['pImageClrVertices'][0x9]=0x1,this['pImageClrVertices'][0xa]=0x1,this['pImageClrVertices'][0xb]=0x1;}var _0x41f48b={},_0x24645a={};if(_0x41f48b['fLeft']=(_0x1c0520['fLeft']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x41f48b['fRight']=(_0x1c0520['fRight']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x41f48b['fTop']=(_0x1c0520['fTop']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x41f48b['fBottom']=(_0x1c0520['fBottom']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x24645a['fLeft']=this['fDstUseLeft']+_0x41f48b['fLeft']*(this['fDstUseRight']-this['fDstUseLeft']),_0x24645a['fRight']=this['fDstUseLeft']+_0x41f48b['fRight']*(this['fDstUseRight']-this['fDstUseLeft']),_0x24645a['fTop']=this['fDstUseTop']+_0x41f48b['fTop']*(this['fDstUseBottom']-this['fDstUseTop']),_0x24645a['fBottom']=this['fDstUseTop']+_0x41f48b['fBottom']*(this['fDstUseBottom']-this['fDstUseTop']),null==this['pImagePosVertices']&&(this['pImagePosVertices']=new Float32Array(0xc),null==this['pImagePosVertices']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];switch(this['pImagePosVertices']['fill'](0x0),this['pImagePosVertices'][0x0]=0x2*_0x24645a['fLeft']-0x1,this['pImagePosVertices'][0x1]=0x1-0x2*_0x24645a['fTop'],this['pImagePosVertices'][0x2]=0x2*_0x24645a['fLeft']-0x1,this['pImagePosVertices'][0x3]=0x1-0x2*_0x24645a['fBottom'],this['pImagePosVertices'][0x4]=0x2*_0x24645a['fRight']-0x1,this['pImagePosVertices'][0x5]=0x1-0x2*_0x24645a['fTop'],this['pImagePosVertices'][0x6]=0x2*_0x24645a['fRight']-0x1,this['pImagePosVertices'][0x7]=0x1-0x2*_0x24645a['fTop'],this['pImagePosVertices'][0x8]=0x2*_0x24645a['fLeft']-0x1,this['pImagePosVertices'][0x9]=0x1-0x2*_0x24645a['fBottom'],this['pImagePosVertices'][0xa]=0x2*_0x24645a['fRight']-0x1,this['pImagePosVertices'][0xb]=0x1-0x2*_0x24645a['fBottom'],0x1==this['bIsCapturing']?this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']):this['ctx']['viewport'](0x0,0x0,this['nWndWidth'],this['nWndHeight']),this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFuncSeparate'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA'],this['ctx']['ONE'],this['ctx']['ONE_MINUS_SRC_ALPHA']),_0x3f795d){case _0x459b97['SR_PF_SURFACE']:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}this['ctx']['useProgram'](this['videoShaderProgram']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x29ee90=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'position');if(_0x29ee90<0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['vertexAttribPointer'](_0x29ee90,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x29ee90),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x4043ed=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'texCoord');if(_0x4043ed<0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['vertexAttribPointer'](_0x4043ed,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x4043ed),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['useProgram'](null),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x2482df),0x0==this['nImageShaderProgram']){var _0x18fbe3=this['CompileProgram'](_0x235883,_0x30cc3b);if(_0x18fbe3<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['nImageShaderProgram']=_0x18fbe3;}break;case _0x459b97['SR_PF_RGBA32']:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x2482df),0x0==this['nImageShaderProgram']){var _0x41a230=this['CompileProgram'](_0x235883,_0x30cc3b);if(_0x41a230<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['nImageShaderProgram']=_0x41a230;}break;case _0x459b97['SR_PF_RGB565']:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGB'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGB'],this['ctx']['UNSIGNED_SHORT_5_6_5'],_0x2482df),0x0==this['nImageShaderProgram']){var _0x531ab9=this['CompileProgram'](_0x235883,'\\x0a\\x20\\x20\\x20\\x20precision\\x20mediump\\x20float;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x20\\x0a\\x20\\x20\\x20\\x20varying\\x20lowp\\x20vec4\\x20pp;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAlpha;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20pp.st);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20*=\\x20fAlpha;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a');if(_0x531ab9<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['nImageShaderProgram']=_0x531ab9;}break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}var _0xc3f37a=this['nImageShaderProgram'];this['ctx']['useProgram'](_0xc3f37a);var _0x331fca=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'bCapture');if(_0x331fca<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x331fca,0x1):this['ctx']['uniform1i'](_0x331fca,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']);var _0x40744e=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'texture');this['ctx']['uniform1i'](_0x40744e,0x0),_0x40744e=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'fAlpha'),this['ctx']['uniform1f'](_0x40744e,_0x2eef72);var _0xa01475=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'matRotate');if(_0xa01475<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniformMatrix4fv'](_0xa01475,!0x1,this['matRotate']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glImagePosBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pImagePosVertices'],this['ctx']['STATIC_DRAW']);var _0x4956be=this['ctx']['getAttribLocation'](this['nImageShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x4956be),this['ctx']['vertexAttribPointer'](_0x4956be,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glImageClrBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pImageClrVertices'],this['ctx']['STATIC_DRAW']);var _0x33705e=this['ctx']['getAttribLocation'](this['nImageShaderProgram'],'texCoord');return this['ctx']['enableVertexAttribArray'](_0x33705e),this['ctx']['vertexAttribPointer'](_0x33705e,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['disable'](this['ctx']['DEPTH_TEST']),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),_0x12eada['SR_OK'];}},{'key':'DrawMosaic','value':function(_0x34ae85,_0x3f3513,_0x41acb8,_0x1f4a27,_0x3e0865){if(_0x34ae85<0x0||_0x3f3513<0x0||_0x41acb8<0x0||_0x1f4a27<0x0||_0x34ae85>0x1||_0x3f3513>0x1||_0x41acb8>0x1||_0x1f4a27>0x1||_0x3e0865<=0x0)return _0x12eada['SR_ERR_PARAM'];if(0x0==this['nMosaicShaderProgram']){var _0x389a31=this['CompileProgram']('\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20position;\\x20\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20\\x20out_texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x20\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20\\x20=\\x20position;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20\\x20-gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20out_texCoord\\x20=\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a','\\x0a\\x20\\x20\\x20\\x20varying\\x20lowp\\x20vec4\\x20out_texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20videoWidth;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20videoHeight;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20mosaicSize;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20left;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20right;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20top;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20bottom;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20lowp\\x20vec2\\x20uv;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv.x\\x20=\\x20floor(out_texCoord.x\\x20*\\x20videoWidth\\x20/\\x20mosaicSize)\\x20*\\x20mosaicSize\\x20/\\x20videoWidth;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv.y\\x20=\\x20floor(out_texCoord.y\\x20*\\x20videoHeight\\x20/\\x20mosaicSize)\\x20*\\x20mosaicSize\\x20/\\x20videoHeight;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20uv);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(out_texCoord.x\\x20<\\x20left\\x20||\\x20out_texCoord.x\\x20>\\x20right\\x20||\\x20out_texCoord.y\\x20<\\x20top\\x20||\\x20out_texCoord.y\\x20>\\x20bottom)\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20=\\x201.0;\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a');if(_0x389a31<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['nMosaicShaderProgram']=_0x389a31;}this['ctx']['viewport'](0x0,0x0,this['nWndWidth'],this['nWndHeight']),this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFuncSeparate'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA'],this['ctx']['ONE'],this['ctx']['ONE_MINUS_SRC_ALPHA']);var _0x4fe7db=this['nMosaicShaderProgram'];this['ctx']['useProgram'](_0x4fe7db);var _0x19aeb7=this['ctx']['getUniformLocation'](_0x4fe7db,'bCapture');if(_0x19aeb7<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x19aeb7,0x1):this['ctx']['uniform1i'](_0x19aeb7,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]);var _0x2cfb55=this['ctx']['getUniformLocation'](_0x4fe7db,'texture');this['ctx']['uniform1i'](_0x2cfb55,0x0);var _0x4602bb=this['ctx']['getUniformLocation'](_0x4fe7db,'videoWidth');if(_0x4602bb<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4602bb,this['frameDisplayWidth']);var _0x4c7178=this['ctx']['getUniformLocation'](_0x4fe7db,'videoHeight');if(_0x4c7178<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4c7178,this['frameDisplayHeight']);var _0x3159b5=this['ctx']['getUniformLocation'](_0x4fe7db,'mosaicSize');if(_0x3159b5<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3159b5,_0x3e0865);var _0x3f5d62=this['ctx']['getUniformLocation'](_0x4fe7db,'left');if(_0x3f5d62<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3f5d62,_0x34ae85);var _0x52b4ff=this['ctx']['getUniformLocation'](_0x4fe7db,'right');if(_0x52b4ff<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x52b4ff,_0x3f3513);var _0x4a8f57=this['ctx']['getUniformLocation'](_0x4fe7db,'top');if(_0x4a8f57<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x4a8f57,_0x41acb8);var _0x3e7490=this['ctx']['getUniformLocation'](_0x4fe7db,'bottom');if(_0x3e7490<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['uniform1f'](_0x3e7490,_0x1f4a27);var _0x7acde2=this['ctx']['getAttribLocation'](_0x4fe7db,'position');this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']),this['ctx']['vertexAttribPointer'](_0x7acde2,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x7acde2);var _0x266c88=this['ctx']['getAttribLocation'](_0x4fe7db,'texCoord');return this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']),this['ctx']['vertexAttribPointer'](_0x266c88,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x266c88),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x12eada['SR_OK'];}},{'key':'SetCallBack','value':function(_0x3a9e85,_0x113ec0,_0xe3a15){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];switch(_0xe3a15){case _0x1386af['SR_CBT_NULL']:this['pfuncCBIn']=_0x3a9e85,this['pUserIn']=_0x113ec0;break;case _0x1386af['SR_CBT_OUT']:this['pfuncCBOut']=_0x3a9e85,this['pUserOut']=_0x113ec0;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'DoCallBack','value':function(){return null==this['ctx']?_0x12eada['SR_ERR_CALL_ORDER']:(null!=this['pfuncCBIn']&&this['pfuncCBIn'](this['pUserIn']),null!=this['pfuncCBOut']&&this['pfuncCBOut'](this['pUserOut']),_0x12eada['SR_OK']);}},{'key':'SetViewParam','value':function(_0xa7b9a4,_0x46b520){if(!this['b3DPort'])return _0x12eada['SR_ERR_NOT_SUPPORT'];switch(_0xa7b9a4){case _0x3bfb8f['SR_VT_ROTATION_X']:if((this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_PLANET']||this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_PLANET'])&&(_0x46b520>1.57||_0x46b520<-1.57))return _0x12eada['SR_ERR_PARAM'];if((this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR'])&&(_0x46b520>0.78539815||_0x46b520<0x0))return _0x12eada['SR_ERR_PARAM'];if((this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL'])&&(_0x46b520>this['fRotateLimitX']||_0x46b520<-this['fRotateLimitX']))return _0x12eada['SR_ERR_PARAM'];this['fRotateX']=_0x46b520;break;case _0x3bfb8f['SR_VT_ROTATION_Y']:if((this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL'])&&(_0x46b520>this['fRotateLimitY']||_0x46b520<-this['fRotateLimitY']))return _0x12eada['SR_ERR_PARAM'];this['fRotateY']=_0x46b520;break;case _0x3bfb8f['SR_VT_SCALE']:if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_PLANET']&&(_0x46b520>1.2||_0x46b520<-0.3))return _0x12eada['SR_ERR_PARAM'];if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_SEMISPHERE']){if(_0x46b520<-0.8||_0x46b520>0x384)return _0x12eada['SR_ERR_PARAM'];}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_SPHERE']){if(_0x46b520<-0.95||_0x46b520>0.95)return _0x12eada['SR_ERR_PARAM'];}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_PANORAMA_PLANET']){if(_0x46b520<0.1||_0x46b520>2.6)return _0x12eada['SR_ERR_PARAM'];}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']){if(_0x46b520<0x0||_0x46b520>0x384)return _0x12eada['SR_ERR_PARAM'];}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']){if(_0x46b520<-0.3||_0x46b520>0x5)return _0x12eada['SR_ERR_PARAM'];this['_ComputeRotateLimits']();}else{if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR'])return _0x12eada['SR_ERR_NOT_SUPPORT'];}}}}}this['fScale']=_0x46b520;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'GetViewParam','value':function(_0x3ade87,_0x351b47){if(!this['b3DPort'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x28b2b5=0x0;switch(_0x3ade87){case _0x3bfb8f['SR_VT_ROTATION_X']:_0x28b2b5=this['fRotateX'];break;case _0x3bfb8f['SR_VT_ROTATION_Y']:_0x28b2b5=this['fRotateY'];break;case _0x3bfb8f['SR_VT_SCALE']:_0x28b2b5=this['fScale'];break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x351b47['fValue']=_0x28b2b5,_0x12eada['SR_OK'];}},{'key':'SetRenderMode','value':function(_0x205345){return this['bRenderToTex']=_0x205345,_0x12eada['SR_OK'];}},{'key':'_InitVideoShader','value':function(_0x4547cf,_0x4ae4b7){var _0xc61149,_0x12adee;switch(_0x4ae4b7){case _0x4d466f['SR_DE_NULL']:_0xc61149=_0x359c6e,_0x12adee='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20highp\\x20vec4\\x20pp;\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20float\\x20fWndWidth;\\x0auniform\\x20float\\x20fWndHeight;\\x0auniform\\x20float\\x20fBrightness;\\x0auniform\\x20float\\x20fHue;\\x0auniform\\x20float\\x20fSaturation;\\x0auniform\\x20float\\x20fContrast;\\x0auniform\\x20float\\x20fSharpness;\\x0auniform\\x20int\\x20nPostProc;\\x0auniform\\x20int\\x20bDataFormat;\\x0a\\x0avec3\\x20rgb;\\x0avec3\\x20yuv2rgb(float\\x20y,\\x20float\\x20u,\\x20float\\x20v)\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x0a\\x20\\x20\\x20\\x20y\\x20=\\x201.1643\\x20*\\x20(y\\x20-\\x200.0625);\\x20\\x0a\\x20\\x20\\x20\\x20u\\x20=\\x20u\\x20-\\x200.5;\\x20\\x0a\\x20\\x20\\x20\\x20v\\x20=\\x20v\\x20-\\x200.5;\\x20\\x0a\\x20\\x20\\x20\\x20r\\x20=\\x20y\\x20+\\x201.5958\\x20*\\x20v;\\x20\\x0a\\x20\\x20\\x20\\x20g\\x20=\\x20y\\x20-\\x200.39173\\x20*\\x20u\\x20-\\x200.81290\\x20*\\x20v;\\x20\\x0a\\x20\\x20\\x20\\x20b\\x20=\\x20y\\x20+\\x202.017\\x20*\\x20u;\\x20\\x0a\\x20\\x20\\x20\\x20return\\x20vec3(r,\\x20g,\\x20b);\\x0a}\\x0avec3\\x20rgb2hsv(vec3\\x20c)\\x20\\x0a{\\x20\\x0a\\x20\\x20\\x20\\x20vec4\\x20K\\x20=\\x20vec4(0.0,\\x20-1.0\\x20/\\x203.0,\\x202.0\\x20/\\x203.0,\\x20-1.0);\\x20\\x0a\\x20\\x20\\x20\\x20vec4\\x20p\\x20=\\x20c.g\\x20<\\x20c.b\\x20?\\x20vec4(c.bg,\\x20K.wz)\\x20:\\x20vec4(c.gb,\\x20K.xy);\\x20\\x0a\\x20\\x20\\x20\\x20vec4\\x20q\\x20=\\x20c.r\\x20<\\x20p.x\\x20?\\x20vec4(p.xyw,\\x20c.r)\\x20:\\x20vec4(c.r,\\x20p.yzx);\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20q.x\\x20-\\x20min(q.w,\\x20q.y);\\x20\\x0a\\x20\\x20\\x20\\x20float\\x20e\\x20=\\x201.0e-10;\\x20\\x0a\\x20\\x20\\x20\\x20return\\x20vec3(abs(q.z\\x20+\\x20(q.w\\x20-\\x20q.y)\\x20/\\x20(6.0\\x20*\\x20d\\x20+\\x20e)),\\x20d\\x20/\\x20(q.x\\x20+\\x20e),\\x20q.x);\\x20\\x0a}\\x20\\x0a\\x0avec3\\x20hsv2rgb(vec3\\x20c)\\x20\\x0a{\\x20\\x0a\\x20\\x20\\x20\\x20vec4\\x20K\\x20=\\x20vec4(1.0,\\x202.0\\x20/\\x203.0,\\x201.0\\x20/\\x203.0,\\x203.0);\\x20\\x0a\\x20\\x20\\x20\\x20vec3\\x20p\\x20=\\x20abs(fract(c.xxx\\x20+\\x20K.xyz)\\x20*\\x206.0\\x20-\\x20K.www);\\x20\\x0a\\x20\\x20\\x20\\x20return\\x20c.z\\x20*\\x20mix(K.xxx,\\x20clamp(p\\x20-\\x20K.xxx,\\x200.0,\\x201.0),\\x20c.y);\\x20\\x0a}\\x20\\x0a\\x0avec3\\x20sharpen(vec3\\x20c)\\x20\\x0a{\\x20\\x0a\\x20\\x20\\x20\\x20vec3\\x20sharpenColor;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20sharpenColorY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20sharpenColorU;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20sharpenColorV;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20offWidth\\x20\\x20=\\x201.0\\x20/\\x20fWndWidth;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20offHeight\\x20=\\x201.0\\x20/\\x20fWndHeight;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tempSharpness\\x20=\\x20fSharpness\\x20*\\x20100.0;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20=\\x20(1.0\\x20+\\x204.0\\x20*\\x20tempSharpness)\\x20*\\x20c;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec2\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(offWidth,\\x200);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20=\\x20texture2D(Ytexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorU\\x20=\\x20texture2D(Utexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorV\\x20=\\x20texture2D(Vtexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20-=\\x20tempSharpness\\x20*\\x20yuv2rgb(sharpenColorY,\\x20sharpenColorU,\\x20sharpenColorV);\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(-offWidth,\\x200);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20=\\x20texture2D(Ytexture,\\x20uv).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorU\\x20=\\x20texture2D(Utexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorV\\x20=\\x20texture2D(Vtexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20-=\\x20tempSharpness\\x20*\\x20yuv2rgb(sharpenColorY,\\x20sharpenColorU,\\x20sharpenColorV);\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(0,\\x20offHeight);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20=\\x20texture2D(Ytexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorU\\x20=\\x20texture2D(Utexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorV\\x20=\\x20texture2D(Vtexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20-=\\x20tempSharpness\\x20*\\x20yuv2rgb(sharpenColorY,\\x20sharpenColorU,\\x20sharpenColorV);\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(0,\\x20-offHeight);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20=\\x20texture2D(Ytexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorU\\x20=\\x20texture2D(Utexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorV\\x20=\\x20texture2D(Vtexture,\\x20uv).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20-=\\x20tempSharpness\\x20*\\x20yuv2rgb(sharpenColorY,\\x20sharpenColorU,\\x20sharpenColorV);\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec3\\x20sharpenColorY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20offWidth\\x20\\x20=\\x201.0\\x20/\\x20fWndWidth;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20offHeight\\x20=\\x201.0\\x20/\\x20fWndHeight;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tempSharpness\\x20=\\x20fSharpness\\x20*\\x20100.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec2\\x20uv\\x20=\\x20pp.st;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20=\\x20(1.0\\x20+\\x204.0\\x20*\\x20tempSharpness)\\x20*\\x20texture2D(Ytexture,\\x20uv).rgb;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(offWidth,\\x200);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20-=\\x20tempSharpness\\x20*\\x20texture2D(Ytexture,\\x20uv).rgb;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(-offWidth,\\x200);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20-=\\x20tempSharpness\\x20*\\x20texture2D(Ytexture,\\x20uv).rgb;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(0,\\x20offHeight);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20-=\\x20tempSharpness\\x20*\\x20texture2D(Ytexture,\\x20uv).rgb;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20uv\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20pp.st\\x20+\\x20vec2(0,\\x20-offHeight);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColorY\\x20-=\\x20tempSharpness\\x20*\\x20texture2D(Ytexture,\\x20uv).rgb;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20sharpenColor\\x20=\\x20sharpenColorY;\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20return\\x20sharpenColor;\\x20\\x0a}\\x20\\x0avoid\\x20main(void)\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,\\x20g,\\x20b,\\x20y,\\x20u,\\x20v;\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20pp.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20pp.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20pp.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20rgb\\x20=\\x20vec3(r,\\x20g,\\x20b);\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20pp.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20rgb\\x20=\\x20yuv2rgb(y,\\x20u,\\x20v);\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20if(1\\x20==\\x20nPostProc)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec3\\x20fragRGB\\x20=\\x20sharpen(rgb);\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20//sharpen\\x20锐度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec3\\x20fragHSV\\x20=\\x20rgb2hsv(fragRGB);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragHSV.x\\x20=\\x20fragHSV.x\\x20+\\x20fHue;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20//hue\\x20色度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragHSV.y\\x20=\\x20fragHSV.y\\x20*\\x20(fSaturation\\x20+\\x201.0);\\x20\\x20\\x20\\x20//saturation\\x20饱和度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragRGB\\x20=\\x20hsv2rgb(fragHSV);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(fBrightness\\x20>\\x200.0)\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20//brightness\\x20亮度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragRGB\\x20=\\x20fragRGB\\x20+\\x20(1.0\\x20-\\x20fragRGB)\\x20*\\x20fBrightness;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragRGB\\x20=\\x20fragRGB\\x20+\\x20fragRGB\\x20*\\x20fBrightness;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tempContrast\\x20=\\x20fContrast\\x20>\\x200.0\\x20?\\x20fContrast\\x20*\\x2010.0\\x20:\\x20fContrast;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fragRGB\\x20=\\x20((fragRGB\\x20-\\x200.5)\\x20*\\x20max(tempContrast\\x20+\\x201.0,\\x200.0))\\x20+\\x200.5;\\x20\\x20\\x20\\x20\\x20\\x20//contrast\\x20对比度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(fragRGB,\\x201.0);\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(rgb,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a}\\x0a';break;case _0x4d466f['SR_DE_FISH_ORIGINAL']:_0xc61149=_0x359c6e,_0x12adee='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec4\\x20pp;\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20float\\x20fRX1;\\x0auniform\\x20float\\x20fRX2;\\x0auniform\\x20float\\x20fRY1;\\x0auniform\\x20float\\x20fRY2;\\x0auniform\\x20int\\x20bBlack;\\x20\\x0auniform\\x20int\\x20bCut;\\x0auniform\\x20int\\x20bDataFormat;\\x0a\\x0avoid\\x20main()\\x0a{\\x20\\x0a\\x09float\\x20r,g,b,y,u,v;\\x0a\\x09vec4\\x20origin;\\x0a\\x0a\\x09float\\x20\\x20w;\\x0a\\x09float\\x20\\x20h;\\x0a\\x09float\\x20\\x20fCenterX;\\x0a\\x09float\\x20\\x20fCenterY;\\x0a\\x09float\\x20\\x20fRadius;\\x0a\\x09w\\x20=\\x201.0;\\x0a\\x09h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x09fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x09fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x09fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x09float\\x20\\x20leftCut\\x20=\\x200.0;\\x0a\\x09float\\x20\\x20rightCut\\x20=\\x201.0;\\x0a\\x09float\\x20\\x20topCut\\x20=\\x200.0;\\x0a\\x09float\\x20\\x20bottomCut\\x20=\\x201.0;\\x0a\\x09if(bCut\\x20==\\x201)\\x0a\\x09{\\x0a\\x09\\x09if(fRX1\\x20>\\x200.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09leftCut\\x20=\\x20fRX1;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRX2\\x20<\\x201.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09rightCut\\x20=\\x20fRX2;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRY1\\x20>\\x200.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09topCut\\x20=\\x20fRY1;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRY2\\x20<\\x201.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09bottomCut\\x20=\\x20fRY2;\\x0a\\x09\\x09}\\x0a\\x09}\\x0a\\x09origin.s\\x20=\\x20pp.s\\x20*\\x20(rightCut-leftCut)\\x20+\\x20leftCut;\\x0a\\x09origin.t\\x20=\\x20pp.t\\x20*\\x20(bottomCut-topCut)\\x20+\\x20topCut;\\x0a\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20origin.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20origin.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20origin.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20origin.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20origin.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20origin.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x09if(bBlack\\x20==\\x201)\\x0a\\x09{\\x0a\\x09\\x09float\\x20tmpX,\\x20tmpY;\\x0a\\x09\\x09tmpX\\x20=\\x20origin.s\\x20*\\x20w;\\x20\\x0a\\x09\\x09tmpY\\x20=\\x20origin.t\\x20*\\x20h;\\x20\\x0a\\x09\\x09float\\x20d2\\x20=\\x20(tmpX-fCenterX)*(tmpX-fCenterX)\\x20+\\x20(tmpY-fCenterY)*(tmpY-fCenterY);\\x0a\\x09\\x09if(d2\\x20>\\x20fRadius*fRadius)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09r\\x20=\\x200.0;\\x20\\x0a\\x09\\x09\\x09g\\x20=\\x200.0;\\x20\\x0a\\x09\\x09\\x09b\\x20=\\x200.0;\\x20\\x0a\\x09\\x09}\\x0a\\x09}\\x0a\\x0a\\x09gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x0a';break;case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:_0xc61149=_0x359c6e,_0x12adee='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec4\\x20pp;\\x20\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20float\\x20fHAngleCos;\\x0auniform\\x20float\\x20fHAngleSin;\\x0auniform\\x20float\\x20fVAngleCos;\\x0auniform\\x20float\\x20fVAngleSin;\\x0auniform\\x20float\\x20fZoom;\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0auniform\\x20int\\x20bDataFormat;\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x09float\\x20r,g,b,y,u,v;\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20pp.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x200.5\\x20-\\x20pp.t;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t\\x20+\\x20z2*z2);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20tmp*origin2.s\\x20/\\x20dnew\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20tmp*origin2.t\\x20/\\x20dnew\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20((origin2.s*fHAngleCos\\x20-\\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20(-(origin2.s*fHAngleSin\\x20+\\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a';break;case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:_0xc61149=_0x359c6e,_0x12adee='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec4\\x20pp;\\x20\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20float\\x20fHAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fHAngleSin;\\x20\\x0auniform\\x20float\\x20fVAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fZoom;\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0auniform\\x20int\\x20bDataFormat;\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x09float\\x20r,g,b,y,u,v;\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20pp.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x20pp.t\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t\\x20+\\x20z2*z2);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20tmp*origin2.s\\x20/\\x20dnew\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20tmp*origin2.t\\x20/\\x20dnew\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20((origin2.s*fHAngleCos\\x20-\\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20((origin2.s*fHAngleSin\\x20+\\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a';break;case _0x4d466f['SR_DE_FISH_PTZ_WALL']:_0xc61149=_0x359c6e,_0x12adee='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec4\\x20pp;\\x20\\x0auniform\\x20sampler2D\\x20Ytexture;\\x0auniform\\x20sampler2D\\x20Utexture;\\x0auniform\\x20sampler2D\\x20Vtexture;\\x0auniform\\x20float\\x20fHAngleCos;\\x0auniform\\x20float\\x20fHAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fZoom;\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0auniform\\x20int\\x20bDataFormat;\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x09float\\x20r,g,b,y,u,v;\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin3;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z3;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x0a\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20pp.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x20pp.t\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20origin3.s\\x20=\\x20origin2.s*fHAngleCos\\x20+\\x20z2*fHAngleSin\\x20;\\x0a\\x20\\x20\\x20\\x20origin3.t\\x20=\\x20origin2.y;\\x0a\\x20\\x20\\x20\\x20z3\\x20=\\x20z2*fHAngleCos\\x20-\\x20origin2.x*fHAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin3.s*origin3.s\\x20+\\x20origin3.t*origin3.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin3.s*origin3.s\\x20+\\x20origin3.t*origin3.t\\x20+\\x20z3*z3);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20(tmp*origin3.s\\x20/\\x20dnew\\x20*\\x20fRadius\\x20*\\x202.0\\x20+\\x20fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20(tmp*origin3.t\\x20/\\x20dnew\\x20*\\x20fRadius\\x20*\\x202.0\\x20+\\x20fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a';break;case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:_0xc61149=_0x359c6e,_0x12adee='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Ytexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Utexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Vtexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bDataFormat;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x20pp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20pp.t\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r,\\x20g,\\x20b,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a';break;case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:_0xc61149=_0x359c6e,_0x12adee='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Ytexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Utexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Vtexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bDataFormat;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20newpp;\\x20\\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(pp.t\\x20\\x20<=\\x200.5)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20pp.s\\x20/\\x202.0\\x20+\\x200.5;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20pp.t\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20pp.s\\x20/\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20(pp.t\\x20-\\x200.5)\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x20newpp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20newpp.t\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a';break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:_0xc61149=_0x359c6e,_0x12adee='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Ytexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Utexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Vtexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bDataFormat;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x201.0\\x20-\\x20pp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20(1.0\\x20-\\x20pp.t)\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a';break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']:_0xc61149=_0x359c6e,_0x12adee='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Ytexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Utexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Vtexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bDataFormat;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20newpp;\\x20\\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(pp.t\\x20\\x20<=\\x200.5)\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20pp.s\\x20/\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20pp.t\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20pp.s\\x20/\\x202.0\\x20+\\x200.5;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20(pp.t\\x20-\\x200.5)\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x201.0\\x20-\\x20newpp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20(1.0\\x20-\\x20newpp.t)\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a';break;case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:_0xc61149=_0x359c6e,_0x12adee='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Ytexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Utexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20Vtexture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bDataFormat;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b,y,u,v;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20defaultTopCut\\x20=\\x200.1;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20defaultBottomCut\\x20=\\x200.9;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20leftCut\\x20=\\x200.0;\\x20\\x20\\x20\\x20///<当图像中圆不完整时需要切掉无图像部分,即使图像完整,为了效果,也要切掉上下固定的一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20rightCut\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20topCut\\x20=\\x20defaultTopCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20bottomCut\\x20=\\x20defaultBottomCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20tmp\\x20/\\x20(2.0*fRadius);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20leftCut\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20tmp\\x20/\\x20(2.0*fRadius);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20rightCut\\x20=\\x201.0\\x20-\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20tmp\\x20/\\x20(2.0*fRadius);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20defaultTopCut)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20topCut\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20topCut\\x20=\\x20defaultTopCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20tmp\\x20/\\x20(2.0*fRadius);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x201.0\\x20-\\x20defaultBottomCut)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20bottomCut\\x20=\\x201.0\\x20-\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20bottomCut\\x20=\\x20defaultBottomCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x20pp.s\\x20*\\x20(rightCut-leftCut)\\x20+\\x20leftCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20pp.t\\x20*\\x20(bottomCut-topCut)\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmpx\\x20=\\x20origin.s\\x20*\\x202.0\\x20*\\x20fRadius\\x20+\\x20fCenterX\\x20-\\x20fRadius;\\x20///<纹理坐标转化为原图上的实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmpy\\x20=\\x20origin.t\\x20*\\x202.0\\x20*\\x20fRadius\\x20+\\x20fCenterY\\x20-\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20sqrt(fRadius*fRadius\\x20-\\x20(tmpy-fCenterY)*(tmpy-fCenterY));\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20((tmpx-fCenterX)\\x20*\\x20d\\x20/\\x20fRadius\\x20+\\x20fCenterX)\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20tmpy\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bDataFormat\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(Ytexture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(Ytexture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x20if(bDataFormat\\x20==\\x200)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y\\x20=\\x20texture2D(Ytexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u\\x20=\\x20texture2D(Utexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v\\x20=\\x20texture2D(Vtexture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20y=1.1643*(y-0.0625);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20u=u-0.5;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v=v-0.5;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r=y+1.5958*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g=y-0.39173*u-0.81290*v;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b=y+2.017*u;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a';break;case _0x4d466f['SR_DE_FISH_SEMISPHERE']:case _0x4d466f['SR_DE_PANORAMA_SPHERE']:case _0x4d466f['SR_DE_PANORAMA_PLANET']:case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:case _0x4d466f['SR_DE_FISH_PLANET']:_0xc61149='\\x0a\\x20\\x20\\x20\\x20precision\\x20lowp\\x20\\x20float;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20texCoord;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20\\x20\\x20\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x0a\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matProj;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matView;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20matProj\\x20*\\x20matView\\x20*\\x20position;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20texCoord;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-\\x20gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x12adee=_0x1cafd1;break;case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:_0xc61149='\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20texCoord;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20\\x20\\x20\\x20pp;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20int\\x20bCapture;\\x0a\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matProj;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matView;\\x0a\\x20\\x20\\x20\\x20uniform\\x20highp\\x20vec4\\x20\\x20\\x20\\x20vecCylinderParam;\\x0a\\x20\\x20\\x20\\x20uniform\\x20highp\\x20float\\x20\\x20\\x20fTextureOffset;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mediump\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20dx\\x20\\x20\\x20\\x20\\x20=\\x20position.x\\x20-\\x20vecCylinderParam.x;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20dz\\x20\\x20\\x20\\x20\\x20=\\x20position.z\\x20-\\x20(vecCylinderParam.z\\x20+\\x20vecCylinderParam.y);\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20theta\\x20\\x20=\\x20atan(abs(dx/dz));\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20fDis\\x20\\x20\\x20=\\x20(3.1415926\\x20-\\x202.0\\x20*\\x20theta)\\x20*\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20fdx\\x20\\x20\\x20\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(dx\\x20>\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fdx\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fdx\\x20=\\x20-1.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fDis\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20=\\x20fdx\\x20*\\x20fDis;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20lx\\x20\\x20\\x20\\x20\\x20=\\x20fDis;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20lz\\x20\\x20\\x20\\x20\\x20=\\x20vecCylinderParam.z\\x20+\\x20vecCylinderParam.y;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20fRate\\x20\\x20=\\x20(3.1415926\\x20/\\x202.0\\x20+\\x20vecCylinderParam.w)\\x20/\\x203.1415926\\x20*\\x202.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20vec4\\x20newPos\\x20\\x20=\\x20position;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newPos.x\\x20\\x20\\x20\\x20\\x20=\\x20fRate\\x20*\\x20(lx\\x20-\\x20newPos.x)\\x20+\\x20newPos.x;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newPos.z\\x20\\x20\\x20\\x20\\x20=\\x20fRate\\x20*\\x20(lz\\x20-\\x20newPos.z)\\x20+\\x20newPos.z;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20\\x20=\\x20matProj\\x20*\\x20matView\\x20*\\x20newPos;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(bCapture\\x20==\\x201)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20=\\x20-\\x20gl_Position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20s\\x20=\\x20texCoord.s\\x20*\\x20w\\x20-\\x20fCenterX;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20highp\\x20float\\x20t\\x20=\\x20fCenterY\\x20-\\x20texCoord.t\\x20*\\x20h;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp.s\\x20=\\x20(s*cos(fTextureOffset)\\x20-\\x20t*sin(fTextureOffset)\\x20+\\x20fCenterX)\\x20/\\x20w;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp.t\\x20=\\x20(fCenterY\\x20-\\x20(s*sin(fTextureOffset)\\x20+\\x20t*cos(fTextureOffset)))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20}\\x0a',_0x12adee=_0x1cafd1;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}var _0x4cd638=this['CompileProgram'](_0xc61149,_0x12adee);return _0x4cd638<=0x0?_0x12eada['SR_ERR_WEBGL_RESOURCE']:(this['videoShaderProgram']=_0x4cd638,_0x12eada['SR_OK']);}},{'key':'_InitVideoVertex','value':function(_0x572e41,_0x1e0b5f,_0x2f008f){var _0xd1a05a=null,_0x401742=null,_0x4d2d8d=null,_0x519998=_0x12eada['SR_OK'];if(0x0==this['b3DPort'])_0xd1a05a=new Float32Array([-0x1,0x1,-0x1,-0x1,0x1,0x1,0x1,0x1,-0x1,-0x1,0x1,-0x1]),_0x401742=new Float32Array([0x0,0x0,0x0,0x1,0x1,0x0,0x1,0x0,0x0,0x1,0x1,0x1]);else{if(this['fRX1']=_0x2f008f['fRXLeft'],this['fRX2']=_0x2f008f['fRXRight'],this['fRY1']=_0x2f008f['fRYTop'],this['fRY2']=_0x2f008f['fRYBottom'],_0x1e0b5f==_0x4d466f['SR_DE_FISH_SEMISPHERE']||_0x1e0b5f==_0x4d466f['SR_DE_FISH_PLANET'])_0x519998=this['_CreateSemiSphere'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2']),_0xd1a05a=this['pSemiSpherePos'],_0x401742=this['pSemiSphereTex'];else{if(_0x1e0b5f==_0x4d466f['SR_DE_PANORAMA_SPHERE']||_0x1e0b5f==_0x4d466f['SR_DE_PANORAMA_PLANET'])_0x519998=this['_CreateSphere'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2']),_0xd1a05a=this['pSpherePos'],_0x401742=this['pSphereTex'],_0x4d2d8d=this['pSphereInd'];else{if(_0x1e0b5f==_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']||_0x1e0b5f==_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']||_0x1e0b5f==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']||_0x1e0b5f==_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR'])_0x519998=this['_CreateCylinder'](_0x1e0b5f,this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2'],0x0,0x0),_0xd1a05a=this['pCylinderPos'],_0x401742=this['pCylinderTex'];else{if(_0x1e0b5f!=_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']&&_0x1e0b5f!=_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL'])return _0x12eada['SR_ERR_NOT_SUPPORT'];_0x519998=_0x1e0b5f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_CreateArcSphere'](_0x1e0b5f,0.05,0.95,-0.3,1.3):this['_CreateArcSphere'](_0x1e0b5f,-0.16,1.16,0.005,0.995),_0xd1a05a=this['pArcSpherePos'],_0x401742=this['pArcSphereTex'];}}}if(_0x519998!=_0x12eada['SR_OK'])return _0x519998;}if(null==_0xd1a05a||null==_0x401742)return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x4abc2b=this['ctx']['createBuffer']();if(this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x4abc2b),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0xd1a05a,this['ctx']['STATIC_DRAW']),this['vertexPosBuffer']=_0x4abc2b,_0x1e0b5f==_0x4d466f['SR_DE_PANORAMA_SPHERE']||_0x1e0b5f==_0x4d466f['SR_DE_PANORAMA_PLANET']){var _0x34bfaa=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ELEMENT_ARRAY_BUFFER'],_0x34bfaa),this['ctx']['bufferData'](this['ctx']['ELEMENT_ARRAY_BUFFER'],_0x4d2d8d,this['ctx']['STATIC_DRAW']),this['indicesPosBuffer']=_0x34bfaa;}var _0x4b7b5c=this['ctx']['createBuffer']();return this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x4b7b5c),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x401742,this['ctx']['STATIC_DRAW']),this['texturePosBuffer']=_0x4b7b5c,this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),_0xd1a05a=null,_0x401742=null,_0x12eada['SR_OK'];}},{'key':'_InitCamera','value':function(_0x5971ab){if(null!=this['pCamera'])return _0x12eada['SR_ERR_CALL_ORDER'];switch(_0x5971ab){case _0x4d466f['SR_DE_NULL']:case _0x4d466f['SR_DE_FISH_ORIGINAL']:case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:case _0x4d466f['SR_DE_FISH_PTZ_WALL']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:return _0x12eada['SR_OK'];case _0x4d466f['SR_DE_FISH_SEMISPHERE']:if(this['pCamera']=new _0x3298a7(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetFov'](_0x3b2c52),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fRotateX']=4.71,this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['fScale']=0x3,this['pCamera']['SetScale'](this['fScale']);break;case _0x4d466f['SR_DE_PANORAMA_SPHERE']:if(this['pCamera']=new _0x3298a7(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetFov'](_0x3b2c52),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fRotateX']=0x0,this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['fScale']=0x0,this['pCamera']['SetScale'](this['fScale']);break;case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:if(this['pCamera']=new _0x3298a7(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetFov'](_0x3b2c52),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fRotateX']=0.785,this['pCamera']['SetPitch'](-this['fRotateX']),this['fScale']=0x6,this['pCamera']['SetScale'](this['fScale']);break;case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:if(this['pCamera']=new _0x3298a7(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetOrtho'](!0x0),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fScale']=0x3,this['pCamera']['SetScale'](this['fScale']);break;case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:if(this['pCamera']=new _0x3298a7(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetFov'](1.25663704),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fScale']=0x2,this['pCamera']['SetScale'](this['fScale']),_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==_0x5971ab?(this['fRotateLimitX']=0.17453292222222222,this['fRotateLimitY']=1.0471975333333334):(this['fRotateLimitX']=0.5235987666666667,this['fRotateLimitY']=0.34906584444444444);break;case _0x4d466f['SR_DE_FISH_PLANET']:if(this['pCamera']=new _0x5e5ca3(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetFov'](2.16),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fRotateX']=1.57,this['pCamera']['SetPitch'](this['fRotateX']),this['pCamera']['SetYaw'](_0x645d1a+this['fRotateY']),this['fScale']=0x1,this['pCamera']['SetScale'](this['fScale']);break;case _0x4d466f['SR_DE_PANORAMA_PLANET']:if(this['pCamera']=new _0x5e5ca3(),null==this['pCamera'])return _0x12eada['SR_ERR_ALLOC_MEMORY'];this['pCamera']['SetPano'](!0x0),this['pCamera']['SetNear'](0.02),this['pCamera']['SetFar'](0x3e8),this['fRotateX']=1.57,this['pCamera']['SetPitch'](this['fRotateX']),this['fRotateY']=-1.57,this['pCamera']['SetYaw'](_0x645d1a+this['fRotateY']),this['fScale']=2.6,this['pCamera']['SetScale'](this['fScale']);break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'CompileProgram','value':function(_0x2ffadc,_0x2556cb){var _0xfb8dc1=this['ctx'];if(null==_0xfb8dc1||null==_0x2ffadc||null==_0x2556cb)return-0x1;var _0xb71e0f=_0xfb8dc1['createShader'](_0xfb8dc1['VERTEX_SHADER']);if(_0xfb8dc1['shaderSource'](_0xb71e0f,_0x2ffadc),_0xfb8dc1['compileShader'](_0xb71e0f),!_0xfb8dc1['getShaderParameter'](_0xb71e0f,_0xfb8dc1['COMPILE_STATUS']))return-0x1;var _0x4b08a8=_0xfb8dc1['createShader'](_0xfb8dc1['FRAGMENT_SHADER']);if(_0xfb8dc1['shaderSource'](_0x4b08a8,_0x2556cb),_0xfb8dc1['compileShader'](_0x4b08a8),!_0xfb8dc1['getShaderParameter'](_0x4b08a8,_0xfb8dc1['COMPILE_STATUS']))return-0x1;var _0x40b2bb=_0xfb8dc1['createProgram']();return _0xfb8dc1['attachShader'](_0x40b2bb,_0xb71e0f),_0xfb8dc1['attachShader'](_0x40b2bb,_0x4b08a8),_0xfb8dc1['linkProgram'](_0x40b2bb),_0xfb8dc1['getProgramParameter'](_0x40b2bb,_0xfb8dc1['LINK_STATUS'])?(_0xfb8dc1['deleteShader'](_0xb71e0f),_0xfb8dc1['deleteShader'](_0x4b08a8),_0x40b2bb):-0x1;}},{'key':'_CreateSemiSphere','value':function(_0x302666,_0x5d0182,_0xba0759,_0x4a6b5a){if(null!=this['pSemiSpherePos']||null!=this['pSemiSphereTex'])return _0x12eada['SR_ERR_CALL_ORDER'];this['pSemiSpherePos']=new Float32Array(0xa8c0),this['pSemiSphereTex']=new Float32Array(0x7080);for(var _0x52200a=(_0x5d0182-_0x302666)/(_0x4a6b5a-_0xba0759),_0x4901a8=(_0x5d0182-_0x302666)/0x2*0x1,_0x564fe7=6.2831852/0x3c,_0x1d330d=0.0392699075,_0x363aae=0x0,_0x4c1f56=0x0,_0x4ed384=0x0,_0x33eeef=0x0;_0x33eeef<0x3c;++_0x33eeef)for(var _0x5ad86c=0x0;_0x5ad86c<0x28;++_0x5ad86c){var _0x1a5ba4=_0x33eeef*_0x564fe7;0x0==_0x33eeef&&(_0x363aae=_0x1a5ba4);var _0x49d8af=0x3b==_0x33eeef?_0x363aae:(_0x33eeef+0x1)*_0x564fe7,_0x537dfe=-_0x5ad86c*_0x1d330d,_0x596b70=-(_0x5ad86c+0x1)*_0x1d330d,_0x297c96=void 0x0,_0xbdd002=void 0x0;this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x537dfe)*Math['cos'](_0x1a5ba4),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x537dfe),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x537dfe)*Math['sin'](_0x1a5ba4),_0xbdd002=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['sin'](_0x1a5ba4),_0x297c96=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['cos'](_0x1a5ba4),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3,this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x596b70)*Math['cos'](_0x1a5ba4),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x596b70),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x596b70)*Math['sin'](_0x1a5ba4),_0xbdd002=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['sin'](_0x1a5ba4),_0x297c96=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['cos'](_0x1a5ba4),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3,this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x537dfe)*Math['cos'](_0x49d8af),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x537dfe),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x537dfe)*Math['sin'](_0x49d8af),_0xbdd002=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['sin'](_0x49d8af),_0x297c96=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['cos'](_0x49d8af),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3,this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x537dfe)*Math['cos'](_0x49d8af),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x537dfe),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x537dfe)*Math['sin'](_0x49d8af),_0xbdd002=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['sin'](_0x49d8af),_0x297c96=0.5-0.5*(0x1+_0x537dfe/1.5707963)*Math['cos'](_0x49d8af),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3,this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x596b70)*Math['cos'](_0x1a5ba4),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x596b70),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x596b70)*Math['sin'](_0x1a5ba4),_0xbdd002=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['sin'](_0x1a5ba4),_0x297c96=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['cos'](_0x1a5ba4),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3,this['pSemiSpherePos'][_0x4c1f56]=-0x1*Math['cos'](_0x596b70)*Math['cos'](_0x49d8af),this['pSemiSpherePos'][_0x4c1f56+0x1]=0x1*Math['sin'](_0x596b70),this['pSemiSpherePos'][_0x4c1f56+0x2]=-0x1*Math['cos'](_0x596b70)*Math['sin'](_0x49d8af),_0xbdd002=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['sin'](_0x49d8af),_0x297c96=0.5-0.5*(0x1+_0x596b70/1.5707963)*Math['cos'](_0x49d8af),this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0x297c96*_0x4901a8+0x1*_0x302666)/0x1,this['pSemiSphereTex'][_0x4ed384++]=(0x2*_0xbdd002*_0x4901a8+_0xba0759*_0x52200a)/_0x52200a,_0x4c1f56+=0x3;}return this['nSemiSpherePosNum']=_0x4c1f56/0x3,this['nSemiSpherePosSize']=0x3,this['nSemiSphereTexSize']=0x2,_0x12eada['SR_OK'];}},{'key':'_CreateSphere','value':function(){if(null!=this['pSpherePos']||null!=this['pSphereTex'])return _0x12eada['SR_ERR_CALL_ORDER'];this['pSpherePos']=new Float32Array(0x1e7b),this['pSphereTex']=new Float32Array(0x1452),this['pSphereInd']=new Uint16Array(0x3a98);for(var _0x14a043=0x0,_0x55bdbb=0x0,_0x293e77=0x0;_0x293e77<=0x32;++_0x293e77)for(var _0x1651dd=_0x293e77*_0x645d1a/0x32-1.5707963,_0xf2a45b=Math['sin'](_0x1651dd),_0x31648e=Math['cos'](_0x1651dd),_0x4ebf86=0x0;_0x4ebf86<=0x32;++_0x4ebf86){var _0x10524b=0x2*_0x4ebf86*_0x645d1a/0x32-_0x645d1a,_0x2c25b0=Math['sin'](_0x10524b),_0x33701f=0x1*_0x31648e*Math['cos'](_0x10524b),_0x4c3d3b=0x1*_0xf2a45b,_0x4e5e99=0x1*_0x31648e*_0x2c25b0;this['pSpherePos'][_0x14a043]=-_0x33701f,this['pSpherePos'][_0x14a043+0x1]=_0x4c3d3b,this['pSpherePos'][_0x14a043+0x2]=_0x4e5e99;var _0x277de9=_0x4ebf86/0x32,_0x1bd6b7=_0x293e77/0x32;this['pSphereTex'][_0x55bdbb++]=_0x277de9,this['pSphereTex'][_0x55bdbb++]=_0x1bd6b7,_0x14a043+=0x3;}for(var _0x471614=0x0,_0x4336a6=0x0;_0x4336a6<0x32;++_0x4336a6)for(var _0x4b6683=0x0;_0x4b6683<0x32;++_0x4b6683){var _0x54b3df=0x33*_0x4336a6+_0x4b6683,_0x1a6807=_0x54b3df+0x32+0x1;this['pSphereInd'][_0x471614+0x0]=_0x54b3df,this['pSphereInd'][_0x471614+0x1]=_0x1a6807,this['pSphereInd'][_0x471614+0x2]=_0x54b3df+0x1,this['pSphereInd'][_0x471614+0x3]=_0x1a6807,this['pSphereInd'][_0x471614+0x4]=_0x1a6807+0x1,this['pSphereInd'][_0x471614+0x5]=_0x54b3df+0x1,_0x471614+=0x6;}return this['nSpherePosNum']=0x9c4,this['nSpherePosSize']=0x3,this['nSphereTexSize']=0x2,_0x12eada['SR_OK'];}},{'key':'_CreateCylinder','value':function(_0x3f62e3,_0x5e8168,_0x25a99e,_0x343752,_0x5c44e2,_0x183a45,_0x3e70d7){if(null!=this['pCylinderPos']||null!=this['pCylinderTex'])return _0x12eada['SR_ERR_CALL_ORDER'];if(Math['abs'](_0x183a45-0x0)<0.000001)this['fCylinderHeight']=0x2;else{if(_0x183a45<0.5||_0x183a45>0x6)return _0x12eada['SR_ERR_PARAM'];this['fCylinderHeight']=_0x183a45;}if(Math['abs'](_0x3e70d7-0x0)<0.000001)_0x3f62e3==_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']||_0x3f62e3==_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']?this['fCylinderRadius']=0x2:this['fCylinderRadius']=0x1;else{if(_0x3e70d7<0.5||_0x3e70d7>0x4)return _0x12eada['SR_ERR_PARAM'];this['fCylinderRadius']=_0x3e70d7;}if(this['pCylinderPos']=new Float32Array(0xa8c0),this['pCylinderTex']=new Float32Array(0x7080),null==this['pCylinderPos']||null==this['pCylinderTex'])return this['pCylinderPos']=null,this['pCylinderTex']=null,_0x12eada['SR_ERR_ALLOC_MEMORY'];for(var _0x232913=(_0x25a99e-_0x5e8168)/(_0x5c44e2-_0x343752),_0x5db5a8=(_0x25a99e-_0x5e8168)/0x2*0x1,_0x479218=6.2831852/0x3c,_0x520ccb=this['fCylinderHeight']/0x28,_0x20f702=0x0,_0x504f58=0x0,_0x53421b=0x0;_0x53421b<0x3c;++_0x53421b)for(var _0x1b4378=0x0;_0x1b4378<0x28;++_0x1b4378){var _0x5680b2=_0x53421b*_0x479218,_0x3f0453=(_0x53421b+0x1)*_0x479218,_0x119670=void 0x0,_0x212eca=void 0x0;this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x5680b2),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-_0x1b4378*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x5680b2),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*_0x1b4378)*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.1+0.01*_0x1b4378)*Math['cos'](_0x5680b2)):(_0x119670=0.5-(0.5-0.01*_0x1b4378)*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.5-0.01*_0x1b4378)*Math['cos'](_0x5680b2)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3,this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x5680b2),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-(_0x1b4378+0x1)*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x5680b2),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['cos'](_0x5680b2)):(_0x119670=0.5-(0.5-0.01*(_0x1b4378+0x1))*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.5-0.01*(_0x1b4378+0x1))*Math['cos'](_0x5680b2)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3,this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x3f0453),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-_0x1b4378*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3f0453),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*_0x1b4378)*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.1+0.01*_0x1b4378)*Math['cos'](_0x3f0453)):(_0x119670=0.5-(0.5-0.01*_0x1b4378)*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.5-0.01*_0x1b4378)*Math['cos'](_0x3f0453)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3,this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x3f0453),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-_0x1b4378*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3f0453),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*_0x1b4378)*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.1+0.01*_0x1b4378)*Math['cos'](_0x3f0453)):(_0x119670=0.5-(0.5-0.01*_0x1b4378)*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.5-0.01*_0x1b4378)*Math['cos'](_0x3f0453)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3,this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x5680b2),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-(_0x1b4378+0x1)*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x5680b2),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['cos'](_0x5680b2)):(_0x119670=0.5-(0.5-0.01*(_0x1b4378+0x1))*Math['sin'](_0x5680b2),_0x212eca=0.5+(0.5-0.01*(_0x1b4378+0x1))*Math['cos'](_0x5680b2)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3,this['pCylinderPos'][_0x20f702]=-this['fCylinderRadius']*Math['sin'](_0x3f0453),this['pCylinderPos'][_0x20f702+0x1]=this['fCylinderHeight']/0x2-(_0x1b4378+0x1)*_0x520ccb,this['pCylinderPos'][_0x20f702+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3f0453),_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==_0x3f62e3||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x3f62e3?(_0x119670=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.1+0.01*(_0x1b4378+0x1))*Math['cos'](_0x3f0453)):(_0x119670=0.5-(0.5-0.01*(_0x1b4378+0x1))*Math['sin'](_0x3f0453),_0x212eca=0.5+(0.5-0.01*(_0x1b4378+0x1))*Math['cos'](_0x3f0453)),this['pCylinderTex'][_0x504f58++]=(0x2*_0x119670*_0x5db5a8+0x1*_0x5e8168)/0x1,this['pCylinderTex'][_0x504f58++]=(0x2*_0x212eca*_0x5db5a8+_0x343752*_0x232913)/_0x232913,_0x20f702+=0x3;}return this['nCylinderPosNum']=_0x20f702/0x3,this['nCylinderPosSize']=0x3,this['nCylinderTexSize']=0x2,_0x12eada['SR_OK'];}},{'key':'_CreateArcSphere','value':function(_0x13f05f,_0x1bf08a,_0x2f6006,_0x3b9e2e,_0x5d5669){if(null!=this['pArcSpherePos']||null!=this['pArcSphereTex'])return _0x12eada['SR_ERR_CALL_ORDER'];if(_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']){if(_0x3b9e2e>0x0||_0x5d5669<0x1)return _0x12eada['SR_ERR_PARAM'];}else{if(_0x13f05f!=_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL'])return _0x12eada['SR_ERR_NOT_SUPPORT'];if(_0x1bf08a>0x0||_0x2f6006<0x1)return _0x12eada['SR_ERR_PARAM'];}this['fImageWidth']=0x1,this['fImageHeight']=(_0x2f6006-_0x1bf08a)/(_0x5d5669-_0x3b9e2e),this['fTexCenterX']=(_0x1bf08a+_0x2f6006)/0x2*this['fImageWidth'],this['fTexCenterY']=(_0x3b9e2e+_0x5d5669)/0x2*this['fImageHeight'],this['fTexRadius']=(_0x2f6006-_0x1bf08a)/0x2*this['fImageWidth'];if(null==this['pArcSphereTex']&&(this['pArcSphereTex']=new Float32Array(0x3960),null==this['pArcSphereTex']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];if(null==this['pArcSpherePos']&&(this['pArcSpherePos']=new Float32Array(0x5610),null==this['pArcSpherePos']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];var _0x2e0344=new Float32Array(0x40);if(null==_0x2e0344)return _0x12eada['SR_ERR_ALLOC_MEMORY'];var _0xb50cf=_0x12eada['SR_OK'];if(_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?_0xb50cf=this['_ComputeLatitudeHorizontal'](_0x2e0344,0x19,0x28,0x1):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&(_0xb50cf=this['_ComputeLatitudeVertical'](_0x2e0344,0x19,0x28,0x1)),_0x12eada['SR_OK']!=_0xb50cf)return this['pArcSpherePos']=null,this['pArcSphereTex']=null,_0xb50cf;this['fFirstLatitude']=_0x2e0344[0xc],this['fLastLatitude']=_0x2e0344[0x33];var _0x50ac0f=0x0,_0x2e2286=0x0,_0x2e8f58=new Float32Array(0x5);if(null==_0x2e8f58)return this['pArcSpherePos']=null,this['pArcSphereTex']=null,_0x12eada['SR_ERR_ALLOC_MEMORY'];for(var _0x5c5c1f=_0x645d1a/0x18,_0x2d7113=-0xc;_0x2d7113<0xc;++_0x2d7113)for(var _0x19edb8=_0x2d7113<0x0?-_0x2d7113:_0x2d7113,_0x2cd72e=_0x2d7113<0x0?_0x19edb8:_0x19edb8+0x1,_0x9c630d=_0x2d7113<0x0?0x40-0x2*(_0x19edb8-0x1)-0x2:0x40-0x2*_0x19edb8-0x2,_0x400fb7=0x0;_0x400fb7<_0x9c630d;++_0x400fb7,++_0x2cd72e)_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3,_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3,_0x2d7113>=0x0&&0x0==_0x400fb7?_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e-0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e-0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e-0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e-0x1],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3,_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3,_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3,_0x2d7113<0x0&&_0x400fb7==_0x9c630d-0x1?_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e+0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*(_0x2d7113+0x1),_0x2e0344[_0x2cd72e+0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?this['_ComputeVertexAndTexturePosHorizontal'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e+0x1],_0x2e8f58):_0x13f05f==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']&&this['_ComputeVertexAndTexturePosVertical'](0x1,1.5707963-_0x5c5c1f*_0x2d7113,_0x2e0344[_0x2cd72e+0x1],_0x2e8f58),this['pArcSpherePos'][_0x50ac0f]=_0x2e8f58[0x0],this['pArcSpherePos'][_0x50ac0f+0x1]=_0x2e8f58[0x1],this['pArcSpherePos'][_0x50ac0f+0x2]=_0x2e8f58[0x2],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x3],this['pArcSphereTex'][_0x2e2286++]=_0x2e8f58[0x4],_0x50ac0f+=0x3;return this['nArcSpherePosNum']=_0x50ac0f/0x3,this['nArcSpherePosSize']=0x3,this['nArcSphereTexSize']=0x2,_0x2e0344=null,_0x2e8f58=null,_0x12eada['SR_OK'];}},{'key':'_ComputeIntersectionOfPlaneAndLongtitude','value':function(_0x1f69de,_0x33645b,_0x214c6a){if(null==_0x1f69de)return _0x12eada['SR_ERR_PARAM'];var _0x43cb74,_0x3d75aa=_0x1f69de[0x1]*_0x214c6a,_0x4d5809=_0x1f69de[0x2]*_0x214c6a*Math['sin'](_0x33645b),_0x104ec5=-_0x1f69de[0x3],_0x22b167=0x0;if(_0x1f69de[0x1]>0x0){var _0x3208f2=_0x3d75aa*_0x3d75aa*_0x104ec5*_0x104ec5-(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809)*(_0x104ec5*_0x104ec5-_0x4d5809*_0x4d5809);_0x22b167=(-_0x3d75aa*_0x104ec5-Math['sqrt'](_0x3208f2))/(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809),_0x3208f2=_0x4d5809*_0x4d5809*_0x104ec5*_0x104ec5-(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809)*(_0x104ec5*_0x104ec5-_0x3d75aa*_0x3d75aa),(-_0x4d5809*_0x104ec5+Math['sqrt'](_0x3208f2))/(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809);}if(_0x1f69de[0x1]<0x0){var _0x6bd83f=_0x3d75aa*_0x3d75aa*_0x104ec5*_0x104ec5-(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809)*(_0x104ec5*_0x104ec5-_0x4d5809*_0x4d5809);_0x22b167=(-_0x3d75aa*_0x104ec5+Math['sqrt'](_0x6bd83f))/(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809),_0x6bd83f=_0x4d5809*_0x4d5809*_0x104ec5*_0x104ec5-(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809)*(_0x104ec5*_0x104ec5-_0x3d75aa*_0x3d75aa),(-_0x4d5809*_0x104ec5+Math['sqrt'](_0x6bd83f))/(_0x3d75aa*_0x3d75aa+_0x4d5809*_0x4d5809);}return Math['cos'](_0x33645b),_0x43cb74=-_0x214c6a*_0x22b167,Math['sin'](_0x33645b),Math['asin'](_0x43cb74/_0x214c6a);}},{'key':'_ComputeLatitudeHorizontal','value':function(_0x299774,_0x328a29,_0x59c4b8,_0x535463){if(null==_0x299774)return _0x12eada['SR_ERR_PARAM'];var _0x369620=0x0,_0x2638d7=(this['fTexCenterY'],_0x645d1a/(_0x328a29-0x1)),_0x20ba8d=_0x645d1a*this['fTexCenterY']/(0x2*this['fTexRadius']),_0x1ffb13=Math['asin'](this['fTexCenterY']/this['fTexRadius']),_0x421099=Math['atan'](Math['cos'](_0x20ba8d)/(Math['sin'](_0x20ba8d)-Math['sin'](_0x1ffb13))),_0x200138=new Float32Array(0x4);_0x200138[0x0]=0x0,_0x200138[0x1]=Math['sin'](_0x421099),_0x200138[0x2]=Math['cos'](_0x421099),_0x200138[0x3]=-_0x535463*Math['sin'](_0x421099)*Math['sin'](_0x1ffb13),_0x299774[_0x369620++]=_0x20ba8d;for(var _0x4e45e9=0x1;_0x4e45e9<=(_0x328a29-0x3)/0x2;++_0x4e45e9){var _0x4623e0=this['_ComputeIntersectionOfPlaneAndLongtitude'](_0x200138,1.5707963-_0x2638d7*_0x4e45e9,_0x535463);_0x299774[_0x369620++]=_0x4623e0;}for(var _0x2bd513=-Math['asin']((this['fImageHeight']-this['fTexCenterY'])/this['fTexRadius']),_0x403d42=_0x1ffb13,_0x30ec4e=(_0x403d42-_0x2bd513)/(_0x59c4b8-0x1),_0x30f562=0x0;_0x30f562<_0x59c4b8;++_0x30f562)_0x299774[_0x369620++]=_0x403d42-_0x30f562*_0x30ec4e;var _0x3261c7=_0x2bd513,_0x15ecb6=_0x645d1a*(this['fTexCenterY']-this['fImageHeight'])/(0x2*this['fTexRadius']);_0x421099=Math['atan'](Math['cos'](_0x15ecb6)/(Math['sin'](_0x3261c7)-Math['sin'](_0x15ecb6)));var _0x3ca821=new Float32Array(0x4);_0x3ca821[0x0]=0x0,_0x3ca821[0x1]=-Math['sin'](_0x421099),_0x3ca821[0x2]=Math['cos'](_0x421099),_0x3ca821[0x3]=_0x535463*Math['sin'](_0x421099)*Math['sin'](_0x3261c7);for(var _0x33e4a6=0x1;_0x33e4a6<=(_0x328a29-0x3)/0x2;++_0x33e4a6){var _0x2e8b2a=this['_ComputeIntersectionOfPlaneAndLongtitude'](_0x3ca821,_0x2638d7*_0x33e4a6,_0x535463);_0x299774[_0x369620++]=_0x2e8b2a;}return _0x299774[_0x369620++]=_0x15ecb6,_0x200138=null,_0x3ca821=null,_0x12eada['SR_OK'];}},{'key':'_ComputeVertexAndTexturePosHorizontal','value':function(_0x1bdbaf,_0x4a6e49,_0x23e9c8,_0x24914c){if(null==_0x24914c)return _0x12eada['SR_ERR_PARAM'];_0x24914c[0x2]=-_0x1bdbaf*Math['cos'](_0x23e9c8)*Math['sin'](_0x4a6e49),_0x24914c[0x0]=_0x1bdbaf*Math['cos'](_0x23e9c8)*Math['cos'](_0x4a6e49),_0x24914c[0x1]=_0x1bdbaf*Math['sin'](_0x23e9c8);var _0x4a8de3,_0x4fc9d6=-Math['asin'](-_0x24914c[0x2]/_0x1bdbaf)/_0x645d1a;_0x4a8de3=_0x23e9c8>=0x0?Math['acos'](_0x24914c[0x0]/Math['sqrt'](_0x24914c[0x0]*_0x24914c[0x0]+_0x24914c[0x1]*_0x24914c[0x1])):6.2831852-Math['acos'](_0x24914c[0x0]/Math['sqrt'](_0x24914c[0x0]*_0x24914c[0x0]+_0x24914c[0x1]*_0x24914c[0x1]));var _0x33b830=this['fTexCenterX']-this['fTexRadius'],_0x332f11=this['fTexRadius']-this['fTexCenterY'];return _0x24914c[0x3]=(Math['cos'](_0x4a8de3)*this['fTexRadius']*(0x1+0x2*_0x4fc9d6)+this['fTexRadius']+_0x33b830)/this['fImageWidth'],_0x24914c[0x4]=(Math['sin'](_0x4a8de3)*this['fTexRadius']*(-0x1-0x2*_0x4fc9d6)+this['fTexRadius']-_0x332f11)/this['fImageHeight'],_0x12eada['SR_OK'];}},{'key':'_ComputeLatitudeVertical','value':function(_0x334375,_0x1d1888,_0x391144,_0x2c3e4f){if(null==_0x334375)return _0x12eada['SR_ERR_PARAM'];var _0x5031d4=0x0,_0x41d833=_0x645d1a/(_0x1d1888-0x1),_0x578f90=_0x645d1a*this['fTexCenterX']/(0x2*this['fTexRadius']),_0x1481a0=Math['asin'](this['fTexCenterX']/this['fTexRadius']),_0x521fb7=Math['atan'](Math['cos'](_0x578f90)/(Math['sin'](_0x578f90)-Math['sin'](_0x1481a0))),_0xef2275=new Float32Array(0x4);_0xef2275[0x0]=0x0,_0xef2275[0x1]=Math['sin'](_0x521fb7),_0xef2275[0x2]=Math['cos'](_0x521fb7),_0xef2275[0x3]=-_0x2c3e4f*Math['sin'](_0x521fb7)*Math['sin'](_0x1481a0),_0x334375[_0x5031d4++]=_0x578f90;for(var _0x4973fd=0x1;_0x4973fd<=(_0x1d1888-0x3)/0x2;++_0x4973fd){var _0x3f8b33=this['_ComputeIntersectionOfPlaneAndLongtitude'](_0xef2275,1.5707963-_0x41d833*_0x4973fd,_0x2c3e4f);_0x334375[_0x5031d4++]=_0x3f8b33;}for(var _0xb9a95d=-Math['asin']((this['fImageWidth']-this['fTexCenterX'])/this['fTexRadius']),_0x1b3fc0=_0x1481a0,_0x19e4be=(_0x1b3fc0-_0xb9a95d)/(_0x391144-0x1),_0x427c5b=0x0;_0x427c5b<_0x391144;++_0x427c5b)_0x334375[_0x5031d4++]=_0x1b3fc0-_0x427c5b*_0x19e4be;var _0x32fe25=_0xb9a95d,_0x223d9c=_0x645d1a*(this['fTexCenterX']-this['fImageWidth'])/(0x2*this['fTexRadius']);_0x521fb7=Math['atan'](Math['cos'](_0x223d9c)/(Math['sin'](_0x32fe25)-Math['sin'](_0x223d9c)));var _0x5ed7df=new Float32Array(0x4);_0x5ed7df[0x0]=0x0,_0x5ed7df[0x1]=-Math['sin'](_0x521fb7),_0x5ed7df[0x2]=Math['cos'](_0x521fb7),_0x5ed7df[0x3]=_0x2c3e4f*Math['sin'](_0x521fb7)*Math['sin'](_0x32fe25);for(var _0x95f005=0x1;_0x95f005<=(_0x1d1888-0x3)/0x2;++_0x95f005){var _0x4431a8=this['_ComputeIntersectionOfPlaneAndLongtitude'](_0x5ed7df,_0x41d833*_0x95f005,_0x2c3e4f);_0x334375[_0x5031d4++]=_0x4431a8;}return _0x334375[_0x5031d4++]=_0x223d9c,_0xef2275=null,_0x5ed7df=null,_0x12eada['SR_OK'];}},{'key':'_ComputeVertexAndTexturePosVertical','value':function(_0x22a75b,_0x4c6386,_0x494418,_0x4556a7){if(null==_0x4556a7)return _0x12eada['SR_ERR_PARAM'];_0x4556a7[0x2]=-_0x22a75b*Math['cos'](_0x494418)*Math['sin'](_0x4c6386),_0x4556a7[0x1]=_0x22a75b*Math['cos'](_0x494418)*Math['cos'](_0x4c6386),_0x4556a7[0x0]=-_0x22a75b*Math['sin'](_0x494418);var _0xb4bff9,_0x4aef4a=-Math['asin'](-_0x4556a7[0x2]/_0x22a75b)/_0x645d1a;_0xb4bff9=_0x4c6386<=1.5707963?Math['acos'](_0x4556a7[0x0]/Math['sqrt'](_0x4556a7[0x0]*_0x4556a7[0x0]+_0x4556a7[0x1]*_0x4556a7[0x1])):6.2831852-Math['acos'](_0x4556a7[0x0]/Math['sqrt'](_0x4556a7[0x0]*_0x4556a7[0x0]+_0x4556a7[0x1]*_0x4556a7[0x1]));var _0x2b1108=this['fTexCenterX']-this['fTexRadius'],_0x1551be=this['fTexRadius']-this['fTexCenterY'];return _0x4556a7[0x3]=(Math['cos'](_0xb4bff9)*this['fTexRadius']*(0x1+0x2*_0x4aef4a)+this['fTexRadius']+_0x2b1108)/this['fImageWidth'],_0x4556a7[0x4]=(Math['sin'](_0xb4bff9)*this['fTexRadius']*(-0x1-0x2*_0x4aef4a)+this['fTexRadius']-_0x1551be)/this['fImageHeight'],_0x12eada['SR_OK'];}},{'key':'_BeginCapture','value':function(){var _0x14ce3b=_0x12eada['SR_OK'];return 0x0==this['bCaptureResInit']&&(_0x14ce3b=this['_InitRenderTarget'](this['nWndWidth'],this['nWndHeight'],!0x1,!0x0),_0x12eada['SR_OK']!=_0x14ce3b)?_0x14ce3b:(_0x14ce3b=this['_Resize'](this['nWndWidth'],this['nWndHeight'],!0x1,!0x0),_0x12eada['SR_OK']!=_0x14ce3b?_0x14ce3b:(this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['bIsCapturing']=!0x0,_0x12eada['SR_OK']));}},{'key':'_InitRenderTarget','value':function(_0x1c7258,_0x4de7fe,_0x8bafe2,_0x598966){if(0x0!=this['nCaptureRTTex']||0x0!=this['nCaptureFBO'])return _0x12eada['SR_ERR_CALL_ORDER'];if(_0x1c7258<=0x0||_0x4de7fe<=0x0)return _0x12eada['SR_ERR_PARAM'];if(this['nCaptureRTTex']=this['ctx']['createTexture'](),this['nCaptureRTTex']<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nCaptureRTTex']),this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MINMAP_LINEAR']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],_0x1c7258,_0x4de7fe,0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],null),0x0==this['nCaptureFBO']&&(this['nCaptureFBO']=this['ctx']['createFramebuffer'](),this['nCaptureFBO']<=0x0))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['ctx']['framebufferTexture2D'](this['ctx']['FRAMEBUFFER'],this['ctx']['COLOR_ATTACHMENT0'],this['ctx']['TEXTURE_2D'],this['nCaptureRTTex'],0x0),0x1==_0x598966&&0x0==this['nCaptureDepthbuffer']){if(this['nCaptureDepthbuffer']=this['ctx']['createRenderbuffer'](),this['nCaptureDepthbuffer']<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindRenderbuffer'](this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']),this['ctx']['renderbufferStorage'](this['ctx']['RENDERBUFFER'],this['ctx']['DEPTH_COMPONENT16'],_0x1c7258,_0x4de7fe),this['ctx']['framebufferRenderbuffer'](this['ctx']['FRAMEBUFFER'],this['ctx']['DEPTH_ATTACHMENT'],this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']);}return this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),this['nCaptureFBOWidth']=_0x1c7258,this['nCaptureFBOHeight']=_0x4de7fe,this['bCaptureResInit']=!0x0,_0x12eada['SR_OK'];}},{'key':'_Resize','value':function(_0x398ac4,_0x4e4305,_0x14cbed,_0x3ebde8){if(this['nCaptureFBOWidth']!=_0x398ac4||this['nCaptureFBOHeight']!=_0x4e4305){if(this['nCaptureFBOWidth']=_0x398ac4,this['nCaptureFBOHeight']=_0x4e4305,0x0!=this['nCaptureRTTex']&&(this['ctx']['deleteTexture'](this['nCaptureRTTex']),this['nCaptureRTTex']=0x0),0x0!=this['nCaptureDepthbuffer']&&(this['ctx']['deleteRenderbuffer'](this['nCaptureDepthbuffer']),this['nCaptureDepthbuffer']=0x0),0x0==this['nCaptureRTTex']&&(this['nCaptureRTTex']=this['ctx']['createTexture'](),this['nCaptureRTTex']<=0x0))return _0x12eada['SR_ERR_WEBGL_RESOURCE'];if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nCaptureRTTex']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MINMAP_LINEAR']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nCaptureFBOWidth'],this['nCaptureFBOHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],null),this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['ctx']['framebufferTexture2D'](this['ctx']['FRAMEBUFFER'],this['ctx']['COLOR_ATTACHMENT0'],this['ctx']['TEXTURE_2D'],this['nCaptureRTTex'],0x0),0x1==_0x3ebde8&&0x0==this['nCaptureDepthbuffer']){if(this['nCaptureDepthbuffer']=this['ctx']['createRenderbuffer'](),this['nCaptureDepthbuffer']<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindRenderbuffer'](this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']),this['ctx']['renderbufferStorage'](this['ctx']['RENDERBUFFER'],this['ctx']['DEPTH_COMPONENT16'],_0x398ac4,_0x4e4305),this['ctx']['framebufferRenderbuffer'](this['ctx']['FRAMEBUFFER'],this['ctx']['DEPTH_ATTACHMENT'],this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']);}this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null);}return _0x12eada['SR_OK'];}},{'key':'_EndCapture','value':function(_0x390593){return null==this['ctx']?(this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_CALL_ORDER']):null==_0x390593['pBuffer']||null==_0x390593['pBuffer']?(this['bIsCapturing']=!0x1,this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),_0x12eada['SR_ERR_PARAM']):(this['ctx']['readPixels'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight'],this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x390593['pBuffer']),this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),this['bIsCapturing']=!0x1,_0x12eada['SR_OK']);}},{'key':'_ComputeRotateLimits','value':function(){if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']||this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']){var _0x654f63,_0x4714ff;if(this['enDisplayEffect']==_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']?(_0x654f63=0.17453292222222222,_0x4714ff=1.0471975333333334):(_0x654f63=0.5235987666666667,_0x4714ff=0.34906584444444444),0x0==this['nWndWidth']||0x0==this['nWndHeight'])this['fRotateLimitX']=_0x654f63,this['fRotateLimitY']=_0x4714ff;else{var _0x11cdf2=Math['tan'](2.748893525);if(Math['abs'](_0x11cdf2*this['fScale'])<0x1){var _0x59b4cd=_0x11cdf2*_0x11cdf2+0x1,_0x2bae9d=-0x2*_0x11cdf2*_0x11cdf2*this['fScale'],_0x3ca976=_0x11cdf2*_0x11cdf2*this['fScale']*this['fScale']-0x1,_0x288d52=(-_0x2bae9d-Math['sqrt'](_0x2bae9d*_0x2bae9d-0x4*_0x59b4cd*_0x3ca976))/(0x2*_0x59b4cd),_0x5c358b=_0x11cdf2*(_0x288d52-this['fScale']);this['fRotateLimitX']=Math['acos'](_0x5c358b/Math['sqrt'](_0x288d52*_0x288d52+_0x5c358b*_0x5c358b)),this['fRotateLimitX']<_0x654f63&&(this['fRotateLimitX']=_0x654f63);}else this['fRotateLimitX']=_0x654f63;var _0x2a6500=Math['atan'](this['nWndWidth']/this['nWndHeight']*Math['tan'](_0x3b2c52/0x2));if(_0x11cdf2=Math['tan'](_0x645d1a-_0x2a6500),Math['abs'](_0x11cdf2*this['fScale'])<0x1){var _0x3e18f8=_0x11cdf2*_0x11cdf2+0x1,_0x5a0452=-0x2*_0x11cdf2*_0x11cdf2*this['fScale'],_0x3da698=_0x11cdf2*_0x11cdf2*this['fScale']*this['fScale']-0x1,_0x2bd8ae=(-_0x5a0452-Math['sqrt'](_0x5a0452*_0x5a0452-0x4*_0x3e18f8*_0x3da698))/(0x2*_0x3e18f8),_0x4be32a=_0x11cdf2*(_0x2bd8ae-this['fScale']);this['fRotateLimitY']=Math['acos'](_0x4be32a/Math['sqrt'](_0x2bd8ae*_0x2bd8ae+_0x4be32a*_0x4be32a)),this['fRotateLimitY']<_0x4714ff&&(this['fRotateLimitY']=_0x4714ff);}else this['fRotateLimitY']=_0x4714ff;}this['fRotateX']>this['fRotateLimitX']&&(this['fRotateX']=this['fRotateLimitX']),this['fRotateX']<-this['fRotateLimitX']&&(this['fRotateX']=-this['fRotateLimitX']),this['fRotateY']>this['fRotateLimitY']&&(this['fRotateY']=this['fRotateLimitX']),this['fRotateY']<-this['fRotateLimitX']&&(this['fRotateY']=-this['fRotateLimitX']);}return _0x12eada['SR_OK'];}},{'key':'SetMSAACache','value':function(_0x46baaf,_0x41bb63){return this['msaaFrameBuffer']=_0x46baaf,this['renderBuffer']=_0x41bb63,_0x12eada['SR_OK'];}}]),_0x408baa;}()),_0x25eff0=(function(){function _0xc00ba7(){_0x3a92c7(this,_0xc00ba7),this['canvas']=null,this['ctx']=null,this['pFrameData']=null,this['frameDisplayWidth']=0x0,this['frameDisplayHeight']=0x0,this['onlySupportedWebGL1']=!0x1,this['bAntialias']=!0x1,this['bAntialiasStateNeedChange']=!0x1,this['bRecreateTex']=!0x0,this['nSurfaceTexture']=[],this['nSurfaceTexture'][0x0]=0x0,this['nSurfaceTexture'][0x1]=0x0,this['nSurfaceTexture'][0x2]=0x0,this['bOpenMsaa']=!0x1,this['nMsaaFBO']=0x0,this['nResolveFBO']=0x0,this['nMsaaColorBuffer']=0x0,this['nResolveTexture']=0x0,this['nMsaaSample']=0x0,this['pFishParamManager']=null,this['enDisplayEffect']=_0x4d466f['SR_DE_NULL'],this['nFECPort']=-0x1,this['enPixelFormat']=_0x459b97['SR_PF_NULL'],this['nTextureNum']=0x0,this['nCaptureWidth']=0x0,this['nCaptureHeight']=0x0,this['pSubDisplay']=null,this['nRTWidth']=0x0,this['nRTHeight']=0x0,this['pRenderToTex']=null,this['bRenderToTex']=!0x1,this['b3DPort']=!0x1,this['preDisplayRectnX']=0x0,this['preDisplayRectnY']=0x0,this['preDisplayRectnW']=0x0,this['preDisplayRectnH']=0x0,this['preImageRotateValue']=0x0;}return _0x30be4b(_0xc00ba7,[{'key':'SR_Init','value':function(_0x57f11e,_0x4b5479){if(null==_0x57f11e)return _0x12eada['SR_ERR_PARAM'];if(this['canvas']=_0x57f11e,this['ctx']=this['canvas']['getContext']('webgl2'),!this['ctx']){if(this['ctx']=this['canvas']['getContext']('webgl')||this['canvas']['getContext']('experimental-webgl'),!this['ctx'])return _0x12eada['SR_ERR_CANVAS'];this['onlySupportedWebGL1']=!0x0;}if(_0x4b5479==_0x459b97['SR_PF_NV12']||_0x4b5479==_0x459b97['SR_PF_NV21'])return _0x12eada['SR_ERR_NOT_SUPPORT'];switch(_0x4b5479){case _0x459b97['SR_PF_YV12']:case _0x459b97['SR_PF_I420']:this['nTextureNum']=0x3;break;case _0x459b97['SR_PF_SURFACE']:this['nTextureNum']=0x1;break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return this['enPixelFormat']=_0x4b5479,_0x12eada['SR_OK'];}},{'key':'SR_AddSubPort','value':function(_0x1f0648){var _0x5377c9=-0x1;if(null==this['ctx'])return _0x5377c9;if(null!=this['pFishParamManager']?(_0x5377c9=this['pFishParamManager']['GetFECPort'](_0x1f0648),this['b3DPort']=!0x0):_0x1f0648==_0x4d466f['SR_DE_NULL']&&(_0x5377c9=0x0),-0x1==_0x5377c9)return-0x1;this['nFECPort']=_0x5377c9;var _0x48aac0=_0x12eada['SR_OK'];if(null==this['pSubDisplay']&&(this['pSubDisplay']=new _0x2779f7(),null==this['pSubDisplay']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];if((_0x48aac0=this['pSubDisplay']['SetCanvasSize'](this['canvas']['width'],this['canvas']['height']))!=_0x12eada['SR_OK'])return _0x48aac0;if((_0x48aac0=this['pSubDisplay']['SetWebGL2Support'](this['onlySupportedWebGL1']))!=_0x12eada['SR_OK'])return _0x48aac0;var _0x39a87e={};if(null!=this['pFishParamManager']){this['pSubDisplay']['SetFishParamManager'](this['pFishParamManager']),this['pSubDisplay']['SetFECPort'](this['nFECPort']);for(var _0x3c1e51=0x0;_0x3c1e51<0x20&&_0x12eada['SR_OK']!=this['pFishParamManager']['GetRenderParam'](_0x3c1e51,_0x39a87e);++_0x3c1e51);}if((_0x48aac0=this['pSubDisplay']['Init'](this['ctx'],this['enPixelFormat'],_0x1f0648,_0x39a87e))!=_0x12eada['SR_OK'])return _0x48aac0;if(_0x4d466f['SR_DE_NULL']!=_0x1f0648){_0x48aac0=this['pFishParamManager']['SetPTZDisplayMode'](_0x3b7ab3['SR_DM_NULL']);var _0x6a4c62={};if((_0x48aac0=this['pFishParamManager']['GetFishParam'](this['nFECPort'],_0x6a4c62))!=_0x12eada['SR_OK'])return _0x48aac0;if(_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==_0x1f0648){if(_0x6a4c62['nFishParamType']=_0x1a6379['SR_FPT_CENTER'],_0x6a4c62['fRXLeft']=0.05,_0x6a4c62['fRXRight']=0.95,_0x6a4c62['fRYTop']=-0.3,_0x6a4c62['fRYBottom']=1.3,(_0x48aac0=this['pFishParamManager']['SetFishParam'](this['nFECPort'],_0x6a4c62))!=_0x12eada['SR_OK'])return _0x48aac0;}else{if(_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==_0x1f0648&&(_0x6a4c62['nFishParamType']=_0x1a6379['SR_FPT_CENTER'],_0x6a4c62['fRXLeft']=-0.16,_0x6a4c62['fRXRight']=1.16,_0x6a4c62['fRYTop']=0.005,_0x6a4c62['fRYBottom']=0.995,(_0x48aac0=this['pFishParamManager']['SetFishParam'](this['nFECPort'],_0x6a4c62))!=_0x12eada['SR_OK']))return _0x48aac0;}}return null!=this['pFishParamManager']&&this['pFishParamManager']['ComputePTZPoints'](),this['enDisplayEffect']=_0x1f0648,this['nFECPort'];}},{'key':'SR_UpdateFrameData','value':function(_0x261677,_0x3456b8,_0x30dbdb,_0x2bedf0,_0x2f02fa){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x261677||_0x3456b8<=0x0||_0x30dbdb<=0x0)return _0x12eada['SR_ERR_PARAM'];this['frameDisplayWidth']==_0x3456b8&&this['frameDisplayHeight']==_0x30dbdb||(this['bRecreateTex']=!0x0);var _0x37e5f2=_0x12eada['SR_OK'];if(_0x459b97['SR_PF_SURFACE']==this['enPixelFormat'])this['frameDisplayWidth']=_0x3456b8,this['frameDisplayHeight']=_0x30dbdb;else{if(_0x37e5f2=this['_ResizeFrameData'](_0x261677,_0x3456b8,_0x30dbdb,_0x2bedf0),_0x12eada['SR_OK']!=_0x37e5f2)return _0x37e5f2;}if(0x1==this['bRecreateTex']){if(this['enPixelFormat']==_0x459b97['SR_PF_SURFACE']){if(0x0!=this['nSurfaceTexture'][0x0]){var _0x14709b=this['nSurfaceTexture'][0x0];this['ctx']['deleteTexture'](_0x14709b),this['nSurfaceTexture'][0x0]=0x0;}var _0x1dc4a2=this['ctx']['createTexture']();if(_0x1dc4a2<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],_0x1dc4a2),this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],null),this['nSurfaceTexture'][0x0]=_0x1dc4a2;}else{if(this['enPixelFormat']==_0x459b97['SR_PF_YV12']||this['enPixelFormat']==_0x459b97['SR_PF_I420'])for(var _0x429960=0x0;_0x429960<this['nTextureNum'];_0x429960++){if(0x0!=this['nSurfaceTexture'][_0x429960]){var _0x5ba65e=this['nSurfaceTexture'][_0x429960];this['ctx']['deleteTexture'](_0x5ba65e),this['nSurfaceTexture'][_0x429960]=0x0;}var _0x5211fa=this['ctx']['createTexture']();if(_0x5211fa<=0x0)return _0x12eada['SR_ERR_WEBGL_RESOURCE'];this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],_0x5211fa),this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['nSurfaceTexture'][_0x429960]=_0x5211fa,this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],null);}}this['bRecreateTex']=!0x1;}if(_0x459b97['SR_PF_YV12']==this['enPixelFormat']){var _0x5a8508=this['pFrameData']['subarray'](0x0,_0x3456b8*_0x30dbdb);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8,_0x30dbdb,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x5a8508),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])));var _0x3f4459=this['pFrameData']['subarray'](_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2,_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2+_0x3456b8/0x2*_0x30dbdb/0x2);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8/0x2,_0x30dbdb/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x3f4459),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])));var _0x303523=this['pFrameData']['subarray'](_0x3456b8*_0x30dbdb,_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8/0x2,_0x30dbdb/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x303523),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])),this['bAntialiasStateNeedChange']=!0x1),_0x5a8508=null,_0x3f4459=null,_0x303523=null;}else{if(_0x459b97['SR_PF_I420']==this['enPixelFormat']){var _0x5dc7b9=this['pFrameData']['subarray'](0x0,_0x3456b8*_0x30dbdb);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8,_0x30dbdb,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x5dc7b9),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])));var _0x4cbff5=this['pFrameData']['subarray'](_0x3456b8*_0x30dbdb,_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8/0x2,_0x30dbdb/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x4cbff5),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])));var _0x3898a3=this['pFrameData']['subarray'](_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2,_0x3456b8*_0x30dbdb+_0x3456b8/0x2*_0x30dbdb/0x2+_0x3456b8/0x2*_0x30dbdb/0x2);this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x3456b8/0x2,_0x30dbdb/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x3898a3),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])),this['bAntialiasStateNeedChange']=!0x1),_0x5dc7b9=null,_0x4cbff5=null,_0x3898a3=null;}else _0x459b97['SR_PF_SURFACE']==this['enPixelFormat']&&(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],_0x3456b8,_0x30dbdb,0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x261677),this['bAntialiasStateNeedChange']&&(this['onlySupportedWebGL1']||0x1!=this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']):(this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']),this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D'])),this['bAntialiasStateNeedChange']=!0x1));}return _0x12eada['SR_OK'];}},{'key':'SR_Display','value':function(_0x6ae9fb){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];this['pSubDisplay']['SetTextureNum'](this['nTextureNum']);for(var _0x209210=0x0;_0x209210<this['nTextureNum'];_0x209210++)this['pSubDisplay']['SetTextures'](_0x209210,this['nSurfaceTexture'][_0x209210]);if(null!=this['pFishParamManager']){var _0x1ccca2={};this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x1ccca2),this['pSubDisplay']['SetFishParam'](_0x1ccca2);}var _0x16d3f1=this['pSubDisplay']['Render'](!0x1);if(_0x12eada['SR_OK']!=_0x16d3f1)return _0x16d3f1;if(null!=this['pFishParamManager']){var _0x1e104d=this['pFishParamManager']['GetWndPort']();-0x1!=_0x1e104d&&_0x1e104d==this['nFECPort']&&this['DrawPTZLines']();}return this['pSubDisplay']['SetVideoResolution'](this['frameDisplayWidth'],this['frameDisplayHeight']),_0x6ae9fb||this['pSubDisplay']['DoCallBack'](),_0x12eada['SR_OK'];}},{'key':'SR_SetDisplayRect','value':function(_0x562ae3,_0x4f8386,_0x438caf,_0xf37f28,_0x37da83){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x57615c=_0x12eada['SR_OK'];return(_0x57615c=this['pSubDisplay']['SetDisplayRect'](_0x562ae3,_0x4f8386,_0x438caf,_0xf37f28,_0x37da83))!=_0x12eada['SR_OK']?_0x57615c:(this['preDisplayRectnX']=_0x562ae3,this['preDisplayRectnY']=_0x4f8386,this['preDisplayRectnW']=_0x438caf,this['preDisplayRectnH']=_0xf37f28,_0x12eada['SR_OK']);}},{'key':'SR_SetImagePostProcess','value':function(_0x59e223,_0x3ed549){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay']&&(this['pSubDisplay']=new _0x2779f7(),null==this['pSubDisplay']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];var _0x5ba155=_0x12eada['SR_OK'];return(_0x5ba155=this['pSubDisplay']['SetImagePostProcess'](_0x59e223,_0x3ed549))!=_0x12eada['SR_OK']?_0x5ba155:_0x12eada['SR_OK'];}},{'key':'SR_SetRenderState','value':function(_0x49340a,_0x320560){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x51ad3e=_0x12eada['SR_OK'];return(_0x51ad3e=this['pSubDisplay']['SetRenderState'](_0x49340a,_0x320560))!=_0x12eada['SR_OK']?_0x51ad3e:(_0x49340a==_0x23df7b['SR_RST_IMAGE_ROTATE']&&(this['preImageRotateValue']=_0x320560),_0x12eada['SR_OK']);}},{'key':'SR_GetCaptureSize','value':function(_0x13318e){var _0x44d764=arguments['length']>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];if(null==_0x13318e)return _0x12eada['SR_ERR_PARAM'];if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0xafd946=_0x12eada['SR_OK'];return(_0xafd946=this['pSubDisplay']['GetCaptureSize'](_0x13318e,_0x44d764))!=_0x12eada['SR_OK']?_0xafd946:(this['nCaptureWidth']=_0x13318e['nWidth'],this['nCaptureHeight']=_0x13318e['nHeight'],_0x12eada['SR_OK']);}},{'key':'SR_CaptureScreen','value':function(_0x4c6d42){var _0x3d1999=arguments['length']>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];if(0x0==this['nSurfaceTexture'][0x0])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x1fe153={'nWndWidth':0x0,'nWndHeight':0x0};this['pSubDisplay']['GetWndResolution'](_0x1fe153),this['pSubDisplay']['SetWndResolution'](this['nCaptureWidth'],this['nCaptureHeight']);var _0x18fc3f=_0x12eada['SR_OK'];return(_0x18fc3f=this['pSubDisplay']['CaptureScreen'](_0x4c6d42,_0x3d1999))!=_0x12eada['SR_OK']?_0x18fc3f:(this['pSubDisplay']['SetWndResolution'](_0x1fe153['nWndWidth'],_0x1fe153['nWndHeight']),_0x12eada['SR_OK']);}},{'key':'SR_DrawMosaic','value':function(_0x3a20ff,_0x2d8532,_0x5244c1,_0x5b8112,_0x37b5d8){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x20ec59=_0x12eada['SR_OK'];return(_0x20ec59=this['pSubDisplay']['DrawMosaic'](_0x3a20ff,_0x2d8532,_0x5244c1,_0x5b8112,_0x37b5d8))!=_0x12eada['SR_OK']?_0x20ec59:_0x12eada['SR_OK'];}},{'key':'DrawPTZLines','value':function(){if(null==this['pFishParamManager'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x24ed17=this['pFishParamManager']['GetPTZDisplayMode']();if(_0x24ed17==_0x3b7ab3['SR_DM_RANGE']||_0x24ed17==_0x3b7ab3['SR_DM_RECT']){for(var _0xe91fe2=0x0,_0x19f617={'fR':0x0,'fG':0x0,'fB':0x0,'fA':0x0},_0x4dc0d4=_0x12eada['SR_OK'],_0x542d75=0x0;_0x542d75<0x20;++_0x542d75)if(0x0!=this['pFishParamManager']['IsPortAllocated'](_0x542d75)&&(_0xe91fe2=0x2,_0x4dc0d4=this['pFishParamManager']['GetPTZColor'](_0x542d75,_0x19f617),_0x12eada['SR_OK']==_0x4dc0d4)){0x1==this['pFishParamManager']['IsPTZSelected'](_0x542d75)&&(_0xe91fe2+=0x1);var _0x368fc0=this['pFishParamManager']['GetWndPort']();if(_0x542d75!=_0x368fc0&&_0x3b7ab3['SR_DM_RANGE']==_0x24ed17){if(_0x4d466f['SR_DE_FISH_ORIGINAL']==this['pFishParamManager']['GetDisplayEffect'](_0x368fc0)){var _0x4dcdcf={};if(_0x4dc0d4=this['pFishParamManager']['GetPTZPoints'](_0x542d75,_0x4dcdcf,_0x3b7ab3['SR_DM_RANGE']),_0x12eada['SR_OK']!=_0x4dc0d4)continue;if(null!=_0x4dcdcf['pstPoints']&&0x0!=_0x4dcdcf['nPointNum']&&(_0x4dc0d4=this['SR_DrawLines'](_0x4dcdcf['pstPoints'],_0x4dcdcf['nPointNum'],!0x0,_0x19f617,_0xe91fe2,!0x1),_0x12eada['SR_OK']!=_0x4dc0d4))continue;}else{var _0x1de167;if((_0x1de167=this['pFishParamManager']['GetPTZFragmentNum'](_0x542d75))<=0x0)continue;for(var _0x204b73=0x0;_0x204b73<_0x1de167;_0x204b73++){var _0x3ca363={};this['pFishParamManager']['GetPTZFragmentPoints'](_0x542d75,_0x3ca363,_0x204b73),null!=_0x3ca363['pstPoints']&&0x0!=_0x3ca363['nPointNum']&&this['SR_DrawLines'](_0x3ca363['pstPoints'],_0x3ca363['nPointNum'],!0x1,_0x19f617,_0xe91fe2,!0x1);}}}else{if(_0x542d75!=_0x368fc0&&_0x3b7ab3['SR_DM_RECT']==_0x24ed17){var _0x18747e={};if(_0x4dc0d4=this['pFishParamManager']['GetPTZPoints'](_0x542d75,_0x18747e,_0x3b7ab3['SR_DM_RECT']),_0x12eada['SR_OK']!=_0x4dc0d4)continue;if(null!=_0x18747e['pstPoints']&&0x0!=_0x18747e['nPointNum']&&(_0x4dc0d4=this['SR_DrawLines'](_0x18747e['pstPoints'],_0x18747e['nPointNum'],!0x0,_0x19f617,_0xe91fe2,!0x1),_0x12eada['SR_OK']!=_0x4dc0d4))continue;}}}}return _0x12eada['SR_OK'];}},{'key':'SR_DrawLines','value':function(_0x1d3b22,_0x33a381,_0x46d226,_0x4c199e,_0xe244d5,_0x799edd){return null==this['ctx']||null==this['pSubDisplay']?_0x12eada['SR_ERR_CALL_ORDER']:this['pSubDisplay']['DrawLines'](_0x1d3b22,_0x33a381,_0x46d226,_0x4c199e,_0xe244d5,_0x799edd);}},{'key':'SR_DrawLinesEx','value':function(_0x5802b7,_0x39eefc,_0x86af79,_0x2519a5){return null==this['ctx']||null==this['pSubDisplay']?_0x12eada['SR_ERR_CALL_ORDER']:this['pSubDisplay']['DrawLinesEx'](_0x5802b7,_0x39eefc,_0x86af79,_0x2519a5);}},{'key':'SR_DrawFont','value':function(_0x3b04df,_0x25be85,_0x47c3ee,_0x4d5053,_0x539bb7,_0x477210,_0x13feac,_0x260f7d,_0x5b389e,_0x42b409,_0x52b067){return _0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'SR_DrawFontEx','value':function(_0x255f19,_0x1d8b43){var _0x474a6f=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x428115=arguments['length']>0x3?arguments[0x3]:void 0x0;if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x5e8ca7=this['pSubDisplay']['DrawFontEx'](_0x255f19,_0x1d8b43,_0x474a6f,_0x428115);return _0x5e8ca7;}},{'key':'SR_DrawImage','value':function(_0x57400d,_0x190fbc,_0x5699f4,_0x9cf368,_0x14de32,_0x5b30c4){return null==this['ctx']||null==this['pSubDisplay']?_0x12eada['SR_ERR_CALL_ORDER']:this['pSubDisplay']['DrawImage'](_0x57400d,_0x190fbc,_0x5699f4,_0x9cf368,_0x14de32,_0x5b30c4);}},{'key':'SR_DelSubPort','value':function(_0x5f2fda){return null==this['ctx']||null==this['pSubDisplay']?_0x12eada['SR_ERR_CALL_ORDER']:(this['pSubDisplay']['DelSubPort'](),null!=this['pFishParamManager']&&this['nFECPort']==_0x5f2fda&&this['pFishParamManager']['FreeFECPort'](this['nFECPort']),this['enDisplayEffect']=_0x4d466f['SR_DE_NULL'],this['pSubDisplay']=null,_0x12eada['SR_OK']);}},{'key':'SR_GetFishParam','value':function(_0x38dae9){return null==_0x38dae9?_0x12eada['SR_ERR_PARAM']:null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['GetFishParam'](this['nFECPort'],_0x38dae9);}},{'key':'SR_SetFishParam','value':function(_0x5a8877){return null==_0x5a8877?_0x12eada['SR_ERR_PARAM']:null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['SetFishParam'](this['nFECPort'],_0x5a8877);}},{'key':'SR_Destroy','value':function(){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];this['frameDisplayWidth']=0x0,this['frameDisplayHeight']=0x0,this['pFrameData']=null;for(var _0x58ffef=0x0;_0x58ffef<this['nTextureNum'];_0x58ffef++)0x0!=this['nSurfaceTexture'][_0x58ffef]&&null!=this['ctx']&&(this['ctx']['deleteTexture'](this['nSurfaceTexture'][_0x58ffef]),this['nSurfaceTexture'][_0x58ffef]=0x0);return this['SR_DelSubPort'](this['nFECPort']),this['ctx']=null,this['onlySupportedWebGL1']=!0x1,this['bAntialias']=!0x1,this['bAntialiasStateNeedChange']=!0x1,this['bOpenMsaa']=!0x1,this['bRecreateTex']=!0x0,this['pFishParamManager']=null,_0x12eada['SR_OK'];}},{'key':'SR_SetCanvasSize','value':function(_0x1d70b6,_0x332346){if(!this['pSubDisplay']||!this['canvas'])return _0x12eada['SR_ERR_CALL_ORDER'];this['canvas']['width']=_0x1d70b6,this['canvas']['height']=_0x332346;var _0x37c28c=this['pSubDisplay']['SetCanvasSize'](_0x1d70b6,_0x332346);return _0x37c28c!=_0x12eada['SR_OK']?_0x37c28c:_0x12eada['SR_OK'];}},{'key':'SR_GetCanvasSize','value':function(){return this['canvas']?_0x12eada['SR_OK']:_0x12eada['SR_ERR_CALL_ORDER'];}},{'key':'SR_SetAntialias','value':function(_0x1572db){if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];if(0x1==this['onlySupportedWebGL1'])return _0x12eada['SR_ERR_NOT_SUPPORT'];this['bAntialias']!=_0x1572db&&(this['bAntialias']=_0x1572db,this['bAntialiasStateNeedChange']=!0x0);var _0x52c647=this['pSubDisplay']['SetAntialias'](this['bAntialias']);return _0x52c647!=_0x12eada['SR_OK']?_0x52c647:_0x12eada['SR_OK'];}},{'key':'SR_SetRenderMode','value':function(_0x18fa1c){return _0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'SR_SetPTZDisplayMode','value':function(_0x25923f){return null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['SetPTZDisplayMode'](_0x25923f);}},{'key':'SR_SetFishParamManager','value':function(_0x470698){return null!=this['pFishParamManager']?_0x12eada['SR_ERR_NOT_SUPPORT']:(this['pFishParamManager']=_0x470698,_0x12eada['SR_OK']);}},{'key':'SR_SetViewParam','value':function(_0x1ec89e,_0x3e7e26){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x4d0d50=this['pSubDisplay']['SetViewParam'](_0x1ec89e,_0x3e7e26);return _0x4d0d50!=_0x12eada['SR_OK']?_0x4d0d50:_0x12eada['SR_OK'];}},{'key':'SR_GetViewParam','value':function(_0x1c39aa,_0x283c5b){if(null==this['ctx'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0xb4568c=this['pSubDisplay']['GetViewParam'](_0x1c39aa,_0x283c5b);return _0xb4568c!=_0x12eada['SR_OK']?_0xb4568c:_0x12eada['SR_OK'];}},{'key':'SR_SetCallBack','value':function(_0x19cafb,_0x69247c,_0xa2b4ce){if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x287873=_0x12eada['SR_OK'];return(_0x287873=this['pSubDisplay']['SetCallBack'](_0x19cafb,_0x69247c,_0xa2b4ce))!=_0x12eada['SR_OK']?_0x287873:_0x12eada['SR_OK'];}},{'key':'SR_SetPTZColor','value':function(_0x1c43f9,_0x274626){return null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['SetPTZColor'](_0x1c43f9,_0x274626);}},{'key':'SR_GetPTZColor','value':function(_0x2f10cb,_0x1d960e){return null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['GetPTZColor'](_0x2f10cb,_0x1d960e);}},{'key':'SR_SetPTZPort','value':function(_0x3d7f50){return null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:this['pFishParamManager']['SetPTZPort'](_0x3d7f50);}},{'key':'SR_GetPTZPort','value':function(_0x38d566,_0x931674,_0x2ffcd7){return null==this['pFishParamManager']?_0x12eada['SR_ERR_CALL_ORDER']:null==_0x2ffcd7?_0x12eada['SR_ERR_PARAM']:this['pFishParamManager']['GetPTZPort'](_0x38d566,_0x931674,_0x2ffcd7);}},{'key':'SR_GetDllVersion','value':function(){return'V1.1.0.3_build20250820_svn96751';}},{'key':'_ResizeFrameData','value':function(_0x3135bc,_0x58757d,_0x7f70bc,_0x17c733){if(0x0==_0x58757d%0x8&&null==_0x17c733)return this['frameDisplayWidth']=Math['round'](_0x58757d),this['frameDisplayHeight']=Math['round'](_0x7f70bc),this['pFrameData']=_0x3135bc,_0x12eada['SR_OK'];if(null!=_0x17c733&&0x0==_0x17c733['nCropBottom']&&0x0==_0x17c733['nCropLeft']&&0x0==_0x17c733['nCropRight']&&0x0==_0x17c733['nCropTop']&&0x0==_0x58757d%0x8)return this['frameDisplayWidth']=Math['round'](_0x58757d),this['frameDisplayHeight']=Math['round'](_0x7f70bc),this['pFrameData']=_0x3135bc,_0x12eada['SR_OK'];if((null==this['pFrameData']||this['frameDisplayWidth']!=_0x58757d/0x8*0x8||this['frameDisplayHeight']!=_0x7f70bc)&&(this['frameDisplayWidth']=0x8*Math['round'](_0x58757d/0x8),this['frameDisplayHeight']=Math['round'](_0x7f70bc),this['pFrameData']=null,this['pFrameData']=new Uint8Array(this['frameDisplayWidth']*this['frameDisplayHeight']*0x3/0x2),null==this['pFrameData']))return _0x12eada['SR_ERR_ALLOC_MEMORY'];var _0x3ed75e=0x0,_0x2fc62b=0x0,_0x2c57d7=Math['round'](_0x17c733['nCodeWidth']),_0x334c5c=Math['round'](_0x17c733['nCodeHeight']),_0xd1d919=0x0;if(_0x459b97['SR_PF_YV12']==this['enPixelFormat']||_0x459b97['SR_PF_I420']==this['enPixelFormat']){var _0x20040c,_0x1cd8bf,_0x18e09f;null!=_0x17c733?(_0x3ed75e=Math['round'](_0x17c733['nCropLeft']),_0x2fc62b=Math['round'](_0x17c733['nCropTop']),_0x20040c=_0x3135bc['subarray'](_0x3ed75e*_0x2c57d7+_0x2fc62b,_0x2c57d7*_0x334c5c),_0x1cd8bf=_0x3135bc['subarray'](_0x2c57d7*_0x334c5c+_0x2fc62b*_0x2c57d7/0x4+_0x3ed75e/0x2,_0x2c57d7*_0x334c5c*0x5/0x4),_0x18e09f=_0x3135bc['subarray'](_0x2c57d7*_0x334c5c*0x5/0x4+_0x2fc62b*_0x2c57d7/0x4+_0x3ed75e/0x2,_0x2c57d7*_0x334c5c*0x3/0x2),_0xd1d919=_0x2c57d7):(_0x20040c=_0x3135bc['subarray'](0x0,_0x58757d*_0x7f70bc),_0x1cd8bf=_0x3135bc['subarray'](_0x58757d*_0x7f70bc,_0x58757d*_0x7f70bc*0x5/0x4),_0x18e09f=_0x3135bc['subarray'](_0x58757d*_0x7f70bc*0x5/0x4,_0x58757d*_0x7f70bc*0x3/0x2),_0xd1d919=this['frameDisplayWidth']);for(var _0x1cb8d5=null,_0x4965d6=0x0;_0x4965d6<this['frameDisplayHeight'];++_0x4965d6){var _0x58ff52=Math['round'](_0x4965d6*_0xd1d919),_0xca8fa3=Math['round'](_0x4965d6*_0xd1d919+this['frameDisplayWidth']);_0x1cb8d5=_0x20040c['slice'](_0x58ff52,_0xca8fa3);var _0x5be200=Math['round'](_0x4965d6*this['frameDisplayWidth']);this['pFrameData']['set'](_0x1cb8d5,_0x5be200);}for(var _0xd4ab0b=0x0;_0xd4ab0b<this['frameDisplayHeight']/0x2;++_0xd4ab0b){var _0x5e0eff=Math['round'](_0xd4ab0b*_0xd1d919/0x2),_0xd326c1=Math['round'](_0xd4ab0b*_0xd1d919/0x2+this['frameDisplayWidth']/0x2);_0x1cb8d5=_0x1cd8bf['slice'](_0x5e0eff,_0xd326c1);var _0x3c3aa2=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']+_0xd4ab0b*this['frameDisplayWidth']/0x2);this['pFrameData']['set'](_0x1cb8d5,_0x3c3aa2);}for(var _0x1a4191=0x0;_0x1a4191<this['frameDisplayHeight']/0x2;++_0x1a4191){var _0x35faec=Math['round'](_0x1a4191*_0xd1d919/0x2),_0xea805=Math['round'](_0x1a4191*_0xd1d919/0x2+this['frameDisplayWidth']/0x2);_0x1cb8d5=_0x18e09f['slice'](_0x35faec,_0xea805);var _0x1bc782=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']*0x5/0x4+_0x1a4191*this['frameDisplayWidth']/0x2);this['pFrameData']['set'](_0x1cb8d5,_0x1bc782);}_0x20040c=null,_0x1cd8bf=null,_0x18e09f=null,_0x1cb8d5=null;}else{if(_0x459b97['SR_PF_NV12']==this['enPixelFormat']){var _0x6efa94,_0x1911bb,_0x265708;null!=_0x17c733?(_0x3ed75e=Math['round'](_0x17c733['nCropLeft']),_0x2fc62b=Math['round'](_0x17c733['nCropTop']),_0x6efa94=_0x3135bc['subarray'](_0x2fc62b*_0x2c57d7+_0x3ed75e,_0x2c57d7*_0x334c5c),_0x1911bb=_0x3135bc['subarray'](_0x2c57d7*_0x334c5c+_0x2fc62b*_0x2c57d7/0x4+_0x3ed75e/0x2,_0x2c57d7*_0x334c5c*0x3/0x2),_0xd1d919=Math['round'](_0x17c733['nCodeWidth'])):(_0x6efa94=_0x3135bc['subarray'](0x0,_0x2c57d7*_0x334c5c),_0x1911bb=_0x3135bc['subarray'](_0x2c57d7*_0x334c5c,_0x2c57d7*_0x334c5c*0x3/0x2),_0xd1d919=this['frameDisplayWidth']);for(var _0xfe6658=0x0;_0xfe6658<this['frameDisplayHeight'];++_0xfe6658){var _0x266410=Math['round'](_0xfe6658*_0xd1d919),_0x3e1970=Math['round'](_0xfe6658*_0xd1d919+this['frameDisplayWidth']);_0x265708=_0x6efa94['slice'](_0x266410,_0x3e1970);var _0x16f98a=Math['round'](_0xfe6658*this['frameDisplayWidth']);this['pFrameData']['set'](_0x265708,_0x16f98a);}for(var _0x268a95=0x0;_0x268a95<this['frameDisplayHeight']/0x2;++_0x268a95){var _0x34a807=Math['round'](_0x268a95*_0xd1d919),_0xa8b88=Math['round'](_0x268a95*_0xd1d919+this['frameDisplayWidth']);_0x265708=_0x1911bb['slice'](_0x34a807,_0xa8b88);var _0x5047c2=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']+_0x268a95*this['frameDisplayWidth']);this['pFrameData']['set'](_0x265708,_0x5047c2);}_0x6efa94=null,_0x1911bb=null,_0x265708=null;}}return _0x12eada['SR_OK'];}},{'key':'_RenderToTarget','value':function(_0x10cb3d){return _0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'_SetRenderMode','value':function(_0x2ed11d){if(null==this['pSubDisplay'])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x41d14e=_0x12eada['SR_OK'];if(_0x2ed11d==this['bRenderToTex'])return _0x12eada['SR_OK'];this['bRenderToTex']=_0x2ed11d;var _0x559d7a={};if(null!=this['pFishParamManager']){this['pSubDisplay']['SetFishParamManager'](this['pFishParamManager']),this['pSubDisplay']['SetFECPort'](this['nFECPort']);for(var _0x3175e6=0x0;_0x3175e6<0x20&&_0x12eada['SR_OK']!=this['pFishParamManager']['GetRenderParam'](_0x3175e6,_0x559d7a);++_0x3175e6);}return(_0x41d14e=this['bRenderToTex']?this['pSubDisplay']['Init'](this['ctx'],_0x459b97['SR_PF_RGBA32'],this['enDisplayEffect'],_0x559d7a):this['pSubDisplay']['Init'](this['ctx'],this['enPixelFormat'],this['enDisplayEffect'],_0x559d7a))!=_0x12eada['SR_OK']?_0x41d14e:0x0==this['preDisplayRectnX']&&0x0==this['preDisplayRectnY']&&0x0==this['preDisplayRectnW']&&0x0==this['preDisplayRectnH']||(_0x41d14e=this['pSubDisplay']['SetDisplayRect'](this['preDisplayRectnX'],this['preDisplayRectnY'],this['preDisplayRectnW'],this['preDisplayRectnH'],_0x2a07c0['SR_SRT_SRC']))==_0x12eada['SR_OK']?(this['pSubDisplay']['nImageRotateAngle']=_0x1dca5a['SR_IRA_0'],(_0x41d14e=this['pSubDisplay']['SetRenderState'](_0x23df7b['SR_RST_IMAGE_ROTATE'],this['preImageRotateValue']))!=_0x12eada['SR_OK']?_0x41d14e:_0x12eada['SR_OK']):_0x41d14e;}}]),_0xc00ba7;}()),_0x5b51cb=(function(){function _0x2b7417(){_0x3a92c7(this,_0x2b7417),this['bPortAllocated']=[],this['pRenderParam']=[],this['pFishParam']=[],this['stPTZColor']=[],this['pPTZSetColor']=[];for(var _0x571a28=0x0;_0x571a28<0x20;++_0x571a28)this['pPTZSetColor'][_0x571a28]={},this['pPTZSetColor'][_0x571a28]['fR']=0x0,this['pPTZSetColor'][_0x571a28]['fG']=0x0,this['pPTZSetColor'][_0x571a28]['fB']=0x0,this['pPTZSetColor'][_0x571a28]['fA']=0x1,this['pPTZSetColor'][_0x571a28]['bSetColor']=!0x1;this['nBasePTZPointNum']=[],this['nOriPTZPointNum']=[],this['nPanoPTZPointNum']=[],this['nPTZFragmentNum']=[],this['pBasePTZPoints']=[],this['pPanoPTZPoints']=[],this['pRectPoints']=[],this['nPTZRectNum']=[],this['nPTZDisplayMode']=_0x3b7ab3['SR_DM_NULL'],this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1,this['pOriPTZPoints']=[],this['nWndPort']=-0x1,this['nPlaceType']=0x0,this['nPTZFragmentNode']=[],this['bPTZSelected']=[],this['nPTZDisplayMode']=_0x3b7ab3['SR_DM_RANGE'];for(var _0x2f9a32=0x0;_0x2f9a32<0x20;++_0x2f9a32){this['bPortAllocated'][_0x2f9a32]=!0x1,this['bPTZSelected'][_0x2f9a32]=!0x1,this['pRenderParam'][_0x2f9a32]=null,this['pFishParam'][_0x2f9a32]=null,this['stPTZColor'][_0x2f9a32]={},this['stPTZColor'][_0x2f9a32]['fR']=0x0,this['stPTZColor'][_0x2f9a32]['fG']=0x0,this['stPTZColor'][_0x2f9a32]['fB']=0x0,this['stPTZColor'][_0x2f9a32]['fA']=0x0,this['nBasePTZPointNum'][_0x2f9a32]=0x0,this['nOriPTZPointNum'][_0x2f9a32]=0x0,this['nPanoPTZPointNum'][_0x2f9a32]=0x0,this['nPTZRectNum'][_0x2f9a32]=0x0,this['pPanoPTZPoints'][_0x2f9a32]=[],this['pRectPoints'][_0x2f9a32]=[],this['pBasePTZPoints'][_0x2f9a32]=[],this['pOriPTZPoints'][_0x2f9a32]=[];for(var _0x3c8309=0x0;_0x3c8309<0x4;++_0x3c8309)this['pRectPoints'][_0x2f9a32][_0x3c8309]={},this['pRectPoints'][_0x2f9a32][_0x3c8309]['fX']=0x0,this['pRectPoints'][_0x2f9a32][_0x3c8309]['fY']=0x0;for(var _0x1c01d1=0x0;_0x1c01d1<0x400;++_0x1c01d1)this['pBasePTZPoints'][_0x2f9a32][_0x1c01d1]={},this['pBasePTZPoints'][_0x2f9a32][_0x1c01d1]['fX']=0x0,this['pBasePTZPoints'][_0x2f9a32][_0x1c01d1]['fY']=0x0,this['pOriPTZPoints'][_0x2f9a32][_0x1c01d1]={},this['pOriPTZPoints'][_0x2f9a32][_0x1c01d1]['fX']=0x0,this['pOriPTZPoints'][_0x2f9a32][_0x1c01d1]['fY']=0x0,this['pPanoPTZPoints'][_0x2f9a32][_0x1c01d1]={},this['pPanoPTZPoints'][_0x2f9a32][_0x1c01d1]['fX']=0x0,this['pPanoPTZPoints'][_0x2f9a32][_0x1c01d1]['fY']=0x0;this['nPTZFragmentNum'][_0x2f9a32]=0x0,this['nPTZFragmentNode'][_0x2f9a32]=[];for(var _0x5a6023=0x0;_0x5a6023<0x64;++_0x5a6023)this['nPTZFragmentNode'][_0x2f9a32][_0x5a6023]=0x0;}this['InitColorList']();}return _0x30be4b(_0x2b7417,[{'key':'GetFECPort','value':function(_0x1d112e){for(var _0x47ecf7=-0x1,_0x3184cc=0x0;_0x3184cc<0x20;++_0x3184cc)if(0x0==this['bPortAllocated'][_0x3184cc]){_0x47ecf7=_0x3184cc;break;}if(-0x1==_0x47ecf7)return _0x47ecf7;if(_0x1d112e==_0x4d466f['SR_DE_NULL'])return _0x47ecf7;var _0x4bacde=this['JudgeDisplayEffect'](_0x1d112e);if(_0x12eada['SR_OK']!=_0x4bacde)return this['FreeFECPort'](_0x47ecf7),-0x1;if(_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']==_0x1d112e||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']==_0x1d112e||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']==_0x1d112e||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x1d112e||_0x4d466f['SR_DE_FISH_PANORAMA_WALL']==_0x1d112e||_0x4d466f['SR_DE_FISH_ORIGINAL']==_0x1d112e){if(-0x1!=this['nWndPort'])return this['FreeFECPort'](_0x47ecf7),-0x1;this['nWndPort']=_0x47ecf7;}if(!(_0x4d466f['SR_DE_FISH_PTZ_CEILING']!=_0x1d112e&&_0x4d466f['SR_DE_FISH_PTZ_FLOOR']!=_0x1d112e&&_0x4d466f['SR_DE_FISH_PTZ_WALL']!=_0x1d112e||-0x1==this['nWndPort']||null==this['pRenderParam'][this['nWndPort']]||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][this['nWndPort']]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']!=this['pRenderParam'][this['nWndPort']]['nDisplayEffect']))return this['FreeFECPort'](_0x47ecf7),-0x1;if(_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']==_0x1d112e||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x1d112e){for(var _0x383f87=0x0;_0x383f87<0x20;++_0x383f87)if(null!=this['pRenderParam'][_0x383f87]&&(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x383f87]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x383f87]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x383f87]['nDisplayEffect']))return this['FreeFECPort'](_0x47ecf7),-0x1;}if(_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==_0x1d112e){for(var _0x4ee7ac=0x0;_0x4ee7ac<0x20;++_0x4ee7ac)if(null!=this['pRenderParam'][_0x4ee7ac]&&_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==this['pRenderParam'][_0x4ee7ac]['nDisplayEffect'])return this['FreeFECPort'](_0x47ecf7),-0x1;}if(_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==_0x1d112e){for(var _0x2df7fa=0x0;_0x2df7fa<0x20;++_0x2df7fa)if(null!=this['pRenderParam'][_0x2df7fa]&&_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==this['pRenderParam'][_0x2df7fa]['nDisplayEffect'])return this['FreeFECPort'](_0x47ecf7),-0x1;}return this['pRenderParam'][_0x47ecf7]={},this['pRenderParam'][_0x47ecf7]['fCosH']=0x1,this['pRenderParam'][_0x47ecf7]['fSinH']=0x0,this['pRenderParam'][_0x47ecf7]['fCosV']=0x1,this['pRenderParam'][_0x47ecf7]['fSinV']=0x0,this['pRenderParam'][_0x47ecf7]['fAngle']=0x0,this['pRenderParam'][_0x47ecf7]['fRX1']=this['fRX1'],this['pRenderParam'][_0x47ecf7]['fRX2']=this['fRX2'],this['pRenderParam'][_0x47ecf7]['fRY1']=this['fRY1'],this['pRenderParam'][_0x47ecf7]['fRY2']=this['fRY2'],this['pRenderParam'][_0x47ecf7]['bBlack']=this['bBlack'],this['pRenderParam'][_0x47ecf7]['fZoom']=0.035+0.8,this['pRenderParam'][_0x47ecf7]['nDisplayEffect']=_0x1d112e,this['pRenderParam'][_0x47ecf7]['bBlack']=!0x1,this['pRenderParam'][_0x47ecf7]['bCut']=!0x1,this['pFishParam'][_0x47ecf7]={},this['pFishParam'][_0x47ecf7]['nFishParamType']=0x0,this['pFishParam'][_0x47ecf7]['bCut']=!0x1,this['pFishParam'][_0x47ecf7]['fAngle']=this['pRenderParam'][_0x47ecf7]['fAngle'],this['pFishParam'][_0x47ecf7]['fPTZX']=0.5,this['pFishParam'][_0x47ecf7]['fPTZY']=0.5,this['pFishParam'][_0x47ecf7]['fRXLeft']=this['pRenderParam'][_0x47ecf7]['fRX1'],this['pFishParam'][_0x47ecf7]['fRXRight']=this['pRenderParam'][_0x47ecf7]['fRX2'],this['pFishParam'][_0x47ecf7]['fRYTop']=this['pRenderParam'][_0x47ecf7]['fRY1'],this['pFishParam'][_0x47ecf7]['fRYBottom']=this['pRenderParam'][_0x47ecf7]['fRY2'],this['pFishParam'][_0x47ecf7]['bBlack']=this['pRenderParam'][_0x47ecf7]['bBlack'],this['pFishParam'][_0x47ecf7]['fZoom']=(this['pRenderParam'][_0x47ecf7]['fZoom']-0.8)/0x7,this['bPortAllocated'][_0x47ecf7]=!0x0,_0x47ecf7;}},{'key':'FreeFECPort','value':function(_0x39846b){if(_0x39846b<0x0||_0x39846b>=0x20)return _0x12eada['SR_ERR_PARAM'];this['nWndPort']==_0x39846b&&(this['nWndPort']=-0x1),null!=this['pRenderParam'][_0x39846b]&&(this['pRenderParam'][_0x39846b]['fCosH']=0x1,this['pRenderParam'][_0x39846b]['fSinH']=0x0,this['pRenderParam'][_0x39846b]['fCosV']=0x1,this['pRenderParam'][_0x39846b]['fSinV']=0x0,this['pRenderParam'][_0x39846b]['fAngle']=0x0,this['pRenderParam'][_0x39846b]['fZoom']=0x0,this['pRenderParam'][_0x39846b]['fRX1']=0x0,this['pRenderParam'][_0x39846b]['fRX2']=0x1,this['pRenderParam'][_0x39846b]['fRY1']=0x0,this['pRenderParam'][_0x39846b]['fRY2']=0x1,this['pRenderParam'][_0x39846b]['nDisplayEffect']=0x0,this['pRenderParam'][_0x39846b]['bBlack']=!0x1,this['pRenderParam'][_0x39846b]['bCut']=!0x1),null!=this['pFishParam'][_0x39846b]&&(this['pFishParam'][_0x39846b]['nFishParamType']=0x0,this['pFishParam'][_0x39846b]['fRXLeft']=0x0,this['pFishParam'][_0x39846b]['fRXRight']=0x1,this['pFishParam'][_0x39846b]['fRYTop']=0x0,this['pFishParam'][_0x39846b]['fRYBottom']=0x1,this['pFishParam'][_0x39846b]['bBlack']=!0x1,this['pFishParam'][_0x39846b]['bCut']=!0x1,this['pFishParam'][_0x39846b]['fAngle']=0x0,this['pFishParam'][_0x39846b]['fZoom']=0x0,this['pFishParam'][_0x39846b]['fPTZX']=0.5,this['pFishParam'][_0x39846b]['fPTZY']=0.5),this['nBasePTZPointNum'][_0x39846b]=0x0,this['nOriPTZPointNum'][_0x39846b]=0x0,this['nPanoPTZPointNum'][_0x39846b]=0x0,this['nPTZRectNum'][_0x39846b]=0x0;for(var _0x52b9db=0x0;_0x52b9db<0x4;++_0x52b9db)this['pRectPoints'][_0x39846b][_0x52b9db]['fX']=0x0,this['pRectPoints'][_0x39846b][_0x52b9db]['fY']=0x0;for(var _0x15900e=0x0;_0x15900e<0x400;++_0x15900e)this['pBasePTZPoints'][_0x39846b][_0x15900e]['fX']=0x0,this['pBasePTZPoints'][_0x39846b][_0x15900e]['fY']=0x0,this['pOriPTZPoints'][_0x39846b][_0x15900e]['fX']=0x0,this['pOriPTZPoints'][_0x39846b][_0x15900e]['fY']=0x0,this['pPanoPTZPoints'][_0x39846b][_0x15900e]['fX']=0x0,this['pPanoPTZPoints'][_0x39846b][_0x15900e]['fY']=0x0;if(this['pPTZSetColor'][_0x39846b]['bSetColor']&&(this['pPTZSetColor'][_0x39846b]['fA']=0x0,this['pPTZSetColor'][_0x39846b]['fR']=0x0,this['pPTZSetColor'][_0x39846b]['fG']=0x0,this['pPTZSetColor'][_0x39846b]['fB']=0x0,this['pPTZSetColor'][_0x39846b]['bSetColor']=!0x1),this['bPTZSelected'][_0x39846b]=!0x1,0x0!=this['nPlaceType']){for(var _0x5e1cd1=!0x1,_0x2f8358=0x0;_0x2f8358<0x20;++_0x2f8358)if(null!=this['pRenderParam'][_0x2f8358]&&(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_WALL']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_CYLINDER_CEILING']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==this['pRenderParam'][_0x2f8358]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==this['pRenderParam'][_0x2f8358]['nDisplayEffect'])){_0x5e1cd1=!0x0;break;}_0x5e1cd1||(this['nPlaceType']=0x0);}for(var _0x1ec290=!0x1,_0x401d8c=0x0;_0x401d8c<0x20;++_0x401d8c)if(null!=this['pRenderParam'][_0x401d8c]){_0x1ec290=!0x0;break;}_0x1ec290||(this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1),this['nPTZFragmentNum'][_0x39846b]=0x0;for(var _0x427559=0x0;_0x427559<0x64;++_0x427559)this['nPTZFragmentNode'][_0x39846b][_0x427559]=0x0;return this['bPortAllocated'][_0x39846b]=!0x1,_0x12eada['SR_OK'];}},{'key':'DeInit','value':function(){for(var _0x1332ba=0x0;_0x1332ba<0x20;++_0x1332ba){for(var _0x224e60=0x0;_0x224e60<0x4;++_0x224e60)this['pRectPoints'][_0x1332ba][_0x224e60]=null;for(var _0x2411b5=0x0;_0x2411b5<0x400;++_0x2411b5)this['pBasePTZPoints'][_0x1332ba][_0x2411b5]=null,this['pOriPTZPoints'][_0x1332ba][_0x2411b5]=null,this['pPanoPTZPoints'][_0x1332ba][_0x2411b5]=null;this['nPTZFragmentNum'][_0x1332ba]=0x0,this['nPTZFragmentNode'][_0x1332ba]=null,this['bPortAllocated'][_0x1332ba]=!0x1,this['bPTZSelected'][_0x1332ba]=!0x1,this['pRenderParam'][_0x1332ba]=null,this['pFishParam'][_0x1332ba]=null,this['stPTZColor'][_0x1332ba]=null,this['nBasePTZPointNum'][_0x1332ba]=0x0,this['nOriPTZPointNum'][_0x1332ba]=0x0,this['nPanoPTZPointNum'][_0x1332ba]=0x0,this['nPTZRectNum'][_0x1332ba]=0x0,this['pPanoPTZPoints'][_0x1332ba]=null,this['pRectPoints'][_0x1332ba]=null,this['pBasePTZPoints'][_0x1332ba]=null,this['pOriPTZPoints'][_0x1332ba]=null;}return this['bPortAllocated']=null,this['pRenderParam']=null,this['pFishParam']=null,this['stPTZColor']=null,this['nBasePTZPointNum']=null,this['nOriPTZPointNum']=null,this['nPanoPTZPointNum']=null,this['nPTZFragmentNum']=null,this['pBasePTZPoints']=null,this['pPanoPTZPoints']=null,this['pRectPoints']=null,this['nPTZRectNum']=null,this['nPTZDisplayMode']=_0x3b7ab3['SR_DM_NULL'],this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1,this['pOriPTZPoints']=null,this['pBasePTZPoints']=null,this['nWndPort']=-0x1,this['nPlaceType']=0x0,this['nPTZFragmentNode']=null,this['bPTZSelected']=null,this['nPTZDisplayMode']=_0x3b7ab3['SR_DM_RANGE'],_0x12eada['SR_OK'];}},{'key':'InitColorList','value':function(){this['stPTZColor'][0x0]['fR']=0.5,this['stPTZColor'][0x0]['fG']=0.5,this['stPTZColor'][0x0]['fB']=0x0,this['stPTZColor'][0x0]['fA']=0x1,this['stPTZColor'][0x1]['fR']=0x1,this['stPTZColor'][0x1]['fG']=0x0,this['stPTZColor'][0x1]['fB']=0x0,this['stPTZColor'][0x1]['fA']=0x1,this['stPTZColor'][0x2]['fR']=0x0,this['stPTZColor'][0x2]['fG']=0x1,this['stPTZColor'][0x2]['fB']=0x0,this['stPTZColor'][0x2]['fA']=0x1,this['stPTZColor'][0x3]['fR']=0x0,this['stPTZColor'][0x3]['fG']=0x0,this['stPTZColor'][0x3]['fB']=0x1,this['stPTZColor'][0x3]['fA']=0x1,this['stPTZColor'][0x4]['fR']=0x1,this['stPTZColor'][0x4]['fG']=0x1,this['stPTZColor'][0x4]['fB']=0x0,this['stPTZColor'][0x4]['fA']=0x1,this['stPTZColor'][0x5]['fR']=0.5,this['stPTZColor'][0x5]['fG']=0x0,this['stPTZColor'][0x5]['fB']=0x1,this['stPTZColor'][0x5]['fA']=0x1,this['stPTZColor'][0x6]['fR']=0x0,this['stPTZColor'][0x6]['fG']=0x1,this['stPTZColor'][0x6]['fB']=0x1,this['stPTZColor'][0x6]['fA']=0x1,this['stPTZColor'][0x7]['fR']=0x1,this['stPTZColor'][0x7]['fG']=0.5,this['stPTZColor'][0x7]['fB']=0x0,this['stPTZColor'][0x7]['fA']=0x1,this['stPTZColor'][0x8]['fR']=0x0,this['stPTZColor'][0x8]['fG']=0.5,this['stPTZColor'][0x8]['fB']=0.5,this['stPTZColor'][0x8]['fA']=0x1;for(var _0x1e6e85=0x9;_0x1e6e85<0x20;_0x1e6e85++)this['stPTZColor'][_0x1e6e85]['fR']=0x1*_0x1e6e85/0x20,this['stPTZColor'][_0x1e6e85]['fG']=0x1*_0x1e6e85/0x20,this['stPTZColor'][_0x1e6e85]['fB']=0x1*_0x1e6e85/0x20,this['stPTZColor'][_0x1e6e85]['fA']=0x1;return _0x12eada['SR_OK'];}},{'key':'GetRangePoints','value':function(_0x268d19){if(_0x268d19<0x0||_0x268d19>=0x20)return _0x12eada['SR_ERR_PARAM'];if(null==this['pRenderParam'][_0x268d19])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x4b35b4=0x0,_0x47818f=0x0;switch(this['nOriPTZPointNum'][_0x268d19]=0x0,this['nBasePTZPointNum'][_0x268d19]=0x0,this['pRenderParam'][_0x268d19]['nDisplayEffect']){case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:for(_0x47818f=0x0;_0x47818f<0x1;_0x47818f+=0.01)this['GetFishPTZCeiling'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0.9995,_0x4b35b4=0x0;_0x4b35b4<0x1;_0x4b35b4+=0.02)this['GetFishPTZCeiling'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x4b35b4=0.999,_0x47818f=0.9995;_0x47818f>=0x0;_0x47818f-=0.01)this['GetFishPTZCeiling'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0x0,_0x4b35b4=0.999;_0x4b35b4>=0x0;_0x4b35b4-=0.02)this['GetFishPTZCeiling'](_0x4b35b4,_0x47818f,_0x268d19);break;case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:for(_0x47818f=0x0;_0x47818f<0x1;_0x47818f+=0.01)this['GetFishPTZFloor'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0.9995,_0x4b35b4=0x0;_0x4b35b4<0x1;_0x4b35b4+=0.02)this['GetFishPTZFloor'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x4b35b4=0.999,_0x47818f=0.9995;_0x47818f>=0x0;_0x47818f-=0.01)this['GetFishPTZFloor'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0x0,_0x4b35b4=0.999;_0x4b35b4>=0x0;_0x4b35b4-=0.02)this['GetFishPTZFloor'](_0x4b35b4,_0x47818f,_0x268d19);break;case _0x4d466f['SR_DE_FISH_PTZ_WALL']:for(_0x47818f=0x0;_0x47818f<0x1;_0x47818f+=0.01)this['GetFishPTZWALL'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0.9995,_0x4b35b4=0x0;_0x4b35b4<0x1;_0x4b35b4+=0.02)this['GetFishPTZWALL'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x4b35b4=0.999,_0x47818f=0.9995;_0x47818f>=0x0;_0x47818f-=0.01)this['GetFishPTZWALL'](_0x4b35b4,_0x47818f,_0x268d19);for(_0x47818f=0x0,_0x4b35b4=0.999;_0x4b35b4>=0x0;_0x4b35b4-=0.02)this['GetFishPTZWALL'](_0x4b35b4,_0x47818f,_0x268d19);break;default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_OK'];}},{'key':'TransformPTZRangePoints','value':function(_0x461ec6){if(-0x1==this['nWndPort'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pBasePTZPoints'][_0x461ec6]||null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];this['nPanoPTZPointNum'][_0x461ec6]=0x0;var _0x5b6c8d=_0x12eada['SR_OK'],_0x3bf1f2=this['nWndPort'];switch(this['pRenderParam'][_0x3bf1f2]['nDisplayEffect']){case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:if(_0x5b6c8d=this['GetPanoPTZWall'](_0x461ec6),_0x12eada['SR_OK']!=_0x5b6c8d)return _0x5b6c8d;break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:if(_0x5b6c8d=this['GetPanoPTZFloor'](_0x461ec6),_0x12eada['SR_OK']!=_0x5b6c8d)return _0x5b6c8d;break;case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:if(_0x5b6c8d=this['GetPanoPTZCeiling'](_0x461ec6),_0x12eada['SR_OK']!=_0x5b6c8d)return _0x5b6c8d;}return this['CalcPTZFragmentPoints'](_0x461ec6),_0x12eada['SR_OK'];}},{'key':'GetRectPoints','value':function(_0x40142e){if(_0x40142e<0x0||_0x40142e>=0x20)return _0x12eada['SR_ERR_PARAM'];if(-0x1==this['nWndPort'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pRenderParam'][this['nWndPort']]||null==this['pFishParam'][_0x40142e])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x1271cd=this['pRenderParam'][this['nWndPort']]['nDisplayEffect'],_0x18c34c=_0x12eada['SR_OK'],_0x228598={'fX':0x0,'fY':0x0};switch(_0x1271cd){case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:if(_0x18c34c=this['GetPointFish2PanoWall'](_0x228598,this['pFishParam'][_0x40142e]['fPTZX'],this['pFishParam'][_0x40142e]['fPTZY']),_0x12eada['SR_OK']!=_0x18c34c)return _0x18c34c;break;case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:if(_0x18c34c=this['GetPointFish2PanoFloor'](_0x228598,this['pFishParam'][_0x40142e]['fPTZX'],this['pFishParam'][_0x40142e]['fPTZY']),_0x12eada['SR_OK']!=_0x18c34c)return _0x12eada['SR_ERR_NOT_SUPPORT']==_0x18c34c&&(this['pRectPoints'][_0x40142e]=null),_0x18c34c;break;case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:if(_0x18c34c=this['GetPointFish2PanoCeiling'](_0x228598,this['pFishParam'][_0x40142e]['fPTZX'],this['pFishParam'][_0x40142e]['fPTZY']),_0x12eada['SR_OK']!=_0x18c34c)return _0x12eada['SR_ERR_NOT_SUPPORT']==_0x18c34c&&(this['pRectPoints'][_0x40142e]=null),_0x18c34c;break;case _0x4d466f['SR_DE_FISH_ORIGINAL']:_0x228598['fX']=this['pFishParam'][_0x40142e]['fPTZX'],_0x228598['fY']=this['pFishParam'][_0x40142e]['fPTZY'];}if(null==this['pRectPoints'][_0x40142e]){this['pRectPoints'][_0x40142e]=[];for(var _0x43a2f2=0x0;_0x43a2f2<0x4;++_0x43a2f2)this['pRectPoints'][_0x40142e][_0x43a2f2]={},this['pRectPoints'][_0x40142e][_0x43a2f2]['fX']=0x0,this['pRectPoints'][_0x40142e][_0x43a2f2]['fY']=0x0;}return this['pRectPoints'][_0x40142e][0x0]['fX']=_0x228598['fX']-0.05,this['pRectPoints'][_0x40142e][0x0]['fY']=_0x228598['fY']-0.05,this['pRectPoints'][_0x40142e][0x1]['fX']=_0x228598['fX']+0.05,this['pRectPoints'][_0x40142e][0x1]['fY']=_0x228598['fY']-0.05,this['pRectPoints'][_0x40142e][0x2]['fX']=_0x228598['fX']+0.05,this['pRectPoints'][_0x40142e][0x2]['fY']=_0x228598['fY']+0.05,this['pRectPoints'][_0x40142e][0x3]['fX']=_0x228598['fX']-0.05,this['pRectPoints'][_0x40142e][0x3]['fY']=_0x228598['fY']+0.05,this['nPTZRectNum'][_0x40142e]=0x4,_0x12eada['SR_OK'];}},{'key':'GetFishPTZCeiling','value':function(_0x11b779,_0x1a2032,_0x3159ea){var _0x55b88e,_0x3ca13c,_0x4b8635,_0x523e75,_0x358dea,_0x410f67,_0x3a63c2,_0x45683a={'fX':0x0,'fY':0x0},_0x5022f9={'fX':0x0,'fY':0x0},_0x11d473={'fX':0x0,'fY':0x0},_0x2f4aa5={};_0x523e75=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x358dea=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x410f67=(this['fRY1']+this['fRY2'])/0x2*_0x523e75,_0x3a63c2=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x45683a['fX']=_0x1a2032-0.5,_0x45683a['fY']=0.5-_0x11b779,_0x55b88e=this['pRenderParam'][_0x3159ea]['fZoom'],_0x5022f9['fX']=_0x45683a['fX'],_0x5022f9['fY']=_0x45683a['fY']*this['pRenderParam'][_0x3159ea]['fCosV']+_0x55b88e*this['pRenderParam'][_0x3159ea]['fSinV'],_0x3ca13c=_0x55b88e*this['pRenderParam'][_0x3159ea]['fCosV']-_0x45683a['fY']*this['pRenderParam'][_0x3159ea]['fSinV'],_0x4b8635=Math['sqrt'](_0x5022f9['fX']*_0x5022f9['fX']+_0x5022f9['fY']*_0x5022f9['fY']);var _0x38a4e3=Math['sqrt'](_0x5022f9['fX']*_0x5022f9['fX']+_0x5022f9['fY']*_0x5022f9['fY']+_0x3ca13c*_0x3ca13c),_0x3bddbe=Math['asin'](_0x4b8635/_0x38a4e3)/1.5707963*0.5;_0x5022f9['fX']=_0x3bddbe*_0x5022f9['fX']/_0x4b8635,_0x5022f9['fY']=_0x3bddbe*_0x5022f9['fY']/_0x4b8635,_0x11d473['fX']=_0x5022f9['fX']*this['pRenderParam'][_0x3159ea]['fCosH']-_0x5022f9['fY']*this['pRenderParam'][_0x3159ea]['fSinH'],_0x11d473['fY']=_0x5022f9['fX']*this['pRenderParam'][_0x3159ea]['fSinH']+_0x5022f9['fY']*this['pRenderParam'][_0x3159ea]['fCosH'],_0x2f4aa5['fX']=0x2*_0x11d473['fX']*_0x3a63c2+_0x358dea,_0x2f4aa5['fY']=0x2*-_0x11d473['fY']*_0x3a63c2+_0x410f67;var _0x2ebd4d=this['nBasePTZPointNum'][_0x3159ea];this['pBasePTZPoints'][_0x3159ea][_0x2ebd4d]['fX']=_0x11d473['fX']+0.5,this['pBasePTZPoints'][_0x3159ea][_0x2ebd4d]['fY']=0.5-_0x11d473['fY'],this['nBasePTZPointNum'][_0x3159ea]=this['nBasePTZPointNum'][_0x3159ea]+0x1;var _0x298f4e=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x80356e=this['fRY1']<=0x0?0x0:this['fRY1']*_0x523e75,_0xcc0b83=this['fRX2']>=0x1?0x1-_0x298f4e:0x1*this['fRX2']-_0x298f4e,_0x26526c=this['fRY2']>=0x1?_0x523e75-_0x80356e:this['fRY2']*_0x523e75-_0x80356e;if(_0x2f4aa5['fX']=(_0x2f4aa5['fX']-_0x298f4e)/_0xcc0b83,_0x2f4aa5['fY']=(_0x2f4aa5['fY']-_0x80356e)/_0x26526c,_0x2f4aa5['fX']<=0x1&&_0x2f4aa5['fY']<=0x1&&_0x2f4aa5['fX']>=0x0&&_0x2f4aa5['fY']>=0x0){var _0x171b27=this['nOriPTZPointNum'][_0x3159ea];this['pOriPTZPoints'][_0x3159ea][_0x171b27]['fX']=_0x2f4aa5['fX'],this['pOriPTZPoints'][_0x3159ea][_0x171b27]['fY']=_0x2f4aa5['fY'],this['nOriPTZPointNum'][_0x3159ea]=this['nOriPTZPointNum'][_0x3159ea]+0x1;}return _0x12eada['SR_OK'];}},{'key':'GetFishPTZFloor','value':function(_0x337438,_0x3d462e,_0x1f10c3){var _0x15418f,_0x3b1a2c,_0x129f64,_0x27e225,_0xc57d36,_0x3f05aa,_0x48764f,_0x17df7b={'fX':0x0,'fY':0x0},_0x596cbe={'fX':0x0,'fY':0x0},_0x3bc426={'fX':0x0,'fY':0x0},_0x29bc7e={};_0x27e225=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0xc57d36=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x3f05aa=(this['fRY1']+this['fRY2'])/0x2*_0x27e225,_0x48764f=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x17df7b['fX']=_0x337438-0.5,_0x17df7b['fY']=_0x3d462e-0.5,_0x15418f=this['pRenderParam'][_0x1f10c3]['fZoom'],_0x596cbe['fX']=_0x17df7b['fX'],_0x596cbe['fY']=_0x17df7b['fY']*this['pRenderParam'][_0x1f10c3]['fCosV']+_0x15418f*this['pRenderParam'][_0x1f10c3]['fSinV'],_0x3b1a2c=_0x15418f*this['pRenderParam'][_0x1f10c3]['fCosV']-_0x17df7b['fY']*this['pRenderParam'][_0x1f10c3]['fSinV'],_0x129f64=Math['sqrt'](_0x596cbe['fX']*_0x596cbe['fX']+_0x596cbe['fY']*_0x596cbe['fY']);var _0x2994f9=Math['sqrt'](_0x596cbe['fX']*_0x596cbe['fX']+_0x596cbe['fY']*_0x596cbe['fY']+_0x3b1a2c*_0x3b1a2c),_0x2e4d70=Math['asin'](_0x129f64/_0x2994f9)/1.5707963*0.5;_0x596cbe['fX']=_0x2e4d70*_0x596cbe['fX']/_0x129f64,_0x596cbe['fY']=_0x2e4d70*_0x596cbe['fY']/_0x129f64,_0x3bc426['fX']=_0x596cbe['fX']*this['pRenderParam'][_0x1f10c3]['fCosH']-_0x596cbe['fY']*this['pRenderParam'][_0x1f10c3]['fSinH'],_0x3bc426['fY']=_0x596cbe['fX']*this['pRenderParam'][_0x1f10c3]['fSinH']+_0x596cbe['fY']*this['pRenderParam'][_0x1f10c3]['fCosH'],_0x29bc7e['fX']=0x2*_0x3bc426['fX']*_0x48764f+_0xc57d36,_0x29bc7e['fY']=0x2*_0x3bc426['fY']*_0x48764f+_0x3f05aa;var _0x35e2a0=this['nBasePTZPointNum'][_0x1f10c3];this['pBasePTZPoints'][_0x1f10c3][_0x35e2a0]['fX']=_0x3bc426['fX']+0.5,this['pBasePTZPoints'][_0x1f10c3][_0x35e2a0]['fY']=_0x3bc426['fY']+0.5,this['nBasePTZPointNum'][_0x1f10c3]=this['nBasePTZPointNum'][_0x1f10c3]+0x1;var _0x4eef18=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x381751=this['fRY1']<=0x0?0x0:this['fRY1']*_0x27e225,_0x26bfa1=this['fRX2']>=0x1?0x1-_0x4eef18:0x1*this['fRX2']-_0x4eef18,_0x5d1acc=this['fRY2']>=0x1?_0x27e225-_0x381751:this['fRY2']*_0x27e225-_0x381751;if(_0x29bc7e['fX']=(_0x29bc7e['fX']-_0x4eef18)/_0x26bfa1,_0x29bc7e['fY']=(_0x29bc7e['fY']-_0x381751)/_0x5d1acc,_0x29bc7e['fX']<=0x1&&_0x29bc7e['fY']<=0x1&&_0x29bc7e['fX']>=0x0&&_0x29bc7e['fY']>=0x0){var _0xddb2f1=this['nOriPTZPointNum'][_0x1f10c3];this['pOriPTZPoints'][_0x1f10c3][_0xddb2f1]['fX']=_0x29bc7e['fX'],this['pOriPTZPoints'][_0x1f10c3][_0xddb2f1]['fY']=_0x29bc7e['fY'],this['nOriPTZPointNum'][_0x1f10c3]=this['nOriPTZPointNum'][_0x1f10c3]+0x1;}return _0x12eada['SR_OK'];}},{'key':'GetFishPTZWALL','value':function(_0x49f343,_0x3d0f33,_0x2cfea0){var _0x3a8be9,_0x5091c4,_0x1208c8,_0x4cb7e3,_0x367d55,_0x2f5770,_0x5ed625,_0x1938c0,_0x1ecee4={'fX':0x0,'fY':0x0},_0x9b5143={'fX':0x0,'fY':0x0},_0x57763d={'fX':0x0,'fY':0x0},_0x178214={};_0x367d55=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x2f5770=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x5ed625=(this['fRY1']+this['fRY2'])/0x2*_0x367d55,_0x1938c0=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x1ecee4['fX']=_0x3d0f33-0.5,_0x1ecee4['fY']=_0x49f343-0.5,_0x3a8be9=this['pRenderParam'][_0x2cfea0]['fZoom'],_0x9b5143['fX']=_0x1ecee4['fX'],_0x9b5143['fY']=_0x1ecee4['fY']*this['pRenderParam'][_0x2cfea0]['fCosV']+_0x3a8be9*this['pRenderParam'][_0x2cfea0]['fSinV'],_0x5091c4=_0x3a8be9*this['pRenderParam'][_0x2cfea0]['fCosV']-_0x1ecee4['fY']*this['pRenderParam'][_0x2cfea0]['fSinV'],_0x57763d['fX']=_0x9b5143['fX']*this['pRenderParam'][_0x2cfea0]['fCosH']+_0x5091c4*this['pRenderParam'][_0x2cfea0]['fSinH'],_0x57763d['fY']=_0x9b5143['fY'],_0x1208c8=_0x5091c4*this['pRenderParam'][_0x2cfea0]['fCosH']-_0x9b5143['fX']*this['pRenderParam'][_0x2cfea0]['fSinH'],_0x4cb7e3=Math['sqrt'](_0x57763d['fX']*_0x57763d['fX']+_0x57763d['fY']*_0x57763d['fY']);var _0x533530=Math['sqrt'](_0x57763d['fX']*_0x57763d['fX']+_0x57763d['fY']*_0x57763d['fY']+_0x1208c8*_0x1208c8),_0x8b7bc1=Math['asin'](_0x4cb7e3/_0x533530)/1.5707963*0.5;_0x178214['fX']=_0x8b7bc1*_0x57763d['fX']/_0x4cb7e3*_0x1938c0*0x2+_0x2f5770,_0x178214['fY']=_0x8b7bc1*_0x57763d['fY']/_0x4cb7e3*_0x1938c0*0x2+_0x5ed625;var _0x507c3a=this['nBasePTZPointNum'][_0x2cfea0];this['pBasePTZPoints'][_0x2cfea0][_0x507c3a]['fX']=_0x8b7bc1*_0x57763d['fX']/_0x4cb7e3+0.5,this['pBasePTZPoints'][_0x2cfea0][_0x507c3a]['fY']=_0x8b7bc1*_0x57763d['fY']/_0x4cb7e3+0.5,this['nBasePTZPointNum'][_0x2cfea0]=this['nBasePTZPointNum'][_0x2cfea0]+0x1;var _0x30ccb3=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x2980f2=this['fRY1']<=0x0?0x0:this['fRY1']*_0x367d55,_0x53c399=this['fRX2']>=0x1?0x1-_0x30ccb3:0x1*this['fRX2']-_0x30ccb3,_0x49a153=this['fRY2']>=0x1?_0x367d55-_0x2980f2:this['fRY2']*_0x367d55-_0x2980f2;if(_0x178214['fX']=(_0x178214['fX']-_0x30ccb3)/_0x53c399,_0x178214['fY']=(_0x178214['fY']-_0x2980f2)/_0x49a153,_0x178214['fX']<=0x1&&_0x178214['fY']<=0x1&&_0x178214['fX']>=0x0&&_0x178214['fY']>=0x0){var _0x439951=this['nOriPTZPointNum'][_0x2cfea0];this['pOriPTZPoints'][_0x2cfea0][_0x439951]['fX']=_0x178214['fX'],this['pOriPTZPoints'][_0x2cfea0][_0x439951]['fY']=_0x178214['fY'],this['nOriPTZPointNum'][_0x2cfea0]=this['nOriPTZPointNum'][_0x2cfea0]+0x1;}return _0x12eada['SR_OK'];}},{'key':'GetPanoPTZCeiling','value':function(_0x1bdce8){if(null==this['pRenderParam'][_0x1bdce8]||null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pBasePTZPoints'][_0x1bdce8])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x1e0204,_0x218418,_0x39d8fd=this['nBasePTZPointNum'][_0x1bdce8];_0x1e0204=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x218418=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x146cd8,_0xba3e6b=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRY1']<0x0||this['fRX1']<0x0)&&(this['fRX1']<0x0&&(_0x146cd8=0x1*-this['fRX1'])>_0xba3e6b&&(_0xba3e6b=_0x146cd8),this['fRX2']>0x1&&(_0x146cd8=0x1*(this['fRX2']-0x1))>_0xba3e6b&&(_0xba3e6b=_0x146cd8),this['fRY1']<0x0&&(_0x146cd8=-this['fRY1']*_0x1e0204)>_0xba3e6b&&(_0xba3e6b=_0x146cd8),this['fRY2']>0x1&&(_0x146cd8=(this['fRY2']-0x1)*_0x1e0204)>_0xba3e6b&&(_0xba3e6b=_0x146cd8));for(var _0x5319c3,_0x3f3a91=_0xba3e6b/_0x218418,_0x5bb31b={'fX':0x0,'fY':0x0},_0x188d27={'fX':0x0,'fY':0x0},_0x52cadb=0x0;_0x52cadb<_0x39d8fd;++_0x52cadb)if(_0x188d27['fX']=this['pBasePTZPoints'][_0x1bdce8][_0x52cadb]['fX'],_0x188d27['fY']=this['pBasePTZPoints'][_0x1bdce8][_0x52cadb]['fY'],!(Math['abs'](_0x188d27['fX']-0.5)<0.000001&&Math['abs'](_0x188d27['fY']-0.5)<0.000001)){var _0x111bd3={'fX':0x0,'fY':0x0},_0x32543b={'fX':0x0,'fY':0x0};_0x111bd3['fX']=_0x188d27['fX']-0.5,_0x111bd3['fY']=_0x188d27['fY']-0.5,_0x32543b['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x32543b['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x4c8680=Math['sqrt'](_0x111bd3['fX']*_0x111bd3['fX']+_0x111bd3['fY']*_0x111bd3['fY']),_0x507a63=Math['sqrt'](_0x32543b['fX']*_0x32543b['fX']+_0x32543b['fY']*_0x32543b['fY']);if(_0x5319c3=Math['acos']((_0x111bd3['fX']*_0x32543b['fX']+_0x111bd3['fY']*_0x32543b['fY'])/(_0x4c8680*_0x507a63)),_0x111bd3['fX']*_0x32543b['fY']-_0x111bd3['fY']*_0x32543b['fX']>0x0&&(_0x5319c3=6.2831852-_0x5319c3),_0x5bb31b['fX']=_0x5319c3/6.2831853,_0x5bb31b['fY']=(0x2*(0.5-_0x4c8680)-_0x3f3a91)/(0.8-_0x3f3a91),_0x5bb31b['fY']>=0x0&&_0x5bb31b['fX']>=0x0&&_0x5bb31b['fY']<=0x1&&_0x5bb31b['fX']<=0x1){var _0x19a2e6=this['nPanoPTZPointNum'][_0x1bdce8];this['pPanoPTZPoints'][_0x1bdce8][_0x19a2e6]['fX']=_0x5bb31b['fX'],this['pPanoPTZPoints'][_0x1bdce8][_0x19a2e6]['fY']=_0x5bb31b['fY'],this['nPanoPTZPointNum'][_0x1bdce8]=this['nPanoPTZPointNum'][_0x1bdce8]+0x1;}}return _0x12eada['SR_OK'];}},{'key':'GetPanoPTZFloor','value':function(_0x4dbda6){if(null==this['pRenderParam'][_0x4dbda6]||null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pBasePTZPoints'][_0x4dbda6])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x2b6ecc,_0x300bf3,_0x48b9cb=this['nBasePTZPointNum'][_0x4dbda6];_0x2b6ecc=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x300bf3=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x51aa45,_0x5887b1=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRY1']<0x0||this['fRX1']<0x0)&&(this['fRX1']<0x0&&(_0x51aa45=0x1*-this['fRX1'])>_0x5887b1&&(_0x5887b1=_0x51aa45),this['fRX2']>0x1&&(_0x51aa45=0x1*(this['fRX2']-0x1))>_0x5887b1&&(_0x5887b1=_0x51aa45),this['fRY1']<0x0&&(_0x51aa45=-this['fRY1']*_0x2b6ecc)>_0x5887b1&&(_0x5887b1=_0x51aa45),this['fRY2']>0x1&&(_0x51aa45=(this['fRY2']-0x1)*_0x2b6ecc)>_0x5887b1&&(_0x5887b1=_0x51aa45));for(var _0x310877,_0x17a31e=_0x5887b1/_0x300bf3,_0x4f0557={'fX':0x0,'fY':0x0},_0x5af560={'fX':0x0,'fY':0x0},_0x4f7bbf=0x0;_0x4f7bbf<_0x48b9cb;++_0x4f7bbf)if(_0x5af560['fX']=this['pBasePTZPoints'][_0x4dbda6][_0x4f7bbf]['fX'],_0x5af560['fY']=this['pBasePTZPoints'][_0x4dbda6][_0x4f7bbf]['fY'],!(Math['abs'](_0x5af560['fX']-0.5)<0.000001&&Math['abs'](_0x5af560['fY']-0.5)<0.000001)){var _0x1241a8={'fX':0x0,'fY':0x0},_0x1136eb={'fX':0x0,'fY':0x0};_0x1241a8['fX']=_0x5af560['fX']-0.5,_0x1241a8['fY']=_0x5af560['fY']-0.5,_0x1136eb['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x1136eb['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x18f0d7=Math['sqrt'](_0x1241a8['fX']*_0x1241a8['fX']+_0x1241a8['fY']*_0x1241a8['fY']),_0x2614a4=Math['sqrt'](_0x1136eb['fX']*_0x1136eb['fX']+_0x1136eb['fY']*_0x1136eb['fY']);if(_0x310877=Math['acos']((_0x1241a8['fX']*_0x1136eb['fX']+_0x1241a8['fY']*_0x1136eb['fY'])/(_0x18f0d7*_0x2614a4)),_0x1241a8['fX']*_0x1136eb['fY']-_0x1241a8['fY']*_0x1136eb['fX']>0x0&&(_0x310877=6.2831852-_0x310877),_0x4f0557['fX']=0x1-_0x310877/6.2831853,_0x4f0557['fY']=0x1-(0x2*(0.5-_0x18f0d7)-_0x17a31e)/(0.8-_0x17a31e),_0x4f0557['fY']>=0x0&&_0x4f0557['fX']>=0x0&&_0x4f0557['fY']<=0x1&&_0x4f0557['fX']<=0x1){var _0x3ce9b4=this['nPanoPTZPointNum'][_0x4dbda6];this['pPanoPTZPoints'][_0x4dbda6][_0x3ce9b4]['fX']=_0x4f0557['fX'],this['pPanoPTZPoints'][_0x4dbda6][_0x3ce9b4]['fY']=_0x4f0557['fY'],this['nPanoPTZPointNum'][_0x4dbda6]=this['nPanoPTZPointNum'][_0x4dbda6]+0x1;}}return _0x12eada['SR_OK'];}},{'key':'GetPanoPTZWall','value':function(_0x25c3c8){if(null==this['pRenderParam'][_0x25c3c8]||null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pBasePTZPoints'][_0x25c3c8])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x4b3314,_0x55ff12,_0x218a32=this['nBasePTZPointNum'][_0x25c3c8];_0x4b3314=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x55ff12=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x2c7a39,_0x429b2c,_0x56aa54,_0x3d3e5a,_0x2447c8,_0x29d0a4=0x0,_0x406710=0x1,_0x5595cf=0.1,_0x338379=0.9;this['fRX1']<0x0&&(_0x2c7a39=0x1*-this['fRX1'],_0x29d0a4=_0x2c7a39/=0x2*_0x55ff12),this['fRX2']>0x1&&(_0x429b2c=0x1*(this['fRX2']-0x1),_0x406710=0x1-(_0x429b2c/=0x2*_0x55ff12)),this['fRY1']<0x0&&(_0x56aa54=-this['fRY1']*_0x4b3314,_0x5595cf=(_0x56aa54/=0x2*_0x55ff12)>0.1?_0x56aa54:0.1),this['fRY2']>0x1&&(_0x3d3e5a=(this['fRY2']-0x1)*_0x4b3314,_0x338379=(_0x3d3e5a/=0x2*_0x55ff12)>0x1-0.9?0x1-_0x3d3e5a:0.9);for(var _0x3b0545={'fX':0x0,'fY':0x0},_0x585b69={'fX':0x0,'fY':0x0},_0x13db1c=0x0;_0x13db1c<_0x218a32;++_0x13db1c){_0x585b69['fX']=this['pBasePTZPoints'][_0x25c3c8][_0x13db1c]['fX'],_0x585b69['fY']=this['pBasePTZPoints'][_0x25c3c8][_0x13db1c]['fY'];var _0x5cb97a=0x2*_0x585b69['fX']*_0x55ff12,_0x860f56=0x2*_0x585b69['fY']*_0x55ff12;if(_0x2447c8=Math['sqrt'](_0x55ff12*_0x55ff12-(_0x860f56-_0x55ff12)*(_0x860f56-_0x55ff12)),!(Math['abs'](_0x2447c8)<0.000001)&&(_0x585b69['fX']=_0x55ff12*(_0x5cb97a-_0x55ff12)/_0x2447c8+_0x55ff12,_0x585b69['fY']=_0x860f56,_0x3b0545['fX']=(_0x585b69['fX']-0x2*_0x29d0a4*_0x55ff12)/(0x2*(_0x406710-_0x29d0a4)*_0x55ff12),_0x3b0545['fY']=(_0x585b69['fY']-0x2*_0x5595cf*_0x55ff12)/(0x2*(_0x338379-_0x5595cf)*_0x55ff12),_0x3b0545['fY']>=0x0&&_0x3b0545['fX']>=0x0&&_0x3b0545['fY']<=0x1&&_0x3b0545['fX']<=0x1)){var _0x52279d=this['nPanoPTZPointNum'][_0x25c3c8];this['pPanoPTZPoints'][_0x25c3c8][_0x52279d]['fX']=_0x3b0545['fX'],this['pPanoPTZPoints'][_0x25c3c8][_0x52279d]['fY']=_0x3b0545['fY'],this['nPanoPTZPointNum'][_0x25c3c8]=this['nPanoPTZPointNum'][_0x25c3c8]+0x1;}}return _0x12eada['SR_OK'];}},{'key':'GetPointPano2FishCeiling','value':function(_0x3ca737,_0x1c348b,_0xff65ff){if(null==_0x3ca737||null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x2d1869,_0x5529dd;_0x2d1869=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x5529dd=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x2662f8,_0x488e4c=0x0,_0x5850c5=0x1,_0x5f397f=0x0,_0x3bd430=0x1,_0x140f06=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&((_0x2662f8=0x1*-this['fRX1'])>_0x140f06&&(_0x140f06=_0x2662f8),_0x488e4c=_0x2662f8/=0x2*_0x5529dd),this['fRX2']>0x1&&((_0x2662f8=0x1*(this['fRX2']-0x1))>_0x140f06&&(_0x140f06=_0x2662f8),_0x5850c5=0x1-(_0x2662f8/=0x2*_0x5529dd)),this['fRY1']<0x0&&((_0x2662f8=-this['fRY1']*_0x2d1869)>_0x140f06&&(_0x140f06=_0x2662f8),_0x5f397f=_0x2662f8/=0x2*_0x5529dd),this['fRY2']>0x1&&((_0x2662f8=(this['fRY2']-0x1)*_0x2d1869)>_0x140f06&&(_0x140f06=_0x2662f8),_0x3bd430=0x1-(_0x2662f8/=0x2*_0x5529dd)));var _0x554697,_0x53d02d,_0x5e14ce=_0x140f06/_0x5529dd,_0x407593={},_0x59ef16={};return _0x407593['fX']=_0x1c348b,_0x407593['fY']=(0.8-_0x5e14ce)*_0xff65ff+_0x5e14ce,_0x554697=6.2831853*_0x407593['fX']+this['pRenderParam'][this['nWndPort']]['fAngle'],_0x53d02d=0.5*(0x1-_0x407593['fY']),_0x59ef16['fX']=0.5-_0x53d02d*Math['sin'](_0x554697),_0x59ef16['fY']=0.5+_0x53d02d*Math['cos'](_0x554697),_0x59ef16['fX']=(_0x59ef16['fX']-_0x488e4c)/(_0x5850c5-_0x488e4c),_0x59ef16['fY']=(_0x59ef16['fY']-_0x5f397f)/(_0x3bd430-_0x5f397f),_0x3ca737['fX']=_0x59ef16['fX'],_0x3ca737['fY']=_0x59ef16['fY'],_0x12eada['SR_OK'];}},{'key':'GetPointPano2FishFloor','value':function(_0x3403f7,_0x1309e3,_0x3ae759){if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x3403f7)return _0x12eada['SR_ERR_PARAM'];var _0x159bbe,_0x1fb0ed;_0x159bbe=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x1fb0ed=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x277c1c,_0x1b95e3=0x0,_0x5d1e70=0x1,_0x50efdd=0x0,_0x153b63=0x1,_0x35f246=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&((_0x277c1c=0x1*-this['fRX1'])>_0x35f246&&(_0x35f246=_0x277c1c),_0x1b95e3=_0x277c1c/=0x2*_0x1fb0ed),this['fRX2']>0x1&&((_0x277c1c=0x1*(this['fRX2']-0x1))>_0x35f246&&(_0x35f246=_0x277c1c),_0x5d1e70=0x1-(_0x277c1c/=0x2*_0x1fb0ed)),this['fRY1']<0x0&&((_0x277c1c=-this['fRY1']*_0x159bbe)>_0x35f246&&(_0x35f246=_0x277c1c),_0x50efdd=_0x277c1c/=0x2*_0x1fb0ed),this['fRY2']>0x1&&((_0x277c1c=(this['fRY2']-0x1)*_0x159bbe)>_0x35f246&&(_0x35f246=_0x277c1c),_0x153b63=0x1-(_0x277c1c/=0x2*_0x1fb0ed)));var _0x95af29,_0x501488,_0x33fd35=_0x35f246/_0x1fb0ed,_0x3fea72={},_0x9d045d={};return _0x3fea72['fX']=0x1-_0x1309e3,_0x3fea72['fY']=(0.8-_0x33fd35)*(0x1-_0x3ae759)+_0x33fd35,_0x95af29=6.2831853*_0x3fea72['fX']+this['pRenderParam'][this['nWndPort']]['fAngle'],_0x501488=0.5*(0x1-_0x3fea72['fY']),_0x9d045d['fX']=0.5-_0x501488*Math['sin'](_0x95af29),_0x9d045d['fY']=0.5+_0x501488*Math['cos'](_0x95af29),_0x9d045d['fX']=(_0x9d045d['fX']-_0x1b95e3)/(_0x5d1e70-_0x1b95e3),_0x9d045d['fY']=(_0x9d045d['fY']-_0x50efdd)/(_0x153b63-_0x50efdd),_0x3403f7['fX']=_0x9d045d['fX'],_0x3403f7['fY']=_0x9d045d['fY'],_0x12eada['SR_OK'];}},{'key':'GetPointPano2FishWall','value':function(_0x5e97cc,_0x13f165,_0x546fa4){if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x5e97cc)return _0x12eada['SR_ERR_PARAM'];var _0x5b42ad,_0x97a6e6;_0x5b42ad=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x97a6e6=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x270df4,_0x511c2e,_0x299837,_0x550b45,_0x31e7b7=0x0,_0x518bba=0x1,_0x5e878f=0.1,_0x5803fe=0.9,_0x5584d6=0x0,_0x1daf58=0x1,_0x1519a8=0x0,_0x3721c0=0x1;this['fRX1']<0x0&&(_0x270df4=0x1*-this['fRX1'],_0x31e7b7=_0x270df4/=0x2*_0x97a6e6,_0x5584d6=_0x270df4),this['fRX2']>0x1&&(_0x511c2e=0x1*(this['fRX2']-0x1),_0x518bba=0x1-(_0x511c2e/=0x2*_0x97a6e6),_0x1daf58=0x1-_0x511c2e),this['fRY1']<0x0&&(_0x299837=-this['fRY1']*_0x5b42ad,_0x5e878f=(_0x299837/=0x2*_0x97a6e6)>0.1?_0x299837:0.1,_0x1519a8=_0x299837),this['fRY2']>0x1&&(_0x550b45=(this['fRY2']-0x1)*_0x5b42ad,_0x5803fe=(_0x550b45/=0x2*_0x97a6e6)>0x1-0.9?0x1-_0x550b45:0.9,_0x3721c0=0x1-_0x550b45);var _0x304871={},_0x166890={};_0x304871['fX']=_0x13f165*(_0x518bba-_0x31e7b7)+_0x31e7b7,_0x304871['fY']=_0x546fa4*(_0x5803fe-_0x5e878f)+_0x5e878f;var _0x49ee13=Math['sqrt'](0.25-(_0x304871['fY']-0.5)*(_0x304871['fY']-0.5));return _0x166890['fX']=(_0x304871['fX']-0.5)*_0x49ee13/0.5+0.5,_0x166890['fY']=_0x304871['fY'],_0x166890['fX']=(_0x166890['fX']-_0x5584d6)/(_0x1daf58-_0x5584d6),_0x166890['fY']=(_0x166890['fY']-_0x1519a8)/(_0x3721c0-_0x1519a8),_0x5e97cc['fX']=_0x166890['fX'],_0x5e97cc['fY']=_0x166890['fY'],_0x12eada['SR_OK'];}},{'key':'UpdatePTZPosition','value':function(_0x344005,_0x489379,_0xc348c7){if(null==this['pRenderParam'][_0x344005])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x5a24e8={'fHAngleSin':0x0,'fHAngleCos':0x0,'fVAngleSin':0x0,'fVAngleCos':0x0},_0x3e1ec1=_0x12eada['SR_OK'];if(_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x344005]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x344005]['nDisplayEffect']){if((_0x3e1ec1=this['ComputeAngleVertical'](_0x489379,_0xc348c7,_0x5a24e8,this['pRenderParam'][_0x344005]['nDisplayEffect']))!=_0x12eada['SR_OK'])return _0x3e1ec1;}else{if(_0x4d466f['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x344005]['nDisplayEffect'])return _0x12eada['SR_ERR_NOT_SUPPORT'];if((_0x3e1ec1=this['ComputeAngleHorizontal'](_0x489379,_0xc348c7,_0x5a24e8))!=_0x12eada['SR_OK'])return _0x3e1ec1;}return 0x0==this['IsInImage'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2'],_0x5a24e8,this['pRenderParam'][_0x344005]['fZoom'],this['pRenderParam'][_0x344005]['nDisplayEffect'])?_0x12eada['SR_ERR_PARAM']:(this['pRenderParam'][_0x344005]['fCosH']=_0x5a24e8['fHAngleCos'],this['pRenderParam'][_0x344005]['fSinH']=_0x5a24e8['fHAngleSin'],this['pRenderParam'][_0x344005]['fCosV']=_0x5a24e8['fVAngleCos'],this['pRenderParam'][_0x344005]['fSinV']=_0x5a24e8['fVAngleSin'],_0x12eada['SR_OK']);}},{'key':'JudgeDisplayEffect','value':function(_0x1513e5){var _0x37660e=0x0;switch(_0x37660e){case 0x0:return _0x37660e=this['GetPlaceType'](_0x1513e5),0x4==this['nPlaceType']&&(this['nPlaceType']=0x0),_0x12eada['SR_OK'];case 0x3:return(_0x37660e=this['GetPlaceType'](_0x1513e5))==this['nPlaceType']||0x4==this['nPlaceType']?_0x12eada['SR_OK']:_0x12eada['SR_ERR_NOT_SUPPORT'];case 0x2:case 0x1:return(_0x37660e=this['GetPlaceType'](_0x1513e5))==this['nPlaceType']||0x4==_0x37660e?_0x12eada['SR_OK']:_0x12eada['SR_ERR_NOT_SUPPORT'];default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return _0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'GetPlaceType','value':function(_0x3cf74e){switch(_0x3cf74e){case _0x4d466f['SR_DE_FISH_PTZ_CEILING']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x4d466f['SR_DE_FISH_CYLINDER_CEILING']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:return 0x3;case _0x4d466f['SR_DE_FISH_PTZ_FLOOR']:case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x4d466f['SR_DE_FISH_PANARAMA_FLOOR_180']:case _0x4d466f['SR_DE_FISH_CYLINDER_FLOOR']:case _0x4d466f['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:return 0x2;case _0x4d466f['SR_DE_FISH_PTZ_WALL']:case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x4d466f['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:return 0x1;case _0x4d466f['SR_DE_FISH_SEMISPHERE']:case _0x4d466f['SR_DE_FISH_ORIGINAL']:case _0x4d466f['SR_DE_FISH_PLANET']:case _0x4d466f['SR_DE_PANORAMA_SPHERE']:case _0x4d466f['SR_DE_PANORAMA_PLANET']:return 0x4;default:return 0x0;}return 0x0;}},{'key':'SetFishParam','value':function(_0x57e48a,_0x1e44a5){if(_0x57e48a<0x0||_0x57e48a>=0x20)return _0x12eada['SR_ERR_PARAM'];if(null==_0x1e44a5)return _0x12eada['SR_ERR_PARAM'];if(null==this['pRenderParam'][_0x57e48a])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x198ee8=_0x12eada['SR_OK'];switch(_0x1e44a5['nFishParamType']){case _0x1a6379['SR_FPT_CENTER']:if((_0x198ee8=this['UpdateCircyeParam'](_0x1e44a5['fRXLeft'],_0x1e44a5['fRXRight'],_0x1e44a5['fRYTop'],_0x1e44a5['fRYBottom']))!=_0x12eada['SR_OK'])return _0x198ee8;this['pRenderParam'][_0x57e48a]['bCut']=_0x1e44a5['bCut'],this['bBlack']=_0x1e44a5['bBlack'];break;case _0x1a6379['SR_FPT_ANGLE']:if(_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect'])return _0x12eada['SR_ERR_NOT_SUPPORT'];if((_0x198ee8=this['UpdateWideScanAngle'](_0x57e48a,_0x1e44a5['fAngle']))!=_0x12eada['SR_OK'])return _0x198ee8;this['pFishParam'][_0x57e48a]['fAngle']=_0x1e44a5['fAngle'];break;case _0x1a6379['SR_FPT_ZOOM']:if(_0x4d466f['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect'])return _0x12eada['SR_ERR_NOT_SUPPORT'];if((_0x198ee8=this['UpdateRangeParam'](_0x57e48a,_0x1e44a5['fZoom']))!=_0x12eada['SR_OK'])return _0x198ee8;this['pFishParam'][_0x57e48a]['fZoom']=_0x1e44a5['fZoom'];break;case _0x1a6379['SR_FPT_PTZ']:if(_0x4d466f['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x57e48a]['nDisplayEffect'])return _0x12eada['SR_ERR_NOT_SUPPORT'];if((_0x198ee8=this['UpdatePTZPosition'](_0x57e48a,_0x1e44a5['fPTZX'],_0x1e44a5['fPTZY'],this['pRenderParam'][_0x57e48a]['fZoom'],!0x0))!=_0x12eada['SR_OK'])return _0x198ee8;this['pFishParam'][_0x57e48a]['fPTZX']=_0x1e44a5['fPTZX'],this['pFishParam'][_0x57e48a]['fPTZY']=_0x1e44a5['fPTZY'];break;case _0x1a6379['SR_FPT_NULL']:default:return _0x12eada['SR_ERR_NOT_SUPPORT'];}return this['ComputePTZPoints'](),_0x12eada['SR_OK'];}},{'key':'GetFishParam','value':function(_0x157bfb,_0x583e23){return _0x157bfb<0x0||_0x157bfb>=0x20||null==_0x583e23||null==this['pFishParam'][_0x157bfb]?_0x12eada['SR_ERR_PARAM']:(_0x583e23['fRXLeft']=this['fRX1'],_0x583e23['fRXRight']=this['fRX2'],_0x583e23['fRYTop']=this['fRY1'],_0x583e23['fRYBottom']=this['fRY2'],_0x583e23['bBlack']=this['bBlack'],_0x583e23['bCut']=this['pRenderParam'][_0x157bfb]['bCut'],_0x583e23['nFishParamType']=this['pFishParam'][_0x157bfb]['nFishParamType'],_0x583e23['fAngle']=this['pFishParam'][_0x157bfb]['fAngle'],_0x583e23['fZoom']=this['pFishParam'][_0x157bfb]['fZoom'],_0x583e23['fPTZX']=this['pFishParam'][_0x157bfb]['fPTZX'],_0x583e23['fPTZY']=this['pFishParam'][_0x157bfb]['fPTZY'],_0x12eada['SR_OK']);}},{'key':'GetRenderParam','value':function(_0x3d11e1,_0x34a1af){return _0x3d11e1<0x0||_0x3d11e1>=0x20||null==_0x34a1af||null==this['pRenderParam'][_0x3d11e1]?_0x12eada['SR_ERR_PARAM']:(_0x34a1af['fRXLeft']=this['fRX1'],_0x34a1af['fRXRight']=this['fRX2'],_0x34a1af['fRYTop']=this['fRY1'],_0x34a1af['fRYBottom']=this['fRY2'],_0x34a1af['bBlack']=this['bBlack'],_0x34a1af['fCosH']=this['pRenderParam'][_0x3d11e1]['fCosH'],_0x34a1af['fSinH']=this['pRenderParam'][_0x3d11e1]['fSinH'],_0x34a1af['fCosV']=this['pRenderParam'][_0x3d11e1]['fCosV'],_0x34a1af['fSinV']=this['pRenderParam'][_0x3d11e1]['fSinV'],_0x34a1af['fAngle']=this['pRenderParam'][_0x3d11e1]['fAngle'],_0x34a1af['fZoom']=this['pRenderParam'][_0x3d11e1]['fZoom'],_0x34a1af['nDisplayEffect']=this['pRenderParam'][_0x3d11e1]['nDisplayEffect'],_0x34a1af['bCut']=this['pRenderParam'][_0x3d11e1]['bCut'],_0x12eada['SR_OK']);}},{'key':'UpdateCircyeParam','value':function(_0x2eac63,_0x1906e0,_0x235deb,_0x428641){if(_0x2eac63<=-0.5||_0x2eac63>=0.4||_0x1906e0<=0.6||_0x1906e0>=1.5||_0x235deb<=-0.5||_0x235deb>=0.4||_0x428641<=0.6||_0x428641>=1.5||_0x2eac63+_0x1906e0<=0.8||_0x2eac63+_0x1906e0>=1.2||_0x235deb+_0x428641<=0.8||_0x235deb+_0x428641>=1.2)return _0x12eada['SR_ERR_PARAM'];if(_0x2eac63<0x0||_0x1906e0>0x1||_0x235deb<0x0||_0x428641>0x1){for(var _0x64a2d3=0x0;_0x64a2d3<0x20;++_0x64a2d3)if(null!=this['pRenderParam'][_0x64a2d3]&&(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x64a2d3]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x64a2d3]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x64a2d3]['nDisplayEffect'])){var _0x2fd367={};if(_0x2fd367['fHAngleCos']=this['pRenderParam'][_0x64a2d3]['fCosH'],_0x2fd367['fHAngleSin']=this['pRenderParam'][_0x64a2d3]['fSinH'],_0x2fd367['fVAngleCos']=this['pRenderParam'][_0x64a2d3]['fCosV'],_0x2fd367['fVAngleSin']=this['pRenderParam'][_0x64a2d3]['fSinV'],0x0==this['IsInImage'](_0x2eac63,_0x1906e0,_0x235deb,_0x428641,_0x2fd367,this['pRenderParam'][_0x64a2d3]['fZoom'],this['pRenderParam'][_0x64a2d3]['nDisplayEffect']))return _0x12eada['SR_ERR_PARAM'];}}return this['fRX1']=_0x2eac63,this['fRX2']=_0x1906e0,this['fRY1']=_0x235deb,this['fRY2']=_0x428641,_0x12eada['SR_OK'];}},{'key':'UpdateWideScanAngle','value':function(_0xe12a61,_0x281c10){return null==this['pRenderParam'][_0xe12a61]?_0x12eada['SR_ERR_CALL_ORDER']:(_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']==this['pRenderParam'][_0xe12a61]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_180']==this['pRenderParam'][_0xe12a61]['nDisplayEffect']?this['pRenderParam'][_0xe12a61]['fAngle']=_0x281c10:_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']!=this['pRenderParam'][_0xe12a61]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][_0xe12a61]['nDisplayEffect']||(this['pRenderParam'][_0xe12a61]['fAngle']=-_0x281c10),_0x12eada['SR_OK']);}},{'key':'ComputeAngleVertical','value':function(_0x315676,_0x40db32,_0x4c4380,_0x91345a){var _0x1cce3b=_0x315676,_0xd7b4a3=_0x40db32,_0x105075=Math['sqrt']((_0xd7b4a3-0.5)*(_0xd7b4a3-0.5)+(_0x1cce3b-0.5)*(_0x1cce3b-0.5));if(_0x105075>0.5)return _0x12eada['SR_ERR_PARAM'];if(_0x105075<0.001)return _0x4c4380['fVAngleCos']=0x1,_0x4c4380['fVAngleSin']=0x0,_0x4c4380['fHAngleCos']=0x1,_0x4c4380['fHAngleSin']=0x0,_0x12eada['SR_OK'];if(_0x91345a==_0x4d466f['SR_DE_FISH_PTZ_CEILING']){_0x4c4380['fHAngleCos']=(0.5-_0xd7b4a3)/_0x105075,_0x4c4380['fHAngleSin']=(0.5-_0x1cce3b)/_0x105075;var _0x312cf1=_0x105075*_0x645d1a;_0x4c4380['fVAngleCos']=Math['cos'](_0x312cf1),_0x4c4380['fVAngleSin']=Math['sin'](_0x312cf1);}else{if(_0x91345a!=_0x4d466f['SR_DE_FISH_PTZ_FLOOR'])return _0x12eada['SR_ERR_PARAM'];_0x4c4380['fHAngleCos']=(_0xd7b4a3-0.5)/_0x105075,_0x4c4380['fHAngleSin']=(0.5-_0x1cce3b)/_0x105075;var _0x3190a1=_0x105075*_0x645d1a;_0x4c4380['fVAngleCos']=Math['cos'](_0x3190a1),_0x4c4380['fVAngleSin']=Math['sin'](_0x3190a1);}return _0x12eada['SR_OK'];}},{'key':'ComputeAngleHorizontal','value':function(_0xa3366a,_0x45f8a7,_0x293b99){var _0x383236,_0x52ddbd,_0x28961f,_0x5da65d,_0x146f66,_0x3e91bd,_0xbb4266,_0x19eb91=_0xa3366a,_0x392f32=_0x45f8a7;return(_0x392f32-(_0x146f66=0.5))*(_0x392f32-_0x146f66)+(_0x19eb91-_0x146f66)*(_0x19eb91-_0x146f66)>0.25?_0x12eada['SR_ERR_PARAM']:(_0x3e91bd=(_0x392f32-_0x146f66)/_0x146f66*_0x645d1a/0x2,_0x383236=Math['cos'](_0x3e91bd),_0x52ddbd=Math['sin'](_0x3e91bd),(_0x19eb91-_0x146f66)/_0x146f66/_0x383236>0x1||(_0x19eb91-_0x146f66)/_0x146f66/_0x383236<-0x1?_0x12eada['SR_ERR_PARAM']:(_0xbb4266=(_0x19eb91-_0x146f66)/_0x146f66/_0x383236*_0x645d1a/0x2,_0x28961f=Math['cos'](_0xbb4266),_0x5da65d=Math['sin'](_0xbb4266),_0x293b99['fVAngleCos']=_0x383236,_0x293b99['fVAngleSin']=_0x52ddbd,_0x293b99['fHAngleCos']=_0x28961f,_0x293b99['fHAngleSin']=_0x5da65d,_0x12eada['SR_OK']));}},{'key':'IsInImage','value':function(_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda,_0x2720ee,_0x5f2b8b){return 0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x1,0.5,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x0,0.5,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0.5,0x1,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0.5,0x0,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x0,0x0,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x0,0x1,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x1,0x1,_0x5f2b8b)&&0x1!=this['IsOutofImage'](_0x57e9bc,_0x57eb99,_0x54fa57,_0x59c7e2,_0x671cda['fHAngleCos'],_0x671cda['fHAngleSin'],_0x671cda['fVAngleCos'],_0x671cda['fVAngleSin'],_0x2720ee,0x1,0x0,_0x5f2b8b);}},{'key':'IsOutofImage','value':function(_0x3ca651,_0x5c3e74,_0x34e499,_0x4a3a30,_0x3be4bb,_0x33a0b9,_0x2f645a,_0x649a62,_0x4f2000,_0x9fcda8,_0x4224f1,_0x4935a4){var _0x3c96ee,_0x4e07a1,_0x385611,_0x1785f8,_0x4771c6,_0x459190,_0x5d12f9,_0x529bc4,_0x174913,_0x89433d,_0x4dff67,_0x58f062,_0x280aca;if(_0x4dff67=(_0x3ca651+_0x5c3e74)/0x2*0x1,_0x58f062=(_0x34e499+_0x4a3a30)/0x2*(_0x89433d=(_0x5c3e74-_0x3ca651)/(_0x4a3a30-_0x34e499)),_0x280aca=(_0x5c3e74-_0x3ca651)/0x2*0x1,_0x4935a4==_0x4d466f['SR_DE_FISH_PTZ_CEILING']){if(_0x4e07a1=_0x9fcda8-0.5,_0x385611=(_0x3c96ee=0.5-_0x4224f1)*_0x2f645a+(_0x459190=_0x4f2000)*_0x649a62,(_0x5d12f9=_0x459190*_0x2f645a-_0x3c96ee*_0x649a62)<=0x0)return!0x0;_0x174913=Math['sqrt'](_0x4e07a1*_0x4e07a1+_0x385611*_0x385611);var _0x4b9483=Math['sqrt'](_0x4e07a1*_0x4e07a1+_0x385611*_0x385611+_0x5d12f9*_0x5d12f9),_0x452069=Math['asin'](_0x174913/_0x4b9483)/1.5707963*0.5;if(_0x4771c6=(-((_0x4e07a1=_0x452069*_0x4e07a1/_0x174913)*_0x33a0b9+(_0x385611=_0x452069*_0x385611/_0x174913)*_0x3be4bb)*_0x280aca*0x2+_0x58f062)/_0x89433d,(_0x1785f8=((_0x4e07a1*_0x3be4bb-_0x385611*_0x33a0b9)*_0x280aca*0x2+_0x4dff67)/0x1)<0x0||_0x1785f8>0x1||_0x4771c6<0x0||_0x4771c6>0x1)return!0x0;}if(_0x4935a4==_0x4d466f['SR_DE_FISH_PTZ_FLOOR']){if(_0x4e07a1=_0x9fcda8-0.5,_0x385611=(_0x3c96ee=_0x4224f1-0.5)*_0x2f645a+(_0x459190=_0x4f2000)*_0x649a62,(_0x5d12f9=_0x459190*_0x2f645a-_0x3c96ee*_0x649a62)<=0x0)return!0x0;_0x174913=Math['sqrt'](_0x4e07a1*_0x4e07a1+_0x385611*_0x385611);var _0x462bae=Math['sqrt'](_0x4e07a1*_0x4e07a1+_0x385611*_0x385611+_0x5d12f9*_0x5d12f9),_0x330f04=Math['asin'](_0x174913/_0x462bae)/1.5707963*0.5;if(_0x4771c6=(((_0x4e07a1=_0x330f04*_0x4e07a1/_0x174913)*_0x33a0b9+(_0x385611=_0x330f04*_0x385611/_0x174913)*_0x3be4bb)*_0x280aca*0x2+_0x58f062)/_0x89433d,(_0x1785f8=((_0x4e07a1*_0x3be4bb-_0x385611*_0x33a0b9)*_0x280aca*0x2+_0x4dff67)/0x1)<0x0||_0x1785f8>0x1||_0x4771c6<0x0||_0x4771c6>0x1)return!0x0;}if(_0x4935a4==_0x4d466f['SR_DE_FISH_PTZ_WALL']){if(_0x1785f8=(_0x4e07a1=_0x9fcda8-0.5)*_0x3be4bb+(_0x5d12f9=(_0x459190=_0x4f2000)*_0x2f645a-(_0x3c96ee=_0x4224f1-0.5)*_0x649a62)*_0x33a0b9,_0x4771c6=_0x385611=_0x3c96ee*_0x2f645a+_0x459190*_0x649a62,(_0x529bc4=_0x5d12f9*_0x3be4bb-_0x4e07a1*_0x33a0b9)<=0x0)return!0x0;_0x174913=Math['sqrt'](_0x1785f8*_0x1785f8+_0x4771c6*_0x4771c6);var _0x567958=Math['sqrt'](_0x1785f8*_0x1785f8+_0x4771c6*_0x4771c6+_0x529bc4*_0x529bc4),_0x452d95=Math['asin'](_0x174913/_0x567958)/1.5707963*0.5;if(_0x4771c6=(_0x452d95*_0x4771c6/_0x174913*_0x280aca*0x2+_0x58f062)/_0x89433d,(_0x1785f8=(_0x452d95*_0x1785f8/_0x174913*_0x280aca*0x2+_0x4dff67)/0x1)<0x0||_0x1785f8>0x1||_0x4771c6<0x0||_0x4771c6>0x1)return!0x0;}return!0x1;}},{'key':'ComputePTZPoints','value':function(){if(-0x1==this['nWndPort'])return _0x12eada['SR_ERR_CALL_ORDER'];for(var _0x42f881=0x0;_0x42f881<0x20;++_0x42f881)if(null!=this['pRenderParam'][_0x42f881]&&(_0x4d466f['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x42f881]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x42f881]['nDisplayEffect']||_0x4d466f['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x42f881]['nDisplayEffect'])){var _0x1b6b49=_0x12eada['SR_OK'];if(this['nPTZDisplayMode']==_0x3b7ab3['SR_DM_RANGE']){if(_0x1b6b49=this['GetRangePoints'](_0x42f881),_0x12eada['SR_OK']!=_0x1b6b49)continue;if(_0x1b6b49=this['TransformPTZRangePoints'](_0x42f881),_0x12eada['SR_OK']!=_0x1b6b49)continue;}else{if(this['nPTZDisplayMode']==_0x3b7ab3['SR_DM_RECT']&&(_0x1b6b49=this['GetRectPoints'](_0x42f881),_0x12eada['SR_OK']!=_0x1b6b49))continue;}}return _0x12eada['SR_OK'];}},{'key':'GetWndPort','value':function(){return this['nWndPort'];}},{'key':'GetPTZDisplayMode','value':function(){return this['nPTZDisplayMode'];}},{'key':'GetPTZColor','value':function(_0x492712,_0x14241f){return _0x492712<0x0||_0x492712>=0x20||null==_0x14241f?_0x12eada['SR_ERR_PARAM']:(_0x14241f['fA']=this['stPTZColor'][_0x492712]['fA'],_0x14241f['fR']=this['stPTZColor'][_0x492712]['fR'],_0x14241f['fG']=this['stPTZColor'][_0x492712]['fG'],_0x14241f['fB']=this['stPTZColor'][_0x492712]['fB'],this['pPTZSetColor'][_0x492712]['bSetColor']&&(Math['abs'](this['pPTZSetColor'][_0x492712]['fA'])<0.000001||Math['abs'](this['pPTZSetColor'][_0x492712]['fR'])<0.000001||Math['abs'](this['pPTZSetColor'][_0x492712]['fG'])<0.000001||Math['abs'](this['pPTZSetColor'][_0x492712]['fB'])<0.000001)&&(_0x14241f['fA']=this['pPTZSetColor'][_0x492712]['fA'],_0x14241f['fR']=this['pPTZSetColor'][_0x492712]['fR'],_0x14241f['fG']=this['pPTZSetColor'][_0x492712]['fG'],_0x14241f['fB']=this['pPTZSetColor'][_0x492712]['fB']),_0x12eada['SR_OK']);}},{'key':'SetPTZColor','value':function(_0x42ca48,_0x4dfeda){return _0x42ca48<0x0||_0x42ca48>=0x20||null==_0x4dfeda?_0x12eada['SR_ERR_PARAM']:(this['pPTZSetColor'][_0x42ca48]['fR']=_0x4dfeda['fR'],this['pPTZSetColor'][_0x42ca48]['fG']=_0x4dfeda['fG'],this['pPTZSetColor'][_0x42ca48]['fB']=_0x4dfeda['fB'],this['pPTZSetColor'][_0x42ca48]['fA']=_0x4dfeda['fA'],this['pPTZSetColor'][_0x42ca48]['bSetColor']=!0x0,_0x12eada['SR_OK']);}},{'key':'IsPTZSelected','value':function(_0x4dd3c5){return!(_0x4dd3c5<0x0||_0x4dd3c5>=0x20)&&this['bPTZSelected'][_0x4dd3c5];}},{'key':'GetPTZPort','value':function(_0x48991a,_0x9261d7,_0x4f0396){if(-0x1==this['nWndPort'])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];var _0x22f136=0x20,_0x36548e={};_0x36548e['fX']=_0x48991a,_0x36548e['fY']=_0x9261d7;for(var _0x26b42d=0x0;_0x26b42d<0x20;++_0x26b42d)this['bPTZSelected'][_0x26b42d]=!0x1;if(this['nPTZDisplayMode']==_0x3b7ab3['SR_DM_RANGE']){switch(this['pRenderParam'][this['nWndPort']]['nDisplayEffect']){case _0x4d466f['SR_DE_FISH_PANORAMA_FLOOR_360']:this['GetPointPano2FishFloor'](_0x36548e,_0x48991a,_0x9261d7);break;case _0x4d466f['SR_DE_FISH_PANORAMA_CEILING_360']:this['GetPointPano2FishCeiling'](_0x36548e,_0x48991a,_0x9261d7);break;case _0x4d466f['SR_DE_FISH_PANORAMA_WALL']:this['GetPointPano2FishWall'](_0x36548e,_0x48991a,_0x9261d7);}for(var _0x453c20=0x0;_0x453c20<0x20;++_0x453c20)if(0x0!=this['nOriPTZPointNum'][_0x453c20]){var _0x1421c7={};_0x1421c7['fX']=this['pOriPTZPoints'][_0x453c20][0x0]['fX'],_0x1421c7['fY']=this['pOriPTZPoints'][_0x453c20][0x0]['fY'];var _0x29aa63={};_0x29aa63['fX']=this['pOriPTZPoints'][_0x453c20][0x0]['fX'],_0x29aa63['fY']=this['pOriPTZPoints'][_0x453c20][0x0]['fY'];for(var _0x2a6e48=0x1;_0x2a6e48<this['nOriPTZPointNum'][_0x453c20];++_0x2a6e48)this['GetPTZRectange'](_0x1421c7,_0x29aa63,this['pOriPTZPoints'][_0x453c20][_0x2a6e48]);if(_0x36548e['fX']<=_0x1421c7['fX']&&_0x36548e['fX']>=_0x29aa63['fX']&&_0x36548e['fY']>=_0x29aa63['fY']&&_0x36548e['fY']<=_0x1421c7['fY']){_0x22f136=_0x453c20;break;}}}else{if(this['nPTZDisplayMode']!=_0x3b7ab3['SR_DM_RECT'])return _0x12eada['SR_ERR_NOT_SUPPORT'];for(var _0x103486=0x0;_0x103486<0x20;++_0x103486)if(_0x36548e['fX']<=this['pRectPoints'][_0x103486][0x2]['fX']&&_0x36548e['fX']>=this['pRectPoints'][_0x103486][0x0]['fX']&&_0x36548e['fY']>=this['pRectPoints'][_0x103486][0x0]['fY']&&_0x36548e['fY']<=this['pRectPoints'][_0x103486][0x2]['fY']){_0x22f136=_0x103486;break;}}return _0x22f136<0x20?(this['bPTZSelected'][_0x22f136]=!0x0,_0x4f0396['nPTZPort']=_0x22f136,_0x12eada['SR_OK']):_0x12eada['SR_ERR_NOT_SUPPORT'];}},{'key':'SetPTZPort','value':function(_0xfeb96b){if(_0xfeb96b<0x0||_0xfeb96b>=0x20)return _0x12eada['SR_ERR_PARAM'];for(var _0x25952d=0x0;_0x25952d<0x20;++_0x25952d)this['bPTZSelected'][_0x25952d]=!0x1;if(this['nPTZDisplayMode']==_0x3b7ab3['SR_DM_RANGE']){if(0x0==this['nOriPTZPointNum'][_0xfeb96b])return _0x12eada['SR_ERR_PARAM'];this['bPTZSelected'][_0xfeb96b]=!0x0;}else{if(0x0==this['nPTZRectNum'][_0xfeb96b])return _0x12eada['SR_ERR_PARAM'];this['bPTZSelected'][_0xfeb96b]=!0x0;}return _0x12eada['SR_OK'];}},{'key':'GetPTZRectange','value':function(_0x52669e,_0x4d7842,_0x5c704d){return _0x5c704d['fX']<_0x4d7842['fX']&&(_0x4d7842['fX']=_0x5c704d['fX']),_0x5c704d['fY']<_0x4d7842['fY']&&(_0x4d7842['fY']=_0x5c704d['fY']),_0x5c704d['fX']>_0x52669e['fX']&&(_0x52669e['fX']=_0x5c704d['fX']),_0x5c704d['fY']>_0x52669e['fY']&&(_0x52669e['fY']=_0x5c704d['fY']),_0x12eada['SR_OK'];}},{'key':'GetPTZPoints','value':function(_0x212538,_0x33abed,_0x5f4a94){return _0x212538<0x0||_0x212538>=0x20?_0x12eada['SR_ERR_PARAM']:null==this['pRenderParam'][this['nWndPort']]?_0x12eada['SR_ERR_CALL_ORDER']:(_0x3b7ab3['SR_DM_RANGE']==_0x5f4a94?null!=this['pOriPTZPoints'][_0x212538]&&0x0!=this['nOriPTZPointNum'][_0x212538]&&(_0x33abed['pstPoints']=this['pOriPTZPoints'][_0x212538],_0x33abed['nPointNum']=this['nOriPTZPointNum'][_0x212538]):_0x3b7ab3['SR_DM_RECT']==_0x5f4a94&&null!=this['pRectPoints'][_0x212538]&&(_0x33abed['pstPoints']=this['pRectPoints'][_0x212538],_0x33abed['nPointNum']=0x4),_0x12eada['SR_OK']);}},{'key':'SetPTZDisplayMode','value':function(_0x5aec81){return this['nPTZDisplayMode']=_0x5aec81,this['ComputePTZPoints']();}},{'key':'GetDisplayEffect','value':function(_0x1b645a){return _0x1b645a<0x0||_0x1b645a>=0x20||null==this['pRenderParam']?_0x4d466f['SR_DE_NULL']:this['pRenderParam'][_0x1b645a]['nDisplayEffect'];}},{'key':'GetPTZFragmentPoints','value':function(_0x594db9,_0x295f28,_0x126286){if(_0x594db9<0x0||_0x594db9>=0x20)return _0x12eada['SR_ERR_PARAM'];if(null==this['pPanoPTZPoints'][_0x594db9]||0x0==this['nPanoPTZPointNum'][_0x594db9])return _0x12eada['SR_ERR_PARAM'];var _0x22e68a=this['nPTZFragmentNode'][_0x594db9][_0x126286];if(_0x295f28['nPointNum']=this['nPTZFragmentNode'][_0x594db9][_0x126286+0x1]-this['nPTZFragmentNode'][_0x594db9][_0x126286],_0x295f28['nPointNum']<0x0)return _0x12eada['SR_ERR_CALL_ORDER'];_0x295f28['pstPoints']=[];for(var _0x38bc61=0x0;_0x38bc61<_0x295f28['nPointNum'];++_0x38bc61){var _0x160e8e={};_0x160e8e['fX']=this['pPanoPTZPoints'][_0x594db9][_0x22e68a+_0x38bc61]['fX'],_0x160e8e['fY']=this['pPanoPTZPoints'][_0x594db9][_0x22e68a+_0x38bc61]['fY'],_0x295f28['pstPoints']['push'](_0x160e8e);}return _0x12eada['SR_OK'];}},{'key':'GetPTZFragmentNum','value':function(_0x565f8d){return _0x565f8d<0x0||_0x565f8d>=0x20||0x0==this['nPTZFragmentNum'][_0x565f8d]?0x0:this['nPTZFragmentNum'][_0x565f8d];}},{'key':'CalcPTZFragmentPoints','value':function(_0x34bde8){if(_0x34bde8<0x0||_0x34bde8>=0x20)return _0x12eada['SR_ERR_PARAM'];if(null==this['pPanoPTZPoints'][_0x34bde8]||0x0==this['nPanoPTZPointNum'][_0x34bde8])return _0x12eada['SR_ERR_CALL_ORDER'];this['nPTZFragmentNode'][_0x34bde8][0x0]=0x0,this['nPTZFragmentNum'][_0x34bde8]=0x1;for(var _0x38a102=0x0,_0x1d1160=0x0;_0x1d1160<this['nPanoPTZPointNum'][_0x34bde8]-0x1;_0x1d1160++)Math['abs'](this['pPanoPTZPoints'][_0x34bde8][_0x1d1160+0x1]['fX']-this['pPanoPTZPoints'][_0x34bde8][_0x1d1160]['fX'])>0.5&&(_0x38a102=this['nPTZFragmentNum'][_0x34bde8],this['nPTZFragmentNode'][_0x34bde8][_0x38a102]=_0x1d1160+0x1,this['nPTZFragmentNum'][_0x34bde8]=this['nPTZFragmentNum'][_0x34bde8]+0x1);var _0x154b61=this['nPanoPTZPointNum'][_0x34bde8];return Math['abs'](this['pPanoPTZPoints'][_0x34bde8][0x0]['fX']-this['pPanoPTZPoints'][_0x34bde8][_0x154b61-0x1]['fX'])<0.5&&(this['pPanoPTZPoints'][_0x34bde8][_0x154b61]['fX']=this['pPanoPTZPoints'][_0x34bde8][0x0]['fX'],this['pPanoPTZPoints'][_0x34bde8][_0x154b61]['fY']=this['pPanoPTZPoints'][_0x34bde8][0x0]['fY'],this['nPanoPTZPointNum'][_0x34bde8]=this['nPanoPTZPointNum'][_0x34bde8]+0x1),_0x38a102=this['nPTZFragmentNum'][_0x34bde8],this['nPTZFragmentNode'][_0x34bde8][_0x38a102]=this['nPanoPTZPointNum'][_0x34bde8],_0x12eada['SR_OK'];}},{'key':'IsPortAllocated','value':function(_0x2faf88){return this['bPortAllocated'][_0x2faf88];}},{'key':'GetPointFish2PanoCeiling','value':function(_0x3e56ee,_0x149fb3,_0x3a81d7){if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x3e56ee)return _0x12eada['SR_ERR_PARAM'];var _0x1f58c4,_0x40c6db;_0x1f58c4=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x40c6db=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x161f34,_0x523231=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&(_0x161f34=0x1*-this['fRX1'])>_0x523231&&(_0x523231=_0x161f34),this['fRX2']>0x1&&(_0x161f34=0x1*(this['fRX2']-0x1))>_0x523231&&(_0x523231=_0x161f34),this['fRY1']<0x0&&(_0x161f34=-this['fRY1']*_0x1f58c4)>_0x523231&&(_0x523231=_0x161f34),this['fRY2']>0x1&&(_0x161f34=(this['fRY2']-0x1)*_0x1f58c4)>_0x523231&&(_0x523231=_0x161f34));var _0x5d70ae,_0x865977=_0x523231/_0x40c6db,_0xa30fe1={'fX':0x0,'fY':0x0};if(Math['abs'](_0x149fb3-0.5)<0.000001&&Math['abs'](_0x3a81d7-0.5)<0.000001)return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x1864b5={},_0x525b9e={};_0x1864b5['fX']=_0x149fb3-0.5,_0x1864b5['fY']=_0x3a81d7-0.5,_0x525b9e['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x525b9e['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x102baf=Math['sqrt'](_0x1864b5['fX']*_0x1864b5['fX']+_0x1864b5['fY']*_0x1864b5['fY']),_0x8bbbd7=Math['sqrt'](_0x525b9e['fX']*_0x525b9e['fX']+_0x525b9e['fY']*_0x525b9e['fY']);return _0x5d70ae=Math['acos']((_0x1864b5['fX']*_0x525b9e['fX']+_0x1864b5['fY']*_0x525b9e['fY'])/(_0x102baf*_0x8bbbd7)),_0x1864b5['fX']*_0x525b9e['fY']-_0x1864b5['fY']*_0x525b9e['fX']>0x0&&(_0x5d70ae=6.2831852-_0x5d70ae),_0xa30fe1['fX']=_0x5d70ae/6.2831853,_0xa30fe1['fY']=(0x2*(0.5-_0x102baf)-_0x865977)/(0.8-_0x865977),_0xa30fe1['fY']>=0x0&&_0xa30fe1['fX']>=0x0&&_0xa30fe1['fY']<=0x1&&_0xa30fe1['fX']<=0x1?(_0x3e56ee['fX']=_0xa30fe1['fX'],_0x3e56ee['fY']=_0xa30fe1['fY'],_0x12eada['SR_OK']):_0x12eada['SR_ERR_PARAM'];}},{'key':'GetPointFish2PanoFloor','value':function(_0x5b776a,_0x2cf49e,_0x3fd881){if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x5b776a)return _0x12eada['SR_ERR_PARAM'];var _0x2efaf9,_0x17910b;_0x2efaf9=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x17910b=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x23e98d,_0xb74cd8=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&(_0x23e98d=0x1*-this['fRX1'])>_0xb74cd8&&(_0xb74cd8=_0x23e98d),this['fRX2']>0x1&&(_0x23e98d=0x1*(this['fRX2']-0x1))>_0xb74cd8&&(_0xb74cd8=_0x23e98d),this['fRY1']<0x0&&(_0x23e98d=-this['fRY1']*_0x2efaf9)>_0xb74cd8&&(_0xb74cd8=_0x23e98d),this['fRY2']>0x1&&(_0x23e98d=(this['fRY2']-0x1)*_0x2efaf9)>_0xb74cd8&&(_0xb74cd8=_0x23e98d));var _0x4bdebb,_0x19ef37=_0xb74cd8/_0x17910b,_0x5e2482={'fX':0x0,'fY':0x0};if(Math['abs'](_0x2cf49e-0.5)<0.000001&&Math['abs'](_0x3fd881-0.5)<0.000001)return _0x12eada['SR_ERR_NOT_SUPPORT'];var _0x31065c={},_0x508a28={};_0x31065c['fX']=_0x2cf49e-0.5,_0x31065c['fY']=_0x3fd881-0.5,_0x508a28['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x508a28['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x13aa5d=Math['sqrt'](_0x31065c['fX']*_0x31065c['fX']+_0x31065c['fY']*_0x31065c['fY']),_0x1c9ee2=Math['sqrt'](_0x508a28['fX']*_0x508a28['fX']+_0x508a28['fY']*_0x508a28['fY']);return _0x4bdebb=Math['acos']((_0x31065c['fX']*_0x508a28['fX']+_0x31065c['fY']*_0x508a28['fY'])/(_0x13aa5d*_0x1c9ee2)),_0x31065c['fX']*_0x508a28['fY']-_0x31065c['fY']*_0x508a28['fX']>0x0&&(_0x4bdebb=6.2831852-_0x4bdebb),_0x5e2482['fX']=0x1-_0x4bdebb/6.2831853,_0x5e2482['fY']=0x1-(0x2*(0.5-_0x13aa5d)-_0x19ef37)/(0.8-_0x19ef37),_0x5e2482['fY']>=0x0&&_0x5e2482['fX']>=0x0&&_0x5e2482['fY']<=0x1&&_0x5e2482['fX']<=0x1?(_0x5b776a['fX']=_0x5e2482['fX'],_0x5b776a['fY']=_0x5e2482['fY'],_0x12eada['SR_OK']):_0x12eada['SR_ERR_PARAM'];}},{'key':'GetPointFish2PanoWall','value':function(_0x37cb2a,_0x3ba453,_0x3f6191){if(null==this['pRenderParam'][this['nWndPort']])return _0x12eada['SR_ERR_CALL_ORDER'];if(null==_0x37cb2a)return _0x12eada['SR_ERR_PARAM'];var _0x5056e5,_0x4e41d3;_0x5056e5=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x4e41d3=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x2b07a0,_0x458ec3,_0x296e70,_0x48688d,_0x3a75a8,_0x3bbad3=0x0,_0x4c1503=0x1,_0x249f84=0.1,_0x5016eb=0.9;this['fRX1']<0x0&&(_0x2b07a0=0x1*-this['fRX1'],_0x3bbad3=_0x2b07a0/=0x2*_0x4e41d3),this['fRX2']>0x1&&(_0x458ec3=0x1*(this['fRX2']-0x1),_0x4c1503=0x1-(_0x458ec3/=0x2*_0x4e41d3)),this['fRY1']<0x0&&(_0x296e70=-this['fRY1']*_0x5056e5,_0x249f84=(_0x296e70/=0x2*_0x4e41d3)>0.1?_0x296e70:0.1),this['fRY2']>0x1&&(_0x48688d=(this['fRY2']-0x1)*_0x5056e5,_0x5016eb=(_0x48688d/=0x2*_0x4e41d3)>0x1-0.9?0x1-_0x48688d:0.9);var _0xbd1d6c={'fX':0x0,'fY':0x0},_0x42697b=0x2*_0x3ba453*_0x4e41d3,_0x40476e=0x2*_0x3f6191*_0x4e41d3;return _0x3a75a8=Math['sqrt'](_0x4e41d3*_0x4e41d3-(_0x40476e-_0x4e41d3)*(_0x40476e-_0x4e41d3)),Math['abs'](_0x3a75a8)<0.000001?_0x12eada['SR_ERR_PARAM']:(_0x3ba453=_0x4e41d3*(_0x42697b-_0x4e41d3)/_0x3a75a8+_0x4e41d3,_0x3f6191=_0x40476e,_0xbd1d6c['fX']=(_0x3ba453-0x2*_0x3bbad3*_0x4e41d3)/(0x2*(_0x4c1503-_0x3bbad3)*_0x4e41d3),_0xbd1d6c['fY']=(_0x3f6191-0x2*_0x249f84*_0x4e41d3)/(0x2*(_0x5016eb-_0x249f84)*_0x4e41d3),_0xbd1d6c['fY']>=0x0&&_0xbd1d6c['fX']>=0x0&&_0xbd1d6c['fY']<=0x1&&_0xbd1d6c['fX']<=0x1?(_0x37cb2a['fX']=_0xbd1d6c['fX'],_0x37cb2a['fY']=_0xbd1d6c['fY'],_0x12eada['SR_OK']):_0x12eada['SR_ERR_PARAM']);}},{'key':'UpdateRangeParam','value':function(_0x5e6296,_0x2f9cda){if(null==this['pRenderParam'][_0x5e6296])return _0x12eada['SR_ERR_CALL_ORDER'];if(_0x2f9cda<0.00001||_0x2f9cda>0.6)return _0x12eada['SR_ERR_PARAM'];var _0xbe8853=0x0;return _0x4d466f['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x5e6296]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x5e6296]['nDisplayEffect']&&_0x4d466f['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x5e6296]['nDisplayEffect']||(_0xbe8853=0x7*_0x2f9cda+0.8,this['IsInImage'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2'],this['pRenderParam'][_0x5e6296]['fCosH'],this['pRenderParam'][_0x5e6296]['fSinH'],this['pRenderParam'][_0x5e6296]['fCosV'],this['pRenderParam'][_0x5e6296]['fSinV'],_0xbe8853,this['pRenderParam'][_0x5e6296]['nDisplayEffect']))?(this['pRenderParam'][_0x5e6296]['fZoom']=_0xbe8853,_0x12eada['SR_OK']):_0x12eada['SR_ERR_PARAM'];}}]),_0x2b7417;}()),_0x28ed38=_0x39fedc['Dv'],_0x506212=_0x39fedc['CF'],_0x21dfba=_0x39fedc['bC'],_0x15f25d=(function(){function _0x1cfefa(){_0x1d88b2(this,_0x1cfefa),this['canvas']=null,this['ctx']=null,this['regionSx']=0x0,this['regionSy']=0x0,this['regionSw']=0x0,this['regionSh']=0x0,this['needRect']=!0x1,this['bAntialias']=!0x1,this['bRecreateAntia']=!0x1,this['pfuncCBIn']=null,this['pUserIn']=null,this['pfuncCBOut']=null,this['pUserOut']=null;}return _0x4e686c(_0x1cfefa,[{'key':'SR_Init','value':function(_0x358a92){this['canvas']=_0x358a92,this['ctx']=this['canvas']['getContext']('2d'),console['log']('2d\\x20render\\x20init'),this['ctx']||console['log']('your\\x20browser\\x20does\\x20not\\x20support\\x202d\\x20render');}},{'key':'SR_Draw','value':function(_0x79c56b){return this['needRect']?this['ctx']['drawImage'](_0x79c56b,this['regionSx'],this['regionSy'],this['regionSw'],this['regionSh'],0x0,0x0,this['canvas']['width'],this['canvas']['height']):this['ctx']['drawImage'](_0x79c56b,0x0,0x0,_0x79c56b['displayWidth'],_0x79c56b['displayHeight'],0x0,0x0,this['canvas']['width'],this['canvas']['height']),null!=this['pfuncCBIn']&&this['pfuncCBIn'](this['pUserIn']),0x1;}},{'key':'SR_UpdateFrameData','value':function(_0x1ff803,_0x59d645,_0x460199,_0x19174c,_0x1c5dce){return this['needRect']?this['ctx']['drawImage'](_0x1ff803,this['regionSx'],this['regionSy'],this['regionSw'],this['regionSh'],0x0,0x0,this['canvas']['width'],this['canvas']['height']):this['ctx']['drawImage'](_0x1ff803,0x0,0x0,_0x59d645,_0x460199,0x0,0x0,this['canvas']['width'],this['canvas']['height']),null!=this['pfuncCBIn']&&this['pfuncCBIn'](this['pUserIn']),0x1;}},{'key':'SR_Display','value':function(_0x182f5c){return 0x1;}},{'key':'SR_GetCaptureSize','value':function(){return 0x0;}},{'key':'GetCanvasData','value':function(_0x50427){console['log']('%c\\x20start\\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\\x20blue');var _0x4d933a=this['ctx']['getImageData'](0x0,0x0,this['canvas']['width'],this['canvas']['height']);console['log']('%c\\x202\\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\\x20blue');var _0x22251e='jpeg',_0x59b849='image/jpeg',_0x1ed1b3=document['createElement']('canvas'),_0x32c2ac=_0x1ed1b3['getContext']('2d');_0x1ed1b3['width']=this['canvas']['width'],_0x1ed1b3['height']=this['canvas']['height'],_0x32c2ac['putImageData'](_0x4d933a,0x0,0x0);var _0x14eddf=_0x1ed1b3['toDataURL'](),_0x3b459b=document['createElement']('a');_0x3b459b['download']=new Date()['getTime']()+'.'+_0x22251e,_0x3b459b['href']=_0x14eddf,_0x3b459b['dataset']['downloadurl']=[_0x59b849,_0x3b459b['download'],_0x3b459b['href']]['join'](':'),document['body']['appendChild'](_0x3b459b),_0x3b459b['click'](),document['body']['removeChild'](_0x3b459b),console['log']('%c\\x20end\\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\\x20blue');}},{'key':'SR_DelSubPort','value':function(_0x1717a6){return 0x0;}},{'key':'SR_AddSubPort','value':function(_0x104f19){return 0x0;}},{'key':'SR_SetDisplayRect','value':function(_0x2ae66e,_0x28a416,_0x538311,_0x5e8228){this['regionSx']=_0x2ae66e,this['regionSy']=_0x28a416,this['regionSw']=_0x538311,this['regionSh']=_0x5e8228,this['needRect']=!0x0;}},{'key':'SR_Destroy','value':function(){this['canvas']=null,this['ctx']=null,this['regionSx']=0x0,this['regionSy']=0x0,this['regionSw']=0x0,this['regionSh']=0x0,this['needRect']=!0x1;}},{'key':'SR_SetCanvasSize','value':function(_0x21a0f8,_0x2ac8ae){this['canvas']['width']=_0x21a0f8,this['canvas']['height']=_0x2ac8ae;}},{'key':'SR_GetCanvasSize','value':function(){console['log']('canvas\\x20width:'+this['canvas']['width']+',height:'+this['canvas']['height']);}},{'key':'SR_SetAntialias','value':function(_0x487ba9){return _0x487ba9!=this['bAntialias']?(this['bAntialias']=_0x487ba9,this['bRecreateAntia']=!0x0):this['bRecreateAntia']=!0x1,this['bRecreateAntia']&&(this['bAntialias']?(this['canvas']['width']=0x5*this['canvas']['width'],this['canvas']['height']=0x5*this['canvas']['height'],this['canvas']['style']['transform']='scale(0.2)',this['canvas']['style']['transformOrigin']='0\\x200'):(this['canvas']['width']=this['canvas']['width']/0x5,this['canvas']['height']=this['canvas']['height']/0x5,this['canvas']['style']['transform']='scale(1)',this['canvas']['style']['transformOrigin']='0\\x200')),0x1;}},{'key':'SR_SetCallBack','value':function(_0x16be5f,_0xecfc1f,_0x37f010){switch(_0x37f010){case _0x21dfba['SRCALLBACKTYPE']['SR_CBT_NULL']:this['pfuncCBIn']=_0x16be5f,this['pUserIn']=_0xecfc1f;break;case _0x21dfba['SRCALLBACKTYPE']['SR_CBT_OUT']:this['pfuncCBOut']=_0x16be5f,this['pUserOut']=_0xecfc1f;break;default:return 0x0;}return 0x1;}},{'key':'SR_DrawFont','value':function(_0x1c8a72,_0x208110,_0x44506c,_0x5196f1,_0x4d49f8,_0x427321,_0x2c334a,_0x105a70,_0x1b2891){var _0x4f3eef=[],_0x14e462={};return _0x14e462['bBackground']=_0x427321,_0x14e462['nFontWidth']=_0x5196f1,_0x14e462['nFontHeight']=_0x4d49f8,_0x14e462['pstBGColor']=_0x2c334a,_0x14e462['pstFontColor']=_0x44506c,_0x14e462['pString']=_0x1c8a72,_0x14e462['pstStartPos']=_0x208110,_0x14e462['fRotateAngle']=_0x105a70,_0x14e462['pFontFamily']=_0x1b2891,_0x4f3eef['push'](_0x14e462),this['SR_DrawFontEx'](_0x4f3eef,0x1),0x1;}},{'key':'SR_DrawFontEx','value':function(_0x34d803,_0x1c9fc5){for(var _0x314ff8=0x0;_0x314ff8<_0x1c9fc5;_0x314ff8++){this['ctx']['textBaseline']='top';var _0x14264c=_0x34d803[_0x314ff8]['nFontWidth'],_0x5356cb=_0x34d803[_0x314ff8]['nFontHeight'],_0x301a48=(_0x14264c=Math['round'](_0x14264c))<(_0x5356cb=Math['round'](_0x5356cb))?_0x14264c:_0x5356cb;this['ctx']['font']=_0x301a48['toString']()+'px\\x20'+_0x34d803[_0x314ff8]['pFontFamily'];var _0x40c5b0=parseInt(0xff*_0x34d803[_0x314ff8]['pstFontColor']['fR']),_0x314e75=parseInt(0xff*_0x34d803[_0x314ff8]['pstFontColor']['fG']),_0x4c21f7=parseInt(0xff*_0x34d803[_0x314ff8]['pstFontColor']['fB']),_0x8c9602=_0x40c5b0<0x10?'0'+_0x40c5b0['toString'](0x10):_0x40c5b0['toString'](0x10),_0x391129=_0x314e75<0x10?'0'+_0x314e75['toString'](0x10):_0x314e75['toString'](0x10),_0x54beb7=_0x4c21f7<0x10?'0'+_0x4c21f7['toString'](0x10):_0x4c21f7['toString'](0x10);this['ctx']['fillStyle']='#'+_0x8c9602+_0x391129+_0x54beb7,this['ctx']['globalAlpha']=_0x34d803[_0x314ff8]['pstFontColor']['fA'],this['ctx']['fillText'](_0x34d803[_0x314ff8]['pString'],_0x34d803[_0x314ff8]['pstStartPos']['fX']*this['canvas']['width'],_0x34d803[_0x314ff8]['pstStartPos']['fY']*this['canvas']['height']);}return 0x1;}},{'key':'SR_DrawImage','value':function(_0x30b25a,_0x86640c,_0x485603,_0x5422e4,_0x35d238,_0x2690de){return 0x1;}},{'key':'SR_DrawLinesEx','value':function(_0x49e3aa,_0x57d217,_0x3c5063,_0x4826ce){return 0x1;}}]),_0x1cfefa;}());function _0x9a07a6(_0x122da1,_0x50435f){var _0x413141=Object['keys'](_0x122da1);if(Object['getOwnPropertySymbols']){var _0x1f1c83=Object['getOwnPropertySymbols'](_0x122da1);_0x50435f&&(_0x1f1c83=_0x1f1c83['filter'](function(_0x329e28){return Object['getOwnPropertyDescriptor'](_0x122da1,_0x329e28)['enumerable'];})),_0x413141['push']['apply'](_0x413141,_0x1f1c83);}return _0x413141;}function _0x4c50a5(_0x17ae60){for(var _0x502bdd=0x1;_0x502bdd<arguments['length'];_0x502bdd++){var _0x46925f=null!=arguments[_0x502bdd]?arguments[_0x502bdd]:{};_0x502bdd%0x2?_0x9a07a6(Object(_0x46925f),!0x0)['forEach'](function(_0x5e182){_0x5ba299(_0x17ae60,_0x5e182,_0x46925f[_0x5e182]);}):Object['getOwnPropertyDescriptors']?Object['defineProperties'](_0x17ae60,Object['getOwnPropertyDescriptors'](_0x46925f)):_0x9a07a6(Object(_0x46925f))['forEach'](function(_0x31df92){Object['defineProperty'](_0x17ae60,_0x31df92,Object['getOwnPropertyDescriptor'](_0x46925f,_0x31df92));});}return _0x17ae60;}var _0x3e91af=0x10,_0x5e47b7=0x10,_0x1eb546=0x1e,_0x3651d0=(function(){function _0x3ed76e(_0x406f9d){_0x1d88b2(this,_0x3ed76e),this['oVideoRenderHandle']=_0x406f9d,this['renderEngine']='webgl',this['oVideoHandle']=null,this['mainCanvasID']=null,this['curTimestamp']=0x0,this['mainSubPort']=0x0,this['mainVaildSubPort']=0x0,this['mainFECCorrect']=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'],this['FECErrorCode']=0x0,this['subPortNum']=0x0,this['FECShowMode']=_0x21dfba['SRPTZDISPLAYMODE']['SR_DM_RANGE'],this['pFishParamManager']=null,this['enPixelFormat']=_0x21dfba['SRPIXELFORMAT']['SR_PF_NULL'],this['InitFECParam'](),this['nTimePerFrame']=0x0,this['nFrameRate']=0x0,this['privateNormalLinesInfo']=[],this['maxNormalPrivateLineTimeStamp']=0x0,this['curNormalLinesInfo']=null,this['privateThermalLinesInfo']=[],this['curThermalLinesInfo']=null,this['privateTemLinesInfo']=[],this['maxTemPrivateLineTimeStamp']=0x0,this['curTemLinesInfo']=null,this['m_nTEMDrawLinescount']=0x0,this['m_nTEMDrawFontscount']=0x0,this['privateTargetLinesInfo']=[],this['maxTargetPrivateLineTimeStamp']=0x0,this['curTargetLinesInfo']=null,this['privateMDLinesInfo']=[],this['maxMDPrivateLineTimeStamp']=0x0,this['curMDLinesInfo']=null,this['privateExactLinesInfo']=[],this['maxExactPrivateLineTimeStamp']=0x0,this['curExactLinesInfo']=null,this['privateExactRuleLinesInfo']=[],this['maxExactRulePrivateLineTimeStamp']=0x0,this['curExactRuleLinesInfo']=null,this['DrawlinesParamArray']=[],this['DrawlinesParamArrayAllPointNum']=0x0,this['bDrawlinesParamArrayFill']=0x0,this['DrawMosaiclinesParamArray']=[],this['DrawTargetlinesParamArray']=[],this['DrawPOSFontsParamArray']=[],this['DrawTargetEventIDList']=[],this['privateNormalFontsInfo']=[],this['maxNormalPrivateFontTimeStamp']=0x0,this['curNormalFontsInfo']=null,this['curNormalPOSFontsInfo']=null,this['privateTemFontsInfo']=[],this['maxTemPrivateFontTimeStamp']=0x0,this['curTemFontsInfo']=null,this['privateTargetFontsInfo']=[],this['maxTargetPrivateFontTimeStamp']=0x0,this['curTargetFontsInfo']=null,this['privateExactPOSFontsInfo']=[],this['maxExactPOSPrivateFontTimeStamp']=0x0,this['curExactPOSFontsInfo']=null,this['privateExactFontsInfo']=[],this['maxExactPrivateFontTimeStamp']=0x0,this['curExactFontsInfo']=null,this['DrawFontParamArray']=[],this['privateImageInfo']=[],this['maxPrivateImageTimeStamp']=0x0,this['curImagesInfo']={},this['privatePNGImageInfo']=[],this['m_bEnableIVSEx']=!0x0,this['m_bEnableMDEx']=!0x0,this['m_bEnablePICEx']=!0x1,this['m_bDisPos']=!0x1,this['m_bEnableTEMEx']=!0x1,this['m_bEnableTEMBox']=!0x1,this['m_bEnableTEMLine']=!0x1,this['m_bEnableTEMPoint']=!0x1,this['m_bEnableTrackEx']=!0x1,this['m_bEnableTrackPeople']=!0x0,this['m_bEnableTrackVehicle']=!0x0,this['m_bEnableThermal']=!0x1,this['m_bEnableThermalFireMask']=!0x1,this['m_bEnableThermalRuleGas']=!0x1,this['m_bEnableThermalTargetGas']=!0x1,this['m_bEnableFIREEx']=!0x0,this['m_bEnableFireDis']=!0x0,this['m_bEnableFireMax']=!0x1,this['m_bEnableFireMaxPos']=!0x0,this['m_bEnableFireDistance']=!0x0,this['bSRCallBackFlag']=!0x1,this['hasSetFECParamManager']=!0x1,this['panoramaDisplayEffect']=0x0,this['viewParamType']=0x3,this['viewParamValue']=0.2,this['pstWaterFontParamArray']=[];for(var _0x1b198a=0x0;_0x1b198a<_0x3e91af;_0x1b198a++)this['pstWaterFontParamArray'][_0x1b198a]=[];this['pstWaterFontParam']=null,this['pWaterImageParam']=[],this['waterMarkImageIndex']=0x0,this['waterMarkImageMax']=0x1,this['baseWaterMarkImageTime']=0x0,this['finishDecodeImage']=!0x1,this['aPOSAdaptBuf']=[],this['textCanvas']=null,this['MosaicType']=0x0,this['MosaicSize']=0x0,this['MosaicColorR']=0x0,this['MosaicColorG']=0x0,this['MosaicColorB']=0x0,this['MosaicColorA']=0x0;}return _0x4e686c(_0x3ed76e,[{'key':'InitDisplay','value':function(_0x5f1e2a,_0x2e0454,_0x3ec2cd){if(this['renderEngine']=_0x2e0454,this['mainCanvasID']=_0x5f1e2a,this['printfFlag']=this['oVideoRenderHandle']['printfFlag'],'2d'===this['renderEngine']||'2D'===this['renderEngine'])this['oVideoHandle']=new _0x15f25d(),this['printfFlag']>=0x0&&console['log']('2d\\x20render');else{if(this['oVideoHandle']=new _0x506212(),this['mainFECCorrect']!=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'])null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x28ed38()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0;else{null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x28ed38()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0;var _0x3f7be7=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'];_0x3f7be7=0x1==this['panoramaDisplayEffect']?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_PANORAMA_SPHERE']:0x3==this['panoramaDisplayEffect']?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_PANORAMA_PLANET']:_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'],this['mainFECCorrect']=_0x3f7be7;}this['printfFlag']>=0x0&&console['log']('webgl\\x20render\\x20this.printfFlag:'+this['printfFlag']);}return this['enPixelFormat']=_0x3ec2cd,this['oVideoHandle']['SR_Init'](_0x5f1e2a,_0x3ec2cd),this['mainVaildSubPort']=this['oVideoHandle']['SR_AddSubPort'](this['mainFECCorrect']),-0x1==this['mainVaildSubPort']?(console['info']('%c\\x20InitDisplay\\x20SR_AddSubPort\\x20error\\x20subport:%d','color:\\x20red',this['mainVaildSubPort']),0x0):(this['mainFECCorrect']==_0x21dfba['SRDISPLAYEFFECT']['SR_DE_PANORAMA_SPHERE']&&this['oVideoHandle']['SR_SetViewParam'](this['viewParamType'],this['viewParamValue']),0x1);}},{'key':'ReleaseDisplay','value':function(){if(null!=this['oVideoHandle']&&(this['oVideoHandle']['SR_DelSubPort'](this['mainVaildSubPort']),this['oVideoHandle']['SR_Destroy'](),this['oVideoHandle']=null),this['subPortNum']>0x0){for(var _0x42d98a=0x1;_0x42d98a<_0x3e91af;_0x42d98a++)0x0!=this['stFishEyeManager'][_0x42d98a]['nSubPort']&&null!=this['stFishEyeManager'][_0x42d98a]['sCanvasID']&&0x0!=this['stFishEyeManager'][_0x42d98a]['bInited']&&(this['FEC_Disable'](_0x42d98a),this['FEC_DelPort'](_0x42d98a));}for(var _0x50c8a1=0x0;_0x50c8a1<_0x3e91af;_0x50c8a1++)this['stFishEyeManager'][_0x50c8a1]['pRender']=null;return this['stFishEyeManager']['splice'](0x0,this['stFishEyeManager']['length']),this['stFishParam']['splice'](0x0,this['stFishParam']['length']),null!=this['pFishParamManager']&&(this['pFishParamManager']['DeInit'](),this['pFishParamManager']=null),this['FECShowMode']=_0x21dfba['SRPTZDISPLAYMODE']['SR_DM_RANGE'],this['DeInitPrivateParam'](),0x1;}},{'key':'DeInitPrivateParam','value':function(){this['privateNormalLinesInfo']['splice'](0x0,this['privateNormalLinesInfo']['length']),this['curNormalLinesInfo']=null,this['privateThermalLinesInfo']['splice'](0x0,this['privateThermalLinesInfo']['length']),this['curThermalLinesInfo']=null,this['privateTemLinesInfo']['splice'](0x0,this['privateTemLinesInfo']['length']),this['curTemLinesInfo']=null,this['privateTargetLinesInfo']['splice'](0x0,this['privateTargetLinesInfo']['length']),this['curTargetLinesInfo']=null,this['privateMDLinesInfo']['splice'](0x0,this['privateMDLinesInfo']['length']),this['curMDLinesInfo']=null,this['privateExactLinesInfo']['splice'](0x0,this['privateExactLinesInfo']['length']),this['curExactLinesInfo']=null,this['privateExactRuleLinesInfo']['splice'](0x0,this['privateExactRuleLinesInfo']['length']),this['curExactRuleLinesInfo']=null,this['privateNormalFontsInfo']['splice'](0x0,this['privateNormalFontsInfo']['length']),this['curNormalFontsInfo']=null,this['curNormalPOSFontsInfo']=null,this['privateTemFontsInfo']['splice'](0x0,this['privateTemFontsInfo']['length']),this['curTemFontsInfo']=null,this['privateTargetFontsInfo']['splice'](0x0,this['privateTargetFontsInfo']['length']),this['curTargetFontsInfo']=null,this['privateExactPOSFontsInfo']['splice'](0x0,this['privateExactPOSFontsInfo']['length']),this['curExactPOSFontsInfo']=null,this['privateExactFontsInfo']['splice'](0x0,this['privateExactFontsInfo']['length']),this['curExactFontsInfo']=null,this['privateImageInfo']['splice'](0x0,this['privateImageInfo']['length']),this['curImagesInfo']=null,this['privatePNGImageInfo']['splice'](0x0,this['privatePNGImageInfo']['length']),this['DrawlinesParamArray']['splice'](0x0,this['DrawlinesParamArray']['length']),this['DrawTargetlinesParamArray']['splice'](0x0,this['DrawTargetlinesParamArray']['length']),this['DrawMosaiclinesParamArray']['splice'](0x0,this['DrawMosaiclinesParamArray']['length']),this['DrawPOSFontsParamArray']['splice'](0x0,this['DrawPOSFontsParamArray']['length']),this['DrawTargetEventIDList']['splice'](0x0,this['DrawTargetEventIDList']['length']),this['DrawFontParamArray']['splice'](0x0,this['DrawFontParamArray']['length']);for(var _0xb73e99=0x0;_0xb73e99<_0x3e91af;_0xb73e99++)this['pstWaterFontParamArray'][_0xb73e99]['splice'](0x0,this['pstWaterFontParamArray'][_0xb73e99]['length']);this['pWaterImageParam']['splice'](0x0,this['pWaterImageParam']['length']),this['bSRCallBackFlag']=!0x1,this['textCanvas']=null,this['curLinesInfo']=null,this['pstWaterFontParam']=null;}},{'key':'DisplayFrame','value':function(_0x5901af,_0x6ac278,_0x58a285,_0x26d976,_0xd14010,_0x198991,_0x4f22a1,_0x522fb1){var _0x312389=this;return new Promise(function(_0xfcae69){null!=_0x5901af&&(_0x312389['curTimestamp']=_0x26d976),_0x312389['bSRCallBackFlag']||(null!=_0x312389['oVideoHandle']&&_0x312389['oVideoHandle']['SR_SetCallBack'](_0x312389['WebGLDisplayCallBack'],_0x312389,_0x21dfba['SRCALLBACKTYPE']['SR_CBT_NULL']),_0x312389['bSRCallBackFlag']=!0x0);var _0x20ae3e=0x1;if(0x2==_0x312389['panoramaDisplayEffect']&&(_0x6ac278==0x2*_0x58a285?_0x312389['SetPanoramaDisplayEffect'](0x1):_0x312389['SetPanoramaDisplayEffect'](0x0)),null!=_0x5901af&&(_0x312389['nFrameRate']=_0x4f22a1,_0x312389['nTimePerFrame']=0x3e8/_0x4f22a1,0x0==_0x522fb1&&(_0x312389['FindIntelNodefromList'](_0x312389['curTimestamp']),_0x312389['CheckLinesInfo'](),_0x312389['CheckFontsInfo']()),null!=_0x312389['oVideoHandle']&&0x1==(_0x20ae3e=_0x312389['oVideoHandle']['SR_UpdateFrameData'](_0x5901af,_0x6ac278,_0x58a285,_0xd14010,_0x198991))&&(_0x20ae3e=_0x312389['oVideoHandle']['SR_Display'](!0x1)),_0x312389['subPortNum']>0x0)){for(var _0x520cfe=0x1;_0x520cfe<_0x3e91af;_0x520cfe++)0x0!=_0x312389['stFishEyeManager'][_0x520cfe]['nSubPort']&&null!=_0x312389['stFishEyeManager'][_0x520cfe]['sCanvasID']&&0x0!=_0x312389['stFishEyeManager'][_0x520cfe]['bInited']&&null!=_0x312389['stFishEyeManager'][_0x520cfe]['pRender']&&0x1==(_0x20ae3e=_0x312389['stFishEyeManager'][_0x520cfe]['pRender']['SR_UpdateFrameData'](_0x5901af,_0x6ac278,_0x58a285,null,null))&&(_0x20ae3e=_0x312389['stFishEyeManager'][_0x520cfe]['pRender']['SR_Display'](!0x1));}_0xfcae69({'timestamp':_0x312389['curTimestamp'],'DrawRet':_0x20ae3e});});}},{'key':'SetDisplayRect','value':function(_0x225d8f,_0x2062f7,_0x1d632d,_0x37cec9){return null!=this['oVideoHandle']&&(this['oVideoHandle']['SR_SetDisplayRect'](_0x225d8f,_0x2062f7,_0x1d632d,_0x37cec9,_0x21dfba['SRSETRECTTYPE']['SR_SRT_SRC']),null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][0x0]['splice'](0x0,this['pstWaterFontParamArray'][0x0]['length']),this['CalculateWaterMarkParam'](this['oVideoHandle'],0x0,this['pstWaterFontParam']))),0x1;}},{'key':'SetCanvasSize','value':function(_0x5f601c,_0x5618aa,_0xcaaff0){var _0x142703=this['oVideoHandle'];if(_0xcaaff0>0x0&&(_0x142703=this['stFishEyeManager'][_0xcaaff0]['pRender']),null!=_0x142703){if(_0x142703['SR_SetCanvasSize'](_0x5f601c,_0x5618aa),0x0!=this['pstWaterFontParamArray'][_0xcaaff0]['length']&&null!=this['pstWaterFontParam']){if(0x1==this['pstWaterFontParam']['pstCanvasAdapt']['nCanvasAdaptMode'])this['pstWaterFontParamArray'][_0xcaaff0]['splice'](0x0,this['pstWaterFontParamArray'][_0xcaaff0]['length']),this['CalculateWaterMarkParam'](_0x142703,_0xcaaff0,this['pstWaterFontParam']);else{if(0x2==this['pstWaterFontParam']['pstCanvasAdapt']['nCanvasAdaptMode']){var _0x55fa76=this['mainCanvasID']['width'],_0x3ecd86=this['mainCanvasID']['height'];_0xcaaff0>0x0&&(_0x55fa76=this['stFishEyeManager'][_0xcaaff0]['sCanvasID']['width'],_0x3ecd86=this['stFishEyeManager'][_0xcaaff0]['sCanvasID']['height']);for(var _0x1c9ed0=0x0;_0x1c9ed0<this['pstWaterFontParamArray'][_0xcaaff0]['length'];++_0x1c9ed0)this['pstWaterFontParamArray'][_0xcaaff0][_0x1c9ed0]['nFontWidth']=this['pstWaterFontParam']['pstFontSize']['nFontWidth']*_0x55fa76/this['pstWaterFontParam']['pstCanvasAdapt']['nBaseCanvasWidth'],this['pstWaterFontParamArray'][_0xcaaff0][_0x1c9ed0]['nFontHeight']=this['pstWaterFontParam']['pstFontSize']['nFontHeight']*_0x3ecd86/this['pstWaterFontParam']['pstCanvasAdapt']['nBaseCanvasHeight'];}}}return 0x1;}return 0x0;}},{'key':'GetCanvasSize','value':function(){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_GetCanvasSize']():0x0;}},{'key':'SetAntialias','value':function(_0x309b96){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_SetAntialias'](_0x309b96):0x0;}},{'key':'SetD3DPostProcess','value':function(_0x357377,_0x5d0751){var _0x5077b3=0x1;return null!=this['oVideoHandle']?(_0x5077b3=this['oVideoHandle']['SR_SetImagePostProcess'](_0x357377,_0x5d0751),null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][0x0]['splice'](0x0,this['pstWaterFontParamArray'][0x0]['length']),this['CalculateWaterMarkParam'](this['oVideoHandle'],0x0,this['pstWaterFontParam']))):_0x5077b3=0x0,_0x5077b3;}},{'key':'InitFECParam','value':function(){this['stFishEyeManager']=[];for(var _0xf522e7=0x0;_0xf522e7<_0x3e91af;_0xf522e7++)this['stFishEyeManager'][_0xf522e7]={},this['stFishEyeManager'][_0xf522e7]['pRender']=null,this['stFishEyeManager'][_0xf522e7]['nSubPort']=0x0,this['stFishEyeManager'][_0xf522e7]['sCanvasID']=null,this['stFishEyeManager'][_0xf522e7]['bUsed']=0x0,this['stFishEyeManager'][_0xf522e7]['bInited']=0x0,this['stFishEyeManager'][_0xf522e7]['nValidSubPort']=0x0,this['stFishEyeManager'][_0xf522e7]['emPlaceType']=_0x5904b1,this['stFishEyeManager'][_0xf522e7]['emCorrectType']=_0xf6e73b,this['stFishEyeManager'][_0xf522e7]['emEffect']=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];this['stFishParam']=[];for(var _0x1313be=0x0;_0x1313be<_0x3e91af;_0x1313be++)this['stFishParam'][_0x1313be]={},this['stFishParam'][_0x1313be]['nUpDateType']=0x0,this['stFishParam'][_0x1313be]['stPTZParam']={},this['stFishParam'][_0x1313be]['stPTZParam']['fPTZPositionX']=0x0,this['stFishParam'][_0x1313be]['stPTZParam']['fPTZPositionY']=0x0,this['stFishParam'][_0x1313be]['stCycleParam']={},this['stFishParam'][_0x1313be]['stCycleParam']['fRadiusLeft']=0x0,this['stFishParam'][_0x1313be]['stCycleParam']['fRadiusRight']=0x0,this['stFishParam'][_0x1313be]['stCycleParam']['fRadiusTop']=0x0,this['stFishParam'][_0x1313be]['stCycleParam']['fRadiusBottom']=0x0,this['stFishParam'][_0x1313be]['fZoom']=0x0,this['stFishParam'][_0x1313be]['fWideScanOffset']=0x0,this['stFishParam'][_0x1313be]['stPTZColor']={},this['stFishParam'][_0x1313be]['stPTZColor']['nR']=0x0,this['stFishParam'][_0x1313be]['stPTZColor']['nG']=0x0,this['stFishParam'][_0x1313be]['stPTZColor']['nB']=0x0,this['stFishParam'][_0x1313be]['stPTZColor']['nAlpha']=0x0,this['stFishParam'][_0x1313be]['stPTZSelect']={},this['stFishParam'][_0x1313be]['stPTZSelect']['fTop']=0x0,this['stFishParam'][_0x1313be]['stPTZSelect']['fBottom']=0x0,this['stFishParam'][_0x1313be]['stPTZSelect']['fLeft']=0x0,this['stFishParam'][_0x1313be]['stPTZSelect']['fRight']=0x0,this['stFishParam'][_0x1313be]['nCut']=0x0;}},{'key':'FEC_SetCanvasID','value':function(_0x1171d4){return this['mainFECCorrect']=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'],0x1;}},{'key':'FEC_ResetCorrectType','value':function(_0x446521,_0x4ca1d0,_0x22b20f){if(!0x1===this['hasSetFECParamManager']&&(null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x28ed38()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0),_0x22b20f!=_0xf6e73b&&_0x22b20f!=_0x340cf3&&_0x22b20f!=_0x3c6685&&_0x22b20f!=_0xefb8fa&&_0x22b20f!=_0x2bd62a&&_0x22b20f!=_0x56a1c6&&_0x22b20f!=_0x39a314&&_0x22b20f!=_0xe75a42&&_0x22b20f!=_0x102fcd&&_0x22b20f!=_0x1f9056&&_0x22b20f!=_0x406210)return console['log']('%c\\x20hardDecoder\\x20not\\x20support\\x20correctType:%d','color:red',_0x22b20f),this['FECErrorCode']=0x10,0x0;if(0x1!=this['FECParamJudge'](_0x446521,_0x4ca1d0,_0x22b20f))return 0x0;var _0x4ee606=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];if(_0x4ee606=this['_ConvertDisplayEffect'](_0x4ca1d0,_0x22b20f),0x0==_0x446521&&null==this['stFishEyeManager'][_0x446521]['pRender']&&(this['stFishEyeManager'][_0x446521]['pRender']=this['oVideoHandle'],this['stFishEyeManager'][_0x446521]['nSubPort']=_0x446521,this['stFishEyeManager'][_0x446521]['sCanvasID']=this['mainCanvasID'],this['stFishEyeManager'][_0x446521]['bUsed']=0x1,this['stFishEyeManager'][_0x446521]['bInited']=0x1,this['stFishEyeManager'][_0x446521]['nValidSubPort']=this['mainVaildSubPort'],this['stFishEyeManager'][_0x446521]['emPlaceType']=_0x4ca1d0,this['stFishEyeManager'][_0x446521]['emCorrectType']=_0x22b20f,this['stFishEyeManager'][_0x446521]['emEffect']=_0x4ee606,this['mainFECCorrect']=_0x4ee606),null!=this['stFishEyeManager'][_0x446521]['pRender']){this['stFishEyeManager'][_0x446521]['pRender']['SR_DelSubPort'](this['stFishEyeManager'][_0x446521]['nValidSubPort']);var _0xb17bf0=this['stFishEyeManager'][_0x446521]['pRender']['SR_AddSubPort'](_0x4ee606);if(0x0==_0x446521?this['oVideoHandle']['SR_SetCallBack'](this['WebGLDisplayCallBack'],this,_0x21dfba['SRCALLBACKTYPE']['SR_CBT_NULL']):this['stFishEyeManager'][_0x446521]['pRender']['SR_SetCallBack'](this['WebGLDisplaySubCallBack'],{'nUser':this,'handle':this['stFishEyeManager'][_0x446521]['pRender'],'nSubPort':_0x446521},_0x21dfba['SRCALLBACKTYPE']['SR_CBT_NULL']),null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][_0x446521]['splice'](0x0,this['pstWaterFontParamArray'][_0x446521]['length']),this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x446521]['pRender'],_0x446521,this['pstWaterFontParam'])),-0x1==_0xb17bf0)return console['info']('%c\\x20FEC_ResetCorrectType\\x20SR_AddSubPort\\x20error\\x20subport:%d','color:\\x20red',_0xb17bf0),0x0;if(this['stFishEyeManager'][_0x446521]['nValidSubPort']=_0xb17bf0,this['stFishEyeManager'][_0x446521]['emPlaceType']=_0x4ca1d0,this['stFishEyeManager'][_0x446521]['emCorrectType']=_0x22b20f,this['stFishEyeManager'][_0x446521]['emEffect']=_0x4ee606,_0xefb8fa<=this['stFishEyeManager'][_0x446521]['emCorrectType']){var _0x463908=this['stFishEyeManager'][_0x446521]['pRender']['SR_SetRenderState'](_0x21dfba['SRRENDERSTATETYPE']['SR_RST_BACK_CULL'],0x0);_0x21dfba['ERRCODE']['SR_OK']!=_0x463908&&console['log']('>>>VideoRender.js\\x20SR_SetRenderState\\x20failed\\x20ret:%08x\\x0a',_0x463908);}}return this['FECShowMode']>0x0&&null!=this['stFishEyeManager'][_0x446521]['pRender']&&this['stFishEyeManager'][_0x446521]['pRender']['SR_SetPTZDisplayMode'](this['FECShowMode']),0x0==_0x446521&&(this['mainVaildSubPort']=this['stFishEyeManager'][_0x446521]['nValidSubPort']),0x1;}},{'key':'FEC_GetPort','value':function(_0x3ce985,_0x102b6f){if(_0x102b6f!=_0xf6e73b&&_0x102b6f!=_0x340cf3&&_0x102b6f!=_0x3c6685&&_0x102b6f!=_0xefb8fa&&_0x102b6f!=_0x2bd62a&&_0x102b6f!=_0x56a1c6&&_0x102b6f!=_0x39a314&&_0x102b6f!=_0x1f9056&&_0x102b6f!=_0x406210)return console['log']('%c\\x2020231112\\x20hardDecoder\\x20not\\x20support\\x20emCorrectType:%d','color:red',_0x102b6f),this['FECErrorCode']=0x10,-0x1;var _0x123d52;if(0x1!=this['FECParamJudge'](-0x1,_0x3ce985,_0x102b6f))return console['log']('VideoRender.js\\x20FEC_GetPort\\x20FECParamJudge\\x20Get\\x20error'),-0x1;var _0x963676=0x0;for(_0x123d52=0x1;_0x123d52<_0x3e91af;_0x123d52++)if(0x0==this['stFishEyeManager'][_0x123d52]['nSubPort']&&0x0==this['stFishEyeManager'][_0x123d52]['bUsed']){this['stFishEyeManager'][_0x123d52]['nSubPort']=_0x123d52,this['stFishEyeManager'][_0x123d52]['nValidSubPort']=-0x1,this['stFishEyeManager'][_0x123d52]['bUsed']=0x1,this['stFishEyeManager'][_0x123d52]['emPlaceType']=_0x3ce985,this['stFishEyeManager'][_0x123d52]['emCorrectType']=_0x102b6f,_0x963676=_0x123d52;break;}if(_0x3e91af==_0x123d52)return console['info']('%c\\x20FEC_GetPort-12\\x20fish\\x20subport\\x20max','color:\\x20red'),this['FECErrorCode']=0x504,-0x1;var _0x4f33e1=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];return _0x4f33e1=this['_ConvertDisplayEffect'](this['stFishEyeManager'][_0x963676]['emPlaceType'],this['stFishEyeManager'][_0x963676]['emCorrectType']),_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL']!=_0x4f33e1?(0x0==this['stFishEyeManager'][_0x963676]['bInited']&&(this['stFishEyeManager'][_0x963676]['emEffect']=_0x4f33e1,this['stFishEyeManager'][_0x963676]['bInited']=0x0,this['stFishParam'][_0x963676]['fZoom']=0.005,this['stFishParam'][_0x963676]['stPTZParam']['fPTZPositionX']=0.5,this['stFishParam'][_0x963676]['stPTZParam']['fPTZPositionY']=0.5,this['stFishParam'][_0x963676]['fWideScanOffset']=0x0),this['FECErrorCode']=0x0,this['subPortNum']++,_0x963676):_0x963676<_0x3e91af&&0x0==this['stFishEyeManager'][_0x963676]['bInited']?(this['stFishEyeManager'][_0x963676]['emEffect']=_0x4f33e1,this['stFishEyeManager'][_0x963676]['bInited']=0x0,this['stFishParam'][_0x963676]['fZoom']=0x0,this['stFishParam'][_0x963676]['stPTZParam']['fPTZPositionX']=0x0,this['stFishParam'][_0x963676]['stPTZParam']['fPTZPositionY']=0x0,this['stFishParam'][_0x963676]['fWideScanOffset']=0x0,this['FECErrorCode']=0x0,this['subPortNum']++,_0x963676):(this['stFishEyeManager'][_0x123d52]['pRender']=null,this['stFishEyeManager'][_0x123d52]['nSubPort']=0x0,this['stFishEyeManager'][_0x123d52]['sCanvasID']=null,this['stFishEyeManager'][_0x123d52]['bUsed']=0x0,this['stFishEyeManager'][_0x123d52]['bInited']=0x0,this['stFishEyeManager'][_0x123d52]['nValidSubPort']=0x0,this['stFishEyeManager'][_0x123d52]['emPlaceType']=_0x5904b1,this['stFishEyeManager'][_0x123d52]['emCorrectType']=_0xf6e73b,this['stFishEyeManager'][_0x123d52]['emEffect']=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'],this['FECErrorCode']=_0x42e372,-0x1);}},{'key':'FECParamJudge','value':function(_0x1b302a,_0x4bc610,_0x3ef46b){if(0x0!=_0x1b302a){if(_0x3ef46b==_0xf6e73b||_0x3ef46b==_0x340cf3||_0x3ef46b==_0x3c6685||_0x3ef46b==_0x56a1c6||_0x3ef46b==_0x102fcd||_0x3ef46b==_0x1f9056||_0x3ef46b==_0x406210)return console['log']('VideoRender.js\\x20FECParamJudge\\x201\\x20emCorrectType:'+_0x3ef46b),this['FECErrorCode']=_0x42e372,0x0;if(this['stFishEyeManager'][0x0]['emCorrectType']==_0x406210||this['stFishEyeManager'][0x0]['emCorrectType']==_0x1f9056)return this['FECErrorCode']=_0x42e372,console['log']('VideoRender.js\\x20FECParamJudge\\x202\\x20emCorrectType:'+_0x3ef46b),0x0;}if(0x0==_0x1b302a&&(_0x1f9056==_0x3ef46b||_0x406210==_0x3ef46b)){for(var _0x2b474e=0x1;_0x2b474e<_0x3e91af;_0x2b474e++)if(this['stFishEyeManager'][_0x2b474e]['bUsed'])return this['FECErrorCode']=_0x42e372,console['log']('VideoRender.js\\x20FECParamJudge\\x203\\x20subPort:'+_0x1b302a+',emCorrectType:'+_0x3ef46b),0x0;}if(!(_0x1adf2b!=_0x4bc610&&_0x5904b1!=_0x4bc610||_0x56a1c6!=_0x3ef46b&&_0x1f9056!=_0x3ef46b&&_0x406210!=_0x3ef46b))return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x204\\x20floor\\x20and\\x20ceiling\\x20not\\x20support\\x20lat','color:\\x20red'),this['FECErrorCode']=_0x42e372,0x0;if(_0x10787f==_0x4bc610&&(_0x39a314==_0x3ef46b||_0xe75a42==_0x3ef46b||_0x340cf3==_0x3ef46b))return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x205\\x20wall\\x20not\\x20support\\x20cylinger','color:\\x20red'),this['FECErrorCode']=_0x42e372,0x0;if(_0x10787f!=_0x4bc610&&_0x1adf2b!=_0x4bc610&&_0x5904b1!=_0x4bc610)return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x206\\x20emPlaceType\\x20only\\x20support\\x20floor,\\x20ceiling\\x20and\\x20wall','color:\\x20red'),this['FECErrorCode']=MP_E_SUPPORT,0x0;if(0x0!=_0x3ef46b&&_0x3ef46b!=_0x2bd62a&&_0x3ef46b!=_0x340cf3&&_0x3ef46b!=_0x3c6685&&_0x3ef46b!=_0x56a1c6&&_0x3ef46b!=_0xefb8fa&&_0x3ef46b!=_0x39a314&&_0x3ef46b!=_0xe75a42&&_0x3ef46b!=_0x102fcd&&_0x3ef46b!=_0x1f9056&&_0x3ef46b!=_0x406210)return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x207\\x20emCorrectType\\x20error','color:\\x20red'),this['FECErrorCode']=MP_E_SUPPORT,0x0;for(var _0xda5976=0x0;_0xda5976<_0x3e91af;_0xda5976++){if(this['stFishEyeManager'][_0xda5976]['bUsed']&&this['stFishEyeManager'][_0xda5976]['emPlaceType']!=_0x4bc610)return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x208\\x20emPlaceType\\x20changed','color:\\x20red'),this['FECErrorCode']=0x517,0x0;if(_0xda5976!=_0x1b302a){if(this['stFishEyeManager'][_0xda5976]['bUsed']&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0x2bd62a&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0xefb8fa&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0x39a314&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0xe75a42&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0x102fcd&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0x1f9056&&this['stFishEyeManager'][_0xda5976]['emCorrectType']!=_0x406210&&_0x3ef46b!=_0x2bd62a&&_0x3ef46b!=_0xefb8fa&&_0x3ef46b!=_0x39a314&&_0x3ef46b!=_0xe75a42&&_0x3ef46b!=_0x102fcd&&_0x3ef46b!=_0x1f9056&&_0x3ef46b!=_0x406210)return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x209\\x20origin/180/360/lat\\x20only\\x20display\\x20one\\x20port','color:\\x20red'),this['FECErrorCode']=0x518,0x0;if(this['stFishEyeManager'][_0xda5976]['bUsed']&&(this['stFishEyeManager'][_0xda5976]['emCorrectType']==_0x2bd62a&&_0x3ef46b==_0x340cf3||this['stFishEyeManager'][_0xda5976]['emCorrectType']==_0x340cf3&&_0x3ef46b==_0x2bd62a))return console['info']('%c\\x20VideoRender.js\\x20FECParamJudge\\x2010\\x20180\\x20cannot\\x20support\\x20ptz','color:\\x20red'),this['FECErrorCode']=0x518,0x0;}}return 0x1;}},{'key':'FEC_Enable','value':function(_0x47ace0){return _0x47ace0<0x1||_0x47ace0>0x1f||null==_0x47ace0?(console['info']('%c\\x20FEC_Enable-1\\x20nSubPort:%d','color:\\x20red',_0x47ace0),this['FECErrorCode']=_0x1dae8d,0x0):null!==this['stFishEyeManager'][_0x47ace0]['pRender']?(console['info']('%c\\x20FEC_Enable-2\\x20nSubPort:%d','color:\\x20red',_0x47ace0),this['FECErrorCode']=0x515,0x0):(null==this['stFishEyeManager'][_0x47ace0]['pRender']&&(this['stFishEyeManager'][_0x47ace0]['pRender']=new _0x506212(),null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x28ed38()),this['stFishEyeManager'][_0x47ace0]['pRender']['SR_SetFishParamManager'](this['pFishParamManager'])),0x1);}},{'key':'FEC_SetWnd','value':function(_0x478496,_0x287564){if(_0x478496<0x1||_0x478496>0x1f||null==_0x478496)return console['info']('%c\\x20FEC_SetWnd-1\\x20nSubPort:%d','color:\\x20red',_0x478496),this['FECErrorCode']=_0x1dae8d,0x0;if(null==this['stFishEyeManager'][_0x478496]['pRender'])return console['info']('%c\\x20FEC_SetWnd-2\\x20nSubPort:%d\\x20pRender\\x20is\\x20null','color:\\x20red',_0x478496),this['FECErrorCode']=_0x1e1231,0x0;if(0x0==this['stFishEyeManager'][_0x478496]['bUsed'])return console['info']('%c\\x20FEC_SetWnd-3\\x20nSubPort:%d\\x20bUsed:%d','color:\\x20red',_0x478496,this['stFishEyeManager'][_0x478496]['bUsed']),this['FECErrorCode']=_0x421a67,0x0;if(null==_0x287564)return console['info']('%c\\x20FEC_SetWnd-4\\x20nSubPort:%d\\x20sCanvasID:%s','color:\\x20red',_0x478496,_0x287564),this['FECErrorCode']=0x519,0x0;if(0x0!=this['stFishEyeManager'][_0x478496]['nSubPort']&&0x0!=this['stFishEyeManager'][_0x478496]['bUsed']){if(0x0!=this['stFishEyeManager'][_0x478496]['bInited']&&null!=this['stFishEyeManager'][_0x478496]['sCanvasID'])return _0x287564!=this['stFishEyeManager'][_0x478496]['sCanvasID']?(console['info']('%c\\x20FEC_SetWnd-5\\x20nSubPort:%d\\x20sCanvasID:%s\\x20already\\x20init','color:\\x20red',_0x478496,_0x287564),this['FECErrorCode']=0x506,0x0):0x1;var _0x2d1723=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];_0x2d1723=this['_ConvertDisplayEffect'](this['stFishEyeManager'][_0x478496]['emPlaceType'],this['stFishEyeManager'][_0x478496]['emCorrectType']);var _0x270e11=this['stFishEyeManager'][_0x478496]['pRender']['SR_Init'](_0x287564,this['enPixelFormat']),_0x20222d=this['stFishEyeManager'][_0x478496]['pRender']['SR_AddSubPort'](_0x2d1723);if(-0x1==_0x20222d)return console['info']('%c\\x20FEC_SetWnd\\x20SR_AddSubPort\\x20error\\x20subport:%d','color:\\x20red',_0x478496),0x0;if(this['stFishEyeManager'][_0x478496]['nValidSubPort']=_0x20222d,_0x21dfba['ERRCODE']['SR_OK']!=_0x270e11)return this['stFishEyeManager'][_0x478496]['bInited']=0x0,this['stFishEyeManager'][_0x478496]['sCanvasID']=null,this['FECErrorCode']=_0x421a67,0x0;if(this['stFishEyeManager'][_0x478496]['bInited']=0x1,this['stFishEyeManager'][_0x478496]['sCanvasID']=_0x287564,_0xefb8fa<=this['stFishEyeManager'][_0x478496]['emCorrectType']){var _0x3fe257=this['stFishEyeManager'][_0x478496]['pRender']['SR_SetRenderState'](_0x21dfba['SRRENDERSTATETYPE']['SR_RST_BACK_CULL'],0x0);_0x21dfba['ERRCODE']['SR_OK']!=_0x3fe257&&console['log']('>>>VideoRender.js\\x20SR_SetRenderState\\x20failed\\x20ret:%08x\\x0a',_0x3fe257);}return this['stFishEyeManager'][_0x478496]['pRender']['SR_SetCallBack'](this['WebGLDisplaySubCallBack'],{'nUser':this,'handle':this['stFishEyeManager'][_0x478496]['pRender'],'nSubPort':_0x478496},_0x21dfba['SRCALLBACKTYPE']['SR_CBT_NULL']),null!=this['pstWaterFontParam']&&this['SetWaterMarkFont'](this['pstWaterFontParam']),this['FECShowMode']>0x0&&this['stFishEyeManager'][_0x478496]['pRender']['SR_SetPTZDisplayMode'](this['FECShowMode']),0x1;}return this['FECErrorCode']=_0x421a67,0x0;}},{'key':'FEC_Disable','value':function(_0x28f472,_0x5e6f84,_0x19789b){if(_0x28f472<0x1||_0x28f472>0x1f||null==_0x28f472)return console['info']('%c\\x20FEC_Disable-1\\x20nSubPort:%d','color:\\x20red',_0x28f472),this['FECErrorCode']=_0x1dae8d,0x0;if(0x1==this['stFishEyeManager'][_0x28f472]['bInited']&&null!=this['stFishEyeManager'][_0x28f472]['pRender']){if(_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x28f472]['pRender']['SR_DelSubPort'](this['stFishEyeManager'][_0x28f472]['nValidSubPort']))return console['info']('%c\\x20FEC_Disable-2\\x20SR_DelSubPort\\x20error\\x20nSubPort:%d','color:\\x20red',_0x28f472),0x0;this['stFishEyeManager'][_0x28f472]['bInited']=0x0,this['stFishEyeManager'][_0x28f472]['nValidSubPort']=-0x1,this['stFishEyeManager'][_0x28f472]['pRender']['SR_Destroy'](),this['stFishEyeManager'][_0x28f472]['pRender']=null;}return 0x1;}},{'key':'FEC_DelPort','value':function(_0x37888a){return _0x37888a<0x1||_0x37888a>0x1f||null==_0x37888a?(console['info']('%c\\x20FEC_DelPort-1\\x20nSubPort:%d','color:\\x20red',_0x37888a),this['FECErrorCode']=_0x1dae8d,0x0):0x0==this['stFishEyeManager'][_0x37888a]['bUsed']?(console['info']('%c\\x20FEC_DelPort-2\\x20nSubPort:%d\\x20bUsed:%d','color:\\x20red',_0x37888a,this['stFishEyeManager'][_0x37888a]['bUsed']),this['FECErrorCode']=_0x421a67,0x0):(this['stFishEyeManager'][_0x37888a]['nSubPort']=0x0,this['stFishEyeManager'][_0x37888a]['sCanvasID']=null,this['stFishEyeManager'][_0x37888a]['bUsed']=0x0,this['stFishEyeManager'][_0x37888a]['bInited']=0x0,this['stFishEyeManager'][_0x37888a]['nValidSubPort']=0x0,this['stFishEyeManager'][_0x37888a]['emPlaceType']=_0x5904b1,this['stFishEyeManager'][_0x37888a]['emCorrectType']=_0xf6e73b,this['stFishEyeManager'][_0x37888a]['emEffect']=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'],this['stFishParam'][_0x37888a]['stCycleParam']['fRadiusLeft']=0x0,this['stFishParam'][_0x37888a]['stCycleParam']['fRadiusRight']=0x1,this['stFishParam'][_0x37888a]['stCycleParam']['fRadiusTop']=0x0,this['stFishParam'][_0x37888a]['stCycleParam']['fRadiusBottom']=0x1,this['subPortNum']>0x0&&this['subPortNum']--,0x1);}},{'key':'FEC_SetParam','value':function(_0x1c8587,_0x3333c2){if(this['FECErrorCode']=0x0,_0x1c8587<0x0||_0x1c8587>0x1f||null==_0x1c8587)return console['info']('%c\\x20FEC_SetParam-1\\x20nSubPort:%d','color:\\x20red',_0x1c8587),this['FECErrorCode']=_0x1dae8d,0x0;if(null==this['stFishEyeManager'][_0x1c8587]['pRender'])return console['info']('%c\\x20FEC_SetParam-2\\x20nSubPort:%d\\x20pRender:%d','color:\\x20red',_0x1c8587,this['stFishEyeManager'][_0x1c8587]['pRender']),this['FECErrorCode']=_0x1e1231,0x0;if(0x0==this['stFishEyeManager'][_0x1c8587]['bUsed'])return console['info']('%c\\x20FEC_SetParam-3\\x20nSubPort:%d\\x20bUsed:%d','color:\\x20red',_0x1c8587,this['stFishEyeManager'][_0x1c8587]['bUsed']),this['FECErrorCode']=_0x421a67,0x0;if(this['stFishEyeManager'][_0x1c8587]['emCorrectType']>=_0xefb8fa&&this['stFishEyeManager'][_0x1c8587]['emCorrectType']<=_0x406210&&0x1e&_0x3333c2['upDateType'])return console['info']('%c\\x20FEC_SetParam-4\\x20nSubPort:%d\\x20not\\x203D','color:\\x20red',_0x1c8587),this['FECErrorCode']=_0x36522d,0x0;if(_0x11584b&_0x3333c2['upDateType']){if(null==_0x3333c2['stCycleParam'])return this['FECErrorCode']=_0x4c9d86,0x0;for(var _0x2f6d7a=0x1;_0x2f6d7a<_0x3e91af;_0x2f6d7a++){if(this['stFishEyeManager'][_0x2f6d7a]['bUsed']&&this['stFishEyeManager'][_0x2f6d7a]['nSubPort']&&_0x1f9056==this['stFishEyeManager'][_0x2f6d7a]['emCorrectType']&&(_0x3333c2['stCycleParam']['fRadiusLeft']<=-0.5||_0x3333c2['stCycleParam']['fRadiusLeft']>=0.4||_0x3333c2['stCycleParam']['fRadiusRight']<=0.6||_0x3333c2['stCycleParam']['fRadiusRight']>=1.5||_0x3333c2['stCycleParam']['fRadiusTop']<=-0.5||_0x3333c2['stCycleParam']['fRadiusTop']>0x0||_0x3333c2['stCycleParam']['fRadiusBottom']<0x1||_0x3333c2['stCycleParam']['fRadiusBottom']>=1.5||_0x3333c2['stCycleParam']['fRadiusLeft']+_0x3333c2['stCycleParam']['fRadiusRight']<=0.8||_0x3333c2['stCycleParam']['fRadiusLeft']+_0x3333c2['stCycleParam']['fRadiusRight']>=1.2||_0x3333c2['stCycleParam']['fRadiusTop']+_0x3333c2['stCycleParam']['fRadiusBottom']<=0.8||_0x3333c2['stCycleParam']['fRadiusTop']+_0x3333c2['stCycleParam']['fRadiusBottom']>=1.2))return this['FECErrorCode']=_0x4c9d86,0x0;if(this['stFishEyeManager'][_0x2f6d7a]['bUsed']&&this['stFishEyeManager'][_0x2f6d7a]['nSubPort']&&_0x406210==this['stFishEyeManager'][_0x2f6d7a]['emCorrectType']&&(_0x3333c2['stCycleParam']['fRadiusLeft']<=-0.5||_0x3333c2['stCycleParam']['fRadiusLeft']>0x0||_0x3333c2['stCycleParam']['fRadiusRight']<0x1||_0x3333c2['stCycleParam']['fRadiusRight']>=1.5||_0x3333c2['stCycleParam']['fRadiusTop']<=-0.5||_0x3333c2['stCycleParam']['fRadiusTop']>=0.4||_0x3333c2['stCycleParam']['fRadiusBottom']<=0.6||_0x3333c2['stCycleParam']['fRadiusBottom']>=1.5||_0x3333c2['stCycleParam']['fRadiusLeft']+_0x3333c2['stCycleParam']['fRadiusRight']<=0.8||_0x3333c2['stCycleParam']['fRadiusLeft']+_0x3333c2['stCycleParam']['fRadiusRight']>=1.2||_0x3333c2['stCycleParam']['fRadiusTop']+_0x3333c2['stCycleParam']['fRadiusBottom']<=0.8||_0x3333c2['stCycleParam']['fRadiusTop']+_0x3333c2['stCycleParam']['fRadiusBottom']>=1.2))return this['FECErrorCode']=_0x4c9d86,0x0;}}if(0x0==this['stFishEyeManager'][_0x1c8587]['bInited']){if(_0x5ceb2d&_0x3333c2['upDateType']){if(_0x340cf3!=this['stFishEyeManager'][_0x1c8587]['emCorrectType']&&_0x3c6685!=this['stFishEyeManager'][_0x1c8587]['emCorrectType']||_0x10787f==this['stFishEyeManager'][_0x1c8587]['emPlaceType'])return this['FECErrorCode']=_0x36522d,0x0;for(var _0x44e8d4=0x1;_0x44e8d4<_0x3e91af;_0x44e8d4++)if(this['stFishEyeManager'][_0x44e8d4]['nSubPort']&&this['stFishEyeManager'][_0x44e8d4]['bUsed']&&this['stFishEyeManager'][_0x44e8d4]['emCorrectType']==_0x2bd62a)return this['FECErrorCode']=_0xd0cb66,0x0;this['stFishParam'][_0x1c8587]['fWideScanOffset']=_0x3333c2['fValue'];}if(_0x58b6d9&_0x3333c2['upDateType']){if(null==_0x3333c2['stPTZColor'])return this['FECErrorCode']=_0x4c9d86,0x0;if(_0x3333c2['stPTZColor']['nR']>0xff||_0x3333c2['stPTZColor']['nG']>0xff||_0x3333c2['stPTZColor']['nB']>0xff||_0x3333c2['stPTZColor']['nAlpha']>0xff)return this['FECErrorCode']=_0x36522d,0x0;this['stFishParam'][_0x1c8587]['stPTZColor']['nR']=_0x3333c2['stPTZColor']['nR'],this['stFishParam'][_0x1c8587]['stPTZColor']['nG']=_0x3333c2['stPTZColor']['nG'],this['stFishParam'][_0x1c8587]['stPTZColor']['nB']=_0x3333c2['stPTZColor']['nB'],this['stFishParam'][_0x1c8587]['stPTZColor']['nAlpha']=_0x3333c2['stPTZColor']['nAlpha'];}if(_0x4b7d75&_0x3333c2['upDateType']){if(_0x2bd62a!=this['stFishEyeManager'][_0x1c8587]['emCorrectType'])return this['FECErrorCode']=_0x36522d,0x0;this['stFishParam'][_0x1c8587]['stPTZParam']['fPTZPositionX']=_0x3333c2['fPTZParam']['fPTZPositionX'],this['stFishParam'][_0x1c8587]['stPTZParam']['fPTZPositionY']=_0x3333c2['fPTZParam']['fPTZPositionY'];}if(_0x587f78&_0x3333c2['upDateType']){if(_0x2bd62a!=this['stFishEyeManager'][_0x1c8587]['emCorrectType'])return this['FECErrorCode']=_0x36522d,0x0;this['stFishParam'][_0x1c8587]['fZoom']=_0x3333c2['fPTZZoom'];}if(_0xab921a&_0x3333c2['upDateType']){if(null==this['stFishParam']['stPTZSelect'])return 0x0;if(_0x2bd62a!=this['stFishEyeManager'][_0x1c8587]['emCorrectType'])return this['FECErrorCode']=_0x36522d,0x0;this['stFishParam']['stPTZSelect']['fTop']=_0x3333c2['stPTZSelect']['fTop'],this['stFishParam']['stPTZSelect']['fBottom']=_0x3333c2['stPTZSelect']['fBottom'],this['stFishParam']['stPTZSelect']['fLeft']=_0x3333c2['stPTZSelect']['fLeft'],this['stFishParam']['stPTZSelect']['fRight']=_0x3333c2['stPTZSelect']['fRight'];}if(_0x11584b&_0x3333c2['upDateType']){if(null==_0x3333c2['stCycleParam'])return this['FECErrorCode']=_0x4c9d86,0x0;if(0x0==this['_IsValidRadiusParam'](_0x3333c2['stCycleParam']))return this['FECErrorCode']=_0x4c9d86,0x0;this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']=_0x3333c2['stCycleParam']['fRadiusLeft'],this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']=_0x3333c2['stCycleParam']['fRadiusRight'],this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']=_0x3333c2['stCycleParam']['fRadiusTop'],this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']=_0x3333c2['stCycleParam']['fRadiusBottom'];}return 0x1;}if(_0x5ceb2d&_0x3333c2['upDateType']){if(_0x340cf3!=this['stFishEyeManager'][_0x1c8587]['emCorrectType']&&_0x3c6685!=this['stFishEyeManager'][_0x1c8587]['emCorrectType']||_0x10787f==this['stFishEyeManager'][_0x1c8587]['emPlaceType'])return this['FECErrorCode']=_0x36522d,0x0;for(var _0x554377=0x1;_0x554377<_0x3e91af;_0x554377++)if(this['stFishEyeManager'][_0x554377]['nSubPort']&&this['stFishEyeManager'][_0x554377]['bUsed']&&this['stFishEyeManager'][_0x554377]['emCorrectType']==_0x2bd62a)return this['FECErrorCode']=_0xd0cb66,0x0;var _0x4fea8c={};if(_0x4fea8c['nFishParamType']=_0x21dfba['SRFISHPARAMTYPE']['SR_FPT_ANGLE'],_0x4fea8c['bBlack']=0x0,_0x4fea8c['fAngle']=_0x3333c2['fValue'],_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetFishParam'](_0x4fea8c))return this['FECErrorCode']=_0xd0cb66,0x0;this['stFishParam'][_0x1c8587]['fWideScanOffset']=_0x3333c2['fValue'];}if(_0x58b6d9&_0x3333c2['upDateType']){if(null==_0x3333c2['stPTZColor'])return this['FECErrorCode']=_0x36522d,0x0;if(_0x3333c2['stPTZColor']['nR']>0xff||_0x3333c2['stPTZColor']['nG']>0xff||_0x3333c2['stPTZColor']['nB']>0xff||_0x3333c2['stPTZColor']['nAlpha']>0xff)return this['FECErrorCode']=_0x36522d,0x0;var _0x476351={};if(_0x476351['fR']=_0x3333c2['stPTZColor']['nR']/0xff,_0x476351['fG']=_0x3333c2['stPTZColor']['nG']/0xff,_0x476351['fB']=_0x3333c2['stPTZColor']['nB']/0xff,_0x476351['fA']=_0x3333c2['stPTZColor']['nAlpha']/0xff,_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetPTZColor'](_0x1c8587,_0x476351))return this['FECErrorCode']=_0xd0cb66,_0xd0cb66;this['stFishParam'][_0x1c8587]['stPTZColor']['nR']=_0x3333c2['stPTZColor']['nR'],this['stFishParam'][_0x1c8587]['stPTZColor']['nG']=_0x3333c2['stPTZColor']['nG'],this['stFishParam'][_0x1c8587]['stPTZColor']['nB']=_0x3333c2['stPTZColor']['nB'],this['stFishParam'][_0x1c8587]['stPTZColor']['nAlpha']=_0x3333c2['stPTZColor']['nAlpha'];}if(_0x4b7d75&_0x3333c2['upDateType']){if(_0x2bd62a!=this['stFishEyeManager'][_0x1c8587]['emCorrectType'])return this['FECErrorCode']=_0x36522d,0x0;var _0xdffcc7={};_0xdffcc7['nFishParamType']=_0x21dfba['SRFISHPARAMTYPE']['SR_FPT_PTZ'],_0xdffcc7['bBlack']=0x0,_0xdffcc7['fPTZX']=_0x3333c2['fPTZParam']['fPTZPositionX'],_0xdffcc7['fPTZY']=_0x3333c2['fPTZParam']['fPTZPositionY'];var _0x51307d=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetFishParam'](_0xdffcc7);if(_0x21dfba['ERRCODE']['SR_OK']!=_0x51307d)return this['FECErrorCode']=_0xd0cb66,0x0;this['stFishParam'][_0x1c8587]['stPTZParam']['fPTZPositionX']=_0x3333c2['fPTZParam']['fPTZPositionX'],this['stFishParam'][_0x1c8587]['stPTZParam']['fPTZPositionY']=_0x3333c2['fPTZParam']['fPTZPositionY'];}if(_0x587f78&_0x3333c2['upDateType']){if(_0x2bd62a!=this['stFishEyeManager'][_0x1c8587]['emCorrectType'])return this['FECErrorCode']=_0x36522d,0x0;var _0x126b64={};if(_0x126b64['nFishParamType']=_0x21dfba['SRFISHPARAMTYPE']['SR_FPT_ZOOM'],_0x126b64['bBlack']=0x0,_0x126b64['fZoom']=_0x3333c2['fPTZZoom'],_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetFishParam'](_0x126b64))return this['FECErrorCode']=_0xd0cb66,0x0;this['stFishParam'][_0x1c8587]['fZoom']=_0x3333c2['fPTZZoom'];}if(_0x11584b&_0x3333c2['upDateType']){if(0x0==this['_IsValidRadiusParam'](_0x3333c2['stCycleParam']))return this['FECErrorCode']=_0x4c9d86,0x0;var _0x540999={};if(_0x540999['nFishParamType']=_0x21dfba['SRFISHPARAMTYPE']['SR_FPT_CENTER'],_0x540999['bBlack']=0x1,_0x540999['fRXLeft']=_0x3333c2['stCycleParam']['fRadiusLeft'],_0x540999['fRXRight']=_0x3333c2['stCycleParam']['fRadiusRight'],_0x540999['fRYTop']=_0x3333c2['stCycleParam']['fRadiusTop'],_0x540999['fRYBottom']=_0x3333c2['stCycleParam']['fRadiusBottom'],_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetFishParam'](this['stFishEyeManager'][_0x1c8587]['nValidSubPort'],_0x540999))return this['FECErrorCode']=_0x4c9d86,0x0;this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']=_0x3333c2['stCycleParam']['fRadiusLeft'],this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']=_0x3333c2['stCycleParam']['fRadiusRight'],this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']=_0x3333c2['stCycleParam']['fRadiusTop'],this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']=_0x3333c2['stCycleParam']['fRadiusBottom'];}return _0xab921a&_0x3333c2['upDateType']&&_0x2bd62a==this['stFishEyeManager'][_0x1c8587]['emCorrectType']&&_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x1c8587]['pRender']['SR_SetFishParam'](this['stFishEyeManager'][_0x1c8587]['stPTZSelect'])?(this['FECErrorCode']=0x513,0x0):(null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][_0x1c8587]['splice'](_0x1c8587,this['pstWaterFontParamArray'][_0x1c8587]['length']),this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x1c8587]['pRender'],_0x1c8587,this['pstWaterFontParam'])),0x1);}},{'key':'FEC_GetParam','value':function(_0x72d663,_0x4d8453){return _0x72d663<0x0||_0x72d663>0x1f||null==_0x72d663?(console['info']('%c\\x20FEC_GetParam-1\\x20nSubPort:%d','color:\\x20red',_0x72d663),this['FECErrorCode']=_0x1dae8d,0x0):null==this['stFishEyeManager'][_0x72d663]['pRender']?(console['info']('%c\\x20FEC_GetParam-2\\x20pRender:%d','color:\\x20red',this['stFishEyeManager'][_0x72d663]['pRender']),this['FECErrorCode']=_0x1e1231,0x0):(this['stFishEyeManager'][_0x72d663]['pRender']['SR_GetFishParam'](_0x4d8453),_0x4d8453['emCorrectType']=this['stFishEyeManager'][_0x72d663]['emCorrectType'],0x1);}},{'key':'_IsValidRadiusParam','value':function(_0x5d6b34){return _0x5d6b34['fRadiusBottom']<=_0x5d6b34['fRadiusTop']||_0x5d6b34['fRadiusRight']<=_0x5d6b34['fRadiusLeft']?0x0:0x1;}},{'key':'FEC_SetViewParam','value':function(_0x41c1be,_0x43fabb,_0x21c2b0){return _0x41c1be<0x0||_0x41c1be>0x1f||null==_0x41c1be?(console['info']('%c\\x20FEC_SetViewParam-1\\x20nSubPort:%d','color:\\x20red',_0x41c1be),this['FECErrorCode']=_0x1dae8d,0x0):null==this['stFishEyeManager'][_0x41c1be]['pRender']?(console['info']('%c\\x20FEC_SetViewParam-2\\x20pRender:%d','color:\\x20red',this['stFishEyeManager'][_0x41c1be]['pRender']),this['FECErrorCode']=_0x1e1231,0x0):_0x43fabb<_0x21dfba['SRVIEWTYPE']['SR_VT_ROTATION_X']||_0x43fabb>_0x21dfba['SRVIEWTYPE']['SR_VT_SCALE']?(this['FECErrorCode']=_0x604e00,0x0):(this['FECErrorCode']=0x0,0x0==this['stFishEyeManager'][_0x41c1be]['bInited']?(this['FECErrorCode']=_0x421a67,0x0):_0xefb8fa<=this['stFishEyeManager'][_0x41c1be]['emCorrectType']?_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x41c1be]['pRender']['SR_SetViewParam'](_0x43fabb,_0x21c2b0)?(this['FECErrorCode']=_0x604e00,0x0):(null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][_0x41c1be]['splice'](0x0,this['pstWaterFontParamArray'][_0x41c1be]['length']),this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x41c1be]['pRender'],_0x41c1be,this['pstWaterFontParam'])),0x1):(this['FECErrorCode']=_0x36522d,0x0));}},{'key':'FEC_GetViewParam','value':function(_0x438482,_0x2d4949,_0x1a6b2e){if(_0x1a6b2e['fValue']=-0x1,_0x438482<0x0||_0x438482>0x1f||null==_0x438482)return console['info']('%c\\x20FEC_GetViewParam-1\\x20nSubPort:%d','color:\\x20red',_0x438482),this['FECErrorCode']=_0x1dae8d,0x0;if(null==this['stFishEyeManager'][_0x438482]['pRender'])return console['info']('%c\\x20FEC_GetViewParam-2\\x20pRender:%d','color:\\x20red',this['stFishEyeManager'][_0x438482]['pRender']),this['FECErrorCode']=_0x1e1231,0x0;if(_0x2d4949<0x1||_0x2d4949>0x3||0x0==this['stFishEyeManager'][_0x438482]['bInited'])return 0x0;if(_0xefb8fa<=this['stFishEyeManager'][_0x438482]['emCorrectType'])this['stFishEyeManager'][_0x438482]['pRender']['SR_GetViewParam'](_0x2d4949,_0x1a6b2e);return 0x1;}},{'key':'FEC_SetDisplayRegion','value':function(_0x48ac53,_0x4fd4de,_0x401161,_0x10285e,_0x3967a7,_0x34bc5b,_0x5b2b99){return _0x48ac53<0x0||_0x48ac53>0x1f||null==_0x48ac53?(console['info']('%c\\x20FEC_SetDisplayRegion-1\\x20nSubPort:%d','color:\\x20red',_0x48ac53),this['FECErrorCode']=_0x1dae8d,0x0):null==this['stFishEyeManager'][_0x48ac53]['pRender']?(console['info']('%c\\x20FEC_SetDisplayRegion-2\\x20pRender:%d','color:\\x20red',this['stFishEyeManager'][_0x48ac53]['pRender']),this['FECErrorCode']=_0x1e1231,0x0):0x0!=_0x4fd4de||0x0!=_0x401161?(this['FECErrorCode']=_0x604e00,0x0):this['stFishEyeManager'][_0x48ac53]['emCorrectType']!=_0xf6e73b&&this['stFishEyeManager'][_0x48ac53]['emCorrectType']!=_0x340cf3&&this['stFishEyeManager'][_0x48ac53]['emCorrectType']!=_0x3c6685&&this['stFishEyeManager'][_0x48ac53]['emCorrectType']!=_0x56a1c6?(this['FECErrorCode']=_0x42e372,0x0):0x0==this['stFishEyeManager'][_0x48ac53]['bInited']?(this['FECErrorCode']=_0x421a67,0x0):_0x10285e<0x0||_0x3967a7<0x0||_0x34bc5b<0x0||_0x5b2b99<0x0?(this['FECErrorCode']=_0x604e00,0x0):_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x48ac53]['pRender']['SR_SetDisplayRect'](_0x10285e,_0x3967a7,_0x34bc5b,_0x5b2b99,_0x21dfba['SRSETRECTTYPE']['SR_SRT_SRC'])?(this['FECErrorCode']=0x511,0x0):(null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][_0x48ac53]['splice'](0x0,this['pstWaterFontParamArray'][_0x48ac53]['length']),this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x48ac53]['pRender'],_0x48ac53,this['pstWaterFontParam'])),0x1);}},{'key':'FEC_SetBackCilling','value':function(_0x467a9a,_0x4da968){return _0x467a9a<0x0||_0x467a9a>0x1f||null==_0x467a9a?(this['FECErrorCode']=_0x1dae8d,0x0):null==this['stFishEyeManager'][_0x467a9a]['pRender']?(this['FECErrorCode']=_0x1e1231,0x0):0x0==this['stFishEyeManager'][_0x467a9a]['bInited']?(this['FECErrorCode']=_0x421a67,0x0):_0x21dfba['ERRCODE']['SR_OK']!=this['stFishEyeManager'][_0x467a9a]['pRender']['SR_SetRenderState'](_0x21dfba['SRRENDERSTATETYPE']['SR_RST_BACK_CULL'],_0x4da968)?(this['FECErrorCode']=0x511,0x0):(null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][_0x467a9a]['splice'](0x0,this['pstWaterFontParamArray'][_0x467a9a]['length']),this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x467a9a]['pRender'],_0x467a9a,this['pstWaterFontParam'])),0x1);}},{'key':'FEC_GetPTZPort','value':function(_0x567f38,_0x3740bf,_0x5d297e){if(null!=this['stFishEyeManager'][_0x567f38]['pRender']){var _0x4d312b={'nPTZPort':-0x1};if(this['stFishEyeManager'][_0x567f38]['pRender']['SR_GetPTZPort'](_0x3740bf,_0x5d297e,_0x4d312b)==_0x21dfba['ERRCODE']['SR_OK'])return _0x4d312b['nPTZPort'];}return-0x1;}},{'key':'FEC_SetPTZDisplayMode','value':function(_0x200355){return _0x200355>=0x0&&_0x200355<=0x2?(null!=this['stFishEyeManager'][0x0]['pRender']&&this['stFishEyeManager'][0x0]['pRender']['SR_SetPTZDisplayMode'](_0x200355),this['FECShowMode']=_0x200355,0x1):(console['info']('%c\\x20FEC_SetPTZDisplayMode\\x20ptzMode:%d','color:\\x20red',_0x200355),0x0);}},{'key':'FEC_Capture','value':function(_0x2b878f,_0x5b5a3c){if(null!=this['stFishEyeManager'][_0x2b878f]['pRender']){var _0xfd80d1={'nWidth':0x0,'nHeight':0x0,'nBufferLen':0x0},_0x1b3f8d=this['stFishEyeManager'][_0x2b878f]['pRender']['SR_GetCaptureSize'](_0xfd80d1);if(_0x21dfba['ERRCODE']['SR_OK']!=_0x1b3f8d||_0xfd80d1['nBufferLen']<=0x0)return _0x5b5a3c(null,0x0,0x0,_0x2b878f),0x0;var _0x4f1ade=new Uint8Array(_0xfd80d1['nBufferLen']);if(null==_0x4f1ade)return _0x5b5a3c(null,0x0,0x0,_0x2b878f),0x0;var _0x16828f={};return _0x16828f['pBuffer']=_0x4f1ade,this['stFishEyeManager'][_0x2b878f]['pRender']['SR_CaptureScreen'](_0x16828f),_0x5b5a3c(_0x4f1ade,_0xfd80d1['nWidth'],_0xfd80d1['nHeight'],_0x2b878f),_0x4f1ade=null,0x1;}return _0x5b5a3c(null,0x0,0x0,_0x2b878f),0x0;}},{'key':'CheckFrameRGB','value':function(_0x3396b2,_0x310c5e,_0x1f24e5,_0x1447a2,_0x1e1836,_0x117450){if(null==_0x3396b2||null==_0x3396b2['width']||null==_0x3396b2['height']||null==_0x3396b2['pBuffer']||_0x3396b2['width']<=0x0||_0x3396b2['height']<=0x0||_0x3396b2['pBuffer']['length']<=0x0)return 0x0;for(var _0x1c7bfc=_0x3396b2['width']/(_0x1447a2-0x1),_0x4090e3=_0x3396b2['height']/(_0x1f24e5-0x1),_0x168d5e=0x0,_0x4eb92e=0x0,_0x3a63dc=[],_0x59e88c=0x0;_0x59e88c<_0x1f24e5*_0x1447a2;_0x59e88c++)_0x3a63dc[_0x59e88c]=0x0,this['aPOSAdaptBuf'][_0x59e88c]=0x0;if(_0x310c5e){for(var _0x97e0f9=0x0,_0x28e1b8=0x0;_0x28e1b8<_0x3396b2['height'];_0x28e1b8++)for(var _0x40afd1=0x0;_0x40afd1<_0x3396b2['width'];_0x40afd1++){_0x168d5e=(_0x168d5e=Math['round'](_0x40afd1/(_0x1c7bfc/0x2)/0x2))<_0x1447a2?_0x168d5e:_0x1447a2-0x1,_0x4eb92e=(_0x4eb92e=Math['round'](_0x28e1b8/(_0x4090e3/0x2)/0x2))<_0x1f24e5?_0x4eb92e:_0x1f24e5-0x1;var _0x460a4a=_0x3396b2['pBuffer'][_0x97e0f9],_0x552772=_0x3396b2['pBuffer'][_0x97e0f9+0x1],_0x49cd13=_0x3396b2['pBuffer'][_0x97e0f9+0x2],_0x222950=Math['round'](0.299*_0x460a4a+0.587*_0x552772+0.114*_0x49cd13);this['aPOSAdaptBuf'][_0x168d5e+_0x4eb92e*_0x1447a2]+=_0x222950,_0x3a63dc[_0x168d5e+_0x4eb92e*_0x1447a2]++,_0x97e0f9+=0x4;}for(var _0x3c55e4=0x0,_0x1479e5=0x0;_0x1479e5<_0x1f24e5*_0x1447a2;_0x1479e5++)_0x3c55e4=this['aPOSAdaptBuf'][_0x1479e5]/_0x3a63dc[_0x1479e5],this['aPOSAdaptBuf'][_0x1479e5]=_0x3c55e4>0x80?0x0:0x1;}else{var _0x869a9c=Math['round'](_0x1e1836*_0x3396b2['width']),_0x5141d2=Math['round'](_0x117450*_0x3396b2['height']),_0x54d952=_0x869a9c-0x2;_0x54d952=(_0x54d952=_0x54d952>0x0?_0x54d952:0x0)<_0x3396b2['width']?_0x54d952:_0x3396b2['width']-0x1;var _0x171aa7=_0x869a9c+0x2;_0x171aa7=(_0x171aa7=_0x171aa7>0x0?_0x171aa7:0x0)<_0x3396b2['width']?_0x171aa7:_0x3396b2['width']-0x1;var _0x150895=_0x5141d2-0x2;_0x150895=(_0x150895=_0x150895>0x0?_0x150895:0x0)<_0x3396b2['height']?_0x150895:_0x3396b2['height']-0x1;var _0x6d4a9b=_0x5141d2+0x2;_0x6d4a9b=(_0x6d4a9b=_0x6d4a9b>0x0?_0x6d4a9b:0x0)<_0x3396b2['height']?_0x6d4a9b:_0x3396b2['height']-0x1;for(var _0x3115b2=_0x150895;_0x3115b2<_0x6d4a9b;_0x3115b2++)for(var _0x4d1548=_0x54d952;_0x4d1548<_0x171aa7;_0x4d1548++){var _0x3ede9b=0x4*Math['floor']((0x4*_0x4d1548+_0x3115b2*_0x3396b2['width']*0x4)/0x4),_0x36dcb9=_0x3396b2['pBuffer'][_0x3ede9b],_0x1817f0=_0x3396b2['pBuffer'][_0x3ede9b+0x1],_0x4e2ee1=_0x3396b2['pBuffer'][_0x3ede9b+0x2],_0x3d104a=Math['round'](0.299*_0x36dcb9+0.587*_0x1817f0+0.114*_0x4e2ee1);this['aPOSAdaptBuf'][0x0]+=_0x3d104a,_0x3a63dc[0x0]++;}this['aPOSAdaptBuf'][0x0]=this['aPOSAdaptBuf'][0x0]/_0x3a63dc[0x0]>0x80?0x0:0x1;}return 0x1;}},{'key':'GetWaterFontParam','value':function(_0x26cbf6,_0x3d3f8b,_0x252318,_0x396eda,_0x2684e2,_0x3816aa,_0x20c319){var _0x316822=_0x252318['pFontString']['length'],_0x588fe6=_0x252318['pstFontRotate']['fRotateAngle']%0x168/0x168*0x2*Math['PI'],_0x39f42f=Math['min'](_0x252318['pstFontSize']['nFontWidth'],_0x252318['pstFontSize']['nFontHeight']);if(0x2==_0x252318['pstCanvasAdapt']['nCanvasAdaptMode']){var _0x562dcd=_0x252318['pstFontSize']['nFontWidth']*_0x396eda/_0x252318['pstCanvasAdapt']['nBaseCanvasWidth'],_0x899366=_0x252318['pstFontSize']['nFontHeight']*_0x2684e2/_0x252318['pstCanvasAdapt']['nBaseCanvasHeight'];_0x39f42f=Math['min'](_0x562dcd,_0x899366);}var _0x3e0aa9=_0x39f42f/_0x396eda,_0x5a785b=_0x39f42f/_0x2684e2,_0x24cc79=_0x3e0aa9*Math['cos'](Math['PI']/0x2-_0x588fe6)*_0x252318['pSpace'],_0x162ffe=_0x5a785b*Math['sin'](Math['PI']/0x2-_0x588fe6)*_0x252318['pSpace'],_0x5d27c0=[],_0x34931c=[],_0x4efef6=[];if(_0x252318['nFontAlign']){for(var _0x47e108=0x0;_0x47e108<_0x316822;_0x47e108++)_0x5d27c0[_0x47e108]=_0x252318['pFontString'][0x0]['length']*_0x3e0aa9/0x6,_0x34931c[_0x47e108]=Math['atan2'](_0x5d27c0[0x0],_0x162ffe),_0x4efef6[_0x47e108]=Math['sqrt'](_0x5d27c0[0x0]*_0x5d27c0[0x0],_0x162ffe*_0x162ffe);}else{for(var _0x249af4=0x0;_0x249af4<_0x316822;_0x249af4++)_0x5d27c0[_0x249af4]=0x0,_0x34931c[_0x249af4]=0x0,_0x4efef6[_0x249af4]=0x0;}var _0x347eba={};if(this['pstWaterFontParam']['nColorAdapt']){var _0x56e2ef={'nWidth':0x10,'nHeight':0x10,'nBufferLen':0x0},_0x30523f=_0x26cbf6['SR_GetCaptureSize'](_0x56e2ef);if(_0x21dfba['ERRCODE']['SR_OK']==_0x30523f){var _0x24b047=new Uint8Array(_0x56e2ef['nBufferLen']);_0x347eba['pBuffer']=_0x24b047,_0x26cbf6['SR_CaptureScreen'](_0x347eba,!0x0),_0x347eba['width']=_0x56e2ef['nWidth'],_0x347eba['height']=_0x56e2ef['nHeight'],_0x24b047=null;}}var _0x3aacd6=_0x3816aa*_0x20c319;if(_0x252318['pstFontRotate']['fFillFullScreen']){var _0x26bda2=[],_0x260c95=[];if(0x1==_0x252318['pstCanvasAdapt']['nCanvasAdaptMode']){if(_0x20c319<_0x5e47b7){for(var _0x315704=0x0;_0x315704*_0x252318['pstCanvasAdapt']['ntotalColSpace']<=_0x396eda;_0x315704++)_0x260c95[_0x315704]=(_0x315704*_0x252318['pstCanvasAdapt']['ntotalColSpace']+_0x252318['pstCanvasAdapt']['nColSpace']/0x2)/_0x396eda;}else{for(var _0x5e0fd8=0x1/(_0x20c319-0x1),_0x1d7f1a=0x0;_0x1d7f1a<_0x20c319;_0x1d7f1a++)_0x260c95[_0x1d7f1a]=_0x5e0fd8*_0x1d7f1a+_0x24cc79*((_0x316822-0x1)/0x2);}if(_0x3816aa<_0x5e47b7){for(var _0x803eb2=0x0;_0x803eb2*_0x252318['pstCanvasAdapt']['ntotalRowSpace']<=_0x2684e2;_0x803eb2++)_0x26bda2[_0x803eb2]=(_0x803eb2*_0x252318['pstCanvasAdapt']['ntotalRowSpace']+_0x252318['pstCanvasAdapt']['nRowSpace']/0x2)/_0x2684e2;}else{for(var _0x4e0b75=0x1/(_0x3816aa-0x1),_0x21f907=0x0;_0x21f907<_0x3816aa;_0x21f907++)_0x26bda2[_0x21f907]=_0x4e0b75*_0x21f907-_0x162ffe*((_0x316822-0x1)/0x2);}for(var _0xcbe00=0x0;_0xcbe00<_0x316822;_0xcbe00++)_0x5d27c0[_0xcbe00]=0x0,_0x34931c[_0xcbe00]=0x0,_0x4efef6[_0xcbe00]=0x0;}else{if(0x1==_0x3816aa)_0x26bda2[0x0]=0.5;else{for(var _0x2a15ce=0x1/(_0x3816aa-0x1),_0x5deaf5=0x0;_0x5deaf5<_0x3816aa;_0x5deaf5++)_0x26bda2[_0x5deaf5]=_0x2a15ce*_0x5deaf5-_0x162ffe*((_0x316822-0x1)/0x2);}if(0x1==_0x20c319)_0x260c95[0x0]=0.5;else{for(var _0x4c1bab=0x1/(_0x20c319-0x1),_0x6ff991=0x0;_0x6ff991<_0x20c319;_0x6ff991++)_0x260c95[_0x6ff991]=_0x4c1bab*_0x6ff991+_0x24cc79*((_0x316822-0x1)/0x2);}}this['pstWaterFontParamArray'][_0x3d3f8b]=[];for(var _0x334122=0x0;_0x334122<_0x3aacd6;++_0x334122)for(var _0x30c764=0x0;_0x30c764<_0x316822;_0x30c764++){this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]={},this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pString']=_0x252318['pFontString'][_0x30c764],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['nFontWidth']=_0x39f42f,this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['nFontHeight']=_0x39f42f,this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstStartPos']={};var _0x3cd387=_0x334122%_0x20c319,_0x1aed67=Math['floor'](_0x334122/_0x20c319),_0x3699ec=Math['PI']/0x2-_0x588fe6+_0x34931c[_0x30c764];this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstStartPos']['fX']=_0x260c95[_0x3cd387]-_0x30c764*_0x24cc79+_0x4efef6[_0x30c764]*Math['cos'](_0x3699ec),this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstStartPos']['fY']=_0x26bda2[_0x1aed67]+_0x30c764*_0x162ffe-_0x4efef6[_0x30c764]*Math['sin'](_0x3699ec),_0x252318['nColorAdapt']?(0x0==_0x30c764&&this['CheckFrameRGB'](_0x347eba,0x0,0x1,0x1,this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstStartPos']['fX'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstStartPos']['fY']),this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']={},this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']['fR']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']['fG']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']['fB']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']['fA']=_0x252318['pstFontColor']['fA']):this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstFontColor']=_0x252318['pstFontColor'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['bBackGround']=!0x1,this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pstBGColor']=null,this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['fRotateAngle']=_0x252318['pstFontRotate']['fRotateAngle'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['pFontFamily']=_0x252318['pFontFamily'],_0x252318['nFontAlign']?(this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['textAlign']='left',this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['textBaseline']='top'):(this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['textAlign']='center',this['pstWaterFontParamArray'][_0x3d3f8b][_0x316822*_0x334122+_0x30c764]['textBaseline']='middle');}}else{for(var _0x44ed11=0x0;_0x44ed11<_0x252318['pFontString']['length'];_0x44ed11++)this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]={},this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pString']=_0x252318['pFontString'][_0x44ed11],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['nFontWidth']=_0x39f42f,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['nFontHeight']=_0x39f42f,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstStartPos']={},this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstStartPos']['fX']=_0x252318['pstStartPos']['fX']-_0x44ed11*_0x24cc79,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstStartPos']['fY']=_0x252318['pstStartPos']['fY']+_0x44ed11*_0x162ffe,_0x252318['nColorAdapt']?(this['CheckFrameRGB'](_0x347eba,0x0,0x1,0x1,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstStartPos']['fX'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstStartPos']['fY']),this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']={},this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']['fR']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']['fG']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']['fB']=this['aPOSAdaptBuf'][0x0],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']['fA']=_0x252318['pstFontColor']['fA']):this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstFontColor']=_0x252318['pstFontColor'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['bBackGround']=!0x1,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pstBGColor']=null,this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['fRotateAngle']=_0x252318['pstFontRotate']['fRotateAngle'],this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['pFontFamily']=_0x252318['pFontFamily'],_0x252318['nFontAlign']?(this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['textAlign']='left',this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['textBaseline']='top'):(this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['textAlign']='center',this['pstWaterFontParamArray'][_0x3d3f8b][_0x44ed11]['textBaseline']='middle');}return 0x1;}},{'key':'CalculateWaterMarkParam','value':function(_0x469db2,_0x2e7d93,_0x57cc78){var _0x335aa9=this['mainCanvasID']['width'],_0x5f2d2b=this['mainCanvasID']['height'];_0x2e7d93>0x0&&(_0x335aa9=this['stFishEyeManager'][_0x2e7d93]['sCanvasID']['width'],_0x5f2d2b=this['stFishEyeManager'][_0x2e7d93]['sCanvasID']['height']);var _0x4b459f=Math['floor'](_0x57cc78['pstFontNumber']['nRowNumber']),_0x227c84=Math['floor'](_0x57cc78['pstFontNumber']['nColNumber']);0x1==_0x57cc78['pstCanvasAdapt']['nCanvasAdaptMode']&&(_0x4b459f=(_0x4b459f=(_0x4b459f=Math['floor'](_0x5f2d2b/_0x57cc78['pstCanvasAdapt']['ntotalRowSpace']+0x1))<0x1?0x1:_0x4b459f)>_0x5e47b7?_0x5e47b7:_0x4b459f,_0x227c84=(_0x227c84=(_0x227c84=Math['floor'](_0x335aa9/_0x57cc78['pstCanvasAdapt']['ntotalColSpace']+0x1))<0x1?0x1:_0x227c84)>_0x5e47b7?_0x5e47b7:_0x227c84),this['GetWaterFontParam'](_0x469db2,_0x2e7d93,_0x57cc78,_0x335aa9,_0x5f2d2b,_0x4b459f,_0x227c84);}},{'key':'SetWaterMarkFont','value':function(_0x7f97f7){if(0x0!=this['pstWaterFontParamArray']['length']){for(var _0x32bef9=0x0;_0x32bef9<_0x3e91af;_0x32bef9++)this['pstWaterFontParamArray'][_0x32bef9]['splice'](0x0,this['pstWaterFontParamArray'][_0x32bef9]['length']);}if(this['pstWaterFontParam']=_0x7f97f7,null===_0x7f97f7)return 0x1;this['CalculateWaterMarkParam'](this['oVideoHandle'],0x0,_0x7f97f7);for(var _0x7f48cf=0x1;_0x7f48cf<_0x3e91af;_0x7f48cf++)null!=this['stFishEyeManager'][_0x7f48cf]['pRender']&&this['CalculateWaterMarkParam'](this['stFishEyeManager'][_0x7f48cf]['pRender'],_0x7f48cf,_0x7f97f7);return 0x1;}},{'key':'SetMosaicType','value':function(_0x3dfecb){return this['MosaicType']=_0x3dfecb['nMosaicType'],this['MosaicSize']=_0x3dfecb['nMosaicSize'],this['MosaicColorR']=_0x3dfecb['pstMosaicColor']['fMosaicColorR']/0xff,this['MosaicColorG']=_0x3dfecb['pstMosaicColor']['fMosaicColorG']/0xff,this['MosaicColorB']=_0x3dfecb['pstMosaicColor']['fMosaicColorB']/0xff,this['MosaicColorA']=_0x3dfecb['pstMosaicColor']['fMosaicColorA']/0x64,0x1;}},{'key':'SetTextCanvas','value':function(_0x3f1e12){return this['textCanvas']=_0x3f1e12,0x1;}},{'key':'SetPrintLogFlag','value':function(_0xf2eb82){return this['printfFlag']=_0xf2eb82,0x1;}},{'key':'SetRotateAngle','value':function(_0x2a19c3){if(null!=this['oVideoHandle']){var _0x39678b;if(_0x39678b=this['oVideoHandle']['SR_SetRenderState'](_0x21dfba['SRRENDERSTATETYPE']['SR_RST_IMAGE_ROTATE'],_0x2a19c3),null!=this['pstWaterFontParam']&&this['pstWaterFontParam']['nColorAdapt']&&(this['pstWaterFontParamArray'][0x0]['splice'](0x0,this['pstWaterFontParamArray'][0x0]['length']),this['CalculateWaterMarkParam'](this['oVideoHandle'],0x0,this['pstWaterFontParam'])),_0x39678b==_0x21dfba['ERRCODE']['SR_OK'])return 0x1;}return 0x0;}},{'key':'ImageDecoder','value':function(_0xc519d,_0x1d4ce4,_0xcab272){var _0x55584f=this;_0xc519d['decode']({'frameIndex':_0xcab272})['then'](function(_0x21aadd){_0x55584f['pWaterImageParam'][_0xcab272]={},_0x55584f['pWaterImageParam'][_0xcab272]['videoStream']=_0x21aadd['image'],_0x55584f['pWaterImageParam'][_0xcab272]['nImageWidth']=_0x21aadd['image']['displayWidth'],_0x55584f['pWaterImageParam'][_0xcab272]['nImageHeight']=_0x21aadd['image']['displayHeight'],_0x55584f['pWaterImageParam'][_0xcab272]['timeStamp']=_0x21aadd['image']['timestamp']/0x3e8,_0x55584f['pWaterImageParam'][_0xcab272]['duration']=_0x21aadd['image']['duration']/0x3e8,null!=_0x1d4ce4['pstRectPos']?_0x55584f['pWaterImageParam'][_0xcab272]['pstRectPos']=_0x1d4ce4['pstRectPos']:_0x55584f['pWaterImageParam'][_0xcab272]['pstRectPos']={'fLeft':0x0,'fRight':0.1,'fTop':0x0,'fBottom':0.1},null!=_0x1d4ce4['fAlpha']&&_0x1d4ce4['fAlpha']<=0x1&&_0x1d4ce4['fAlpha']>=0x0?_0x55584f['pWaterImageParam'][_0xcab272]['fAlpha']=_0x1d4ce4['fAlpha']:_0x55584f['pWaterImageParam'][_0xcab272]['fAlpha']=0x1,_0x55584f['waterMarkImageMax']=_0xc519d['tracks']['selectedTrack']['frameCount'],_0xcab272<_0xc519d['tracks']['selectedTrack']['frameCount']-0x1?_0x55584f['ImageDecoder'](_0xc519d,_0x1d4ce4,_0xcab272+0x1):(_0x55584f['baseWaterMarkImageTime']=_0x55584f['curTimestamp'],_0x55584f['finishDecodeImage']=!0x0);});}},{'key':'SetWaterMarkImage','value':function(_0x12637a){var _0x420c25=this;if(this['pWaterImageParam']['splice'](0x0,this['pWaterImageParam']['length']),null===_0x12637a)return 0x1;if(null!=_0x12637a['pImageData']){var _0x1c6ae7=new ImageDecoder({'data':_0x12637a['pImageData'],'type':'image/'+_0x12637a['pImageType']});_0x1c6ae7['tracks']['ready']['then'](function(){_0x1c6ae7['completed']['then'](function(){_0x420c25['ImageDecoder'](_0x1c6ae7,_0x12637a,0x0);});});}return this['waterMarkImageIndex']=0x0,0x1;}},{'key':'SelectIntelInfoFeatureToDraw','value':function(_0x1a5385){if(this['DrawTargetEventIDList']['splice'](0x0,this['DrawTargetEventIDList']['length']),null===_0x1a5385)return 0x0;if(pImageParam['NodeNumber']>0x0){for(var _0x32561c=0x0;_0x32561c<pImageParam['NodeNumber'];_0x32561c++)this['DrawTargetEventIDList']['push'](_0x1a5385['pIntelInfoNode'][_0x32561c]);}return 0x1;}},{'key':'_ConvertDisplayEffect','value':function(_0xabaaa,_0x211a0c){switch(_0xabaaa){case _0x10787f:return _0x2bd62a==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PTZ_WALL']:_0x3c6685==_0x211a0c||_0x56a1c6==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PANORAMA_WALL']:_0xefb8fa==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_SEMISPHERE']:_0x102fcd==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PLANET']:_0x1f9056==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:_0x406210==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];case _0x1adf2b:return _0x2bd62a==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PTZ_FLOOR']:_0x3c6685==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PANORAMA_FLOOR_360']:_0x340cf3==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PANORAMA_FLOOR_180']:_0xefb8fa==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_SEMISPHERE']:_0x39a314==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_CYLINDER_FLOOR']:_0xe75a42==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:_0x102fcd==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PLANET']:_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];case _0x5904b1:return _0x2bd62a==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PTZ_CEILING']:_0x3c6685==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PANORAMA_CEILING_360']:_0x340cf3==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PANORAMA_CEILING_180']:_0xefb8fa==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_SEMISPHERE']:_0x39a314==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_CYLINDER_CEILING']:_0xe75a42==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:_0x102fcd==_0x211a0c?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_PLANET']:_0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];default:return _0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];}return _0x21dfba['SRDISPLAYEFFECT']['SR_DE_FISH_ORIGINAL'];}},{'key':'GetCanvasData','value':function(_0x48e3b0){var _0x3a9a71=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0,_0xc49009=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x1a7128=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:0x0,_0x53f5c9={};_0x53f5c9['nWidth']=_0x3a9a71,_0x53f5c9['nHeight']=_0xc49009,_0x53f5c9['nBufferLen']=0x0;var _0x1a1cd5=this['oVideoHandle']['SR_GetCaptureSize'](_0x53f5c9,_0x1a7128);if(_0x21dfba['ERRCODE']['SR_OK']!=_0x1a1cd5||_0x53f5c9['nBufferLen']<=0x0)_0x48e3b0(null);else{var _0x135475=new Uint8Array(_0x53f5c9['nBufferLen']);if(null!=_0x135475){var _0x3bf884={};_0x3bf884['pBuffer']=_0x135475,this['oVideoHandle']['SR_CaptureScreen'](_0x3bf884),_0x48e3b0(_0x135475,_0x53f5c9['nWidth'],_0x53f5c9['nHeight']);}else _0x48e3b0(null);}}},{'key':'FindIntelNodefromList','value':function(_0x2375e1){if(0x0!=this['privateNormalLinesInfo']['length']){for(var _0x190f88=!0x1,_0x805ebd=0x0,_0x39cbde=!0x1,_0x2dd2fd=0x0,_0x4c94e9=0x0,_0xf19116=0x5f5e100,_0x5323b3=0x0;_0x5323b3<this['privateNormalLinesInfo']['length'];_0x5323b3++){if(0x0==(_0x4c94e9=Math['abs'](this['privateNormalLinesInfo'][_0x5323b3]['absTimeStamp']-_0x2375e1))){_0x39cbde=!0x0,_0x2dd2fd=_0x5323b3;break;}_0x4c94e9<=this['nTimePerFrame']+0x3e8&&_0x4c94e9<_0xf19116&&(_0x190f88=!0x0,_0x805ebd=_0x5323b3,_0xf19116=_0x4c94e9);}_0x39cbde?(this['curNormalLinesInfo']=this['privateNormalLinesInfo'][_0x2dd2fd],this['privateNormalLinesInfo']['shift']()):_0x190f88&&(this['curNormalLinesInfo']=this['privateNormalLinesInfo'][_0x805ebd],this['privateNormalLinesInfo']['shift']());}if(0x0!=this['privateThermalLinesInfo']['length']&&(this['curThermalLinesInfo']=this['privateThermalLinesInfo'][0x0]),0x0!=this['privateTemLinesInfo']['length']){for(var _0x38f431=!0x1,_0x51c22c=0x0,_0x5ba391=!0x1,_0x5b4e90=0x0,_0x4317c8=0x0,_0x23d3f2=0x5f5e100,_0x4bef53=0x0;_0x4bef53<this['privateTemLinesInfo']['length'];_0x4bef53++){if(0x0==(_0x4317c8=Math['abs'](this['privateTemLinesInfo'][_0x4bef53]['absTimeStamp']-_0x2375e1))){_0x5ba391=!0x0,_0x5b4e90=_0x4bef53;break;}_0x4317c8<=this['nTimePerFrame']+0x3e8&&_0x4317c8<_0x23d3f2&&(_0x38f431=!0x0,_0x51c22c=_0x4bef53,_0x23d3f2=_0x4317c8);}_0x5ba391?(this['curTemLinesInfo']=this['privateTemLinesInfo'][_0x5b4e90],this['privateTemLinesInfo']['shift']()):_0x38f431?(this['curTemLinesInfo']=this['privateTemLinesInfo'][_0x51c22c],this['privateTemLinesInfo']['shift']()):this['nFrameRate']<=0x1e?this['m_nTEMDrawLinescount']<=0x1e?this['m_nTEMDrawLinescount']++:this['curTemLinesInfo']=null:this['m_nTEMDrawLinescount']<=0x3c?this['m_nTEMDrawLinescount']++:this['curTemLinesInfo']=null;}else this['nFrameRate']<=0x1e?this['m_nTEMDrawLinescount']<=0x1e?this['m_nTEMDrawLinescount']++:this['curTemLinesInfo']=null:this['m_nTEMDrawLinescount']<=0x3c?this['m_nTEMDrawLinescount']++:this['curTemLinesInfo']=null;if(0x0!=this['privateTargetLinesInfo']['length']){for(var _0x90b0c5=!0x1,_0x21e005=0x0,_0x331795=!0x1,_0x26ffc4=0x0,_0x50ea7e=0x0,_0x28f4d0=0x5f5e100,_0x5d96fc=0x0;_0x5d96fc<this['privateTargetLinesInfo']['length'];_0x5d96fc++){if(0x0==(_0x50ea7e=Math['abs'](this['privateTargetLinesInfo'][_0x5d96fc]['absTimeStamp']-_0x2375e1))){_0x331795=!0x0,_0x26ffc4=_0x5d96fc;break;}_0x50ea7e<=this['nTimePerFrame']+0x3e8&&_0x50ea7e<_0x28f4d0&&(_0x90b0c5=!0x0,_0x21e005=_0x5d96fc,_0x28f4d0=_0x50ea7e);}_0x331795?(this['curTargetLinesInfo']=this['privateTargetLinesInfo'][_0x26ffc4],this['privateTargetLinesInfo']['shift']()):_0x90b0c5?(this['curTargetLinesInfo']=this['privateTargetLinesInfo'][_0x21e005],this['privateTargetLinesInfo']['shift']()):this['curTargetLinesInfo']=null;}else this['curTargetLinesInfo']=null;if(0x0!=this['privateMDLinesInfo']['length']){for(var _0x4f9716=!0x1,_0x2aa2a7=0x0,_0x14acaa=!0x1,_0x27b16c=0x0,_0x367c25=0x0,_0x2eaec5=0x5f5e100,_0x377fb7=0x0;_0x377fb7<this['privateMDLinesInfo']['length'];_0x377fb7++){if(0x0==(_0x367c25=Math['abs'](this['privateMDLinesInfo'][_0x377fb7]['absTimeStamp']-_0x2375e1))){_0x14acaa=!0x0,_0x27b16c=_0x377fb7;break;}_0x367c25<=this['nTimePerFrame']+0x3e8&&_0x367c25<_0x2eaec5&&(_0x4f9716=!0x0,_0x2aa2a7=_0x377fb7,_0x2eaec5=_0x367c25);}_0x14acaa?(this['curMDLinesInfo']=this['privateMDLinesInfo'][_0x27b16c],this['privateMDLinesInfo']['shift']()):_0x4f9716?(this['curMDLinesInfo']=this['privateMDLinesInfo'][_0x2aa2a7],this['privateMDLinesInfo']['shift']()):this['curMDLinesInfo']=null;}else this['curMDLinesInfo']=null;if(0x0!=this['privateExactLinesInfo']['length']){for(var _0x5e5448=!0x1,_0x5927ad=0x0,_0x26b05d=!0x1,_0x3368e9=0x0,_0x5a4883=0x0,_0x295cf2=0x5f5e100,_0x25590f=0x0;_0x25590f<this['privateExactLinesInfo']['length'];_0x25590f++){if(0x0==(_0x5a4883=Math['abs'](this['privateExactLinesInfo'][_0x25590f]['absTimeStamp']-_0x2375e1))){_0x26b05d=!0x0,_0x3368e9=_0x25590f;break;}_0x5a4883<=this['nTimePerFrame']/0x2&&_0x5a4883<_0x295cf2&&(_0x5e5448=!0x0,_0x5927ad=_0x25590f,_0x295cf2=_0x5a4883);}_0x26b05d?(this['curExactLinesInfo']=this['privateExactLinesInfo'][_0x3368e9],this['privateExactLinesInfo']['shift']()):_0x5e5448?(this['curExactLinesInfo']=this['privateExactLinesInfo'][_0x5927ad],this['privateExactLinesInfo']['shift']()):this['curExactLinesInfo']=null;}else this['curExactLinesInfo']=null;if(0x0!=this['privateExactRuleLinesInfo']['length']){for(var _0x4838ee=!0x1,_0x1b34e6=0x0,_0x5a0db1=!0x1,_0x58e3e6=0x0,_0x1faa63=0x0,_0x9023c2=0x5f5e100,_0x5da9f5=0x0;_0x5da9f5<this['privateExactRuleLinesInfo']['length'];_0x5da9f5++){if(0x0==(_0x1faa63=Math['abs'](this['privateExactRuleLinesInfo'][_0x5da9f5]['absTimeStamp']-_0x2375e1))){_0x5a0db1=!0x0,_0x58e3e6=_0x5da9f5;break;}_0x1faa63<=this['nTimePerFrame']/0x2&&_0x1faa63<_0x9023c2&&(_0x4838ee=!0x0,_0x1b34e6=_0x5da9f5,_0x9023c2=_0x1faa63);}_0x5a0db1?(this['curExactRuleLinesInfo']=this['privateExactRuleLinesInfo'][_0x58e3e6],this['privateExactRuleLinesInfo']['shift']()):_0x4838ee&&(this['curExactRuleLinesInfo']=this['privateExactRuleLinesInfo'][_0x1b34e6],this['privateExactRuleLinesInfo']['shift']());}if(0x0!=this['privateNormalFontsInfo']['length']){for(var _0x4bff51=!0x1,_0x1c690c=0x0,_0x607c91=!0x1,_0x441a90=0x0,_0x5e6d50=0x0,_0x8c992c=0x5f5e100,_0x2a137e=0x0;_0x2a137e<this['privateNormalFontsInfo']['length'];_0x2a137e++){if(0x0==(_0x5e6d50=Math['abs'](this['privateNormalFontsInfo'][_0x2a137e]['absTimeStamp']-_0x2375e1))){_0x607c91=!0x0,_0x441a90=_0x2a137e;break;}_0x5e6d50<=this['nTimePerFrame']+0x3e8&&_0x5e6d50<_0x8c992c&&(_0x4bff51=!0x0,_0x1c690c=_0x2a137e,_0x8c992c=_0x5e6d50);}_0x607c91?(this['curNormalFontsInfo']=this['privateNormalFontsInfo'][_0x441a90],this['privateNormalFontsInfo']['shift']()):_0x4bff51&&(this['curNormalFontsInfo']=this['privateNormalFontsInfo'][_0x1c690c],this['privateNormalFontsInfo']['shift']());}if(0x0!=this['privateTemFontsInfo']['length']){for(var _0x1e472a=!0x1,_0x5ee60b=0x0,_0x44a471=!0x1,_0x2583fb=0x0,_0x3f437f=0x0,_0x50ef5b=0x5f5e100,_0x459709=0x0;_0x459709<this['privateTemFontsInfo']['length'];_0x459709++){if(0x0==(_0x3f437f=Math['abs'](this['privateTemFontsInfo'][_0x459709]['absTimeStamp']-_0x2375e1))){_0x44a471=!0x0,_0x2583fb=_0x459709;break;}_0x3f437f<=this['nTimePerFrame']+0x3e8&&_0x3f437f<_0x50ef5b&&(_0x1e472a=!0x0,_0x5ee60b=_0x459709,_0x50ef5b=_0x3f437f);}_0x44a471?(this['curTemFontsInfo']=this['privateTemFontsInfo'][_0x2583fb],this['privateTemFontsInfo']['shift']()):_0x1e472a?(this['curTemFontsInfo']=this['privateTemFontsInfo'][_0x5ee60b],this['privateTemFontsInfo']['shift']()):this['nFrameRate']<=0x1e?this['m_nTEMDrawFontscount']<=0x1e?this['m_nTEMDrawFontscount']++:this['curTemFontsInfo']=null:this['m_nTEMDrawFontscount']<=0x3c?this['m_nTEMDrawFontscount']++:this['curTemFontsInfo']=null;}else this['nFrameRate']<=0x1e?this['m_nTEMDrawFontscount']<=0x1e?this['m_nTEMDrawFontscount']++:this['curTemFontsInfo']=null:this['m_nTEMDrawFontscount']<=0x3c?this['m_nTEMDrawFontscount']++:this['curTemFontsInfo']=null;if(0x0!=this['privateTargetFontsInfo']['length']){for(var _0x18862e=!0x1,_0x3633d1=0x0,_0x29e01f=!0x1,_0x119a07=0x0,_0x43b187=0x0,_0x4d0e8a=0x5f5e100,_0x878e5e=0x0;_0x878e5e<this['privateTargetFontsInfo']['length'];_0x878e5e++){if(0x0==(_0x43b187=Math['abs'](this['privateTargetFontsInfo'][_0x878e5e]['absTimeStamp']-_0x2375e1))){_0x29e01f=!0x0,_0x119a07=_0x878e5e;break;}_0x43b187<=this['nTimePerFrame']+0x3e8&&_0x43b187<_0x4d0e8a&&(_0x18862e=!0x0,_0x3633d1=_0x878e5e,_0x4d0e8a=_0x43b187);}_0x29e01f?(this['curTargetFontsInfo']=this['privateTargetFontsInfo'][_0x119a07],this['privateTargetFontsInfo']['shift']()):_0x18862e?(this['curTargetFontsInfo']=this['privateTargetFontsInfo'][_0x3633d1],this['privateTargetFontsInfo']['shift']()):this['curTargetFontsInfo']=null;}else this['curTargetFontsInfo']=null;if(0x0!=this['privateExactPOSFontsInfo']['length']){for(var _0x18f52c=!0x1,_0x2c6ae6=0x0,_0x3a92ad=!0x1,_0x4d4f50=0x0,_0x28b363=0x0,_0x2c0ac1=0x5f5e100,_0x1e4878=0x0;_0x1e4878<this['privateExactPOSFontsInfo']['length'];_0x1e4878++){if(0x0==(_0x28b363=Math['abs'](this['privateExactPOSFontsInfo'][_0x1e4878]['absTimeStamp']-_0x2375e1))){_0x3a92ad=!0x0,_0x4d4f50=_0x1e4878;break;}_0x28b363<=this['nTimePerFrame']/0x2&&_0x28b363<_0x2c0ac1&&(_0x18f52c=!0x0,_0x2c6ae6=_0x1e4878,_0x2c0ac1=_0x28b363);}_0x3a92ad?(this['curExactPOSFontsInfo']=this['privateExactPOSFontsInfo'][_0x4d4f50],this['privateExactPOSFontsInfo']['shift']()):_0x18f52c?(this['curExactPOSFontsInfo']=this['privateExactPOSFontsInfo'][_0x2c6ae6],this['privateExactPOSFontsInfo']['shift']()):this['curExactPOSFontsInfo']=null;}else this['curExactPOSFontsInfo']=null;if(0x0!=this['privateExactFontsInfo']['length']){for(var _0x523075=!0x1,_0x5e3f1c=0x0,_0x4d95fe=!0x1,_0x40a8b9=0x0,_0x38f01a=0x0,_0x59cab1=0x5f5e100,_0x270ddf=0x0;_0x270ddf<this['privateExactFontsInfo']['length'];_0x270ddf++){if(0x0==(_0x38f01a=Math['abs'](this['privateExactFontsInfo'][_0x270ddf]['absTimeStamp']-_0x2375e1))){_0x4d95fe=!0x0,_0x40a8b9=_0x270ddf;break;}_0x38f01a<=this['nTimePerFrame']/0x2&&_0x38f01a<_0x59cab1&&(_0x523075=!0x0,_0x5e3f1c=_0x270ddf,_0x59cab1=_0x38f01a);}_0x4d95fe?(this['curExactFontsInfo']=this['privateExactFontsInfo'][_0x40a8b9],this['privateExactFontsInfo']['shift']()):_0x523075?(this['curExactFontsInfo']=this['privateExactFontsInfo'][_0x5e3f1c],this['privateExactFontsInfo']['shift']()):this['curExactFontsInfo']=null;}else this['curExactFontsInfo']=null;if(0x0!=this['privateImageInfo']['length']){for(var _0x56e5a4=!0x1,_0x3899a3=0x0,_0xe1b585=!0x1,_0x6e4401=0x0,_0x303aa4=0x0,_0x58c5f7=0x5f5e100,_0x4b86fe=0x0;_0x4b86fe<this['privateImageInfo']['length'];_0x4b86fe++){if(0x0==(_0x303aa4=Math['abs'](this['privateImageInfo'][_0x4b86fe]['absTimeStamp']-_0x2375e1))){_0xe1b585=!0x0,_0x6e4401=_0x4b86fe;break;}_0x303aa4<=this['nTimePerFrame']+0x5f5e100&&_0x303aa4<_0x58c5f7&&(_0x56e5a4=!0x0,_0x3899a3=_0x4b86fe,_0x58c5f7=_0x303aa4);}_0xe1b585?(this['curImagesInfo']=this['privateImageInfo'][_0x6e4401],this['privateImageInfo']['shift']()):_0x56e5a4&&(this['curImagesInfo']=this['privateImageInfo'][_0x3899a3],this['privateImageInfo']['shift']());}return 0x1;}},{'key':'RenderPrivateData','value':function(_0x3648ea,_0x320b3b){return 0x1&_0x3648ea&&(this['m_bEnableIVSEx']=_0x320b3b),0x2&_0x3648ea&&(this['m_bEnableMDEx']=_0x320b3b),0x4&_0x3648ea&&(this['m_bDisPos']=_0x320b3b),0x8&_0x3648ea&&(this['m_bEnablePICEx']=_0x320b3b),0x10&_0x3648ea&&(this['m_bEnableFIREEx']=_0x320b3b),0x20&_0x3648ea&&(this['m_bEnableTEMEx']=_0x320b3b),0x40&_0x3648ea&&(this['m_bEnableTrackEx']=_0x320b3b),0x80&_0x3648ea&&(this['m_bEnableThermal']=_0x320b3b),0x1;}},{'key':'RenderPrivateDataEx','value':function(_0x3a74cf,_0x3fca8c,_0x2d70c5){return 0x10==_0x3a74cf&&(0x1&_0x3fca8c&&(this['m_bEnableFireDis']=_0x2d70c5),0x4&_0x3fca8c&&(this['m_bEnableFireMaxPos']=_0x2d70c5),0x8&_0x3fca8c&&(this['m_bEnableFireDistance']=_0x2d70c5)),0x20==_0x3a74cf&&(0x1&_0x3fca8c&&(this['m_bEnableTEMBox']=_0x2d70c5),0x2&_0x3fca8c&&(this['m_bEnableTEMLine']=_0x2d70c5),0x4&_0x3fca8c&&(this['m_bEnableTEMPoint']=_0x2d70c5)),0x40==_0x3a74cf&&(0x1&_0x3fca8c&&(this['m_bEnableTrackPeople']=_0x2d70c5),0x2&_0x3fca8c&&(this['m_bEnableTrackVehicle']=_0x2d70c5)),0x80==_0x3a74cf&&(0x1&_0x3fca8c&&(this['m_bEnableThermalFireMask']=_0x2d70c5),0x2&_0x3fca8c&&(this['m_bEnableThermalRuleGas']=_0x2d70c5),0x4&_0x3fca8c&&(this['m_bEnableThermalTargetGas']=_0x2d70c5)),0x1;}},{'key':'InputPrivateInfo','value':function(_0x247233,_0x4edfac,_0x5d0e9d){var _0x3dd4bf=this,_0x59e36b=!0x1,_0x34ae10=0x0;if(_0x247233['linesNum']>0x0){var _0x2836b6={'linesNum':0x0};_0x2836b6['absTimeStamp']=_0x247233['absTimeStamp'],_0x2836b6['stDrawLinesArray']=[];var _0x21311e={'linesNum':0x0};_0x21311e['absTimeStamp']=_0x247233['absTimeStamp'],_0x21311e['stDrawLinesArray']=[];var _0x29620e={'linesNum':0x0};_0x29620e['absTimeStamp']=_0x247233['absTimeStamp'],_0x29620e['stDrawLinesArray']=[];var _0x1a9f88={'linesNum':0x0};_0x1a9f88['absTimeStamp']=_0x247233['absTimeStamp'],_0x1a9f88['stDrawLinesArray']=[];var _0x11893f={'linesNum':0x0};_0x11893f['absTimeStamp']=_0x247233['absTimeStamp'],_0x11893f['stDrawLinesArray']=[];var _0x56d362={'linesNum':0x0};_0x56d362['absTimeStamp']=_0x247233['absTimeStamp'],_0x56d362['stDrawLinesArray']=[];var _0xf6c7da={'linesNum':0x0};_0xf6c7da['absTimeStamp']=_0x247233['absTimeStamp'],_0xf6c7da['stDrawLinesArray']=[];for(var _0x522e96=0x0;_0x522e96<_0x247233['linesNum'];_0x522e96++)0x1==_0x247233['stDrawLinesArray'][_0x522e96]['dwMatchType']?0x2==_0x247233['stDrawLinesArray'][_0x522e96]['dwIntelFlag']?(_0x56d362['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x56d362['linesNum']):(_0x11893f['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x11893f['linesNum']):0x1==_0x247233['stDrawLinesArray'][_0x522e96]['dwIntelFlag']?(_0x2836b6['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x2836b6['linesNum']):0x4==_0x247233['stDrawLinesArray'][_0x522e96]['dwIntelFlag']?(this['m_nTEMDrawLinescount']=0x0,_0x21311e['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x21311e['linesNum']):0x6==_0x247233['stDrawLinesArray'][_0x522e96]['dwIntelFlag']?(_0x29620e['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x29620e['linesNum']):0x8!=_0x247233['stDrawLinesArray'][_0x522e96]['dwIntelFlag']||0x1!=_0x247233['stDrawLinesArray'][_0x522e96]['dwSubIntelFlag']&&0x2!=_0x247233['stDrawLinesArray'][_0x522e96]['dwSubIntelFlag']?(_0x1a9f88['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0x1a9f88['linesNum']):(_0xf6c7da['stDrawLinesArray']['push'](_0x247233['stDrawLinesArray'][_0x522e96]),++_0xf6c7da['linesNum']);if(_0x11893f['linesNum']>0x0){if(_0x11893f['absTimeStamp']<=this['maxExactPrivateLineTimeStamp']){var _0x267207=0x0;for(_0x267207=0x0;_0x267207<this['privateExactLinesInfo']['length'];_0x267207++)if(this['privateExactLinesInfo'][_0x267207]['absTimeStamp']==_0x11893f['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x267207;break;}}if(_0x59e36b){this['privateExactLinesInfo'][_0x34ae10]['linesNum']=_0x11893f['linesNum'];for(var _0x1e8016=0x0;_0x1e8016<_0x11893f['linesNum'];_0x1e8016++){this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]={},this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['vertex_num']=_0x11893f['stDrawLinesArray'][_0x1e8016]['vertex_num'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['lineWidth']=_0x11893f['stDrawLinesArray'][_0x1e8016]['lineWidth'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['bFill']=_0x11893f['stDrawLinesArray'][_0x1e8016]['bFill'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['bLoop']=_0x11893f['stDrawLinesArray'][_0x1e8016]['bLoop'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['dwMatchType']=_0x11893f['stDrawLinesArray'][_0x1e8016]['dwMatchType'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['dwIntelFlag']=_0x11893f['stDrawLinesArray'][_0x1e8016]['dwIntelFlag'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['dwSubIntelFlag']=_0x11893f['stDrawLinesArray'][_0x1e8016]['dwSubIntelFlag'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['color']={},this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['color']['R']=_0x11893f['stDrawLinesArray'][_0x1e8016]['color']['R'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['color']['G']=_0x11893f['stDrawLinesArray'][_0x1e8016]['color']['G'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['color']['B']=_0x11893f['stDrawLinesArray'][_0x1e8016]['color']['B'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['color']['A']=_0x11893f['stDrawLinesArray'][_0x1e8016]['color']['A'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['stPoint']=[];for(var _0x11dc75=0x0;_0x11dc75<_0x11893f['stDrawLinesArray'][_0x1e8016]['vertex_num'];_0x11dc75++)this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['stPoint'][_0x11dc75]={},this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['stPoint'][_0x11dc75]['x']=_0x11893f['stDrawLinesArray'][_0x1e8016]['stPoint'][_0x11dc75]['x'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['stPoint'][_0x11dc75]['y']=_0x11893f['stDrawLinesArray'][_0x1e8016]['stPoint'][_0x11dc75]['y'];this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['dwFillPicID']=_0x11893f['stDrawLinesArray'][_0x1e8016]['dwFillPicID'],this['privateExactLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1e8016]['eventid']=_0x11893f['stDrawLinesArray'][_0x1e8016]['dwEventID'];}}else this['maxExactPrivateLineTimeStamp']<_0x11893f['absTimeStamp']&&(this['maxExactPrivateLineTimeStamp']=_0x11893f['absTimeStamp']),this['privateExactLinesInfo']['push'](_0x11893f);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x1a9f88['linesNum']>0x0){if(this['privateNormalLinesInfo']['length']>=_0x1eb546&&this['privateNormalLinesInfo']['shift'](),_0x1a9f88['absTimeStamp']<=this['maxNormalPrivateLineTimeStamp']){var _0x49a13b=0x0;for(_0x49a13b=0x0;_0x49a13b<this['privateNormalLinesInfo']['length'];_0x49a13b++)if(this['privateNormalLinesInfo'][_0x49a13b]['absTimeStamp']==_0x1a9f88['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x49a13b;break;}}if(_0x59e36b){for(var _0x665723=0x0;_0x665723<_0x1a9f88['linesNum'];_0x665723++)this['privateNormalLinesInfo'][_0x34ae10]['stDrawLinesArray']['push'](_0x1a9f88['stDrawLinesArray'][_0x665723]),++this['privateNormalLinesInfo'][_0x34ae10]['linesNum'];}else this['maxNormalPrivateLineTimeStamp']<_0x1a9f88['absTimeStamp']&&(this['maxNormalPrivateLineTimeStamp']=_0x1a9f88['absTimeStamp']),this['privateNormalLinesInfo']['push'](_0x1a9f88);}if(_0xf6c7da['linesNum']>0x0){if(this['privateThermalLinesInfo']['length']>=_0x1eb546&&this['privateThermalLinesInfo']['shift'](),0x0!=this['privateThermalLinesInfo']['length']){this['privateThermalLinesInfo'][0x0]['linesNum']=_0xf6c7da['linesNum'];for(var _0xd9f3d=0x0;_0xd9f3d<_0xf6c7da['linesNum'];_0xd9f3d++){this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]={},this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['vertex_num']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['vertex_num'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['lineWidth']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['lineWidth'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['bFill']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['bFill'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['bLoop']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['bLoop'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['dwMatchType']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['dwMatchType'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['dwIntelFlag']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['dwIntelFlag'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['dwSubIntelFlag']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['dwSubIntelFlag'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['color']={},this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['color']['R']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['color']['R'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['color']['G']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['color']['G'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['color']['B']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['color']['B'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['color']['A']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['color']['A'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['stPoint']=[];for(var _0x449248=0x0;_0x449248<_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['vertex_num'];_0x449248++)this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['stPoint'][_0x449248]={},this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['stPoint'][_0x449248]['x']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['stPoint'][_0x449248]['x'],this['privateThermalLinesInfo'][0x0]['stDrawLinesArray'][_0xd9f3d]['stPoint'][_0x449248]['y']=_0xf6c7da['stDrawLinesArray'][_0xd9f3d]['stPoint'][_0x449248]['y'];}}else this['privateThermalLinesInfo']['push'](_0xf6c7da);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x56d362['linesNum']>0x0){if(_0x56d362['absTimeStamp']<=this['maxExactRulePrivateLineTimeStamp']){var _0x45e6f0=0x0;for(_0x45e6f0=0x0;_0x45e6f0<this['privateExactRuleLinesInfo']['length'];_0x45e6f0++)if(this['privateExactRuleLinesInfo'][_0x45e6f0]['absTimeStamp']==_0x56d362['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x45e6f0;break;}}if(_0x59e36b){this['privateExactRuleLinesInfo'][_0x34ae10]['linesNum']=_0x56d362['linesNum'];for(var _0x5005c9=0x0;_0x5005c9<_0x56d362['linesNum'];_0x5005c9++){this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]={},this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['vertex_num']=_0x56d362['stDrawLinesArray'][_0x5005c9]['vertex_num'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['lineWidth']=_0x56d362['stDrawLinesArray'][_0x5005c9]['lineWidth'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['bFill']=_0x56d362['stDrawLinesArray'][_0x5005c9]['bFill'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['bLoop']=_0x56d362['stDrawLinesArray'][_0x5005c9]['bLoop'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['dwMatchType']=_0x56d362['stDrawLinesArray'][_0x5005c9]['dwMatchType'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['dwIntelFlag']=_0x56d362['stDrawLinesArray'][_0x5005c9]['dwIntelFlag'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['dwSubIntelFlag']=_0x56d362['stDrawLinesArray'][_0x5005c9]['dwSubIntelFlag'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['color']={},this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['color']['R']=_0x56d362['stDrawLinesArray'][_0x5005c9]['color']['R'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['color']['G']=_0x56d362['stDrawLinesArray'][_0x5005c9]['color']['G'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['color']['B']=_0x56d362['stDrawLinesArray'][_0x5005c9]['color']['B'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['color']['A']=_0x56d362['stDrawLinesArray'][_0x5005c9]['color']['A'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['stPoint']=[];for(var _0x382a74=0x0;_0x382a74<_0x56d362['stDrawLinesArray'][_0x5005c9]['vertex_num'];_0x382a74++)this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['stPoint'][_0x382a74]={},this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['stPoint'][_0x382a74]['x']=_0x56d362['stDrawLinesArray'][_0x5005c9]['stPoint'][_0x382a74]['x'],this['privateExactRuleLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x5005c9]['stPoint'][_0x382a74]['y']=_0x56d362['stDrawLinesArray'][_0x5005c9]['stPoint'][_0x382a74]['y'];}}else this['maxExactRulePrivateLineTimeStamp']<_0x56d362['absTimeStamp']&&(this['maxExactRulePrivateLineTimeStamp']=_0x56d362['absTimeStamp']),this['privateExactRuleLinesInfo']['push'](_0x56d362);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x2836b6['linesNum']>0x0){if(_0x2836b6['absTimeStamp']<=this['maxTargetPrivateLineTimeStamp']){var _0x1388cd=0x0;for(_0x1388cd=0x0;_0x1388cd<this['privateTargetLinesInfo']['length'];_0x1388cd++)if(this['privateTargetLinesInfo'][_0x1388cd]['absTimeStamp']==_0x2836b6['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x1388cd;break;}}if(_0x59e36b){this['privateTargetLinesInfo'][_0x34ae10]['linesNum']=_0x2836b6['linesNum'];for(var _0x4df736=0x0;_0x4df736<_0x2836b6['linesNum'];_0x4df736++){this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]={},this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['vertex_num']=_0x2836b6['stDrawLinesArray'][_0x4df736]['vertex_num'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['lineWidth']=_0x2836b6['stDrawLinesArray'][_0x4df736]['lineWidth'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['bFill']=_0x2836b6['stDrawLinesArray'][_0x4df736]['bFill'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['bLoop']=_0x2836b6['stDrawLinesArray'][_0x4df736]['bLoop'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['dwMatchType']=_0x2836b6['stDrawLinesArray'][_0x4df736]['dwMatchType'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['dwIntelFlag']=_0x2836b6['stDrawLinesArray'][_0x4df736]['dwIntelFlag'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['dwSubIntelFlag']=_0x2836b6['stDrawLinesArray'][_0x4df736]['dwSubIntelFlag'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['color']={},this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['color']['R']=_0x2836b6['stDrawLinesArray'][_0x4df736]['color']['R'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['color']['G']=_0x2836b6['stDrawLinesArray'][_0x4df736]['color']['G'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['color']['B']=_0x2836b6['stDrawLinesArray'][_0x4df736]['color']['B'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['color']['A']=_0x2836b6['stDrawLinesArray'][_0x4df736]['color']['A'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['stPoint']=[];for(var _0x42e507=0x0;_0x42e507<_0x2836b6['stDrawLinesArray'][_0x4df736]['vertex_num'];_0x42e507++)this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['stPoint'][_0x42e507]={},this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['stPoint'][_0x42e507]['x']=_0x2836b6['stDrawLinesArray'][_0x4df736]['stPoint'][_0x42e507]['x'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['stPoint'][_0x42e507]['y']=_0x2836b6['stDrawLinesArray'][_0x4df736]['stPoint'][_0x42e507]['y'];this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['dwFillPicID']=_0x2836b6['stDrawLinesArray'][_0x4df736]['dwFillPicID'],this['privateTargetLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x4df736]['eventid']=_0x2836b6['stDrawLinesArray'][_0x4df736]['dwEventID'];}}else this['maxTargetPrivateLineTimeStamp']<_0x2836b6['absTimeStamp']&&(this['maxTargetPrivateLineTimeStamp']=_0x2836b6['absTimeStamp']),this['privateTargetLinesInfo']['push'](_0x2836b6);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x29620e['linesNum']>0x0){if(this['privateMDLinesInfo']['length']>=_0x1eb546&&this['privateMDLinesInfo']['shift'](),_0x29620e['absTimeStamp']<=this['maxMDPrivateLineTimeStamp']){var _0xa0c4d0=0x0;for(_0xa0c4d0=0x0;_0xa0c4d0<this['privateMDLinesInfo']['length'];_0xa0c4d0++)if(this['privateMDLinesInfo'][_0xa0c4d0]['absTimeStamp']==_0x29620e['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0xa0c4d0;break;}}if(_0x59e36b){this['privateMDLinesInfo'][_0x34ae10]['linesNum']=_0x29620e['linesNum'];for(var _0x35df53=0x0;_0x35df53<_0x29620e['linesNum'];_0x35df53++){this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]={},this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['vertex_num']=_0x29620e['stDrawLinesArray'][_0x35df53]['vertex_num'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['lineWidth']=_0x29620e['stDrawLinesArray'][_0x35df53]['lineWidth'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['bFill']=_0x29620e['stDrawLinesArray'][_0x35df53]['bFill'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['bLoop']=_0x29620e['stDrawLinesArray'][_0x35df53]['bLoop'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['dwMatchType']=_0x29620e['stDrawLinesArray'][_0x35df53]['dwMatchType'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['dwIntelFlag']=_0x29620e['stDrawLinesArray'][_0x35df53]['dwIntelFlag'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['dwSubIntelFlag']=_0x29620e['stDrawLinesArray'][_0x35df53]['dwSubIntelFlag'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['color']={},this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['color']['R']=_0x29620e['stDrawLinesArray'][_0x35df53]['color']['R'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['color']['G']=_0x29620e['stDrawLinesArray'][_0x35df53]['color']['G'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['color']['B']=_0x29620e['stDrawLinesArray'][_0x35df53]['color']['B'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['color']['A']=_0x29620e['stDrawLinesArray'][_0x35df53]['color']['A'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['stPoint']=[];for(var _0x1a01de=0x0;_0x1a01de<_0x29620e['stDrawLinesArray'][_0x35df53]['vertex_num'];_0x1a01de++)this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['stPoint'][_0x1a01de]={},this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['stPoint'][_0x1a01de]['x']=_0x29620e['stDrawLinesArray'][_0x35df53]['stPoint'][_0x1a01de]['x'],this['privateMDLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x35df53]['stPoint'][_0x1a01de]['y']=_0x29620e['stDrawLinesArray'][_0x35df53]['stPoint'][_0x1a01de]['y'];}}else this['maxMDPrivateLineTimeStamp']<_0x29620e['absTimeStamp']&&(this['maxMDPrivateLineTimeStamp']=_0x29620e['absTimeStamp']),this['privateMDLinesInfo']['push'](_0x29620e);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x21311e['linesNum']>0x0){if(this['privateTemLinesInfo']['length']>=_0x1eb546&&this['privateTemLinesInfo']['shift'](),_0x21311e['absTimeStamp']<=this['maxTemPrivateLineTimeStamp']){var _0x5c8f9d=0x0;for(_0x5c8f9d=0x0;_0x5c8f9d<this['privateTemLinesInfo']['length'];_0x5c8f9d++)if(this['privateTemLinesInfo'][_0x5c8f9d]['absTimeStamp']==_0x21311e['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x5c8f9d;break;}}if(_0x59e36b){this['privateTemLinesInfo'][_0x34ae10]['linesNum']=_0x21311e['linesNum'];for(var _0x1a66ae=0x0;_0x1a66ae<_0x21311e['linesNum'];_0x1a66ae++){this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]={},this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['vertex_num']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['vertex_num'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['lineWidth']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['lineWidth'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['bFill']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['bFill'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['bLoop']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['bLoop'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['dwMatchType']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['dwMatchType'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['dwIntelFlag']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['dwIntelFlag'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['dwSubIntelFlag']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['dwSubIntelFlag'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['color']={},this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['color']['R']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['color']['R'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['color']['G']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['color']['G'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['color']['B']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['color']['B'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['color']['A']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['color']['A'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['stPoint']=[];for(var _0x3d3042=0x0;_0x3d3042<_0x21311e['stDrawLinesArray'][_0x1a66ae]['vertex_num'];_0x3d3042++)this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['stPoint'][_0x3d3042]={},this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['stPoint'][_0x3d3042]['x']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['stPoint'][_0x3d3042]['x'],this['privateTemLinesInfo'][_0x34ae10]['stDrawLinesArray'][_0x1a66ae]['stPoint'][_0x3d3042]['y']=_0x21311e['stDrawLinesArray'][_0x1a66ae]['stPoint'][_0x3d3042]['y'];}}else this['maxTemPrivateLineTimeStamp']<_0x21311e['absTimeStamp']&&(this['maxTemPrivateLineTimeStamp']=_0x21311e['absTimeStamp']),this['privateTemLinesInfo']['push'](_0x21311e);}}if(_0x4edfac['nFontsNum']>0x0){var _0x40a540={'nFontsNum':0x0};_0x40a540['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x40a540['stDrawFontsArray']=[];var _0x206f21={'nFontsNum':0x0};_0x206f21['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x206f21['stDrawFontsArray']=[];var _0x19c569={'nFontsNum':0x0};_0x19c569['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x19c569['stDrawFontsArray']=[];var _0x402f2f={'nFontsNum':0x0};_0x402f2f['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x402f2f['stDrawFontsArray']=[];var _0x13cf6d={'nFontsNum':0x0};_0x13cf6d['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x13cf6d['stDrawFontsArray']=[];var _0x38ad54={'nFontsNum':0x0};_0x38ad54['absTimeStamp']=_0x4edfac['absTimeStamp'],_0x38ad54['stDrawFontsArray']=[];for(var _0x2f9f20=0x0;_0x2f9f20<_0x4edfac['nFontsNum'];_0x2f9f20++)0x1==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwMatchType']?0x1==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwIntelFlag']?(_0x13cf6d['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x13cf6d['nFontsNum']):0x3==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwIntelFlag']&&(_0x38ad54['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x38ad54['nFontsNum']):0x1==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwIntelFlag']?(_0x40a540['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x40a540['nFontsNum']):0x4==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwIntelFlag']?(this['m_nTEMDrawFontscount']=0x0,_0x206f21['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x206f21['nFontsNum']):0x3==_0x4edfac['stDrawFontsArray'][_0x2f9f20]['dwIntelFlag']?_0x4edfac['stDrawFontsArray'][_0x2f9f20]['NeedClearNormalPos']?this['curNormalPOSFontsInfo']=null:(_0x402f2f['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x402f2f['nFontsNum']):(_0x19c569['stDrawFontsArray']['push'](_0x4edfac['stDrawFontsArray'][_0x2f9f20]),++_0x19c569['nFontsNum']);if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x38ad54['nFontsNum']>0x0){if(this['privateExactPOSFontsInfo']['length']>=_0x1eb546&&this['privateExactPOSFontsInfo']['shift'](),_0x38ad54['absTimeStamp']<=this['maxExactPOSPrivateFontTimeStamp']){var _0x48b0a3=0x0;for(_0x48b0a3=0x0;_0x48b0a3<this['privateExactPOSFontsInfo']['length'];_0x48b0a3++)if(this['privateExactPOSFontsInfo'][_0x48b0a3]['absTimeStamp']==_0x38ad54['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x48b0a3;break;}}if(_0x59e36b){this['privateExactPOSFontsInfo'][_0x34ae10]['nFontsNum']=_0x38ad54['nFontsNum'];for(var _0x383599=0x0;_0x383599<_0x38ad54['nFontsNum'];_0x383599++)this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]={},this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['nFontSizeW']=_0x38ad54['stDrawFontsArray'][_0x383599]['nFontSizeW'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['nFontSizeH']=_0x38ad54['stDrawFontsArray'][_0x383599]['nFontSizeH'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['dwMatchType']=_0x38ad54['stDrawFontsArray'][_0x383599]['dwMatchType'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['dwIntelFlag']=_0x38ad54['stDrawFontsArray'][_0x383599]['dwIntelFlag'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['dwSubIntelFlag']=_0x38ad54['stDrawFontsArray'][_0x383599]['dwSubIntelFlag'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['color']={},this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['color']['R']=_0x38ad54['stDrawFontsArray'][_0x383599]['color']['R'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['color']['G']=_0x38ad54['stDrawFontsArray'][_0x383599]['color']['G'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['color']['B']=_0x38ad54['stDrawFontsArray'][_0x383599]['color']['B'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['color']['A']=_0x38ad54['stDrawFontsArray'][_0x383599]['color']['A'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['stPoint']={},this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['stPoint']['x']=_0x38ad54['stDrawFontsArray'][_0x383599]['stPoint']['x'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['stPoint']['y']=_0x38ad54['stDrawFontsArray'][_0x383599]['stPoint']['y'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['fontString']=_0x38ad54['stDrawFontsArray'][_0x383599]['fontString'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['BGcolor']={},this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['BGcolor']['R']=_0x38ad54['stDrawFontsArray'][_0x383599]['BGcolor']['R'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['BGcolor']['G']=_0x38ad54['stDrawFontsArray'][_0x383599]['BGcolor']['G'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['BGcolor']['B']=_0x38ad54['stDrawFontsArray'][_0x383599]['BGcolor']['B'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['BGcolor']['A']=_0x38ad54['stDrawFontsArray'][_0x383599]['BGcolor']['A'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['bBackGround']=_0x38ad54['stDrawFontsArray'][_0x383599]['bBackGround'],this['privateExactPOSFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x383599]['EventID']=_0x38ad54['stDrawFontsArray'][_0x383599]['dwEventID'];}else this['maxExactPOSPrivateFontTimeStamp']<_0x38ad54['absTimeStamp']&&(this['maxExactPOSPrivateFontTimeStamp']=_0x38ad54['absTimeStamp']),this['privateExactPOSFontsInfo']['push'](_0x38ad54);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x13cf6d['nFontsNum']>0x0){if(this['privateExactFontsInfo']['length']>=_0x1eb546&&this['privateExactFontsInfo']['shift'](),_0x13cf6d['absTimeStamp']<=this['maxExactPrivateFontTimeStamp']){var _0x33b1b7=0x0;for(_0x33b1b7=0x0;_0x33b1b7<this['privateExactFontsInfo']['length'];_0x33b1b7++)if(this['privateExactFontsInfo'][_0x33b1b7]['absTimeStamp']==_0x13cf6d['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x33b1b7;break;}}if(_0x59e36b){for(var _0x2589ee=0x0;_0x2589ee<_0x13cf6d['nFontsNum'];_0x2589ee++)this['privateExactFontsInfo'][_0x34ae10]['stDrawFontsArray']['push'](_0x13cf6d['stDrawFontsArray'][_0x2589ee]),++this['privateExactFontsInfo'][_0x34ae10]['nFontsNum'];}else this['maxExactPrivateFontTimeStamp']<_0x13cf6d['absTimeStamp']&&(this['maxExactPrivateFontTimeStamp']=_0x13cf6d['absTimeStamp']),this['privateExactFontsInfo']['push'](_0x13cf6d);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x19c569['nFontsNum']>0x0){if(this['privateNormalFontsInfo']['length']>=_0x1eb546&&this['privateNormalFontsInfo']['shift'](),_0x19c569['absTimeStamp']<=this['maxNormalPrivateFontTimeStamp']){var _0x145457=0x0;for(_0x145457=0x0;_0x145457<this['privateNormalFontsInfo']['length'];_0x145457++)if(this['privateNormalFontsInfo'][_0x145457]['absTimeStamp']==_0x19c569['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x145457;break;}}if(_0x59e36b){for(var _0x32608c=0x0;_0x32608c<_0x19c569['nFontsNum'];_0x32608c++)this['privateNormalFontsInfo'][_0x34ae10]['stDrawFontsArray']['push'](_0x19c569['stDrawFontsArray'][_0x32608c]),++this['privateNormalFontsInfo'][_0x34ae10]['nFontsNum'];}else this['maxNormalPrivateFontTimeStamp']<_0x19c569['absTimeStamp']&&(this['maxNormalPrivateFontTimeStamp']=_0x19c569['absTimeStamp']),this['privateNormalFontsInfo']['push'](_0x19c569);}if(_0x402f2f['nFontsNum']>0x0){if(null==this['curNormalPOSFontsInfo'])this['curNormalPOSFontsInfo']=_0x402f2f;else{this['curNormalPOSFontsInfo']['nFontsNum']=_0x402f2f['nFontsNum'],this['curNormalPOSFontsInfo']['absTimeStamp']=_0x402f2f['absTimeStamp'];for(var _0x1c6f38=0x0;_0x1c6f38<_0x402f2f['nFontsNum'];_0x1c6f38++)this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]={},this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['nFontSizeW']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['nFontSizeW'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['nFontSizeH']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['nFontSizeH'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['dwMatchType']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['dwMatchType'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['dwIntelFlag']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['dwIntelFlag'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['dwSubIntelFlag']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['dwSubIntelFlag'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['color']={},this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['color']['R']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['color']['R'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['color']['G']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['color']['G'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['color']['B']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['color']['B'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['color']['A']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['color']['A'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['stPoint']={},this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['stPoint']['x']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['stPoint']['x'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['stPoint']['y']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['stPoint']['y'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['fontString']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['fontString'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['BGcolor']={},this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['BGcolor']['R']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['BGcolor']['R'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['BGcolor']['G']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['BGcolor']['G'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['BGcolor']['B']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['BGcolor']['B'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['BGcolor']['A']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['BGcolor']['A'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['bBackGround']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['bBackGround'],this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x1c6f38]['EventID']=_0x402f2f['stDrawFontsArray'][_0x1c6f38]['dwEventID'];}}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x40a540['nFontsNum']>0x0){if(this['privateTargetFontsInfo']['length']>=_0x1eb546&&this['privateTargetFontsInfo']['shift'](),_0x40a540['absTimeStamp']<=this['maxTargetPrivateFontTimeStamp']){var _0x478941=0x0;for(_0x478941=0x0;_0x478941<this['privateTargetFontsInfo']['length'];_0x478941++)if(this['privateTargetFontsInfo'][_0x478941]['absTimeStamp']==_0x40a540['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x478941;break;}}if(_0x59e36b){this['privateTargetFontsInfo'][_0x34ae10]['nFontsNum']=_0x40a540['nFontsNum'];for(var _0x5aedcb=0x0;_0x5aedcb<_0x40a540['nFontsNum'];_0x5aedcb++)this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]={},this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['nFontSizeW']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['nFontSizeW'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['nFontSizeH']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['nFontSizeH'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['dwMatchType']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['dwMatchType'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['dwIntelFlag']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['dwIntelFlag'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['dwSubIntelFlag']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['dwSubIntelFlag'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['color']={},this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['color']['R']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['color']['R'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['color']['G']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['color']['G'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['color']['B']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['color']['B'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['color']['A']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['color']['A'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['stPoint']={},this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['stPoint']['x']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['stPoint']['x'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['stPoint']['y']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['stPoint']['y'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['fontString']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['fontString'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['BGcolor']={},this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['BGcolor']['R']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['BGcolor']['R'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['BGcolor']['G']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['BGcolor']['G'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['BGcolor']['B']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['BGcolor']['B'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['BGcolor']['A']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['BGcolor']['A'],this['privateTargetFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5aedcb]['bBackGround']=_0x40a540['stDrawFontsArray'][_0x5aedcb]['bBackGround'];}else this['maxTargetPrivateFontTimeStamp']<_0x40a540['absTimeStamp']&&(this['maxTargetPrivateFontTimeStamp']=_0x40a540['absTimeStamp']),this['privateTargetFontsInfo']['push'](_0x40a540);}if(_0x59e36b=!0x1,_0x34ae10=0x0,_0x206f21['nFontsNum']>0x0){if(this['privateTemFontsInfo']['length']>=_0x1eb546&&this['privateTemFontsInfo']['shift'](),_0x206f21['absTimeStamp']<=this['maxTemPrivateFontTimeStamp']){var _0xfd100f=0x0;for(_0xfd100f=0x0;_0xfd100f<this['privateTemFontsInfo']['length'];_0xfd100f++)if(this['privateTemFontsInfo'][_0xfd100f]['absTimeStamp']==_0x206f21['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0xfd100f;break;}}if(_0x59e36b){this['privateTemFontsInfo'][_0x34ae10]['nFontsNum']=_0x206f21['nFontsNum'];for(var _0x5e6524=0x0;_0x5e6524<_0x206f21['nFontsNum'];_0x5e6524++)this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]={},this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['nFontSizeW']=_0x206f21['stDrawFontsArray'][_0x5e6524]['nFontSizeW'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['nFontSizeH']=_0x206f21['stDrawFontsArray'][_0x5e6524]['nFontSizeH'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['dwMatchType']=_0x206f21['stDrawFontsArray'][_0x5e6524]['dwMatchType'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['dwIntelFlag']=_0x206f21['stDrawFontsArray'][_0x5e6524]['dwIntelFlag'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['dwSubIntelFlag']=_0x206f21['stDrawFontsArray'][_0x5e6524]['dwSubIntelFlag'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['color']={},this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['color']['R']=_0x206f21['stDrawFontsArray'][_0x5e6524]['color']['R'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['color']['G']=_0x206f21['stDrawFontsArray'][_0x5e6524]['color']['G'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['color']['B']=_0x206f21['stDrawFontsArray'][_0x5e6524]['color']['B'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['color']['A']=_0x206f21['stDrawFontsArray'][_0x5e6524]['color']['A'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['stPoint']={},this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['stPoint']['x']=_0x206f21['stDrawFontsArray'][_0x5e6524]['stPoint']['x'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['stPoint']['y']=_0x206f21['stDrawFontsArray'][_0x5e6524]['stPoint']['y'],this['privateTemFontsInfo'][_0x34ae10]['stDrawFontsArray'][_0x5e6524]['fontString']=_0x206f21['stDrawFontsArray'][_0x5e6524]['fontString'];}else this['maxTemPrivateFontTimeStamp']<_0x206f21['absTimeStamp']&&(this['maxTemPrivateFontTimeStamp']=_0x206f21['absTimeStamp']),this['privateTemFontsInfo']['push'](_0x206f21);}}if(_0x59e36b=!0x1,_0x34ae10=0x0,0x4==_0x5d0e9d['nPixelFormat']){if(this['privateImageInfo']['length']>=_0x1eb546&&this['privateImageInfo']['shift'](),_0x5d0e9d['absTimeStamp']<=this['maxPrivateImageTimeStamp']){var _0x44b7d1=0x0;for(_0x44b7d1=0x0;_0x44b7d1<this['privateImageInfo']['length'];_0x44b7d1++)if(this['privateImageInfo'][_0x44b7d1]['absTimeStamp']==_0x5d0e9d['absTimeStamp']){_0x59e36b=!0x0,_0x34ae10=_0x44b7d1;break;}}_0x59e36b?(this['privateImageInfo'][_0x34ae10]['nWidth']=_0x5d0e9d['nWidth'],this['privateImageInfo'][_0x34ae10]['nHeight']=_0x5d0e9d['nHeight'],this['privateImageInfo'][_0x34ae10]['pstRect']={},this['privateImageInfo'][_0x34ae10]['pstRect']['fTop']=_0x5d0e9d['pstRect']['fTop'],this['privateImageInfo'][_0x34ae10]['pstRect']['fBottom']=_0x5d0e9d['pstRect']['fBottom'],this['privateImageInfo'][_0x34ae10]['pstRect']['fLeft']=_0x5d0e9d['pstRect']['fLeft'],this['privateImageInfo'][_0x34ae10]['pstRect']['fRight']=_0x5d0e9d['pstRect']['fRight'],this['privateImageInfo'][_0x34ae10]['nPixelFormat']=_0x5d0e9d['nPixelFormat'],this['privateImageInfo'][_0x34ae10]['fAlpha']=_0x5d0e9d['fAlpha'],this['privateImageInfo'][_0x34ae10]['picImageData']=_0x5d0e9d['picImageData']):(this['maxPrivateImageTimeStamp']<_0x5d0e9d['absTimeStamp']&&(this['maxPrivateImageTimeStamp']=_0x5d0e9d['absTimeStamp']),this['privateImageInfo']['push'](_0x5d0e9d));}else{if(0x100==_0x5d0e9d['nPixelFormat']&&null!=_0x5d0e9d['picImageData'])try{var _0x5146c8=new ImageDecoder({'data':_0x5d0e9d['picImageData'],'type':'image/png'});_0x5146c8['tracks']['ready']['then'](function(){return _0x5146c8['completed'];})['then'](function(){return _0x5146c8['decode']({'frameIndex':0x0});})['then'](function(_0x296e5d){_0x3dd4bf['privatePNGImageInfo']['length']>=0x14&&_0x3dd4bf['privatePNGImageInfo']['shift']();var _0x30df27=_0x3dd4bf['privatePNGImageInfo']['findIndex'](function(_0x2baec4){return _0x2baec4['PicID']===_0x5d0e9d['PicID'];});-0x1!==_0x30df27?_0x3dd4bf['privatePNGImageInfo'][_0x30df27]=_0x4c50a5(_0x4c50a5({},_0x3dd4bf['privatePNGImageInfo'][_0x30df27]),{},{'PicID':_0x5d0e9d['PicID'],'videoStream':_0x296e5d['image'],'nImageWidth':_0x296e5d['image']['displayWidth'],'nImageHeight':_0x296e5d['image']['displayHeight'],'pstRectPos':{'fTop':_0x5d0e9d['pstRect']['fTop'],'fBottom':_0x5d0e9d['pstRect']['fBottom'],'fLeft':_0x5d0e9d['pstRect']['fLeft'],'fRight':_0x5d0e9d['pstRect']['fRight']},'nPixelFormat':_0x5d0e9d['nPixelFormat'],'fAlpha':_0x5d0e9d['fAlpha']}):_0x3dd4bf['privatePNGImageInfo']['push']({'PicID':_0x5d0e9d['PicID'],'videoStream':_0x296e5d['image'],'nImageWidth':_0x296e5d['image']['displayWidth'],'nImageHeight':_0x296e5d['image']['displayHeight'],'pstRectPos':{'fTop':_0x5d0e9d['pstRect']['fTop'],'fBottom':_0x5d0e9d['pstRect']['fBottom'],'fLeft':_0x5d0e9d['pstRect']['fLeft'],'fRight':_0x5d0e9d['pstRect']['fRight']},'nPixelFormat':_0x5d0e9d['nPixelFormat'],'fAlpha':_0x5d0e9d['fAlpha']});})['catch'](function(_0x266080){console['error']('Image\\x20processing\\x20failed:',_0x266080);});}catch(_0x3090d4){console['error']('ImageDecoder\\x20initialization\\x20failed:',_0x3090d4);}}return 0x1;}},{'key':'CheckLinesInfo','value':function(){if(this['DrawlinesParamArray']['splice'](0x0,this['DrawlinesParamArray']['length']),this['DrawlinesParamArrayAllPointNum']=0x0,this['bDrawlinesParamArrayFill']=0x0,this['DrawMosaiclinesParamArray']['splice'](0x0,this['DrawMosaiclinesParamArray']['length']),this['DrawTargetlinesParamArray']['splice'](0x0,this['DrawTargetlinesParamArray']['length']),null!=this['curNormalLinesInfo']){for(var _0x4d8ab0=[],_0x1debcd=0x0,_0x27817d=0x0;_0x27817d<this['curNormalLinesInfo']['linesNum'];_0x27817d++)if(0x2==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwIntelFlag']&&0x1==this['m_bEnableIVSEx']||0x7==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwIntelFlag']&&0x1==this['m_bEnableFIREEx']&&(0x1==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwSubIntelFlag']&&0x1==this['m_bEnableFireDis']||0x4==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwSubIntelFlag']&&0x1==this['m_bEnableFireMaxPos'])||0x8==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwIntelFlag']&&0x1==this['m_bEnableThermal']&&0x4==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwSubIntelFlag']&&0x1==this['m_bEnableThermalTargetGas']||0x9==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwIntelFlag']&&0x1==this['m_bEnableTrackEx']&&(0x1==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwSubIntelFlag']&&0x1==this['m_bEnableTrackPeople']||0x2==this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwSubIntelFlag']&&0x1==this['m_bEnableTrackVehicle'])){_0x4d8ab0[_0x1debcd]={},_0x4d8ab0[_0x1debcd]['nPointNum']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['vertex_num'],_0x4d8ab0[_0x1debcd]['nLineWidth']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['lineWidth'],this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['bFill'],_0x4d8ab0[_0x1debcd]['bLoop']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['bLoop'],_0x4d8ab0[_0x1debcd]['pstColor']={},_0x4d8ab0[_0x1debcd]['pstColor']['fR']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['color']['R'],_0x4d8ab0[_0x1debcd]['pstColor']['fG']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['color']['G'],_0x4d8ab0[_0x1debcd]['pstColor']['fB']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['color']['B'],_0x4d8ab0[_0x1debcd]['pstColor']['fA']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['color']['A'],_0x4d8ab0[_0x1debcd]['pstPoints']=[];for(var _0x365bca=0x0;_0x365bca<_0x4d8ab0[_0x1debcd]['nPointNum'];_0x365bca++)_0x4d8ab0[_0x1debcd]['pstPoints'][_0x365bca]={},_0x4d8ab0[_0x1debcd]['pstPoints'][_0x365bca]['fX']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['stPoint'][_0x365bca]['x'],_0x4d8ab0[_0x1debcd]['pstPoints'][_0x365bca]['fY']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['stPoint'][_0x365bca]['y'];_0x4d8ab0[_0x1debcd]['dwMosaictype']=this['curNormalLinesInfo']['stDrawLinesArray'][_0x27817d]['dwMosaictype'],_0x4d8ab0[_0x1debcd]['dwMosaictype']?this['DrawMosaiclinesParamArray']['push'](_0x4d8ab0[_0x1debcd]):(this['DrawlinesParamArray']['push'](_0x4d8ab0[_0x1debcd]),this['DrawlinesParamArrayAllPointNum']+=_0x4d8ab0[_0x1debcd]['nPointNum'],_0x4d8ab0[_0x1debcd]['nPointNum']),++_0x1debcd;}}if(null!=this['curThermalLinesInfo']){for(var _0x2bf9e9=[],_0x5d6262=0x0,_0x351243=0x0;_0x351243<this['curThermalLinesInfo']['linesNum'];_0x351243++)if(0x8==this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['dwIntelFlag']&&0x1==this['m_bEnableThermal']&&(0x1==this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['dwSubIntelFlag']&&0x1==this['m_bEnableThermalFireMask']||0x2==this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['dwSubIntelFlag']&&0x1==this['m_bEnableThermalRuleGas'])){_0x2bf9e9[_0x5d6262]={},_0x2bf9e9[_0x5d6262]['nPointNum']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['vertex_num'],_0x2bf9e9[_0x5d6262]['nLineWidth']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['lineWidth'],this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['bFill'],_0x2bf9e9[_0x5d6262]['bLoop']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['bLoop'],_0x2bf9e9[_0x5d6262]['pstColor']={},_0x2bf9e9[_0x5d6262]['pstColor']['fR']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['color']['R'],_0x2bf9e9[_0x5d6262]['pstColor']['fG']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['color']['G'],_0x2bf9e9[_0x5d6262]['pstColor']['fB']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['color']['B'],_0x2bf9e9[_0x5d6262]['pstColor']['fA']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['color']['A'],_0x2bf9e9[_0x5d6262]['pstPoints']=[];for(var _0x42e714=0x0;_0x42e714<_0x2bf9e9[_0x5d6262]['nPointNum'];_0x42e714++)_0x2bf9e9[_0x5d6262]['pstPoints'][_0x42e714]={},_0x2bf9e9[_0x5d6262]['pstPoints'][_0x42e714]['fX']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['stPoint'][_0x42e714]['x'],_0x2bf9e9[_0x5d6262]['pstPoints'][_0x42e714]['fY']=this['curThermalLinesInfo']['stDrawLinesArray'][_0x351243]['stPoint'][_0x42e714]['y'];this['DrawlinesParamArray']['push'](_0x2bf9e9[_0x5d6262]),this['DrawlinesParamArrayAllPointNum']+=_0x2bf9e9[_0x5d6262]['nPointNum'],_0x2bf9e9[_0x5d6262]['nPointNum'],++_0x5d6262;}}if(null!=this['curTemLinesInfo']){for(var _0x3ca816=[],_0x5a5fce=0x0,_0x35d020=0x0;_0x35d020<this['curTemLinesInfo']['linesNum'];_0x35d020++)if(0x1==this['m_bEnableTEMEx']&&(0x1==this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMBox']||0x2==this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMLine']||0x4==this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMPoint'])){_0x3ca816[_0x5a5fce]={},_0x3ca816[_0x5a5fce]['nPointNum']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['vertex_num'],_0x3ca816[_0x5a5fce]['nLineWidth']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['lineWidth'],this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['bFill'],_0x3ca816[_0x5a5fce]['bLoop']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['bLoop'],_0x3ca816[_0x5a5fce]['pstColor']={},_0x3ca816[_0x5a5fce]['pstColor']['fR']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['color']['R'],_0x3ca816[_0x5a5fce]['pstColor']['fG']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['color']['G'],_0x3ca816[_0x5a5fce]['pstColor']['fB']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['color']['B'],_0x3ca816[_0x5a5fce]['pstColor']['fA']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['color']['A'],_0x3ca816[_0x5a5fce]['pstPoints']=[];for(var _0x10ad52=0x0;_0x10ad52<_0x3ca816[_0x5a5fce]['nPointNum'];_0x10ad52++)_0x3ca816[_0x5a5fce]['pstPoints'][_0x10ad52]={},_0x3ca816[_0x5a5fce]['pstPoints'][_0x10ad52]['fX']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['stPoint'][_0x10ad52]['x'],_0x3ca816[_0x5a5fce]['pstPoints'][_0x10ad52]['fY']=this['curTemLinesInfo']['stDrawLinesArray'][_0x35d020]['stPoint'][_0x10ad52]['y'];this['DrawlinesParamArray']['push'](_0x3ca816[_0x5a5fce]),this['DrawlinesParamArrayAllPointNum']+=_0x3ca816[_0x5a5fce]['nPointNum'],_0x3ca816[_0x5a5fce]['nPointNum'],++_0x5a5fce;}}if(null!=this['curTargetLinesInfo']){for(var _0x52692e=[],_0x42dd5=0x0,_0x367753=0x0;_0x367753<this['curTargetLinesInfo']['linesNum'];_0x367753++)if(0x1==this['m_bEnableIVSEx']){_0x52692e[_0x42dd5]={},_0x52692e[_0x42dd5]['nPointNum']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['vertex_num'],_0x52692e[_0x42dd5]['nLineWidth']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['lineWidth'],this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['bFill'],_0x52692e[_0x42dd5]['bLoop']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['bLoop'],_0x52692e[_0x42dd5]['pstColor']={},_0x52692e[_0x42dd5]['pstColor']['fR']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['color']['R'],_0x52692e[_0x42dd5]['pstColor']['fG']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['color']['G'],_0x52692e[_0x42dd5]['pstColor']['fB']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['color']['B'],_0x52692e[_0x42dd5]['pstColor']['fA']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['color']['A'],_0x52692e[_0x42dd5]['pstPoints']=[];for(var _0x5605b1=0x0;_0x5605b1<_0x52692e[_0x42dd5]['nPointNum'];_0x5605b1++)_0x52692e[_0x42dd5]['pstPoints'][_0x5605b1]={},_0x52692e[_0x42dd5]['pstPoints'][_0x5605b1]['fX']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['stPoint'][_0x5605b1]['x'],_0x52692e[_0x42dd5]['pstPoints'][_0x5605b1]['fY']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['stPoint'][_0x5605b1]['y'];_0x52692e[_0x42dd5]['dwFillPicID']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['dwFillPicID'],_0x52692e[_0x42dd5]['eventid']=this['curTargetLinesInfo']['stDrawLinesArray'][_0x367753]['eventid'],this['DrawTargetlinesParamArray']['push'](_0x52692e[_0x42dd5]),++_0x42dd5;}}if(null!=this['curMDLinesInfo']){for(var _0xbe9753=[],_0xe2fb75=0x0,_0x15065e=0x0;_0x15065e<this['curMDLinesInfo']['linesNum'];_0x15065e++)if(0x1==this['m_bEnableMDEx']){_0xbe9753[_0xe2fb75]={},_0xbe9753[_0xe2fb75]['nPointNum']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['vertex_num'],_0xbe9753[_0xe2fb75]['nLineWidth']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['lineWidth'],this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['bFill'],_0xbe9753[_0xe2fb75]['bLoop']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['bLoop'],_0xbe9753[_0xe2fb75]['pstColor']={},_0xbe9753[_0xe2fb75]['pstColor']['fR']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['color']['R'],_0xbe9753[_0xe2fb75]['pstColor']['fG']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['color']['G'],_0xbe9753[_0xe2fb75]['pstColor']['fB']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['color']['B'],_0xbe9753[_0xe2fb75]['pstColor']['fA']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['color']['A'],_0xbe9753[_0xe2fb75]['pstPoints']=[];for(var _0x11d8db=0x0;_0x11d8db<_0xbe9753[_0xe2fb75]['nPointNum'];_0x11d8db++)_0xbe9753[_0xe2fb75]['pstPoints'][_0x11d8db]={},_0xbe9753[_0xe2fb75]['pstPoints'][_0x11d8db]['fX']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['stPoint'][_0x11d8db]['x'],_0xbe9753[_0xe2fb75]['pstPoints'][_0x11d8db]['fY']=this['curMDLinesInfo']['stDrawLinesArray'][_0x15065e]['stPoint'][_0x11d8db]['y'];this['DrawlinesParamArray']['push'](_0xbe9753[_0xe2fb75]),this['DrawlinesParamArrayAllPointNum']+=_0xbe9753[_0xe2fb75]['nPointNum'],_0xbe9753[_0xe2fb75]['nPointNum'],++_0xe2fb75;}}if(null!=this['curExactLinesInfo']){for(var _0x5da00d=[],_0x4690e0=0x0,_0x3e505e=0x0;_0x3e505e<this['curExactLinesInfo']['linesNum'];_0x3e505e++)if(0x1==this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwIntelFlag']&&0x1==this['m_bEnableIVSEx']||0x9==this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwIntelFlag']&&0x1==this['m_bEnableTrackEx']&&(0x1==this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwSubIntelFlag']&&0x1==this['m_bEnableTrackPeople']||0x2==this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwSubIntelFlag']&&0x1==this['m_bEnableTrackVehicle'])){_0x5da00d[_0x4690e0]={},_0x5da00d[_0x4690e0]['nPointNum']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['vertex_num'],_0x5da00d[_0x4690e0]['nLineWidth']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['lineWidth'],this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['bFill'],_0x5da00d[_0x4690e0]['bLoop']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['bLoop'],_0x5da00d[_0x4690e0]['pstColor']={},_0x5da00d[_0x4690e0]['pstColor']['fR']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['color']['R'],_0x5da00d[_0x4690e0]['pstColor']['fG']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['color']['G'],_0x5da00d[_0x4690e0]['pstColor']['fB']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['color']['B'],_0x5da00d[_0x4690e0]['pstColor']['fA']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['color']['A'],_0x5da00d[_0x4690e0]['pstPoints']=[];for(var _0x14a8f2=0x0;_0x14a8f2<_0x5da00d[_0x4690e0]['nPointNum'];_0x14a8f2++)_0x5da00d[_0x4690e0]['pstPoints'][_0x14a8f2]={},_0x5da00d[_0x4690e0]['pstPoints'][_0x14a8f2]['fX']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['stPoint'][_0x14a8f2]['x'],_0x5da00d[_0x4690e0]['pstPoints'][_0x14a8f2]['fY']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['stPoint'][_0x14a8f2]['y'];_0x5da00d[_0x4690e0]['dwFillPicID']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwFillPicID'],_0x5da00d[_0x4690e0]['eventid']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['eventid'],_0x5da00d[_0x4690e0]['dwMosaictype']=this['curExactLinesInfo']['stDrawLinesArray'][_0x3e505e]['dwMosaictype'],_0x5da00d[_0x4690e0]['dwMosaictype']?this['DrawMosaiclinesParamArray']['push'](_0x5da00d[_0x4690e0]):this['DrawTargetlinesParamArray']['push'](_0x5da00d[_0x4690e0]),++_0x4690e0;}}if(null!=this['curExactRuleLinesInfo']){for(var _0x3e5e91=[],_0x5e8090=0x0,_0x5462e4=0x0;_0x5462e4<this['curExactRuleLinesInfo']['linesNum'];_0x5462e4++)if(0x1==this['m_bEnableIVSEx']){_0x3e5e91[_0x5e8090]={},_0x3e5e91[_0x5e8090]['nPointNum']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['vertex_num'],_0x3e5e91[_0x5e8090]['nLineWidth']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['lineWidth'],this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['bFill'],_0x3e5e91[_0x5e8090]['bLoop']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['bLoop'],_0x3e5e91[_0x5e8090]['pstColor']={},_0x3e5e91[_0x5e8090]['pstColor']['fR']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['color']['R'],_0x3e5e91[_0x5e8090]['pstColor']['fG']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['color']['G'],_0x3e5e91[_0x5e8090]['pstColor']['fB']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['color']['B'],_0x3e5e91[_0x5e8090]['pstColor']['fA']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['color']['A'],_0x3e5e91[_0x5e8090]['pstPoints']=[];for(var _0x145ca2=0x0;_0x145ca2<_0x3e5e91[_0x5e8090]['nPointNum'];_0x145ca2++)_0x3e5e91[_0x5e8090]['pstPoints'][_0x145ca2]={},_0x3e5e91[_0x5e8090]['pstPoints'][_0x145ca2]['fX']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['stPoint'][_0x145ca2]['x'],_0x3e5e91[_0x5e8090]['pstPoints'][_0x145ca2]['fY']=this['curExactRuleLinesInfo']['stDrawLinesArray'][_0x5462e4]['stPoint'][_0x145ca2]['y'];this['DrawlinesParamArray']['push'](_0x3e5e91[_0x5e8090]),this['DrawlinesParamArrayAllPointNum']+=_0x3e5e91[_0x5e8090]['nPointNum'],_0x3e5e91[_0x5e8090]['nPointNum'],++_0x5e8090;}}}},{'key':'CheckFontsInfo','value':function(){if(this['DrawFontParamArray']['splice'](0x0,this['DrawFontParamArray']['length']),this['DrawPOSFontsParamArray']['splice'](0x0,this['DrawPOSFontsParamArray']['length']),null!=this['curNormalFontsInfo']){for(var _0xd5f2d1=[],_0x28dc05=0x0,_0x24c778=0x0;_0x24c778<this['curNormalFontsInfo']['nFontsNum'];_0x24c778++)0x7==this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['dwIntelFlag']&&0x1==this['m_bEnableFIREEx']&&(0x1==this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['dwSubIntelFlag']&&0x1==this['m_bEnableFireDis']||0x8==this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['dwSubIntelFlag']&&0x1==this['m_bEnableFireDistance'])&&(_0xd5f2d1[_0x28dc05]={},_0xd5f2d1[_0x28dc05]['pString']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['fontString'],_0xd5f2d1[_0x28dc05]['nFontWidth']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['nFontSizeW'],_0xd5f2d1[_0x28dc05]['nFontHeight']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['nFontSizeH'],_0xd5f2d1[_0x28dc05]['pstStartPos']={},_0xd5f2d1[_0x28dc05]['pstStartPos']['fX']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['stPoint']['x'],_0xd5f2d1[_0x28dc05]['pstStartPos']['fY']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['stPoint']['y'],_0xd5f2d1[_0x28dc05]['pstFontColor']={},_0xd5f2d1[_0x28dc05]['pstFontColor']['fR']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['color']['R'],_0xd5f2d1[_0x28dc05]['pstFontColor']['fG']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['color']['G'],_0xd5f2d1[_0x28dc05]['pstFontColor']['fB']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['color']['B'],_0xd5f2d1[_0x28dc05]['pstFontColor']['fA']=this['curNormalFontsInfo']['stDrawFontsArray'][_0x24c778]['color']['A'],_0xd5f2d1[_0x28dc05]['bBackGround']=!0x1,_0xd5f2d1[_0x28dc05]['pstBGColor']=null,_0xd5f2d1[_0x28dc05]['fRotateAngle']=0x0,_0xd5f2d1[_0x28dc05]['pFontFamily']='sans-serif',this['DrawFontParamArray']['push'](_0xd5f2d1[_0x28dc05]),++_0x28dc05);}if(null!=this['curNormalPOSFontsInfo']){for(var _0x34e651=[],_0x506af1=0x0,_0x4a0626=0x0;_0x4a0626<this['curNormalPOSFontsInfo']['nFontsNum'];_0x4a0626++)0x1==this['m_bDisPos']&&(_0x34e651[_0x506af1]={},_0x34e651[_0x506af1]['pString']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['fontString'],_0x34e651[_0x506af1]['nFontWidth']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['nFontSizeW'],_0x34e651[_0x506af1]['nFontHeight']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['nFontSizeH'],_0x34e651[_0x506af1]['pstStartPos']={},_0x34e651[_0x506af1]['pstStartPos']['fX']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['stPoint']['x'],_0x34e651[_0x506af1]['pstStartPos']['fY']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['stPoint']['y'],_0x34e651[_0x506af1]['pstFontColor']={},_0x34e651[_0x506af1]['pstFontColor']['fR']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['color']['R'],_0x34e651[_0x506af1]['pstFontColor']['fG']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['color']['G'],_0x34e651[_0x506af1]['pstFontColor']['fB']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['color']['B'],_0x34e651[_0x506af1]['pstFontColor']['fA']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['color']['A'],_0x34e651[_0x506af1]['bBackGround']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['bBackGround'],_0x34e651[_0x506af1]['pstBGColor']={},_0x34e651[_0x506af1]['pstBGColor']['fR']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['BGcolor']['R'],_0x34e651[_0x506af1]['pstBGColor']['fG']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['BGcolor']['G'],_0x34e651[_0x506af1]['pstBGColor']['fB']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['BGcolor']['B'],_0x34e651[_0x506af1]['pstBGColor']['fA']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['BGcolor']['A'],_0x34e651[_0x506af1]['fRotateAngle']=0x0,_0x34e651[_0x506af1]['pFontFamily']='sans-serif',_0x34e651[_0x506af1]['EventID']=this['curNormalPOSFontsInfo']['stDrawFontsArray'][_0x4a0626]['EventID'],this['DrawPOSFontsParamArray']['push'](_0x34e651[_0x506af1]),++_0x506af1);}if(null!=this['curTemFontsInfo']){for(var _0x2ea897=[],_0x551076=0x0,_0x9792ad=0x0;_0x9792ad<this['curTemFontsInfo']['nFontsNum'];_0x9792ad++)0x1==this['m_bEnableTEMEx']&&(0x1==this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMBox']||0x2==this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMLine']||0x4==this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['dwSubIntelFlag']&&0x1==this['m_bEnableTEMPoint'])&&(_0x2ea897[_0x551076]={},_0x2ea897[_0x551076]['pString']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['fontString'],_0x2ea897[_0x551076]['nFontWidth']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['nFontSizeW'],_0x2ea897[_0x551076]['nFontHeight']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['nFontSizeH'],_0x2ea897[_0x551076]['pstStartPos']={},_0x2ea897[_0x551076]['pstStartPos']['fX']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['stPoint']['x'],_0x2ea897[_0x551076]['pstStartPos']['fY']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['stPoint']['y'],_0x2ea897[_0x551076]['pstFontColor']={},_0x2ea897[_0x551076]['pstFontColor']['fR']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['color']['R'],_0x2ea897[_0x551076]['pstFontColor']['fG']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['color']['G'],_0x2ea897[_0x551076]['pstFontColor']['fB']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['color']['B'],_0x2ea897[_0x551076]['pstFontColor']['fA']=this['curTemFontsInfo']['stDrawFontsArray'][_0x9792ad]['color']['A'],_0x2ea897[_0x551076]['bBackGround']=!0x1,_0x2ea897[_0x551076]['pstBGColor']=null,_0x2ea897[_0x551076]['fRotateAngle']=0x0,_0x2ea897[_0x551076]['pFontFamily']='sans-serif',this['DrawFontParamArray']['push'](_0x2ea897[_0x551076]),++_0x551076);}if(null!=this['curTargetFontsInfo']){for(var _0x4c467f=[],_0x366ebc=0x0,_0x341a0c=0x0;_0x341a0c<this['curTargetFontsInfo']['nFontsNum'];_0x341a0c++)0x1==this['m_bEnableIVSEx']&&(_0x4c467f[_0x366ebc]={},_0x4c467f[_0x366ebc]['pString']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['fontString'],_0x4c467f[_0x366ebc]['nFontWidth']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['nFontSizeW'],_0x4c467f[_0x366ebc]['nFontHeight']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['nFontSizeH'],_0x4c467f[_0x366ebc]['pstStartPos']={},_0x4c467f[_0x366ebc]['pstStartPos']['fX']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['stPoint']['x'],_0x4c467f[_0x366ebc]['pstStartPos']['fY']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['stPoint']['y'],_0x4c467f[_0x366ebc]['pstFontColor']={},_0x4c467f[_0x366ebc]['pstFontColor']['fR']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['color']['R'],_0x4c467f[_0x366ebc]['pstFontColor']['fG']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['color']['G'],_0x4c467f[_0x366ebc]['pstFontColor']['fB']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['color']['B'],_0x4c467f[_0x366ebc]['pstFontColor']['fA']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['color']['A'],_0x4c467f[_0x366ebc]['bBackGround']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['bBackGround'],_0x4c467f[_0x366ebc]['pstBGColor']={},_0x4c467f[_0x366ebc]['pstBGColor']['fR']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['BGcolor']['R'],_0x4c467f[_0x366ebc]['pstBGColor']['fG']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['BGcolor']['G'],_0x4c467f[_0x366ebc]['pstBGColor']['fB']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['BGcolor']['B'],_0x4c467f[_0x366ebc]['pstBGColor']['fA']=this['curTargetFontsInfo']['stDrawFontsArray'][_0x341a0c]['BGcolor']['A'],_0x4c467f[_0x366ebc]['fRotateAngle']=0x0,_0x4c467f[_0x366ebc]['pFontFamily']='sans-serif',this['DrawFontParamArray']['push'](_0x4c467f[_0x366ebc]),++_0x366ebc);}if(null!=this['curExactFontsInfo']){for(var _0x34a59b=[],_0x5f0779=0x0,_0x1877a3=0x0;_0x1877a3<this['curExactFontsInfo']['nFontsNum'];_0x1877a3++)0x1==this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['dwIntelFlag']&&0x1==this['m_bEnableIVSEx']&&(_0x34a59b[_0x5f0779]={},_0x34a59b[_0x5f0779]['pString']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['fontString'],_0x34a59b[_0x5f0779]['nFontWidth']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['nFontSizeW'],_0x34a59b[_0x5f0779]['nFontHeight']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['nFontSizeH'],_0x34a59b[_0x5f0779]['pstStartPos']={},_0x34a59b[_0x5f0779]['pstStartPos']['fX']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['stPoint']['x'],_0x34a59b[_0x5f0779]['pstStartPos']['fY']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['stPoint']['y'],_0x34a59b[_0x5f0779]['pstFontColor']={},_0x34a59b[_0x5f0779]['pstFontColor']['fR']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['color']['R'],_0x34a59b[_0x5f0779]['pstFontColor']['fG']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['color']['G'],_0x34a59b[_0x5f0779]['pstFontColor']['fB']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['color']['B'],_0x34a59b[_0x5f0779]['pstFontColor']['fA']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['color']['A'],_0x34a59b[_0x5f0779]['bBackGround']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['bBackGround'],_0x34a59b[_0x5f0779]['pstBGColor']={},_0x34a59b[_0x5f0779]['pstBGColor']['fR']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['BGcolor']['R'],_0x34a59b[_0x5f0779]['pstBGColor']['fG']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['BGcolor']['G'],_0x34a59b[_0x5f0779]['pstBGColor']['fB']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['BGcolor']['B'],_0x34a59b[_0x5f0779]['pstBGColor']['fA']=this['curExactFontsInfo']['stDrawFontsArray'][_0x1877a3]['BGcolor']['A'],_0x34a59b[_0x5f0779]['fRotateAngle']=0x0,_0x34a59b[_0x5f0779]['pFontFamily']='sans-serif',this['DrawFontParamArray']['push'](_0x34a59b[_0x5f0779]),++_0x5f0779);}if(null!=this['curExactPOSFontsInfo']){for(var _0x351b24=[],_0x3ec5e4=0x0,_0x1ba5b3=0x0;_0x1ba5b3<this['curExactPOSFontsInfo']['nFontsNum'];_0x1ba5b3++)0x3==this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['dwIntelFlag']&&0x1==this['m_bDisPos']&&(_0x351b24[_0x3ec5e4]={},_0x351b24[_0x3ec5e4]['pString']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['fontString'],_0x351b24[_0x3ec5e4]['nFontWidth']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['nFontSizeW'],_0x351b24[_0x3ec5e4]['nFontHeight']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['nFontSizeH'],_0x351b24[_0x3ec5e4]['pstStartPos']={},_0x351b24[_0x3ec5e4]['pstStartPos']['fX']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['stPoint']['x'],_0x351b24[_0x3ec5e4]['pstStartPos']['fY']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['stPoint']['y'],_0x351b24[_0x3ec5e4]['pstFontColor']={},_0x351b24[_0x3ec5e4]['pstFontColor']['fR']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['color']['R'],_0x351b24[_0x3ec5e4]['pstFontColor']['fG']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['color']['G'],_0x351b24[_0x3ec5e4]['pstFontColor']['fB']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['color']['B'],_0x351b24[_0x3ec5e4]['pstFontColor']['fA']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['color']['A'],_0x351b24[_0x3ec5e4]['bBackGround']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['bBackGround'],_0x351b24[_0x3ec5e4]['pstBGColor']={},_0x351b24[_0x3ec5e4]['pstBGColor']['fR']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['BGcolor']['R'],_0x351b24[_0x3ec5e4]['pstBGColor']['fG']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['BGcolor']['G'],_0x351b24[_0x3ec5e4]['pstBGColor']['fB']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['BGcolor']['B'],_0x351b24[_0x3ec5e4]['pstBGColor']['fA']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['BGcolor']['A'],_0x351b24[_0x3ec5e4]['fRotateAngle']=0x0,_0x351b24[_0x3ec5e4]['pFontFamily']='sans-serif',_0x351b24[_0x3ec5e4]['EventID']=this['curExactPOSFontsInfo']['stDrawFontsArray'][_0x1ba5b3]['EventID'],this['DrawPOSFontsParamArray']['push'](_0x351b24[_0x3ec5e4]),++_0x3ec5e4);}}},{'key':'WebGLDisplaySubCallBack','value':function(_0x118032){null!=_0x118032['handle']&&0x0!=_0x118032['nUser']['pstWaterFontParamArray'][_0x118032['nSubPort']]&&null!=_0x118032['nUser']['pstWaterFontParam']&&_0x118032['handle']['SR_DrawFontEx'](_0x118032['nUser']['pstWaterFontParamArray'][_0x118032['nSubPort']],_0x118032['nUser']['pstWaterFontParamArray'][_0x118032['nSubPort']]['length'],0x1,_0x118032['nUser']['textCanvas']);}},{'key':'WebGLDisplayCallBack','value':function(_0x41a26e){0x0!=_0x41a26e['DrawlinesParamArray']['length']&&_0x41a26e['oVideoHandle']['SR_DrawLinesEx'](_0x41a26e['DrawlinesParamArray'],_0x41a26e['DrawlinesParamArray']['length'],_0x41a26e['DrawlinesParamArrayAllPointNum'],_0x41a26e['bDrawlinesParamArrayFill']);for(var _0x9f82ed=0x0;_0x9f82ed<_0x41a26e['DrawMosaiclinesParamArray']['length'];_0x9f82ed++){var _0x4da95d=_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['dwMosaictype'],_0x484344=0x0,_0x4bb77a={};_0x4bb77a['fR']=_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstColor']['fR'],_0x4bb77a['fG']=_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstColor']['fG'],_0x4bb77a['fB']=_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstColor']['fB'],_0x4bb77a['fA']=_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstColor']['fA'],0x0!=_0x41a26e['MosaicType']&&(_0x4da95d=_0x41a26e['MosaicType'],_0x484344=_0x41a26e['MosaicSize'],_0x4bb77a['fR']=_0x41a26e['MosaicColorR'],_0x4bb77a['fG']=_0x41a26e['MosaicColorG'],_0x4bb77a['fB']=_0x41a26e['MosaicColorB'],_0x4bb77a['fA']=_0x41a26e['MosaicColorA']),_0x484344=0x0==_0x484344?0x32:_0x484344,0x5==(_0x4da95d=0x0==_0x4da95d?0x1:_0x4da95d)?_0x41a26e['oVideoHandle']['SR_DrawLines'](_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['nPointNum'],0x1,_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstColor'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['nLineWidth'],0x0):0x3==_0x4da95d?_0x41a26e['oVideoHandle']['SR_DrawLines'](_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['nPointNum'],0x1,_0x4bb77a,_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['nLineWidth'],0x1):_0x41a26e['oVideoHandle']['SR_DrawMosaic'](_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'][0x0]['fX'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'][0x2]['fX'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'][0x0]['fY'],_0x41a26e['DrawMosaiclinesParamArray'][_0x9f82ed]['pstPoints'][0x2]['fY'],_0x484344);}for(var _0x1c13bc=0x0;_0x1c13bc<_0x41a26e['DrawTargetlinesParamArray']['length'];_0x1c13bc++)if(_0x41a26e['privatePNGImageInfo']['length']>0x0&&-0x1!=_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['dwFillPicID']){for(var _0x2d6707=-0x1,_0x4d1c39=0x0,_0x52af7a=0x0;_0x52af7a<_0x41a26e['privatePNGImageInfo']['length'];_0x52af7a++)if(_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['dwFillPicID']==_0x41a26e['privatePNGImageInfo'][_0x52af7a]['PicID']){if(_0x2d6707=_0x52af7a,_0x41a26e['DrawTargetEventIDList']['length']>0x0){for(var _0x4d5bbf=0x0;_0x4d5bbf<_0x41a26e['DrawTargetEventIDList']['length'];_0x4d5bbf++)if(_0x41a26e['DrawTargetEventIDList'][_0x4d5bbf]['nID']==_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['eventid']){_0x4d1c39=0x1;break;}}else _0x4d1c39=0x1;break;}-0x1!=_0x2d6707&&0x1==_0x4d1c39&&(_0x41a26e['privatePNGImageInfo'][_0x2d6707]['pstRectPos']['fTop']=_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstPoints'][0x0]['fY'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['pstRectPos']['fBottom']=_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstPoints'][0x2]['fY'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['pstRectPos']['fLeft']=_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstPoints'][0x0]['fX'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['pstRectPos']['fRight']=_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstPoints'][0x2]['fX'],_0x41a26e['oVideoHandle']['SR_DrawImage'](_0x41a26e['privatePNGImageInfo'][_0x2d6707]['videoStream'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['nImageWidth'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['nImageHeight'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['pstRectPos'],_0x21dfba['SRPIXELFORMAT']['SR_PF_SURFACE'],_0x41a26e['privatePNGImageInfo'][_0x2d6707]['fAlpha']));}else _0x41a26e['oVideoHandle']['SR_DrawLines'](_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstPoints'],_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['nPointNum'],_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['bLoop'],_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['pstColor'],_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['nLineWidth'],_0x41a26e['DrawTargetlinesParamArray'][_0x1c13bc]['bFill']);0x0!=_0x41a26e['DrawFontParamArray']['length']&&_0x41a26e['oVideoHandle']['SR_DrawFontEx'](_0x41a26e['DrawFontParamArray'],_0x41a26e['DrawFontParamArray']['length'],0x0,_0x41a26e['textCanvas']);for(var _0x599aad=_0x41a26e['DrawPOSFontsParamArray']['length']-0x1;_0x599aad>=0x0;_0x599aad--){var _0x3e15e1=0x0;if(-0x1!=_0x41a26e['DrawPOSFontsParamArray'][_0x599aad]['EventID']&&_0x41a26e['DrawTargetEventIDList']['length']>0x0){for(var _0xf36f5c=0x0;_0xf36f5c<_0x41a26e['DrawTargetEventIDList']['length'];_0xf36f5c++)if(_0x41a26e['DrawTargetEventIDList'][_0xf36f5c]['nID']==_0x41a26e['DrawPOSFontsParamArray'][_0x599aad]['EventID']){_0x3e15e1=0x1;break;}}else _0x3e15e1=0x1;0x1!=_0x3e15e1&&_0x41a26e['DrawPOSFontsParamArray']['splice'](_0x599aad,0x1);}if(0x0!=_0x41a26e['DrawPOSFontsParamArray']['length']&&_0x41a26e['oVideoHandle']['SR_DrawFontEx'](_0x41a26e['DrawPOSFontsParamArray'],_0x41a26e['DrawPOSFontsParamArray']['length'],0x0,_0x41a26e['textCanvas']),null!=_0x41a26e['curImagesInfo']&&0x0!=_0x41a26e['curImagesInfo']['nWidth']&&0x0!=_0x41a26e['curImagesInfo']['nHeight']&&0x1==_0x41a26e['m_bEnablePICEx']){var _0x8365cd=null;null!=_0x41a26e['curImagesInfo']&&null!=_0x41a26e['curImagesInfo']&&null!=_0x41a26e['curImagesInfo']['picImageData']&&null!=_0x41a26e['curImagesInfo']['picImageData']&&(_0x8365cd=new Uint16Array(_0x41a26e['curImagesInfo']['picImageData']['buffer'])),null!=_0x41a26e['curImagesInfo']&&_0x41a26e['curImagesInfo']['nPixelFormat']>0x0&&_0x41a26e['oVideoHandle']['SR_DrawImage'](_0x8365cd,_0x41a26e['curImagesInfo']['nWidth'],_0x41a26e['curImagesInfo']['nHeight'],_0x41a26e['curImagesInfo']['pstRect'],_0x41a26e['curImagesInfo']['nPixelFormat'],_0x41a26e['curImagesInfo']['fAlpha']);}if(0x0!==_0x41a26e['pstWaterFontParamArray'][0x0]['length']&&null!=_0x41a26e['pstWaterFontParam']&&_0x41a26e['oVideoHandle']['SR_DrawFontEx'](_0x41a26e['pstWaterFontParamArray'][0x0],_0x41a26e['pstWaterFontParamArray'][0x0]['length'],0x1,_0x41a26e['textCanvas']),0x0!==_0x41a26e['pWaterImageParam']['length']&&_0x41a26e['finishDecodeImage']){_0x41a26e['baseWaterMarkImageTime']<=0x0&&(_0x41a26e['baseWaterMarkImageTime']=_0x41a26e['curTimestamp']);var _0x140bc9=_0x41a26e['curTimestamp']-_0x41a26e['baseWaterMarkImageTime'];_0x140bc9<0x0&&(_0x41a26e['baseWaterMarkImageTime']=_0x41a26e['curTimestamp'],_0x140bc9=0x0,_0x41a26e['waterMarkImageIndex']=0x0),_0x140bc9>=_0x41a26e['pWaterImageParam'][_0x41a26e['waterMarkImageIndex']]['timeStamp']-_0x41a26e['pWaterImageParam'][0x0]['timeStamp']&&_0x41a26e['waterMarkImageIndex']++,_0x41a26e['waterMarkImageIndex']>=_0x41a26e['waterMarkImageMax']&&(_0x41a26e['waterMarkImageIndex']=0x0,_0x41a26e['baseWaterMarkImageTime']=_0x41a26e['curTimestamp']);var _0x4666b3=_0x41a26e['waterMarkImageIndex'];_0x41a26e['oVideoHandle']['SR_DrawImage'](_0x41a26e['pWaterImageParam'][_0x4666b3]['videoStream'],_0x41a26e['pWaterImageParam'][_0x4666b3]['nImageWidth'],_0x41a26e['pWaterImageParam'][_0x4666b3]['nImageHeight'],_0x41a26e['pWaterImageParam'][_0x4666b3]['pstRectPos'],_0x21dfba['SRPIXELFORMAT']['SR_PF_SURFACE'],_0x41a26e['pWaterImageParam'][_0x4666b3]['fAlpha']);}}},{'key':'SetPanoramaDisplayEffect','value':function(_0x42b3a0){if('2d'===this['renderEngine']||'2D'===this['renderEngine'])return 0x0;if(null!=this['oVideoHandle']){if(_0x42b3a0!=this['panoramaDisplayEffect']){this['panoramaDisplayEffect']=_0x42b3a0,this['oVideoHandle']['SR_DelSubPort'](this['mainVaildSubPort']),this['oVideoHandle']['SR_Destroy'](),this['oVideoHandle']=null,this['oVideoHandle']=new _0x506212(),null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x28ed38()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0;var _0xa99e8e=_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'];if(_0xa99e8e=0x1==this['panoramaDisplayEffect']?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_PANORAMA_SPHERE']:0x3==this['panoramaDisplayEffect']?_0x21dfba['SRDISPLAYEFFECT']['SR_DE_PANORAMA_PLANET']:_0x21dfba['SRDISPLAYEFFECT']['SR_DE_NULL'],this['oVideoHandle']['SR_Init'](this['mainCanvasID'],this['enPixelFormat']),this['mainVaildSubPort']=this['oVideoHandle']['SR_AddSubPort'](_0xa99e8e),-0x1==this['mainVaildSubPort'])return console['info']('%c\\x20InitDisplay\\x20SR_AddSubPort\\x20error\\x20subport:%d','color:\\x20red',this['mainVaildSubPort']),0x0;}}else this['panoramaDisplayEffect']=_0x42b3a0;return 0x1;}},{'key':'SetPanoramaSphereViewParam','value':function(_0x42bc0e,_0x1e77a0){return'2d'===this['renderEngine']||'2D'===this['renderEngine']||null==_0x1e77a0||null==_0x1e77a0||_0x42bc0e<0x1||_0x42bc0e>0x3?0x0:(this['viewParamType']=_0x42bc0e,this['viewParamValue']=_0x1e77a0,null!=this['oVideoHandle']?(0x1!=this['panoramaDisplayEffect']&&this['panoramaDisplayEffect'],this['oVideoHandle']['SR_SetViewParam'](_0x42bc0e,_0x1e77a0)!=_0x21dfba['ERRCODE']['SR_OK']?0x0:0x1):0x0);}},{'key':'GetPanoramaSphereViewParam','value':function(_0x5ec10a,_0x514cc8){return'2d'===this['renderEngine']||'2D'===this['renderEngine']||null==_0x514cc8||null==_0x514cc8||_0x5ec10a<0x1||_0x5ec10a>0x3?0x0:null!=this['oVideoHandle']?(0x1!=this['panoramaDisplayEffect']&&this['panoramaDisplayEffect'],_0x514cc8['fValue']=-0x1,this['oVideoHandle']['SR_GetViewParam'](_0x5ec10a,_0x514cc8)!=_0x21dfba['ERRCODE']['SR_OK']?0x0:0x1):0x0;}}]),_0x3ed76e;}()),_0x218390=(function(){function _0xe61299(_0x4dcce6,_0x14ac0e){_0x1d88b2(this,_0xe61299),this['EncoderObj']=null,this['FirstFrame']=!0x0,this['frameRate']=0x19,this['EncoderCurStatus']=0x2,this['frameCounter']=0x0,this['frameNum']=0x0,this['stopEncodflag']=!0x1,this['encodeFrameGlobalTime']=[],this['oPlayCtrlHandle']=null,null!=_0x4dcce6&&(this['oPlayCtrlHandle']=_0x4dcce6),this['player']=null,null!=_0x14ac0e&&(this['player']=_0x14ac0e),this['output']=this['output']['bind'](this),this['reportError']=this['reportError']['bind'](this),this['userAgent']=0x0,this['bWriteData']=!0x1,this['aTotalBuffer']=[],this['iFrameNum']=0x0;}return _0x4e686c(_0xe61299,[{'key':'initEncoder','value':function(_0x4df1b5,_0x285709,_0x49afdc){if(this['codecString']=_0x4df1b5,this['encodeWidth']=_0x285709['encodeWidth'],this['encodeHeight']=_0x285709['encodeHeight'],this['bitrate']=_0x285709['bitrate'],this['frameRate']=_0x285709['frameRate'],0x0==_0x285709['bitrateMode']?this['bitrateMode']='variable':this['bitrateMode']='constant',0x0==_0x285709['latencyMode']?this['latencyMode']='realtime':this['latencyMode']='quality',this['rawDataCB']=_0x49afdc,this['FirstFrame']=!0x0,this['EncoderCurStatus']=0x2,this['frameCounter']=0x0,this['frameNum']=0x0,this['stopEncodflag']=!0x1,null==this['EncoderObj']){var _0x189471={'output':this['output'],'error':this['reportError']};this['EncoderObj']=new VideoEncoder(_0x189471);}this['format']='annexb';var _0x3fbdf7=navigator['userAgent']||navigator['vendor']||window['opera'];_0x3fbdf7['indexOf']('Windows\\x20NT')>-0x1?this['userAgent']=0x0:_0x3fbdf7['indexOf']('Linux')>-0x1?this['userAgent']=0x1:_0x3fbdf7['indexOf']('Mac\\x20OS\\x20X')>-0x1?(this['userAgent']=0x2,this['format']='avc'):/Android/['test'](_0x3fbdf7)?this['userAgent']=0x3:/like Mac OS X/['test'](_0x3fbdf7)?this['userAgent']=0x4:this['userAgent']=0x0;var _0x3d8f98={'codec':_0x4df1b5,'width':this['encodeWidth'],'height':this['encodeHeight'],'displayWidth':this['encodeWidth'],'displayHeight':this['encodeHeight'],'bitrate':this['bitrate'],'framerate':this['frameRate'],'bitrateMode':this['bitrateMode'],'latencyMode':this['latencyMode'],'avc':{'format':this['format']}};console['log']('1videoEncode\\x20config\\x20width:'+this['encodeWidth']+',height:'+this['encodeHeight']+',bitrate:'+this['bitrate']+',framerate:'+this['frameRate']+',bitrateMode:'+this['bitrateMode']+',latencMode:'+this['latencyMode']),this['EncoderObj']['configure'](_0x3d8f98);}},{'key':'inputData','value':function(_0x42bedd,_0x23b641){null==this['EncoderObj']||this['stopEncodflag']||('configured'==this['EncoderObj']['state']||this['FirstFrame'])&&this['EncodeProcess'](_0x42bedd,_0x23b641);}},{'key':'EncodeProcess','value':function(_0x1c3121,_0x21e1ab){if(0x4!=this['EncoderCurStatus']&&null!=this['EncoderObj']&&'configured'==this['EncoderObj']['state']&&this['EncoderObj']['encodeQueueSize']<0xa){var _0x38ebee=this['frameCounter']%0x32==0x0;0x1==_0x38ebee&&this['encodeFrameGlobalTime']['push'](_0x21e1ab),this['EncoderObj']['encode'](_0x1c3121,{'keyFrame':_0x38ebee}),this['frameCounter']++;}}},{'key':'output','value':function(_0x468177,_0x3e25cc){if('configured'==this['EncoderObj']['state']){_0x3e25cc['decoderConfig'],_0x3e25cc['svc'],_0x3e25cc['alphaSideData'],_0x468177['type'];var _0x17f30d=_0x468177['timestamp'];_0x468177['byteLength'];if(!this['stopEncodflag']){var _0x5695a0=new Uint8Array(_0x468177['byteLength']);_0x468177['copyTo'](_0x5695a0);var _0x5cb827={'dataType':0x1};if(_0x5cb827['width']=this['encodeWidth'],_0x5cb827['height']=this['encodeHeight'],_0x5cb827['frameRate']=this['frameRate'],_0x5cb827['timeStamp']=_0x17f30d/0x3e8,_0x5cb827['frameNum']=this['frameNum'],_0x5cb827['bitrate']=0x0,_0x5cb827['globalTime']={},'key'==_0x468177['type']){var _0x2d0d1b=this['encodeFrameGlobalTime']['shift']();'year'in _0x2d0d1b?(_0x5cb827['globalTime']['year']=_0x2d0d1b['year'],_0x5cb827['globalTime']['month']=_0x2d0d1b['month'],_0x5cb827['globalTime']['day']=_0x2d0d1b['day'],_0x5cb827['globalTime']['hour']=_0x2d0d1b['hour'],_0x5cb827['globalTime']['minute']=_0x2d0d1b['minute'],_0x5cb827['globalTime']['second']=_0x2d0d1b['second'],_0x5cb827['globalTime']['milliseconds']=_0x2d0d1b['milliseconds']):(_0x5cb827['globalTime']['year']=0x7e8,_0x5cb827['globalTime']['month']=0x0,_0x5cb827['globalTime']['day']=0x0,_0x5cb827['globalTime']['hour']=0x0,_0x5cb827['globalTime']['minute']=0x0,_0x5cb827['globalTime']['second']=0x0,_0x5cb827['globalTime']['milliseconds']=0x0);}var _0x47735e=null,_0x3c07dc=new Uint8Array(0x4);_0x3c07dc[0x0]=0x0,_0x3c07dc[0x1]=0x0,_0x3c07dc[0x2]=0x0,_0x3c07dc[0x3]=0x1;var _0x4f92e6=null,_0x34d165=0x0,_0x23ff36=null,_0x1a0bd0=0x0,_0x3a888e=null,_0x37d884=null,_0x323a51=0x0,_0x3b8d7a=0x0,_0x196b0f=0x0;if('key'==_0x468177['type']){if('decoderConfig'in _0x3e25cc&&'description'in _0x3e25cc['decoderConfig']&&(_0x37d884=new Uint8Array(_0x3e25cc['decoderConfig']['description'])),0x2==this['userAgent']){for(null!=_0x37d884&&(_0x34d165=0x100*(_0x4f92e6=_0x37d884['slice'](0x6,_0x37d884['length']))[0x0]+_0x4f92e6[0x1],_0x23ff36=_0x4f92e6['slice'](0x2,0x2+_0x34d165),_0x1a0bd0=0x100*_0x4f92e6[0x3+_0x34d165]+_0x4f92e6[0x4+_0x34d165],_0x3a888e=_0x4f92e6['slice'](0x5+_0x34d165,0x5+_0x34d165+_0x1a0bd0),_0x34d165+=0x4,_0x1a0bd0+=0x4);_0x3b8d7a<_0x5695a0['length'];)_0x196b0f=0x100*_0x5695a0[_0x3b8d7a]*0x100*0x100+0x100*_0x5695a0[_0x3b8d7a+0x1]*0x100+0x100*_0x5695a0[_0x3b8d7a+0x2]+_0x5695a0[_0x3b8d7a+0x3],_0x5695a0[_0x3b8d7a]=0x0,_0x5695a0[_0x3b8d7a+0x1]=0x0,_0x5695a0[_0x3b8d7a+0x2]=0x0,_0x5695a0[_0x3b8d7a+0x3]=0x1,_0x3b8d7a=_0x3b8d7a+0x4+_0x196b0f;_0x323a51=_0x34d165+_0x1a0bd0+_0x5695a0['length'],_0x47735e=new Uint8Array(_0x323a51);var _0x779b1f=0x0;null!=_0x23ff36&&(_0x47735e['set'](_0x3c07dc,0x0),_0x47735e['set'](_0x23ff36,_0x3c07dc['length']),_0x779b1f=_0x3c07dc['length']+_0x23ff36['length']),null!=_0x3a888e&&(_0x47735e['set'](_0x3c07dc,_0x779b1f),_0x47735e['set'](_0x3a888e,_0x779b1f+_0x3c07dc['length']),_0x779b1f=_0x3c07dc['length']+_0x23ff36['length']+_0x3c07dc['length']+_0x3a888e['length']),_0x47735e['set'](_0x5695a0,_0x779b1f),_0x5cb827['rawData']=_0x47735e;}else{for(var _0x2610c2=_0x5695a0['slice'](0x6,_0x5695a0['length']),_0x1bd71e=0x0;_0x1bd71e<_0x2610c2['length']&&(0x0!=_0x2610c2[_0x1bd71e]||0x0!=_0x2610c2[_0x1bd71e+0x1]||0x1!=_0x2610c2[_0x1bd71e+0x2]||0x6e!=_0x2610c2[_0x1bd71e+0x3]);_0x1bd71e++);_0x4f92e6=_0x2610c2['slice'](0x0,_0x1bd71e);for(var _0x4e4ba0=_0x2610c2['slice'](_0x1bd71e,_0x2610c2['length']),_0x4fd81a=0x0;_0x4fd81a<_0x4e4ba0['length']&&(0x0!=_0x4e4ba0[_0x4fd81a]||0x0!=_0x4e4ba0[_0x4fd81a+0x1]||0x1!=_0x4e4ba0[_0x4fd81a+0x2]||0x65!=_0x4e4ba0[_0x4fd81a+0x3]);_0x4fd81a++);var _0x3c558c=_0x4e4ba0['slice'](_0x4fd81a-0x1,_0x4e4ba0['length']);_0x3c558c[0x0]=0x0,_0x323a51=_0x4f92e6['length']+_0x3c558c['length'],(_0x47735e=new Uint8Array(_0x323a51))['set'](_0x4f92e6,0x0),_0x47735e['set'](_0x3c558c,_0x4f92e6['length']),_0x2610c2=null,_0x4e4ba0=null,_0x3c558c=null;}_0x5cb827['rawData']=_0x47735e,this['player']?this['rawDataCB']&&this['rawDataCB'](_0x5cb827):postMessage({'function':'VideoRecoderInfo','videoInfo':_0x5cb827},[_0x5cb827['rawData']['buffer']]);}else{if(0x2==this['userAgent']){for(;_0x3b8d7a<_0x5695a0['length'];)_0x196b0f=0x100*_0x5695a0[_0x3b8d7a]*0x100*0x100+0x100*_0x5695a0[_0x3b8d7a+0x1]*0x100+0x100*_0x5695a0[_0x3b8d7a+0x2]+_0x5695a0[_0x3b8d7a+0x3],_0x5695a0[_0x3b8d7a]=0x0,_0x5695a0[_0x3b8d7a+0x1]=0x0,_0x5695a0[_0x3b8d7a+0x2]=0x0,_0x5695a0[_0x3b8d7a+0x3]=0x1,_0x3b8d7a=_0x3b8d7a+0x4+_0x196b0f;_0x5cb827['rawData']=_0x5695a0;}else _0x5cb827['rawData']=_0x5695a0;this['player']?this['rawDataCB']&&this['rawDataCB'](_0x5cb827):postMessage({'function':'VideoRecoderInfo','videoInfo':_0x5cb827},[_0x5cb827['rawData']['buffer']]);}_0x5695a0=null,_0x47735e=null,_0x3c07dc=null,_0x4f92e6=null,_0x23ff36=null,_0x3a888e=null,_0x37d884=null,this['frameNum']++;}}}},{'key':'_downloadFile','value':function(_0x4a312e,_0x5112d4){var _0x369142=_0x4a312e;_0x4a312e instanceof Blob||_0x4a312e instanceof File||(_0x369142=new Blob([_0x4a312e]));var _0xb6cb63=window['URL']['createObjectURL'](_0x369142),_0x4a4742=window['document']['createElement']('a');_0x4a4742['href']=_0xb6cb63,_0x4a4742['download']=_0x5112d4;var _0x18de62=document['createEvent']('MouseEvents');_0x18de62['initEvent']('click',!0x0,!0x0),_0x4a4742['dispatchEvent'](_0x18de62);}},{'key':'downloadData','value':function(_0x5c0eae){if(this['bWriteData']){for(var _0x44f640=_0x5c0eae,_0x28671a=this['aTotalBuffer']['length'],_0x201f7c=0x0,_0x560d75=_0x44f640['length'];_0x201f7c<_0x560d75;_0x201f7c++)this['aTotalBuffer'][_0x28671a+_0x201f7c]=_0x44f640[_0x201f7c];this['iFrameNum']++,_0x44f640=null,console['log']('downloadEncodedata\\x20iFrameNum:'+this['iFrameNum']);}if(this['bWriteData']&&(this['iFrameNum']>=0x258||this['stopEncodflag'])){console['log']('download600encodeData');var _0x1ba3a5=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x1ba3a5,'Encode600.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x1ba3a5=null;}}},{'key':'stopEncode','value':function(){if(this['EncoderCurStatus']=0x4,this['frameCounter']=0x0,this['frameNum']=0x0,this['stopEncodflag']=!0x0,this['destroyEncoder'](),this['bWriteData']&&this['stopEncodflag']){console['log']('download600encodeData');var _0x161246=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x161246,'Encode600.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x161246=null;}}},{'key':'reportError','value':function(_0x383fdc){console['log']('hardEncode\\x20reportError:'+_0x383fdc['message']+',state:'+this['EncoderObj']['state']+',frameRate:'+this['frameRate']);}},{'key':'destroyEncoder','value':function(){var _0x1bf844=this;return new Promise(function(_0x9014d0,_0x2589ea){_0x1bf844['clearEncoderObjBuffer']()['then'](function(){null!=_0x1bf844['EncoderObj']&&('closed'!=_0x1bf844['EncoderObj']['state']&&_0x1bf844['EncoderObj']['close'](),console['log']('>>>JS\\x2011\\x20destroy\\x20VideoEncoderObj'),_0x1bf844['EncoderObj']=null),_0x1bf844['EncoderCurStatus']=0x4,_0x1bf844['FirstFrame']=!0x0,_0x9014d0();},function(){_0x2589ea();});});}},{'key':'resetEncoder','value':function(){var _0x9556c=this;return new Promise(function(_0x4d0ac0,_0x4426b9){_0x9556c['destroyEncoder']()['then'](function(){var _0x4a9c83={'encodeWidth':_0x9556c['encodeWidth'],'encodeHeight':_0x9556c['encodeHeight'],'bitrate':_0x9556c['bitrate'],'frameRate':_0x9556c['frameRate'],'bitrateMode':_0x9556c['bitrateMode'],'latencyMode':_0x9556c['latencyMode']};_0x9556c['initEncoder'](_0x9556c['codecString'],_0x4a9c83,_0x9556c['rawDataCB']),console['log']('%c\\x20reset\\x20hard\\x20Encoder','color:red'),_0x4d0ac0();},function(){_0x4426b9();});});}},{'key':'clearEncoderObjBuffer','value':function(){var _0x43e84e=this;return new Promise(function(_0x93e164,_0x2834b6){null!=_0x43e84e['EncoderObj']&&'configured'==_0x43e84e['EncoderObj']['state']&&_0x43e84e['EncoderObj']['reset'](),_0x93e164();});}}]),_0xe61299;}()),_0x566a63=(function(){function _0x424de8(_0x1095c3,_0x1ad59a){_0x1d88b2(this,_0x424de8),this['AudioEncoderObj']=null,this['FirstFrame']=!0x0,this['EncoderCurStatus']=0x2,this['stopEncodflag']=!0x1,this['aTimeStamp']=0x0,this['oPlayCtrlHandle']=null,null!=_0x1095c3&&(this['oPlayCtrlHandle']=_0x1095c3),this['player']=null,null!=_0x1ad59a&&(this['player']=_0x1ad59a),this['output']=this['output']['bind'](this),this['reportError']=this['reportError']['bind'](this);}var _0xe9fe78;return _0x4e686c(_0x424de8,[{'key':'initEncoder','value':(_0xe9fe78=_0x465afd(_0x171d88()['mark'](function _0x57c544(_0x5ab25f,_0x3401c0,_0x220d3d){var _0x592688,_0x417520;return _0x171d88()['wrap'](function(_0x5f0fe4){for(;;)switch(_0x5f0fe4['prev']=_0x5f0fe4['next']){case 0x0:this['codecString']=_0x5ab25f,this['sampleRate']=_0x3401c0['sampleRate'],this['numberOfChannels']=_0x3401c0['numberOfChannels'],this['bitrate']=_0x3401c0['bitrate'],this['AudioDataCB']=_0x220d3d,this['FirstFrame']=!0x0,this['EncoderCurStatus']=0x2,this['stopEncodflag']=!0x1,this['aTimeStamp']=0x0,null==this['AudioEncoderObj']&&(_0x592688={'output':this['output'],'error':this['reportError']},this['AudioEncoderObj']=new AudioEncoder(_0x592688)),this['format']='adts',_0x417520={'codec':_0x5ab25f,'sampleRate':this['sampleRate'],'numberOfChannels':this['numberOfChannels'],'bitrate':this['bitrate'],'aac':{'format':this['format']}},console['log']('2audioEncode\\x20config\\x20sampleRate:'+this['sampleRate']+',numberOfChannels:'+this['numberOfChannels']+',bitrate:'+this['bitrate']),this['AudioEncoderObj']['configure'](_0x417520);case 0xe:case'end':return _0x5f0fe4['stop']();}},_0x57c544,this);})),function(_0x5c4c63,_0x5f4cb5,_0x4b23f1){return _0xe9fe78['apply'](this,arguments);})},{'key':'inputData','value':function(_0x381b64){null!=this['AudioEncoderObj']&&('configured'==this['AudioEncoderObj']['state']||this['FirstFrame'])&&this['EncodeProcess'](_0x381b64),this['FirstFrame']&&(0x1==this['oPlayCtrlHandle']['recoderBaseTimestampMode']?this['audioBaseTimeStamp']=_0x381b64['timestamp']:0x0==this['oPlayCtrlHandle']['recoderBaseTimestampMode']&&(this['audioBaseTimeStamp']=0x0),this['FirstFrame']=!0x1);}},{'key':'EncodeProcess','value':function(_0x139a9a){0x4!=this['EncoderCurStatus']&&null!=this['AudioEncoderObj']&&'configured'==this['AudioEncoderObj']['state']&&this['AudioEncoderObj']['encode'](_0x139a9a);}},{'key':'output','value':function(_0x4b982f,_0x41cd9d){if('configured'==this['AudioEncoderObj']['state']){_0x4b982f['type'],_0x4b982f['timestamp'],_0x4b982f['byteLength'];if(!this['stopEncodflag']){this['aTimeStamp']+=_0x4b982f['duration']/0x3e8;var _0x1c787f={'dataType':0x2,'width':0x1,'height':0x10,'frameRate':0xbb80};_0x1c787f['timeStamp']=this['aTimeStamp']+this['audioBaseTimeStamp'],_0x1c787f['frameNum']=0x0,_0x1c787f['bitrate']=0x1f400,_0x1c787f['globalTime']={};var _0x12fe8b=new Uint8Array(_0x4b982f['byteLength']);_0x4b982f['copyTo'](_0x12fe8b),_0x1c787f['rawData']=_0x12fe8b,this['player']?null!=this['AudioDataCB']&&this['AudioDataCB'](_0x1c787f):postMessage({'function':'AudioRecoderInfo','audioInfo':_0x1c787f},[_0x1c787f['rawData']['buffer']]),_0x12fe8b=null;}}}},{'key':'stopEncode','value':function(){this['stopEncodflag']=!0x0,this['destroyEncoder']();}},{'key':'reportError','value':function(_0x4bacd0){console['log']('hardEncode\\x20reportError:'+_0x4bacd0['message']+',state:'+this['AudioEncoderObj']['state']);}},{'key':'destroyEncoder','value':function(){var _0x279dba=this;return new Promise(function(_0x32be85,_0x2c066b){_0x279dba['clearEncoderObjBuffer']()['then'](function(){null!=_0x279dba['AudioEncoderObj']&&('closed'!=_0x279dba['AudioEncoderObj']['state']&&_0x279dba['AudioEncoderObj']['close'](),console['log']('>>>JS\\x2012\\x20destroy\\x20AudioEncoderObj'),_0x279dba['AudioEncoderObj']=null),_0x279dba['EncoderCurStatus']=0x4,_0x279dba['FirstFrame']=!0x0,_0x32be85();},function(){_0x2c066b();});});}},{'key':'resetEncoder','value':function(){var _0x430fe5=this;return new Promise(function(_0x259685,_0x32ff36){_0x430fe5['destroyEncoder']()['then'](function(){var _0x23e7f1={'sampleRate':_0x430fe5['sampleRate'],'numberOfChannels':_0x430fe5['numberOfChannels'],'bitrate':_0x430fe5['bitrate']};_0x430fe5['initEncoder'](_0x430fe5['codecString'],_0x23e7f1,_0x430fe5['AudioDataCB']),console['log']('%c\\x20reset\\x20hard\\x20Encoder','color:red'),_0x259685();},function(){_0x32ff36();});});}},{'key':'clearEncoderObjBuffer','value':function(){var _0x48aebd=this;return new Promise(function(_0x5e119a,_0x3e601e){null!=_0x48aebd['AudioEncoderObj']&&'configured'==_0x48aebd['AudioEncoderObj']['state']&&_0x48aebd['AudioEncoderObj']['reset'](),_0x5e119a();});}}]),_0x424de8;}());function _0x5e0274(_0xdd7376,_0x4cea47){var _0x16e0a2='undefined'!=typeof Symbol&&_0xdd7376[Symbol['iterator']]||_0xdd7376['@@iterator'];if(!_0x16e0a2){if(Array['isArray'](_0xdd7376)||(_0x16e0a2=function(_0x48b6a6,_0x565c52){if(!_0x48b6a6)return;if('string'==typeof _0x48b6a6)return _0x1babdd(_0x48b6a6,_0x565c52);var _0x3584b2=Object['prototype']['toString']['call'](_0x48b6a6)['slice'](0x8,-0x1);'Object'===_0x3584b2&&_0x48b6a6['constructor']&&(_0x3584b2=_0x48b6a6['constructor']['name']);if('Map'===_0x3584b2||'Set'===_0x3584b2)return Array['from'](_0x48b6a6);if('Arguments'===_0x3584b2||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/['test'](_0x3584b2))return _0x1babdd(_0x48b6a6,_0x565c52);}(_0xdd7376))||_0x4cea47&&_0xdd7376&&'number'==typeof _0xdd7376['length']){_0x16e0a2&&(_0xdd7376=_0x16e0a2);var _0x496de5=0x0,_0x4abe58=function(){};return{'s':_0x4abe58,'n':function(){return _0x496de5>=_0xdd7376['length']?{'done':!0x0}:{'done':!0x1,'value':_0xdd7376[_0x496de5++]};},'e':function(_0x3ad157){throw _0x3ad157;},'f':_0x4abe58};}throw new TypeError('Invalid\\x20attempt\\x20to\\x20iterate\\x20non-iterable\\x20instance.\\x0aIn\\x20order\\x20to\\x20be\\x20iterable,\\x20non-array\\x20objects\\x20must\\x20have\\x20a\\x20[Symbol.iterator]()\\x20method.');}var _0x4e6716,_0x5ff8a5=!0x0,_0x5ad8cd=!0x1;return{'s':function(){_0x16e0a2=_0x16e0a2['call'](_0xdd7376);},'n':function(){var _0x3c7f3f=_0x16e0a2['next']();return _0x5ff8a5=_0x3c7f3f['done'],_0x3c7f3f;},'e':function(_0x571b56){_0x5ad8cd=!0x0,_0x4e6716=_0x571b56;},'f':function(){try{_0x5ff8a5||null==_0x16e0a2['return']||_0x16e0a2['return']();}finally{if(_0x5ad8cd)throw _0x4e6716;}}};}function _0x1babdd(_0x6f21a6,_0x45ec4c){(null==_0x45ec4c||_0x45ec4c>_0x6f21a6['length'])&&(_0x45ec4c=_0x6f21a6['length']);for(var _0x39e1f8=0x0,_0x4763b3=new Array(_0x45ec4c);_0x39e1f8<_0x45ec4c;_0x39e1f8++)_0x4763b3[_0x39e1f8]=_0x6f21a6[_0x39e1f8];return _0x4763b3;}var _0x2b52fd=(function(){function _0x14d12f(){var _0x5e0bb4=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null;_0x1d88b2(this,_0x14d12f),this['canvas']=null,this['streamOpenMode']=0x0,this['context']=null,this['oVideoDecoder']=null,this['frameBuffers']=[],this['initTimer']=!0x1,this['preTimeStamp']=0x0,this['baseTimeStamp']=0x0,this['resetTimer']=!0x0,this['RenderFrame']=this['RenderFrame']['bind'](this),this['renderCurStatus']=0x2,this['renderLastStatus']=0x2,this['playSpeed']=0x1,this['nplaySpeed']=0x1,this['displayBuf']=0xe,this['needForward']=!0x1,this['firstFrame']=!0x0,this['LatcyTime']=0x32,this['nFrameRate']=0x0,this['needSaveFrameInfo']=!0x1,this['displayFrameInfoCB']=null,this['displayFrameInfo']=[],this['curFrameInfo']={},this['curFrameInfo']['timeStamp']=0x0,this['bResetdisplayFrameInfoCB']=!0x0,this['sx']=0x0,this['sy']=0x0,this['sw']=0x0,this['sh']=0x0,this['displayRunning']=!0x1,this['oRenderTimer']=null,this['waitIFrameTimestamp']=0x0,this['curFrame']=null,this['player']=null,null!=_0x5e0bb4&&(this['player']=_0x5e0bb4),this['renderEngine']='webgl',this['oVideoRender']=null,this['FECCanvasID']='',this['oVideoRender']=new _0x3651d0(this),this['bSetStreamEnd']=!0x1,this['printfFlag']=0x0,this['oVideoEncoder']=null,this['oAudioEncoder']=null,this['startRecoderFlag']=!0x1,this['stopRecoderFlag']=!0x1,this['recoderFrameNum']=0x0,this['vBaseTimeStamp']=0x0,this['encodeVideoInfo']={'encodeVideoType':'avc','encodeWidth':0x500,'encodeHeight':0x2d0,'bitrate':0xf4240,'frameRate':0x19,'bitrateMode':0x0,'latencyMode':0x0},this['encodeAudioInfo']={'encodeAudioType':'aac','sampleRate':0xbb80,'numberOfChannels':0x1,'bitrate':0x1f400},this['recoderBaseTimestampMode']=0x0,this['recoderGetOriginData']=0x0,this['nstreamEndloopNum']=0x0,this['runtimeCBFun']=null,this['nTargetRelativePos']=0x0,this['ProcessPositionflag']=!0x1,this['nMPPlayMode']=0x0,this['nMPPosType']=0x0,this['VideoPrivateInfoMap']=new Map(),this['curPrivateInfo']={},this['curPrivateInfo']['linesInfo']=[],this['curPrivateInfo']['fontInfo']=[],this['curPrivateInfo']['imageInfo']=[],this['StretchPlayTime']=0x0,this['StretchPlayedTime']=0x0,this['StretchPlaySpeed']=0x1,this['StretchPlayFlag']=!0x1,this['Prevideowidth']=0x0,this['Prevideoheight']=0x0,this['PrecodecType']=0x0,this['PlayOrBackMode']=0x1,this['pstRuntimeInfo']={'nRunTimeModule':0x0,'nStrVersion':0x0,'nFrameTimeStamp':0x0,'nFrameNum':0x0,'nErrorCode':0x0,'nInputDataInterval':0x0,'nFrameNumInterval':0x0,'nAverageDecodeTime':0x0,'nSystemFormat':0x0,'nDetectRes':0x0,'nMp4FileTime':0x0,'nMp4TotalFrameNum':0x0,'AbsTimeYear':0x0,'AbsTimeMonth':0x0,'AbsTimeDay':0x0,'AbsTimeHour':0x0,'AbsTimeMinute':0x0,'AbsTimeSecond':0x0,'AbsTimeMilliseconds':0x0},this['firstRenderBegin']=!0x0,this['DecodeTypeFlagMap']=new Map(),this['RenderTypeFlagMap']=new Map();}var _0x2efc64,_0x284eed;return _0x4e686c(_0x14d12f,[{'key':'init','value':function(_0x2ab0d4,_0x11cb25,_0x30af22,_0x250920,_0x444528){if(this['canvas']=_0x2ab0d4,this['streamOpenMode']=_0x11cb25,this['renderEngine']=_0x250920,this['printfFlag']=_0x444528,this['SetCurStatus'](0x2),null==this['oVideoDecoder']&&(this['oVideoDecoder']=new _0xd61466(_0x30af22,this,this['player'],this['canvas']),null!==this['oVideoDecoder']&&this['oVideoDecoder']['initDecoder'](),null!=this['runtimeCBFun']&&this['oVideoDecoder']['SetRunTimeInfoCallBackFun'](0x2,this['runtimeCBFun']),this['DecodeTypeFlagMap']['size']>0x0)){var _0x118d1e,_0x1cb2a6=_0x5e0274(this['DecodeTypeFlagMap']['keys']());try{for(_0x1cb2a6['s']();!(_0x118d1e=_0x1cb2a6['n']())['done'];){var _0x590187=_0x118d1e['value'],_0x7a5407=this['DecodeTypeFlagMap']['get'](_0x590187);0x1==_0x7a5407&&this['oVideoDecoder']['SetRunTimeInfoCallbackType'](0x2,_0x590187,_0x7a5407);}}catch(_0x4f7c8f){_0x1cb2a6['e'](_0x4f7c8f);}finally{_0x1cb2a6['f']();}}''!=this['canvas']&&null!=this['canvas']&&(this['frameBuffers']=this['oVideoDecoder']['ready_frames'],null!=this['oVideoRender']&&this['oVideoRender']['InitDisplay'](this['canvas'],this['renderEngine'],0x100),null==this['oRenderTimer']&&(this['oRenderTimer']=new _0x5bde94()));}},{'key':'HardDecodeError','value':function(){return this['player']['_switchHardToSoft'](),0x1;}},{'key':'inputData','value':function(_0x32dbcc,_0x33481c){if(this['curPrivateInfo']['linesInfo']['length']>0x0||this['curPrivateInfo']['fontInfo']['length']>0x0||this['curPrivateInfo']['imageInfo']['length']>0x0){var _0x33a69f=this['deepClone'](this['curPrivateInfo']);this['VideoPrivateInfoMap']['set'](_0x33481c['timeStamp'],_0x33a69f),this['curPrivateInfo']['linesInfo']['splice'](0x0,this['curPrivateInfo']['linesInfo']['length']),this['curPrivateInfo']['fontInfo']['splice'](0x0,this['curPrivateInfo']['fontInfo']['length']),this['curPrivateInfo']['imageInfo']['splice'](0x0,this['curPrivateInfo']['imageInfo']['length']);}if(0x0!=this['PrecodecType']&&this['PrecodecType']!=_0x33481c['codecType']&&(this['firstFrame']=!0x0,this['oVideoDecoder']['resetDecoderObj']()),this['needSaveFrameInfo']){var _0x51845f=new Object();_0x51845f['port']=_0x33481c['port'],_0x51845f['codecType']=_0x33481c['codecType'],_0x51845f['frameType']=_0x33481c['frameType'],_0x51845f['frameSize']=_0x33481c['frameSize'],_0x51845f['width']=_0x33481c['width'],_0x51845f['height']=_0x33481c['height'],_0x51845f['timeStamp']=_0x33481c['timeStamp'],_0x51845f['frameRate']=_0x33481c['frameRate'],_0x51845f['frameNum']=_0x33481c['frameNum'],_0x51845f['interlace']=_0x33481c['interlace'],_0x51845f['streamEnd']=_0x33481c['streamEnd'],_0x51845f['cropLeft']=_0x33481c['cropLeft'],_0x51845f['cropRight']=_0x33481c['cropRight'],_0x51845f['cropTop']=_0x33481c['cropTop'],_0x51845f['cropBottom']=_0x33481c['cropBottom'],_0x51845f['year']=_0x33481c['year'],_0x51845f['month']=_0x33481c['month'],_0x51845f['week']=_0x33481c['week'],_0x51845f['day']=_0x33481c['day'],_0x51845f['hour']=_0x33481c['hour'],_0x51845f['minute']=_0x33481c['minute'],_0x51845f['second']=_0x33481c['second'],_0x51845f['milliseconds']=_0x33481c['milliseconds'],_0x51845f['isKeyFrame']=_0x33481c['isKeyFrame'],this['nFrameRate']=_0x51845f['frameRate'],this['Prevideowidth']=_0x33481c['width'],this['Prevideoheight']=_0x33481c['height'],this['PrecodecType']=_0x33481c['codecType'],this['displayFrameInfo']['push'](_0x51845f),_0x51845f=null;}else this['displayFrameInfo']['splice'](0x0,this['displayFrameInfo']['length']);null!=this['oVideoDecoder']&&this['oVideoDecoder']['inputData'](_0x32dbcc,_0x33481c);}},{'key':'_resetDecoder','value':function(){var _0x5df498=this;return new Promise(function(_0x152715,_0x317654){_0x5df498['oVideoDecoder']['resetDecoder']()['then'](function(){_0x5df498['displayFrameInfo']['splice'](0x0,_0x5df498['displayFrameInfo']['length']),_0x5df498['curFrameInfo']={},_0x5df498['oVideoRender']['DeInitPrivateParam'](),_0x5df498['VideoPrivateInfoMap']['clear'](),_0x5df498['curPrivateInfo']['linesInfo']['splice'](0x0,_0x5df498['curPrivateInfo']['linesInfo']['length']),_0x5df498['curPrivateInfo']['fontInfo']['splice'](0x0,_0x5df498['curPrivateInfo']['fontInfo']['length']),_0x5df498['curPrivateInfo']['imageInfo']['splice'](0x0,_0x5df498['curPrivateInfo']['imageInfo']['length']),_0x5df498['renderCurStatus']=0x2,_0x5df498['renderLastStatus']=0x2,_0x5df498['player']?_0x5df498['player']['JSPlayM4_ResetEnd']():postMessage({'function':'resetEnd'}),_0x152715();},function(){_0x317654();});});}},{'key':'_resetRenderTimer','value':function(){this['initTimer']=!0x1,this['preTimeStamp']=0x0,this['baseTimeStamp']=0x0,this['resetTimer']=!0x0,null!=this['oRenderTimer']&&this['oRenderTimer']['timerReset'](),this['RenderFrame']=this['RenderFrame']['bind'](this),this['renderCurStatus']=0x2,this['renderLastStatus']=0x2,this['curTimeStamp']=0x0,this['getImageJPEG']=!0x1,this['getImageBMP']=!0x1,this['getCropImageJPEG']=!0x1,this['getCropImageBMP']=!0x1,0x1==this['bResetdisplayFrameInfoCB']&&(this['displayFrameInfoCB']=null),this['displayFrameInfo']['splice'](0x0,this['displayFrameInfo']['length']),this['VideoPrivateInfoMap']['clear'](),this['curPrivateInfo']['linesInfo']['splice'](0x0,this['curPrivateInfo']['linesInfo']['length']),this['curPrivateInfo']['fontInfo']['splice'](0x0,this['curPrivateInfo']['fontInfo']['length']),this['curPrivateInfo']['imageInfo']['splice'](0x0,this['curPrivateInfo']['imageInfo']['length']),this['curFrameInfo']={},this['DecodeTypeFlagMap']['clear'](),this['RenderTypeFlagMap']['clear']();}},{'key':'_destroyPlayCtrl','value':function(){var _0x62ee48=this;this['oVideoDecoder']['destroyDecoder']()['then'](function(){_0x62ee48['oVideoDecoder']=null,null!=_0x62ee48['oVideoRender']&&(_0x62ee48['oVideoRender']['ReleaseDisplay'](),_0x62ee48['oVideoRender']=null),_0x62ee48['_resetRenderTimer'](),_0x62ee48['oRenderTimer']=null,_0x62ee48['displayRunning']=!0x1,_0x62ee48['runtimeCBFun']=null,_0x62ee48['printfFlag']>=0x0&&console['log']('>>>JS\\x2002\\x20destroy\\x20oVideoDecoder/oVideoRender'),null!=_0x62ee48['oVideoEncoder']&&(_0x62ee48['oVideoEncoder']['destroyEncoder'](),_0x62ee48['oVideoEncoder']=null),null!=_0x62ee48['oAudioEncoder']&&(_0x62ee48['oAudioEncoder']['destroyEncoder'](),_0x62ee48['oAudioEncoder']=null);},function(){_0x62ee48['printfFlag']>=0x0&&console['log']('stop\\x20failed\\x20');});}},{'key':'Sleep','value':(_0x284eed=_0x465afd(_0x171d88()['mark'](function _0x24748d(_0x258431){var _0xc93da9;return _0x171d88()['wrap'](function(_0x3bdd2f){for(;;)switch(_0x3bdd2f['prev']=_0x3bdd2f['next']){case 0x0:return _0xc93da9=(_0xc93da9=_0x258431>0xea60?0xea60:_0x258431)<0x0?0x0:_0xc93da9,_0x3bdd2f['abrupt']('return',new Promise(function(_0x1a0447){setTimeout(_0x1a0447,_0xc93da9);}));case 0x3:case'end':return _0x3bdd2f['stop']();}},_0x24748d);})),function(_0x63203e){return _0x284eed['apply'](this,arguments);})},{'key':'RenderFrame','value':(_0x2efc64=_0x465afd(_0x171d88()['mark'](function _0x376dea(){var _0x4de556,_0xe669f4=this;return _0x171d88()['wrap'](function(_0x346edc){for(;;)switch(_0x346edc['prev']=_0x346edc['next']){case 0x0:_0x4de556=this['renderCurStatus'],null!=this['oVideoDecoder']&&null!=this['oVideoDecoder']['decoderObj']&&(this['player']?this['player']['JSPlayM4_GetDecodeBufferSize'](this['oVideoDecoder']['decoderObj']['decodeQueueSize'],this['oVideoDecoder']['ready_frames']['length']):postMessage({'function':'GetDecodeBufferSize','rawSize':this['oVideoDecoder']['decoderObj']['decodeQueueSize'],'frameSize':this['oVideoDecoder']['ready_frames']['length']}),this['oVideoDecoder']['decoderObj']['decodeQueueSize']<=0x3&&this['oVideoDecoder']['ready_frames']['length']<=0x3&&(this['player']?this['player']['JSPlayM4_GetRawData']():postMessage({'function':'GetRawData'})),this['printfFlag']>0x0&&console['log']('VideoPlayCtrl.js\\x20output1\\x20cb\\x20decodeQueueSize:'+this['oVideoDecoder']['decoderObj']['decodeQueueSize']+',length:'+this['oVideoDecoder']['ready_frames']['length'])),_0x346edc['t0']=_0x4de556,_0x346edc['next']=0x0===_0x346edc['t0']?0x5:0x2===_0x346edc['t0']||0x6===_0x346edc['t0']?0x8:0x3===_0x346edc['t0']?0xa:0x5===_0x346edc['t0']?0xd:0x4===_0x346edc['t0']?0xf:0x11;break;case 0x5:return this['_resetRenderTimer'](),this['_resetDecoder']()['then'](function(){requestAnimationFrame(_0xe669f4['RenderFrame']);},function(){}),_0x346edc['abrupt']('break',0x12);case 0x8:return this['displayRunning']?(this['printfFlag']>0x0&&console['log']('displayBuf:'+this['displayBuf']+',this.streamOpenMode:'+this['streamOpenMode']+',LatcyTime:'+this['LatcyTime']),this['chooseFrame']()['then'](function(_0x553062){if(_0xe669f4['curFrame']=_0x553062,0x1==_0xe669f4['ProcessPositionflag']){if(null!=_0xe669f4['curFrame']){new Object();var _0x31ffe5=0x0;if(0x1==_0xe669f4['nMPPosType']&&(_0x31ffe5=_0xe669f4['findFramebyTime'](_0xe669f4['curFrame']['timestamp'],0x0)['frameNum']),0x0==_0xe669f4['nMPPosType']&&_0xe669f4['curFrame']['timestamp']<_0xe669f4['nTargetRelativePos']||0x1==_0xe669f4['nMPPosType']&&_0x31ffe5<_0xe669f4['nTargetRelativePos'])requestAnimationFrame(_0xe669f4['RenderFrame']);else{if(_0xe669f4['ProcessPositionflag']=!0x1,_0xe669f4['player']['needPlaySound']&&_0xe669f4['player']['JSPlayM4_PlaySound'](),_0xe669f4['paint'](_0xe669f4['curFrame']),_0xe669f4['curTimeStamp']=_0xe669f4['curFrame']['timestamp'],null!=_0xe669f4['player']){var _0x4690af={'nRes':0x1};_0x4690af['nRelativePos']=_0xe669f4['nTargetRelativePos'],null!=_0xe669f4['player']['SetPlayPosCBFun']?_0xe669f4['player']['SetPlayPosCBFun'](_0x4690af):postMessage({'function':'SetPlayPosCB','value':_0xe669f4['nTargetRelativePos']});}0x1==_0xe669f4['nMPPlayMode']&&_0xe669f4['SetCurStatus'](0x3),_0xe669f4['RenderFrame']();}}else requestAnimationFrame(_0xe669f4['RenderFrame']);}else{if(-0x1==_0xe669f4['displayBuf']||0x0==_0xe669f4['streamOpenMode']&&0x0==_0xe669f4['LatcyTime'])null!=_0xe669f4['curFrame']&&(_0xe669f4['curTimeStamp']=_0xe669f4['curFrame']['timestamp'],_0xe669f4['paint'](_0xe669f4['curFrame'])),requestAnimationFrame(_0xe669f4['RenderFrame']);else{if(null!=_0xe669f4['curFrame']){_0xe669f4['initTimer']&&!_0xe669f4['resetTimer']||(_0xe669f4['oRenderTimer']['Init'](),_0xe669f4['initTimer']=!0x0,_0xe669f4['resetTimer']=!0x1,_0xe669f4['preTimeStamp']=_0xe669f4['curFrame']['timestamp'],_0xe669f4['baseTimeStamp']=_0xe669f4['curFrame']['timestamp'],0x1==_0xe669f4['streamOpenMode']&&(_0xe669f4['LatcyTime']=0x0)),_0xe669f4['curTimeStamp']=_0xe669f4['curFrame']['timestamp'];var _0x21f1c0=0x0,_0x2b345c=0x0;0x6==_0x4de556?(_0x21f1c0=_0xe669f4['preTimeStamp']-_0xe669f4['curTimeStamp'],_0x2b345c=_0xe669f4['baseTimeStamp']-_0xe669f4['curTimeStamp']):(_0x21f1c0=_0xe669f4['curTimeStamp']-_0xe669f4['preTimeStamp'],_0x2b345c=_0xe669f4['curTimeStamp']-_0xe669f4['baseTimeStamp']);var _0x1c77bd=_0xe669f4['oRenderTimer']['GetTimerWalk']();(_0x21f1c0>0x1388||_0x21f1c0<0x0||_0x2b345c<0x0||_0x1c77bd<=0x0)&&(_0xe669f4['oRenderTimer']['Init'](),_0xe669f4['preTimeStamp']=_0xe669f4['curFrame']['timestamp'],_0xe669f4['baseTimeStamp']=_0xe669f4['curTimeStamp'],_0x2b345c=0x6==_0x4de556?_0xe669f4['baseTimeStamp']-_0xe669f4['curTimeStamp']:_0xe669f4['curTimeStamp']-_0xe669f4['baseTimeStamp'],_0x1c77bd=_0xe669f4['oRenderTimer']['GetTimerWalk']());var _0x473e8a=0x0;_0x473e8a=_0xe669f4['StretchPlayFlag']?_0xe669f4['StretchPlaySpeed']:_0xe669f4['playSpeed'];var _0x14467b=(_0x2b345c+_0xe669f4['LatcyTime'])/_0x473e8a-_0x1c77bd;_0xe669f4['printfFlag']>0x0&&console['log']('baseTimerWalk:'+_0x1c77bd+',lDeta:'+_0x14467b+',Date\\x20:'+new Date()['getFullYear']()+'/'+(new Date()['getMonth']()+0x1)+'/'+new Date()['getDate']()+'\\x20'+new Date()['getHours']()+'-'+new Date()['getMinutes']()+'-'+new Date()['getSeconds']()+'-'+new Date()['getMilliseconds']()),_0x14467b<0xf&&_0x14467b>-0xf||_0x14467b<0x0?(_0xe669f4['StretchPlayFlag']&&_0xe669f4['VideoStretchProcess'](_0xe669f4['curTimeStamp']),_0xe669f4['paint'](_0xe669f4['curFrame']),_0xe669f4['preTimeStamp']=_0xe669f4['curTimeStamp'],_0xe669f4['RenderFrame']()):_0xe669f4['Sleep'](_0x14467b-0x5)['then'](function(){0x2!=_0xe669f4['renderCurStatus']&&0x6!=_0xe669f4['renderCurStatus']||(_0xe669f4['StretchPlayFlag']&&_0xe669f4['VideoStretchProcess'](_0xe669f4['curTimeStamp']),_0xe669f4['paint'](_0xe669f4['curFrame']),_0xe669f4['preTimeStamp']=_0xe669f4['curTimeStamp']),_0xe669f4['RenderFrame']();});}else requestAnimationFrame(_0xe669f4['RenderFrame']);}}})):requestAnimationFrame(this['RenderFrame']),_0x346edc['abrupt']('break',0x12);case 0xa:return this['_refresh'](),requestAnimationFrame(this['RenderFrame']),_0x346edc['abrupt']('break',0x12);case 0xd:return this['needForward']?this['chooseFrame']()['then'](function(_0x5a9518){_0xe669f4['curFrame']=_0x5a9518,null!=_0xe669f4['curFrame']&&(_0xe669f4['curTimeStamp']=_0xe669f4['curFrame']['timestamp'],_0xe669f4['paint'](_0xe669f4['curFrame']),_0xe669f4['needForward']=!0x1),requestAnimationFrame(_0xe669f4['RenderFrame']);}):(this['_refresh'](),requestAnimationFrame(this['RenderFrame'])),_0x346edc['abrupt']('break',0x12);case 0xf:return this['_destroyPlayCtrl'](),_0x346edc['abrupt']('return');case 0x11:return _0x346edc['abrupt']('return');case 0x12:case'end':return _0x346edc['stop']();}},_0x376dea,this);})),function(){return _0x2efc64['apply'](this,arguments);})},{'key':'paint','value':function(_0x13d343){var _0x27bc5a=this,_0x1614d8=arguments['length']>0x1&&void 0x0!==arguments[0x1]&&arguments[0x1];return new Promise(function(_0x701d04,_0x33b050){if(0x4==_0x27bc5a['renderCurStatus']||null==_0x13d343||null==_0x27bc5a['oVideoRender']||0x1==_0x27bc5a['ProcessPositionflag']||null==_0x13d343['timestamp'])_0x701d04();else{_0x27bc5a['waitIFrameTimestamp']===_0x13d343['timestamp']&&(_0x27bc5a['resetTimer']=!0x0);var _0x2fb524={},_0x5adfd9=null;_0x5adfd9=null!=_0x13d343['image']&&null!=_0x13d343['image']?_0x13d343['image']:_0x13d343,_0x2fb524['nCropLeft']=0x0,_0x2fb524['nCropRight']=0x0,_0x2fb524['nCropTop']=0x0,_0x2fb524['nCropBottom']=0x0,_0x2fb524['nCodeWidth']=_0x13d343['displayWidth'],_0x2fb524['nCodeHeight']=_0x13d343['displayHeight'];var _0x4d245e={'x':0x0,'y':0x0};if(_0x4d245e['width']=_0x13d343['displayWidth'],_0x4d245e['height']=_0x13d343['displayHeight'],_0x27bc5a['RenderTypeFlagMap']['size']>0x0){var _0x325f26,_0x52258=_0x5e0274(_0x27bc5a['RenderTypeFlagMap']['keys']());try{for(_0x52258['s']();!(_0x325f26=_0x52258['n']())['done'];){var _0x1b9aa3=_0x325f26['value'];if(_0x1b9aa3==_0x3c737d){if(0x1==_0x27bc5a['RenderTypeFlagMap']['get'](_0x1b9aa3)&&null!=_0x27bc5a['runtimeCBFun']&&0x1==_0x27bc5a['firstRenderBegin']){if(_0x27bc5a['pstRuntimeInfo']['nRunTimeModule']=0x3,_0x27bc5a['pstRuntimeInfo']['nStrVersion']=0x1,_0x27bc5a['pstRuntimeInfo']['nFrameTimeStamp']=_0x13d343['timestamp'],_0x27bc5a['pstRuntimeInfo']['nFrameNum']=0x0,_0x27bc5a['pstRuntimeInfo']['nErrorCode']=_0x3c737d,_0x27bc5a['pstRuntimeInfo']['nInputDataInterval']=0x0,_0x27bc5a['pstRuntimeInfo']['nFrameNumInterval']=0x0,_0x27bc5a['pstRuntimeInfo']['nAverageDecodeTime']=0x0,0x1==_0x1614d8)_0x27bc5a['pstRuntimeInfo']['AbsTimeYear']=_0x27bc5a['curFrameInfo']['year'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMonth']=_0x27bc5a['curFrameInfo']['month'],_0x27bc5a['pstRuntimeInfo']['AbsTimeDay']=_0x27bc5a['curFrameInfo']['day'],_0x27bc5a['pstRuntimeInfo']['AbsTimeHour']=_0x27bc5a['curFrameInfo']['hour'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMinute']=_0x27bc5a['curFrameInfo']['minute'],_0x27bc5a['pstRuntimeInfo']['AbsTimeSecond']=_0x27bc5a['curFrameInfo']['second'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMilliseconds']=_0x27bc5a['curFrameInfo']['milliseconds'];else{var _0x29f594=new Object();_0x29f594=_0x27bc5a['findFramebyTime'](_0x13d343['timestamp'],0x0),_0x27bc5a['pstRuntimeInfo']['AbsTimeYear']=_0x29f594['year'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMonth']=_0x29f594['month'],_0x27bc5a['pstRuntimeInfo']['AbsTimeDay']=_0x29f594['day'],_0x27bc5a['pstRuntimeInfo']['AbsTimeHour']=_0x29f594['hour'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMinute']=_0x29f594['minute'],_0x27bc5a['pstRuntimeInfo']['AbsTimeSecond']=_0x29f594['second'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMilliseconds']=_0x29f594['milliseconds'];}_0x27bc5a['runtimeCBFun'](_0x27bc5a['pstRuntimeInfo']),_0x27bc5a['firstRenderBegin']=!0x1;}}}}catch(_0x5293df){_0x52258['e'](_0x5293df);}finally{_0x52258['f']();}}_0x27bc5a['oVideoRender']['DisplayFrame'](_0x5adfd9,_0x13d343['displayWidth'],_0x13d343['displayHeight'],_0x13d343['timestamp'],_0x2fb524,null,_0x27bc5a['nFrameRate'],_0x1614d8)['then'](function(_0x65c468){var _0x1f153d=_0x65c468['timestamp'],_0x2b101b=_0x65c468['DrawRet'];if(_0x27bc5a['RenderTypeFlagMap']['size']>0x0&&0x1!=_0x2b101b){var _0x7451a4,_0xab1a35=_0x5e0274(_0x27bc5a['RenderTypeFlagMap']['keys']());try{for(_0xab1a35['s']();!(_0x7451a4=_0xab1a35['n']())['done'];){var _0x4833c7=_0x7451a4['value'];if(0x10==_0x4833c7)0x1==_0x27bc5a['RenderTypeFlagMap']['get'](_0x4833c7)&&null!=_0x27bc5a['runtimeCBFun']&&(_0x27bc5a['pstRuntimeInfo']['nRunTimeModule']=0x3,_0x27bc5a['pstRuntimeInfo']['nStrVersion']=0x1,_0x27bc5a['pstRuntimeInfo']['nFrameTimeStamp']=_0x1f153d,_0x27bc5a['pstRuntimeInfo']['nFrameNum']=0x0,_0x27bc5a['pstRuntimeInfo']['nErrorCode']=0x10,_0x27bc5a['runtimeCBFun'](_0x27bc5a['pstRuntimeInfo']));}}catch(_0x3f6928){_0xab1a35['e'](_0x3f6928);}finally{_0xab1a35['f']();}}if(null!==_0x27bc5a['displayFrameInfoCB']&&_0x27bc5a['respondFrameInfoCB'](_0x1f153d),_0x27bc5a['RenderTypeFlagMap']['size']>0x0){var _0x1070ca,_0x57d61f=_0x5e0274(_0x27bc5a['RenderTypeFlagMap']['keys']());try{for(_0x57d61f['s']();!(_0x1070ca=_0x57d61f['n']())['done'];){var _0x875779=_0x1070ca['value'];if(_0x875779==_0x596305)0x1==_0x27bc5a['RenderTypeFlagMap']['get'](_0x875779)&&null!=_0x27bc5a['runtimeCBFun']&&(_0x27bc5a['pstRuntimeInfo']['nRunTimeModule']=0x3,_0x27bc5a['pstRuntimeInfo']['nStrVersion']=0x1,_0x27bc5a['pstRuntimeInfo']['nFrameTimeStamp']=_0x1f153d,_0x27bc5a['pstRuntimeInfo']['nFrameNum']=0x0,_0x27bc5a['pstRuntimeInfo']['nErrorCode']=_0x596305,_0x27bc5a['pstRuntimeInfo']['nInputDataInterval']=0x0,_0x27bc5a['pstRuntimeInfo']['nFrameNumInterval']=0x0,_0x27bc5a['pstRuntimeInfo']['nAverageDecodeTime']=0x0,_0x27bc5a['pstRuntimeInfo']['AbsTimeYear']=_0x27bc5a['curFrameInfo']['year'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMonth']=_0x27bc5a['curFrameInfo']['month'],_0x27bc5a['pstRuntimeInfo']['AbsTimeDay']=_0x27bc5a['curFrameInfo']['day'],_0x27bc5a['pstRuntimeInfo']['AbsTimeHour']=_0x27bc5a['curFrameInfo']['hour'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMinute']=_0x27bc5a['curFrameInfo']['minute'],_0x27bc5a['pstRuntimeInfo']['AbsTimeSecond']=_0x27bc5a['curFrameInfo']['second'],_0x27bc5a['pstRuntimeInfo']['AbsTimeMilliseconds']=_0x27bc5a['curFrameInfo']['milliseconds'],_0x27bc5a['runtimeCBFun'](_0x27bc5a['pstRuntimeInfo']));}}catch(_0x14437e){_0x57d61f['e'](_0x14437e);}finally{_0x57d61f['f']();}}if(_0x27bc5a['firstFrame']){_0x27bc5a['firstFrame']=!0x1;var _0x18a2af=_0x27bc5a;_0x27bc5a['oVideoRender']['GetCanvasData'](function(_0x3d1026,_0x476e31,_0x1a7c2a){if(null!=_0x3d1026){var _0x4d83cc=_0x18a2af['checkColorAnomaly'](_0x3d1026,_0x476e31,_0x1a7c2a);console['log']('checkColorAnomaly\\x20resC:'+_0x4d83cc),_0x4d83cc&&_0x18a2af['HardDecodeError']();}}),null!=_0x27bc5a['player']?null!=_0x27bc5a['player']['FFCallBackFun']&&_0x27bc5a['player']['FFCallBackFun']({'decodeEngine':0x1}):postMessage({'function':'firstFrameCB','value':!0x0});}_0x27bc5a['startRecoderFlag']&&0x0==_0x27bc5a['stopRecoderFlag']&&_0x27bc5a['oVideoRender']['GetCanvasData'](function(_0x50bd4b,_0x1dc7c1,_0xfc4209){if(null!=_0x50bd4b){if(0x0==_0x27bc5a['recoderBaseTimestampMode']){0x0==_0x27bc5a['vBaseTimeStamp']&&(_0x27bc5a['vBaseTimeStamp']=0x3c*new Date()['getHours']()*0x3c*0x3e8+0x3c*new Date()['getMinutes']()*0x3e8+0x3e8*new Date()['getSeconds']()+new Date()['getMilliseconds']());var _0x3aa8d8=0x3c*new Date()['getHours']()*0x3c*0x3e8+0x3c*new Date()['getMinutes']()*0x3e8+0x3e8*new Date()['getSeconds']()+new Date()['getMilliseconds']();_0x27bc5a['recoderFrameTimeStamp']=_0x3aa8d8-_0x27bc5a['vBaseTimeStamp'];}else 0x1==_0x27bc5a['recoderBaseTimestampMode']||(_0x27bc5a['recoderBaseTimestampMode']=0x1),_0x27bc5a['recoderFrameTimeStamp']=_0x1f153d;var _0x346312={'timestamp':0x3e8*_0x27bc5a['recoderFrameTimeStamp'],'codedWidth':_0x27bc5a['encodeVideoInfo']['encodeWidth'],'codedHeight':_0x27bc5a['encodeVideoInfo']['encodeHeight'],'format':'RGBA'},_0x4cf282=new VideoFrame(_0x50bd4b,_0x346312),_0xedbad6={};_0xedbad6['year']=_0x27bc5a['curFrameInfo']['year'],_0xedbad6['month']=_0x27bc5a['curFrameInfo']['month'],_0xedbad6['day']=_0x27bc5a['curFrameInfo']['day'],_0xedbad6['hour']=_0x27bc5a['curFrameInfo']['hour'],_0xedbad6['minute']=_0x27bc5a['curFrameInfo']['minute'],_0xedbad6['second']=_0x27bc5a['curFrameInfo']['second'],_0xedbad6['milliseconds']=_0x27bc5a['curFrameInfo']['milliseconds'],_0x27bc5a['oVideoEncoder']['inputData'](_0x4cf282,_0xedbad6),_0x4cf282['close'](),_0x50bd4b=null,_0x27bc5a['recoderFrameNum']++;}_0x701d04();},_0x27bc5a['encodeVideoInfo']['encodeWidth'],_0x27bc5a['encodeVideoInfo']['encodeHeight'],_0x27bc5a['recoderGetOriginData']);});}});}},{'key':'checkColorAnomaly','value':function(_0x12879f,_0x1a3bf6,_0x5a2a8f){for(var _0x3b7342=0x0,_0x1d23f8=_0x1a3bf6*_0x5a2a8f,_0x310650=0x0;_0x310650<_0x12879f['length'];_0x310650+=0x4){var _0x302a4c=_0x12879f[_0x310650],_0x2925ee=_0x12879f[_0x310650+0x1],_0x2794c0=_0x12879f[_0x310650+0x2];_0x2925ee>1.5*_0x302a4c&&_0x2925ee>1.5*_0x2794c0&&_0x3b7342++;}return _0x3b7342/_0x1d23f8>0.05;}},{'key':'respondFrameInfoCB','value':function(_0x465065){if(0x0!=this['displayFrameInfo']['length']&&(this['curFrameInfo']['timeStamp']!==_0x465065||0x0==_0x465065&&0x0==this['curFrameInfo']['timeStamp'])){var _0x3cf0d3=this['findFramebyTime'](_0x465065,0x1);this['curFrameInfo']['port']=_0x3cf0d3['port'],this['curFrameInfo']['codecType']=_0x3cf0d3['codecType'],this['curFrameInfo']['frameType']=_0x3cf0d3['frameType'],this['curFrameInfo']['frameSize']=_0x3cf0d3['frameSize'],this['curFrameInfo']['width']=_0x3cf0d3['width']-(_0x3cf0d3['cropLeft']+_0x3cf0d3['cropRight']),this['curFrameInfo']['height']=_0x3cf0d3['height']-(_0x3cf0d3['cropTop']+_0x3cf0d3['cropBottom']),this['curFrameInfo']['timeStamp']=_0x3cf0d3['timeStamp'],this['curFrameInfo']['frameRate']=_0x3cf0d3['frameRate'],this['curFrameInfo']['frameNum']=_0x3cf0d3['frameNum'],this['curFrameInfo']['interlace']=_0x3cf0d3['interlace'],this['curFrameInfo']['streamEnd']=_0x3cf0d3['streamEnd'],this['curFrameInfo']['cropLeft']=_0x3cf0d3['cropLeft'],this['curFrameInfo']['cropRight']=_0x3cf0d3['cropRight'],this['curFrameInfo']['cropTop']=_0x3cf0d3['cropTop'],this['curFrameInfo']['cropBottom']=_0x3cf0d3['cropBottom'],this['curFrameInfo']['year']=_0x3cf0d3['year'],this['curFrameInfo']['month']=_0x3cf0d3['month'],this['curFrameInfo']['week']=_0x3cf0d3['week'],this['curFrameInfo']['day']=_0x3cf0d3['day'],this['curFrameInfo']['hour']=_0x3cf0d3['hour'],this['curFrameInfo']['minute']=_0x3cf0d3['minute'],this['curFrameInfo']['second']=_0x3cf0d3['second'],this['curFrameInfo']['milliseconds']=_0x3cf0d3['milliseconds'],_0x3cf0d3=null,null!=this['displayFrameInfoCB']&&this['displayFrameInfoCB'](this['curFrameInfo']);}}},{'key':'findFramebyTime','value':function(_0x477a65,_0x377035){var _0x2c9732=new Object();if(_0x2c9732=this['displayFrameInfo']['find'](function(_0xad904a){return _0xad904a['timeStamp']==_0x477a65;}),0x1==_0x377035){var _0x2fe6a5=this['displayFrameInfo']['findIndex'](function(_0x48be14){return _0x48be14['timeStamp']==_0x477a65;});this['displayFrameInfo']['splice'](_0x2fe6a5,0x1);}return _0x2c9732;}},{'key':'chooseFrame','value':function(){var _0x5c700e=this;return new Promise(function(_0x476fb4,_0x1d8e89){if(null==_0x5c700e['oVideoRender']||null==_0x5c700e['oVideoDecoder'])_0x476fb4(null);else{if(_0x5c700e['oVideoDecoder']['decoderObjNeedReset'])_0x5c700e['oVideoDecoder']['resetDecoder']()['then'](function(){_0x5c700e['oVideoDecoder']['decoderObjNeedReset']=!0x1,_0x476fb4(null);},function(){_0x1d8e89();});else{var _0x43a1db=_0x5c700e['oVideoDecoder']['GetFrameBufferLength']();if(-0x1!=_0x5c700e['displayBuf']){if(_0x43a1db<0x3){if(0x1==_0x5c700e['bSetStreamEnd']&&(_0x5c700e['nstreamEndloopNum']++,_0x5c700e['nstreamEndloopNum']>=0x32&&null!=_0x5c700e['player']&&null!=_0x5c700e['player']['runtimeCBFun'])){var _0x1db392={'nRunTimeModule':0x0,'nStrVersion':0x0,'nFrameTimeStamp':0x0,'nFrameNum':0x0,'nErrorCode':0x9};_0x5c700e['player']['runtimeCBFun'](_0x1db392),_0x5c700e['bSetStreamEnd']=!0x1,_0x5c700e['nstreamEndloopNum']=0x0;}_0x476fb4(null);}else 0x1==_0x5c700e['bSetStreamEnd']&&(_0x5c700e['nstreamEndloopNum']=0x0),_0x5c700e['oVideoDecoder']['GetFrame']()['then'](function(_0x4b8dca){_0x476fb4(_0x4b8dca);},function(){});}else{if(0x0==_0x43a1db){if(0x1==_0x5c700e['bSetStreamEnd']&&(_0x5c700e['nstreamEndloopNum']++,_0x5c700e['nstreamEndloopNum']>=0x32&&null!=_0x5c700e['player']&&null!=_0x5c700e['player']['runtimeCBFun'])){var _0x22b247={'nRunTimeModule':0x0,'nStrVersion':0x0,'nFrameTimeStamp':0x0,'nFrameNum':0x0,'nErrorCode':0x9};_0x5c700e['player']['runtimeCBFun'](_0x22b247),_0x5c700e['bSetStreamEnd']=!0x1,_0x5c700e['nstreamEndloopNum']=0x0;}_0x476fb4(null);}else 0x1==_0x5c700e['bSetStreamEnd']&&(_0x5c700e['nstreamEndloopNum']=0x0),_0x5c700e['oVideoDecoder']['GetFrame']()['then'](function(_0x5eb215){_0x476fb4(_0x5eb215);},function(){});}}}});}},{'key':'SetDisplayRegion','value':function(_0x58c468,_0x165813,_0x2f203e,_0x55f3d3){return null==this['oVideoRender']?0x0:(this['sx']=_0x58c468,this['sy']=_0x165813,this['sw']=_0x2f203e,this['sh']=_0x55f3d3,this['oVideoRender']['SetDisplayRect'](_0x58c468,_0x165813,_0x2f203e,_0x55f3d3));}},{'key':'SetCurStatus','value':function(_0x3273b5){var _0x98a93f=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1];return this['bResetdisplayFrameInfoCB']=_0x98a93f,this['renderCurStatus']=_0x3273b5,0x1;}},{'key':'fast','value':function(){var _0x9e6184=this['_GetFastSpeed'](this['nplaySpeed']);return this['_SetPlaySpeed'](_0x9e6184);}},{'key':'slow','value':function(){var _0x34ab58=this['_GetSlowSpeed'](this['nplaySpeed']);return this['_SetPlaySpeed'](_0x34ab58);}},{'key':'Pause','value':function(_0x411398){if(_0x411398)0x2!=this['renderCurStatus']&&0x6!=this['renderCurStatus']||(this['renderLastStatus']=this['renderCurStatus']),this['SetCurStatus'](0x3);else{if(0x3!==this['renderCurStatus'])return 0x0;0x2===this['renderLastStatus']?this['SetCurStatus'](0x2):0x6===this['renderLastStatus']&&this['SetCurStatus'](0x6),this['resetTimer']=!0x0;}return 0x1;}},{'key':'NotifyBackPlay','value':function(_0x51d4a1){if(_0x51d4a1?this['SetCurStatus'](0x6):this['SetCurStatus'](0x2),null!=this['oVideoDecoder']){if(0x2==this['PlayOrBackMode'])this['oVideoDecoder']['NotifyBackPlay'](_0x51d4a1,this['preTimeStamp'],0x0);else{var _0x5c4693=0x1==_0x51d4a1?0x2:0x1;this['oVideoDecoder']['NotifyBackPlay'](_0x51d4a1,this['preTimeStamp'],_0x5c4693);}}return this['resetTimer']=!0x0,0x1;}},{'key':'SetPlayOrBackSwitchMode','value':function(_0x6c1d47){return this['PlayOrBackMode']=_0x6c1d47,0x1;}},{'key':'SetStretchPlay','value':function(_0xd9db04,_0x5b098e){return 0x2!=this['renderCurStatus']||this['playSpeed']>1.1||this['playSpeed']<0.9?0x0:(this['StretchPlayTime']=_0xd9db04,this['StretchPlayedTime']=0x0,this['StretchPlaySpeed']=_0x5b098e,this['StretchPlayFlag']=!0x0,this['resetTimer']=!0x0,0x1);}},{'key':'VideoStretchProcess','value':function(_0xaaae00){return this['StretchPlayFlag']&&(this['printfFlag']>0x0&&console['log']('StretchPlayedTime:'+this['StretchPlayedTime']+',StretchPlayTime:'+this['StretchPlayTime']),this['StretchPlayedTime']<this['StretchPlayTime']?this['StretchPlayedTime']+=_0xaaae00-this['preTimeStamp']:(this['StretchPlayedTime']=0x0,this['StretchPlayFlag']=!0x1,this['resetTimer']=!0x0)),0x1;}},{'key':'_refresh','value':function(){0x0!=this['frameBuffers']['length']&&this['paint'](this['frameBuffers'][0x0],!0x0);}},{'key':'OneByOne','value':function(_0x14b91a){if(_0x14b91a)0x2!=this['renderCurStatus']&&0x6!=this['renderCurStatus']||(this['renderLastStatus']=this['renderCurStatus']),this['SetCurStatus'](0x5),this['needForward']=!0x0;else{if(0x5!==this['renderCurStatus'])return-0x1;0x2===this['renderLastStatus']?this['SetCurStatus'](0x2):0x6===this['renderLastStatus']&&this['SetCurStatus'](0x6),this['resetTimer']=!0x0,this['needForward']=!0x1,this['_SetPlaySpeed'](0x1);}return 0x1;}},{'key':'SetCanvasSize','value':function(_0x526637,_0x329e97,_0x3a45fa){return null!=this['oVideoRender']?this['oVideoRender']['SetCanvasSize'](_0x526637,_0x329e97,_0x3a45fa):0x0;}},{'key':'GetCanvasSize','value':function(){return null!=this['oVideoRender']?this['oVideoRender']['GetCanvasSize']():0x0;}},{'key':'GetPlayedTime','value':function(){return this['curTimeStamp'];}},{'key':'SetTargetRelativePos','value':function(_0x1babfd,_0x504433,_0x10f916){this['nTargetRelativePos']=_0x1babfd,this['nMPPlayMode']=_0x10f916,this['nMPPosType']=_0x504433,this['ProcessPositionflag']=!0x0;}},{'key':'_SetPlaySpeed','value':function(_0xbe0b51){switch(_0xbe0b51){case-0x10:case-0x8:case-0x4:case-0x2:case 0x1:case 0x2:case 0x4:case 0x8:case 0x10:case 0x20:case 0x40:break;default:return-0x1;}return _0xbe0b51===this['nplaySpeed']||(this['nplaySpeed']=_0xbe0b51,this['playSpeed']=_0xbe0b51>0x0?_0xbe0b51:-0x1/_0xbe0b51,console['log']('playSpeed:'+this['playSpeed']),this['resetTimer']=!0x0,this['needForward']=!0x1,0x2!=this['renderCurStatus']&&0x6!=this['renderCurStatus']&&(0x2===this['renderLastStatus']?this['SetCurStatus'](0x2):0x6===this['renderLastStatus']&&this['SetCurStatus'](0x6))),0x1;}},{'key':'_GetFastSpeed','value':function(_0x32f4a4){var _0x2db323=0x0;switch(_0x32f4a4){case-0x10:_0x2db323=-0x8;break;case-0x8:_0x2db323=-0x4;break;case-0x4:_0x2db323=-0x2;break;case-0x2:_0x2db323=0x1;break;case 0x1:_0x2db323=0x2;break;case 0x2:_0x2db323=0x4;break;case 0x4:_0x2db323=0x8;break;case 0x8:_0x2db323=0x10;break;case 0x10:_0x2db323=0x20;break;case 0x20:_0x2db323=0x40;break;default:_0x2db323=0x0;}return _0x2db323;}},{'key':'_GetSlowSpeed','value':function(_0x5d7e23){var _0x2b4977=0x0;switch(_0x5d7e23){case-0x8:_0x2b4977=-0x10;break;case-0x4:_0x2b4977=-0x8;break;case-0x2:_0x2b4977=-0x4;break;case 0x1:_0x2b4977=-0x2;break;case 0x2:_0x2b4977=0x1;break;case 0x4:_0x2b4977=0x2;break;case 0x8:_0x2b4977=0x4;break;case 0x10:_0x2b4977=0x8;break;case 0x20:_0x2b4977=0x10;break;case 0x40:_0x2b4977=0x20;break;default:_0x2b4977=0x0;}return _0x2b4977;}},{'key':'SetDisplayBuf','value':function(_0x423a50){return this['displayBuf']=_0x423a50,this['LatcyTime']=0x1==_0x423a50?0x0:0xf==_0x423a50?0x2bc:0x2d==_0x423a50?0x76c:_0x423a50>0x6&&_0x423a50<0x2d?0x28*_0x423a50+0x64:-0x1==_0x423a50?0x0:0x32,0x1;}},{'key':'GetJPEG','value':function(){var _0x29e5ea=this;null!=this['oVideoDecoder']&&this['oVideoDecoder']['GetImageYUV']('jpeg',0x0,0x0,0x0,0x0)['then'](function(_0x30d9d8){var _0x403e6d=_0x30d9d8['yuvFrameBuffer'],_0x391478=_0x30d9d8['yuvLength'],_0x3262d5=_0x30d9d8['displayWidth'],_0x47eb60=_0x30d9d8['displayHeight'],_0x12cec3=_0x30d9d8['yuvType'];-0x1!=_0x403e6d&&(_0x29e5ea['player']?_0x29e5ea['player']['_GetImage2'](_0x403e6d,_0x391478,_0x3262d5,_0x47eb60,'jpeg',_0x12cec3,0x0,0x0,0x0,0x0):postMessage({'function':'imageYUV','value':_0x403e6d['buffer'],'size':_0x391478,'width':_0x3262d5,'height':_0x47eb60,'type':'jpeg','yuvType':_0x12cec3,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x403e6d['buffer']]));},function(){});}},{'key':'GetBMP','value':function(){var _0x19114c=this;null!=this['oVideoDecoder']&&this['oVideoDecoder']['GetImageYUV']('bmp',0x0,0x0,0x0,0x0)['then'](function(_0x15dd44){var _0x29e66c=_0x15dd44['yuvFrameBuffer'],_0x3f7cbb=_0x15dd44['yuvLength'],_0x108497=_0x15dd44['displayWidth'],_0x3a0923=_0x15dd44['displayHeight'],_0x3bb03d=_0x15dd44['yuvType'];-0x1!=_0x29e66c&&(_0x19114c['player']?_0x19114c['player']['_GetImage2'](_0x29e66c,_0x3f7cbb,_0x108497,_0x3a0923,'bmp',_0x3bb03d,0x0,0x0,0x0,0x0):postMessage({'function':'imageYUV','value':_0x29e66c['buffer'],'size':_0x3f7cbb,'width':_0x108497,'height':_0x3a0923,'type':'bmp','yuvType':_0x3bb03d,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x29e66c['buffer']]));},function(){});}},{'key':'GetCropJPEG','value':function(){var _0x28cedd=this;null!=this['oVideoDecoder']&&this['oVideoDecoder']['GetImageYUV']('jpeg',this['sx'],this['sy'],this['sw'],this['sh'])['then'](function(_0x3bc3e0){var _0x1fdf4b=_0x3bc3e0['yuvFrameBuffer'],_0x4f18a3=_0x3bc3e0['yuvLength'],_0x5f1596=_0x3bc3e0['displayWidth'],_0x50f266=_0x3bc3e0['displayHeight'],_0x1085e7=_0x3bc3e0['yuvType'];-0x1!=_0x1fdf4b&&(_0x28cedd['player']?_0x28cedd['player']['_GetImage2'](_0x1fdf4b,_0x4f18a3,_0x5f1596,_0x50f266,'jpeg',_0x1085e7,_0x28cedd['sx'],_0x28cedd['sy'],_0x28cedd['sw'],_0x28cedd['sh']):postMessage({'function':'imageYUV','value':_0x1fdf4b['buffer'],'size':_0x4f18a3,'width':_0x5f1596,'height':_0x50f266,'type':'jpeg','yuvType':_0x1085e7,'sx':_0x28cedd['sx'],'sy':_0x28cedd['sy'],'sw':_0x28cedd['sw'],'sh':_0x28cedd['sh']},[_0x1fdf4b['buffer']]));},function(){});}},{'key':'GetCropBMP','value':function(){var _0x2d5af0=this;null!=this['oVideoDecoder']&&this['oVideoDecoder']['GetImageYUV']('bmp',this['sx'],this['sy'],this['sw'],this['sh'])['then'](function(_0x22d9a4){var _0x33add2=_0x22d9a4['yuvFrameBuffer'],_0x3f366f=_0x22d9a4['yuvLength'],_0x2a09e6=_0x22d9a4['displayWidth'],_0x581243=_0x22d9a4['displayHeight'],_0x3d5812=_0x22d9a4['yuvType'];-0x1!=_0x33add2&&(_0x2d5af0['player']?_0x2d5af0['player']['_GetImage2'](_0x33add2,_0x3f366f,_0x2a09e6,_0x581243,'bmp',_0x3d5812,_0x2d5af0['sx'],_0x2d5af0['sy'],_0x2d5af0['sw'],_0x2d5af0['sh']):postMessage({'function':'imageYUV','value':_0x33add2['buffer'],'size':_0x3f366f,'width':_0x2a09e6,'height':_0x581243,'type':'bmp','yuvType':_0x3d5812,'sx':_0x2d5af0['sx'],'sy':_0x2d5af0['sy'],'sw':_0x2d5af0['sw'],'sh':_0x2d5af0['sh']},[_0x33add2['buffer']]));},function(){});}},{'key':'GetCanvasCapture','value':function(_0x55a38f,_0x5a8a12,_0x3caad2){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20GetCanvasCapture','color:red'),0x0):(this['oVideoRender']['GetCanvasData'](_0x55a38f,_0x5a8a12,_0x3caad2),0x1);}},{'key':'SetDecodeFrameType','value':function(_0x1dfee3){return this['waitIFrameTimestamp']=_0x1dfee3,0x1;}},{'key':'SetStreamEnd','value':function(_0x2b1468){return this['bSetStreamEnd']=_0x2b1468,this['oVideoDecoder']['SetStreamEnd'](),0x1;}},{'key':'SetAntialias','value':function(_0x2f3f14){return null!=this['oVideoRender']?this['oVideoRender']['SetAntialias'](_0x2f3f14):0x0;}},{'key':'SetFrameInfoCallBack','value':function(_0x491d9f,_0x1af5a6){return _0x1af5a6?(this['needSaveFrameInfo']=!0x0,this['displayFrameInfoCB']=_0x491d9f):(this['needSaveFrameInfo']=!0x1,this['displayFrameInfoCB']=null),0x1;}},{'key':'FEC_SetCanvasID','value':function(_0x367def){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetCanvasID'](_0x367def):(this['FECCanvasID']=_0x367def,0x0);}},{'key':'FEC_ResetCorrectType','value':function(_0x1c6e4a,_0x1c7f8f,_0x20e2dc){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_ResetCorrectType'](_0x1c6e4a,_0x1c7f8f,_0x20e2dc):0x0;}},{'key':'FEC_GetPort','value':function(_0x598ae7,_0x3b509d){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),-0x1):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetPort'](_0x598ae7,_0x3b509d):-0x1;}},{'key':'FEC_Enable','value':function(_0x3eeb93){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_Enable'](_0x3eeb93):0x0;}},{'key':'FEC_SetParam','value':function(_0x4471e9,_0x53c6f0){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetParam'](_0x4471e9,_0x53c6f0):0x0;}},{'key':'FEC_GetParam','value':function(_0x4bb46b,_0x4e043d){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetParam'](_0x4bb46b,_0x4e043d):0x0;}},{'key':'FEC_SetViewParam','value':function(_0x3e4ab1,_0x4ec360,_0x110cba){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetViewParam'](_0x3e4ab1,_0x4ec360,_0x110cba):0x0;}},{'key':'FEC_GetViewParam','value':function(_0x305d1e,_0x46865a,_0x42e4c3){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetViewParam'](_0x305d1e,_0x46865a,_0x42e4c3):0x0;}},{'key':'FEC_SetWnd','value':function(_0x3a69ae,_0x59558f){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetWnd'](_0x3a69ae,_0x59558f):0x0;}},{'key':'FEC_Disable','value':function(_0x6a9a26,_0x2c3a5d,_0x43cd9b){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_Disable'](_0x6a9a26,_0x2c3a5d,_0x43cd9b):0x0;}},{'key':'FEC_DelPort','value':function(_0x8d4e2){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_DelPort'](_0x8d4e2):0x0;}},{'key':'FEC_SetDisplayRegion','value':function(_0x3eb3f7,_0x1c05a4,_0x4c2909,_0x4ba815,_0x56df49,_0x36cdda,_0x27491f){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetDisplayRegion'](_0x3eb3f7,_0x1c05a4,_0x4c2909,_0x4ba815,_0x56df49,_0x36cdda,_0x27491f):0x0;}},{'key':'FEC_SetBackCilling','value':function(_0x4ebb87,_0x4252bb){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetBackCilling'](_0x4ebb87,_0x4252bb):0x0;}},{'key':'FEC_GetPTZPort','value':function(_0x494eef,_0x4f47c2,_0x3df6a7){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),-0x1):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetPTZPort'](_0x494eef,_0x4f47c2,_0x3df6a7):-0x1;}},{'key':'FEC_SetPTZDisplayMode','value':function(_0x429696){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetPTZDisplayMode'](_0x429696):0x0;}},{'key':'FEC_Capture','value':function(_0x27737a,_0xd598e7){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC_Capture','color:red'),0x0):this['oVideoRender']['FEC_Capture'](_0x27737a,_0xd598e7);}},{'key':'InputPrivateInfo','value':function(_0x18eba1,_0x1c4582,_0x39dfea){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20PrivateInfo','color:red'),0x0):((null!=_0x18eba1&&_0x18eba1['linesNum']>0x0||null!=_0x1c4582&&_0x1c4582['nFontsNum']>0x0)&&0x0==this['firstFrame']&&(this['LatcyTime']=0x64),this['curPrivateInfo']['linesInfo']['push'](_0x18eba1),this['curPrivateInfo']['fontInfo']['push'](_0x1c4582),this['curPrivateInfo']['imageInfo']['push'](_0x39dfea),0x1);}},{'key':'deepClone','value':function(_0x5ae503){if(null===_0x5ae503||'object'!==_0x3521ed(_0x5ae503))return _0x5ae503;if(Array['isArray'](_0x5ae503)){for(var _0x162e8c=[],_0x3443d4=0x0;_0x3443d4<_0x5ae503['length'];_0x3443d4++)_0x162e8c[_0x3443d4]=this['deepClone'](_0x5ae503[_0x3443d4]);return _0x162e8c;}if(ArrayBuffer['isView'](_0x5ae503)){var _0x443790=new Uint8Array(_0x5ae503['length']);return _0x443790['set'](_0x5ae503),_0x443790;}var _0x3a0f6e={};for(var _0x4095f5 in _0x5ae503)_0x5ae503['hasOwnProperty'](_0x4095f5)&&(_0x3a0f6e[_0x4095f5]=this['deepClone'](_0x5ae503[_0x4095f5]));return _0x3a0f6e;}},{'key':'RenderPrivateData','value':function(_0x4907fd,_0xaadae1){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['RenderPrivateData'](_0x4907fd,_0xaadae1):0x0;}},{'key':'RenderPrivateDataEx','value':function(_0x244735,_0x1760a6,_0x3881bc){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['RenderPrivateDataEx'](_0x244735,_0x1760a6,_0x3881bc):0x0;}},{'key':'SetWaterMarkFont','value':function(_0x1296a1){return'2d'===this['renderEngine']||'2D'===this['renderEngine']||null==this['oVideoRender']?(console['log']('%c\\x20param\\x20error\\x20this.renderEngine:%d,this.oVideoRender:%d','color:red',this['renderEngine'],this['oVideoRender']),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetWaterMarkFont'](_0x1296a1):0x0;}},{'key':'SetWaterMarkImage','value':function(_0x8bf7f2){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetWaterMarkImage','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetWaterMarkImage'](_0x8bf7f2):0x0;}},{'key':'SetMosaicType','value':function(_0x66e072){return'2d'===this['renderEngine']||'2D'===this['renderEngine']||null==this['oVideoRender']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetMosaicType','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetMosaicType'](_0x66e072):0x0;}},{'key':'SelectIntelInfoFeatureToDraw','value':function(_0x16c21b){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SelectIntelInfoFeatureToDraw','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SelectIntelInfoFeatureToDraw'](_0x16c21b):0x0;}},{'key':'SetD3DPostProcess','value':function(_0x41f8c7,_0xae3344){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetD3DPostProcess','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetD3DPostProcess'](_0x41f8c7,_0xae3344):0x0;}},{'key':'SetTextCanvas','value':function(_0x32c648){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetD3DPostProcess','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetTextCanvas'](_0x32c648):0x0;}},{'key':'SetPrintLogFlag','value':function(_0x12c556){return this['printfFlag']=_0x12c556,null!=this['oVideoDecoder']&&this['oVideoDecoder']['SetPrintLogFlag'](_0x12c556),null!=this['oVideoRender']&&this['oVideoRender']['SetPrintLogFlag'](_0x12c556),0x1;}},{'key':'SetRotateAngle','value':function(_0x305896){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetRotateAngle','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetRotateAngle'](_0x305896):0x0;}},{'key':'InitEncoder','value':function(_0x4c65d6,_0x2e1306){return _0x4c65d6['encodeWidth']>0x0||_0x4c65d6['encodeHeight']>0x0?(this['encodeVideoInfo']['encodeWidth']=_0x4c65d6['encodeWidth'],this['encodeVideoInfo']['encodeHeight']=_0x4c65d6['encodeHeight']):null!=this['curFrameInfo']['width']&&this['curFrameInfo']['width']>0x0&&this['curFrameInfo']['width']<=0x578&&null!=this['curFrameInfo']['height']&&this['curFrameInfo']['height']>0x0&&this['curFrameInfo']['height']<=0x320?(this['encodeVideoInfo']['encodeWidth']=this['curFrameInfo']['width'],this['encodeVideoInfo']['encodeHeight']=this['curFrameInfo']['height']):(this['encodeVideoInfo']['encodeWidth']=0x500,this['encodeVideoInfo']['encodeHeight']=0x2d0),_0x4c65d6['bitrate']>0x0?this['encodeVideoInfo']['bitrate']=_0x4c65d6['bitrate']:this['encodeVideoInfo']['encodeWidth']>0x62c?this['encodeVideoInfo']['bitrate']=0x3d0900:this['encodeVideoInfo']['encodeWidth']>0x320?this['encodeVideoInfo']['bitrate']=0x1e8480:this['encodeVideoInfo']['bitrate']=0xf4240,_0x4c65d6['frameRate']>0x0?this['encodeVideoInfo']['frameRate']=_0x4c65d6['frameRate']:'frameRate'in this['curFrameInfo']&&(this['encodeVideoInfo']['frameRate']=this['curFrameInfo']['frameRate']),_0x4c65d6['bitrateMode']>0x0?this['encodeVideoInfo']['bitrateMode']=_0x4c65d6['bitrateMode']:this['encodeVideoInfo']['bitrateMode']=0x0,_0x4c65d6['latencyMode']>0x0?this['encodeVideoInfo']['latencyMode']=_0x4c65d6['latencyMode']:this['encodeVideoInfo']['latencyMode']=0x0,0x0==_0x4c65d6['encodeType']&&(this['encodeVideoInfo']['encodeVideoType']='avc'),this['recoderBaseTimestampMode']=_0x4c65d6['baseTimeStampMode'],this['recoderGetOriginData']=_0x4c65d6['getOriginData'],null==this['oVideoEncoder']&&(this['oVideoEncoder']=new _0x218390(this,this['player'])),_0x2e1306['sampleRate']>0x0?this['encodeAudioInfo']['sampleRate']=_0x2e1306['sampleRate']:this['encodeAudioInfo']['sampleRate']=0xbb80,_0x2e1306['numberOfChannels']>0x0?this['encodeAudioInfo']['numberOfChannels']=_0x2e1306['numberOfChannels']:this['encodeAudioInfo']['numberOfChannels']=0x1,_0x2e1306['bitrate']>0x0?this['encodeAudioInfo']['bitrate']=_0x2e1306['bitrate']:this['encodeAudioInfo']['bitrate']=0x1f400,0x0==_0x2e1306['encodeType']&&(this['encodeAudioInfo']['encodeAudioType']='aac'),null==this['oAudioEncoder']&&(this['oAudioEncoder']=new _0x566a63(this,this['player'])),0x1;}},{'key':'StartVideoEncode','value':function(_0x393a91){return null!=this['oVideoEncoder']&&(this['oVideoEncoder']['initEncoder']('avc1.4d4032',this['encodeVideoInfo'],_0x393a91),this['startRecoderFlag']=!0x0,this['stopRecoderFlag']=!0x1),0x1;}},{'key':'StartAudioEncode','value':function(_0x10934c){return null!=this['oAudioEncoder']&&this['oAudioEncoder']['initEncoder']('mp4a.40.2',this['encodeAudioInfo'],_0x10934c),0x1;}},{'key':'InputPCMToEncode','value':function(_0x1d2527,_0x1f32d1){if(null!=this['oAudioEncoder']&&0x0==this['stopRecoderFlag']){var _0x1c69c6={'format':'s16','sampleRate':this['encodeAudioInfo']['sampleRate'],'numberOfFrames':_0x1d2527['length']/0x2,'numberOfChannels':0x1,'timestamp':_0x1f32d1,'data':_0x1d2527},_0x79f394=new AudioData(_0x1c69c6);this['oAudioEncoder']['inputData'](_0x79f394),_0x79f394['close']();}return 0x1;}},{'key':'StopEncode','value':function(){return this['startRecoderFlag']=!0x1,this['stopRecoderFlag']=!0x0,this['recoderFrameNum']=0x0,null!=this['oAudioEncoder']&&(this['oAudioEncoder']['stopEncode'](),this['oAudioEncoder']=null),null!=this['oVideoEncoder']&&(this['oVideoEncoder']['stopEncode'](),this['oVideoEncoder']=null),this['recoderBaseTimestampMode']=0x0,this['recoderGetOriginData']=0x0,0x1;}},{'key':'SetRunTimeInfoCallBack','value':function(_0xd49366,_0x2bc63f){return this['runtimeCBFun']=_0x2bc63f,null!=this['oVideoDecoder']&&this['oVideoDecoder']['SetRunTimeInfoCallBackFun'](_0xd49366,_0x2bc63f),0x1;}},{'key':'SetRunTimeInfoCallbackType','value':function(_0x33bf1e,_0x270548,_0xe28b20){return 0x2==_0x33bf1e?_0xe28b20?this['DecodeTypeFlagMap']['set'](_0x270548,0x1):this['DecodeTypeFlagMap']['delete'](_0x270548):0x3==_0x33bf1e&&(_0xe28b20?this['RenderTypeFlagMap']['set'](_0x270548,0x1):this['RenderTypeFlagMap']['delete'](_0x270548)),null!=this['oVideoDecoder']&&0x2==_0x33bf1e&&this['oVideoDecoder']['SetRunTimeInfoCallbackType'](_0x33bf1e,_0x270548,_0xe28b20),0x1;}},{'key':'IsVisible','value':function(_0x4df508){return null!=this['oVideoDecoder']&&this['oVideoDecoder']['IsVisible'](_0x4df508),0x1;}},{'key':'SetPanoramaDisplayEffect','value':function(_0x328ec9){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetPanoramaDisplayEffect','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetPanoramaDisplayEffect'](_0x328ec9):0x0;}},{'key':'SetPanoramaSphereViewParam','value':function(_0x2a1f4b,_0x22eaa0){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20SetPanoramaSphereViewParam','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetPanoramaSphereViewParam'](_0x2a1f4b,_0x22eaa0):0x0;}},{'key':'GetPanoramaSphereViewParam','value':function(_0x262758,_0x461dde){return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20GetPanoramaSphereViewParam','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['GetPanoramaSphereViewParam'](_0x262758,_0x461dde):0x0;}},{'key':'ResetBuffer','value':function(){return this['resetTimer']=!0x0,this['oVideoDecoder']['clearDecoderObjBuffer'](),0x1;}}]),_0x14d12f;}());!function(_0x3b85a5){let _0x4161e8=new _0x2b52fd(),_0x31f1cc=0x0;self['onmessage']=function(_0x466db3){let _0x3d1df3=_0x466db3['data'];switch(_0x3d1df3['command']){case'init':_0x31f1cc=_0x3d1df3['printfLog'],_0x4161e8['init'](_0x3d1df3['canvas'],_0x3d1df3['streamOpenMode'],_0x3d1df3['sab'],_0x3d1df3['renderEngine'],_0x3d1df3['printfLog']);break;case'inputData':let _0xc03708=new Uint8Array(_0x3d1df3['rawData']),_0x55fdf1=_0x3d1df3['rawDataFrameInfo'];_0x4161e8['inputData'](_0xc03708,_0x55fdf1),_0xc03708=null;break;case'SetDisplayRegion':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),_0x4161e8['SetDisplayRegion'](_0x3d1df3['sx'],_0x3d1df3['sy'],_0x3d1df3['sw'],_0x3d1df3['sh']);break;case'stop':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),_0x4161e8['SetCurStatus'](0x4);let _0x5f29fb=setInterval(()=>{_0x4161e8['displayRunning']||(_0x4161e8=null,self['postMessage']({'function':'stop'}),clearInterval(_0x5f29fb),_0x5f29fb=null,self['close'](),_0x31f1cc>=0x0&&console['log']('>>>JS\\x2003\\x20destroy\\x20oVideoPlayCtrl\\x20and\\x20worker'));},0x2);break;case'fast':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['fast']()&&self['postMessage']({'function':'paraError'});break;case'slow':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['slow']()&&self['postMessage']({'function':'paraError'});break;case'SetDisplayBuf':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['SetDisplayBuf'](_0x3d1df3['value'])&&self['postMessage']({'function':'paraError'});break;case'Pause':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['Pause'](_0x3d1df3['value'])&&self['postMessage']({'function':'paraError'});break;case'OneByOne':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['OneByOne'](_0x3d1df3['value'])&&self['postMessage']({'function':'paraError'});break;case'NotifyBackPlay':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['NotifyBackPlay'](_0x3d1df3['flag'])&&self['postMessage']({'function':'paraError'});break;case'SetPlayOrBackSwitchMode':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['SetPlayOrBackSwitchMode'](_0x3d1df3['PlayOrBackMode'])&&self['postMessage']({'function':'paraError'});break;case'SetStretchPlay':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['SetStretchPlay'](_0x3d1df3['Stretchtime'],_0x3d1df3['Stretchspeed'])&&self['postMessage']({'function':'paraError'});break;case'SetCanvasSize':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['SetCanvasSize'](_0x3d1df3['width'],_0x3d1df3['height'],_0x3d1df3['FECSubPort'])&&self['postMessage']({'function':'paraError'});break;case'GetCanvasSize':null===_0x4161e8&&self['postMessage']({'function':'OrderError'}),0x1!==_0x4161e8['GetCanvasSize']()&&self['postMessage']({'function':'paraError'});break;case'GetPlayedTime':null===_0x4161e8&&self['postMessage']({'function':'OrderError'});let _0x4f72ed=_0x4161e8['GetPlayedTime']();0x0!==_0x4f72ed&&self['postMessage']({'function':'GetPlayedTime','value':_0x4f72ed});break;case'needReset':_0x4161e8['SetCurStatus'](0x0,_0x3d1df3['bTrue']);break;case'GetJPEG':_0x4161e8['GetJPEG']();break;case'GetBMP':_0x4161e8['GetBMP']();break;case'GetCropJPEG':_0x4161e8['GetCropJPEG']();break;case'GetCropBMP':_0x4161e8['GetCropBMP']();break;case'SetDecodeFrameType':_0x4161e8['SetDecodeFrameType'](_0x3d1df3['timestamp']);break;case'SetStreamEnd':_0x4161e8['SetStreamEnd'](_0x3d1df3['bTrue']);break;case'SetAntialias':_0x4161e8['SetAntialias'](_0x3d1df3['value']);break;case'SetFrameInfoCallBack':_0x4161e8['SetFrameInfoCallBack'](_0x55c61e=>{self['postMessage']({'function':'SetFrameInfoCallBack','curFrameInfo':_0x55c61e});},_0x3d1df3['value']);break;case'SetTargetRelativePos':_0x4161e8['SetTargetRelativePos'](_0x3d1df3['nRelativePos'],_0x3d1df3['nPosType'],_0x3d1df3['nPlayMode']);break;case'ResetBuffer':_0x4161e8['ResetBuffer']();break;case'FEC_SetCanvasID':_0x4161e8['FEC_SetCanvasID'](_0x3d1df3['canvasID']);break;case'FECResetCorrectType':_0x4161e8['FEC_ResetCorrectType'](_0x3d1df3['fishSubPort'],_0x3d1df3['placeType'],_0x3d1df3['correctType']);break;case'FECGetPort':let _0x5bc2dd=_0x4161e8['FEC_GetPort'](_0x3d1df3['placeType'],_0x3d1df3['correctType']);(_0x5bc2dd<0x1||_0x5bc2dd>0x1f||null==_0x5bc2dd)&&(_0x5bc2dd=-0x1),self['postMessage']({'function':'FECGetPort','fishSubPort':_0x5bc2dd});break;case'FECEnable':_0x4161e8['FEC_Enable'](_0x3d1df3['fishSubPort']);break;case'FECSetParam':_0x4161e8['FEC_SetParam'](_0x3d1df3['fishSubPort'],_0x3d1df3['param2d']);break;case'FECGetParam':let _0xc4fb5b={};_0x4161e8['FEC_GetParam'](_0x3d1df3['fishSubPort'],_0xc4fb5b),self['postMessage']({'function':'FECGetParam','param2d':_0xc4fb5b});break;case'FECSetViewParam':_0x4161e8['FEC_SetViewParam'](_0x3d1df3['fishSubPort'],_0x3d1df3['upDateType'],_0x3d1df3['fValue']);break;case'FECGetViewParam':let _0x40771f={};_0x4161e8['FEC_GetViewParam'](_0x3d1df3['fishSubPort'],_0x3d1df3['upDateType'],_0x40771f),self['postMessage']({'function':'FECGetViewParam','Param3D':_0x40771f});break;case'FECSetWnd':_0x4161e8['FEC_SetWnd'](_0x3d1df3['fishSubPort'],_0x3d1df3['offscrrenCnv']);break;case'FECDisable':_0x4161e8['FEC_Disable'](_0x3d1df3['fishSubPort'],_0x3d1df3['clearFECCanvas'],_0x3d1df3['clearContext']);break;case'FECDelPort':_0x4161e8['FEC_DelPort'](_0x3d1df3['fishSubPort']);break;case'FECSetDisplayRegion':_0x4161e8['FEC_SetDisplayRegion'](_0x3d1df3['fishSubPort'],_0x3d1df3['type'],_0x3d1df3['regionNum'],_0x3d1df3['sx'],_0x3d1df3['sy'],_0x3d1df3['sw'],_0x3d1df3['sh']);break;case'FECSetBackCilling':_0x4161e8['FEC_SetBackCilling'](_0x3d1df3['fishSubPort'],_0x3d1df3['bValue']);break;case'FECGetPTZPort':let _0x4d417b=_0x4161e8['FEC_GetPTZPort'](_0x3d1df3['subport'],_0x3d1df3['fPositionX'],_0x3d1df3['fPositionY']);(_0x4d417b<0x1||_0x4d417b>0x1f||null==_0x4d417b)&&(_0x4d417b=-0x1,console['info']('%c\\x20hardDecoderWorker\\x20FECGetPTZPort\\x20error\\x20','color:\\x20red')),self['postMessage']({'function':'FECGetPTZPort','fishSubPort':_0x4d417b});break;case'FECCapture':_0x4161e8['FEC_Capture'](_0x3d1df3['subport'],(_0x47e85d,_0x1dc162,_0x5d3914,_0x101191)=>{self['postMessage']({'function':'FECCapture','frameData':_0x47e85d['buffer'],'width':_0x1dc162,'height':_0x5d3914,'fishSubPort':_0x101191},[_0x47e85d['buffer']]);});break;case'FECSetPTZDisplayMode':_0x4161e8['FEC_SetPTZDisplayMode'](_0x3d1df3['ptzMode']);break;case'RenderPrivateData':_0x4161e8['RenderPrivateData'](_0x3d1df3['intelType'],_0x3d1df3['bTrue']);break;case'RenderPrivateDataEx':_0x4161e8['RenderPrivateDataEx'](_0x3d1df3['intelType'],_0x3d1df3['subType'],_0x3d1df3['bTrue']);break;case'InputPrivateInfo':_0x4161e8['InputPrivateInfo'](_0x3d1df3['linesInfo'],_0x3d1df3['fontInfo'],_0x3d1df3['ImageInfo']);break;case'GetCanvasCapture':_0x4161e8['GetCanvasCapture']((_0xc6727b,_0x4409e3,_0x1647f6)=>{self['postMessage']({'function':'GetCanvasCapture','frameData':_0xc6727b['buffer'],'width':_0x4409e3,'height':_0x1647f6},[_0xc6727b['buffer']]);},_0x3d1df3['capWidth'],_0x3d1df3['capHeight']);break;case'SetWaterMarkFont':_0x4161e8['SetWaterMarkFont'](_0x3d1df3['fontParam']);break;case'SetMosaicType':_0x4161e8['SetWaterMarkFont'](_0x3d1df3['MosaicParam']);break;case'SetWaterMarkImage':let _0x2b1d3f=new Uint8Array(_0x3d1df3['pImageData']),_0x324efa={};_0x324efa['pImageData']=_0x2b1d3f,_0x324efa['pImageType']=_0x3d1df3['pImageType'],_0x324efa['pstRectPos']=_0x3d1df3['pstRectPos'],_0x324efa['fAlpha']=_0x3d1df3['fAlpha'],_0x4161e8['SetWaterMarkImage'](_0x324efa),_0x2b1d3f=null;break;case'SelectIntelInfoFeatureToDraw':_0x4161e8['SelectIntelInfoFeatureToDraw'](_0x3d1df3['IntelInfoParam']);break;case'SetD3DPostProcess':_0x4161e8['SetD3DPostProcess'](_0x3d1df3['ProcessType'],_0x3d1df3['ProcessValue']);break;case'SetTextCanvas':_0x4161e8['SetTextCanvas'](_0x3d1df3['textoffscreenCanvas']);break;case'SetPrintLogFlag':_0x4161e8['SetPrintLogFlag'](_0x3d1df3['printfFlag']);break;case'SetPanoramaDisplayEffect':_0x4161e8['SetPanoramaDisplayEffect'](_0x3d1df3['DisplayEffect']);break;case'SetPanoramaSphereViewParam':_0x4161e8['SetPanoramaSphereViewParam'](_0x3d1df3['ViewParamType'],_0x3d1df3['fValue']);break;case'GetPanoramaSphereViewParam':let _0x5626d7={};_0x4161e8['GetPanoramaSphereViewParam'](_0x3d1df3['ViewParamType'],_0x5626d7),self['postMessage']({'function':'GetPanoramaSphereViewParam','ParamVR':_0x5626d7});break;case'SetRotateAngle':_0x4161e8['SetRotateAngle'](_0x3d1df3['rotateValue']);break;case'InitEncoder':_0x4161e8['InitEncoder'](_0x3d1df3['videoInfo'],_0x3d1df3['audioInfo']);break;case'StartVideoEncode':_0x4161e8['StartVideoEncode'](null);break;case'StartAudioEncode':_0x4161e8['StartAudioEncode'](null);break;case'InputPCMToEncode':let _0x56e1d1=new Uint8Array(_0x3d1df3['PCMData']);_0x4161e8['InputPCMToEncode'](_0x56e1d1,_0x3d1df3['timeStamp']);break;case'StopEncode':_0x4161e8['StopEncode']();break;case'SetRunTimeInfoCallBack':_0x4161e8['SetRunTimeInfoCallBack'](_0x3d1df3['module'],_0x4ba5fb=>{self['postMessage']({'function':'runtimeInfo','pstRuntimeInfo':_0x4ba5fb});});break;case'SetRunTimeInfoCallbackType':_0x4161e8['SetRunTimeInfoCallbackType'](_0x3d1df3['module'],_0x3d1df3['type'],_0x3d1df3['flag']);break;case'IsVisible':_0x4161e8['IsVisible'](_0x3d1df3['visibility']);}};}();})());})());","Worker",void 0,void 0)},h=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r},f=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return c(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?c(e,t):void 0}}(e))||t){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,x=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){x=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(x)throw n}}}},c=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r},u=function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")},d=function(e,t,a){return t&&function(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e},p=function(){var e=new Te(16);return Te!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},m=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},S=function(e,t,a){var r=t[0],i=t[1],n=t[2],s=t[3],x=t[4],o=t[5],l=t[6],_=t[7],h=t[8],f=t[9],c=t[10],u=t[11],d=t[12],p=t[13],m=t[14],S=t[15],R=a[0],P=a[1],y=a[2],b=a[3];return e[0]=R*r+P*x+y*h+b*d,e[1]=R*i+P*o+y*f+b*p,e[2]=R*n+P*l+y*c+b*m,e[3]=R*s+P*_+y*u+b*S,R=a[4],P=a[5],y=a[6],b=a[7],e[4]=R*r+P*x+y*h+b*d,e[5]=R*i+P*o+y*f+b*p,e[6]=R*n+P*l+y*c+b*m,e[7]=R*s+P*_+y*u+b*S,R=a[8],P=a[9],y=a[10],b=a[11],e[8]=R*r+P*x+y*h+b*d,e[9]=R*i+P*o+y*f+b*p,e[10]=R*n+P*l+y*c+b*m,e[11]=R*s+P*_+y*u+b*S,R=a[12],P=a[13],y=a[14],b=a[15],e[12]=R*r+P*x+y*h+b*d,e[13]=R*i+P*o+y*f+b*p,e[14]=R*n+P*l+y*c+b*m,e[15]=R*s+P*_+y*u+b*S,e},R=function(e,t,a,r){var i,n,s,x,o,l,_,h,f,c,u,d,p,m,S,R,P,y,b,E,g,F,C,v,T=r[0],D=r[1],A=r[2],I=Math.hypot(T,D,A);return I<ve?null:(T*=I=1/I,D*=I,A*=I,i=Math.sin(a),s=1-(n=Math.cos(a)),x=t[0],o=t[1],l=t[2],_=t[3],h=t[4],f=t[5],c=t[6],u=t[7],d=t[8],p=t[9],m=t[10],S=t[11],R=T*T*s+n,P=D*T*s+A*i,y=A*T*s-D*i,b=T*D*s-A*i,E=D*D*s+n,g=A*D*s+T*i,F=T*A*s+D*i,C=D*A*s-T*i,v=A*A*s+n,e[0]=x*R+h*P+d*y,e[1]=o*R+f*P+p*y,e[2]=l*R+c*P+m*y,e[3]=_*R+u*P+S*y,e[4]=x*b+h*E+d*g,e[5]=o*b+f*E+p*g,e[6]=l*b+c*E+m*g,e[7]=_*b+u*E+S*g,e[8]=x*F+h*C+d*v,e[9]=o*F+f*C+p*v,e[10]=l*F+c*C+m*v,e[11]=_*F+u*C+S*v,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)},P=function(e,t,a,r){var i,n,s,x,o,l,_,h,f,c,u=t[0],d=t[1],p=t[2],S=r[0],R=r[1],P=r[2],y=a[0],b=a[1],E=a[2];return Math.abs(u-y)<ve&&Math.abs(d-b)<ve&&Math.abs(p-E)<ve?m(e):(_=u-y,h=d-b,f=p-E,i=R*(f*=c=1/Math.hypot(_,h,f))-P*(h*=c),n=P*(_*=c)-S*f,s=S*h-R*_,(c=Math.hypot(i,n,s))?(i*=c=1/c,n*=c,s*=c):(i=0,n=0,s=0),x=h*s-f*n,o=f*i-_*s,l=_*n-h*i,(c=Math.hypot(x,o,l))?(x*=c=1/c,o*=c,l*=c):(x=0,o=0,l=0),e[0]=i,e[1]=x,e[2]=_,e[3]=0,e[4]=n,e[5]=o,e[6]=h,e[7]=0,e[8]=s,e[9]=l,e[10]=f,e[11]=0,e[12]=-(i*u+n*d+s*p),e[13]=-(x*u+o*d+l*p),e[14]=-(_*u+h*d+f*p),e[15]=1,e)},y=function(){var e=new Te(3);return Te!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e},b=function(e,t,a){var r=new Te(3);return r[0]=e,r[1]=t,r[2]=a,r},E=function(){var e=new Te(4);return Te!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e},g=function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a},F=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?g(Object(a),!0).forEach((function(t){var r,i,n;r=e,i=t,n=a[t],i in r?Object.defineProperty(r,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[i]=n})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e},C=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return v(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?v(e,t):void 0}}(e))||t){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,x=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){x=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(x)throw n}}}},v=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r},T=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return D(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?D(e,t):void 0}}(e))||t){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,x=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){x=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(x)throw n}}}},D=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r},A=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return I(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?I(e,t):void 0}}(e))||t){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,x=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){x=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(x)throw n}}}},I=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r},M=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=function(e,t){if(e){if("string"==typeof e)return L(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?L(e,t):void 0}}(e))||t){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,x=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){x=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(x)throw n}}}},L=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r};a.r(x),a.d(x,{JSPlayCtrl:function(){return Ft}});var w=16,O=1281,B=1282,k=1285,N=1287,V=1288,U=1289,H=1298,W=1302,Y=256,G=512,X=768,J=1024,Z=1280,j=1536,z=1792,K=2048,q=2304,Q=2560,$=262144,ee=352321537,te=520093697,ae=528482304,re=16,ie=a(687),ne=a.n(ie),se=a(477),xe=a.n(se);function oe(e){return(oe="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)})(e)}var le=function(){function a(){e(this,a),this.startTime=0,this.curTime=0,this.timeWalk=0,this.preTimerStamp=0}return t(a,[{key:"Init",value:function(){this.startTime=this.GetCurTime()}},{key:"GetCurTime",value:function(){return this.curTime=24*(new Date).getDate()*60*60*1e3+60*(new Date).getHours()*60*1e3+60*(new Date).getMinutes()*1e3+1e3*(new Date).getSeconds()+(new Date).getMilliseconds(),this.curTime}},{key:"GetTimerWalk",value:function(){return this.timeWalk=this.GetCurTime()-this.startTime,this.timeWalk<0&&(this.timeWalk=0),this.timeWalk}},{key:"timerReset",value:function(){this.startTime=0,this.curTime=0,this.timeWalk=0,this.preTimerStamp=0}}]),a}(),_e=function(){function a(t,r,i,n){e(this,a),this.width=0,this.height=0,this.decoderObj=null,this.FirstFrame=!0,this.ready_frames=[],this.underflow=!0,this.sab=t,this.frameRate=30,this.needSetPreSoft=!1,this.decoderCurStatus=2,this.decoderOutSuccess=!1,this.decoderObjNeedReset=!1,this.oVideoRenderHandle=r,this.output=this.output.bind(this),this.reportError=this.reportError.bind(this),this.player=null,null!=i&&(this.player=i),this.curFrame=null,this.printfFlag=this.oVideoRenderHandle.printfFlag,this.nGetTotalFrameNum=0,this.nAverageDecodeTime=0,this.oDecodeTimer=null,this.runtimeInfoCBFun=null,this.pstRuntimeInfo={nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:0,nInputDataInterval:0,nFrameNumInterval:0,nAverageDecodeTime:0,nSystemFormat:0,nDetectRes:0,nMp4FileTime:0,nMp4TotalFrameNum:0,AbsTimeYear:0,AbsTimeMonth:0,AbsTimeDay:0,AbsTimeHour:0,AbsTimeMinute:0,AbsTimeSecond:0,AbsTimeMilliseconds:0},this.HardDecFrameCount=0,this.canvas=n,this.bSetStreamEnd=!1,this.bVisibility=!0,this.back_ready_frames=[],this.StartFrameTime=0,this.WaitForFrameFlag=0}return t(a,[{key:"initDecoder",value:function(){if(null==this.decoderObj)try{var e={output:this.output,error:this.reportError};this.decoderObj=new VideoDecoder(e)}catch(e){0==this.oVideoRenderHandle.firstFrame?this.decoderObjNeedReset=!0:(this.oVideoRenderHandle.HardDecodeError(),console.log("%cswitch hardVideoDecoder to softVideoDecoder","color: red"))}""!=this.canvas&&null!=this.canvas&&(this.underflow&&(this.underflow=!1,this.oVideoRenderHandle.RenderFrame().then((function(){}))),this.oVideoRenderHandle.displayRunning=!0),this.decoderCurStatus=2,this.FirstFrame=!0}},{key:"inputData",value:function(e,t){null!=this.decoderObj&&(this.printfFlag>0&&console.log("VideoDecoder.js inputData videoInfo.timeStamp:"+t.timeStamp+",decodeQueueSize:"+this.decoderObj.decodeQueueSize+",frameLength:"+this.ready_frames.length),("configured"==this.decoderObj.state||this.FirstFrame)&&this.decodeProcess(e,t),(this.ready_frames.length>100||this.decoderObj.decodeQueueSize>100)&&(this.player?this.player.JSPlayM4_GetDecodeBufferSize(this.decoderObj.decodeQueueSize,this.ready_frames.length):postMessage({function:"GetDecodeBufferSize",rawSize:this.decoderObj.decodeQueueSize,frameSize:this.ready_frames.length})),t.nStreamEnd&&this.SetStreamEnd())}},{key:"concatenate",value:function(e){for(var t=0,a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];for(var n=0,s=r;n<s.length;n++){t+=s[n].length}for(var x=new e(t),o=0,l=0,_=r;l<_.length;l++){var h=_[l];x.set(h,o),o+=h.length}return x}},{key:"processData",value:function(e){for(var t=null,a=null,r=null,i=!1,n=!1,s=0,x=0;x<e.length-4;x++){if(0!=e[x]||0!=e[x+1]||0!=e[x+2]||1!=e[x+3]||103!=e[x+4]&&39!=e[x+4]||(0!=x?(n=!0,t=e.slice(x),s=x):t=e),0==e[x]&&0==e[x+1]&&0==e[x+2]&&1==e[x+3]&&(9==e[x+4]||6==e[x+4])){if(null==t)continue;null==a&&(a=e.slice(s,x),i=!0)}if(0==e[x]&&0==e[x+1]&&0==e[x+2]&&1==e[x+3]&&(101==e[x+4]||37==e[x+4])){i&&(r=e.slice(x));break}}return i?this.concatenate(Uint8Array,a,r):n?t:e}},{key:"processData1",value:function(e){return 0!=e[0]||0!=e[1]||0!=e[2]||1!=e[3]||9!=e[4]&&6!=e[4]?e:e.slice(5)}},{key:"formatVideoDecoderConfigure",value:function(e,t,a,r){var i="";5==t?(i="hvc1.1.6.L123.00",this.printfFlag>=0&&console.log("265 hard decoder")):256==t?(i="avc1.42001f",this.printfFlag>=0&&console.log("264 hard decoder")):console.log("Support Error: hard decoder only support 264 and 265 !!!");var n={codec:i,hardwareAcceleration:"prefer-hardware",optimizeForLatency:1};return 5!=t&&this.needSetPreSoft&&(n.hardwareAcceleration="prefer-software"),n}},{key:"decodeProcess",value:function(e,t){this.frameRate!=t.frameRate&&(this.frameRate=t.frameRate),this.width!=t.width&&(this.width=t.width),this.height!=t.height&&(this.height=t.height),t.needSetPreSoft&&(this.needSetPreSoft=t.needSetPreSoft);var a=e;if(4!=this.decoderCurStatus&&null!=this.decoderObj)if(this.printfFlag>0&&console.log("VideoDecoder.js Decoder this.decoderObj.state:"+this.decoderObj.state),"configured"==this.decoderObj.state){var r=new EncodedVideoChunk({data:a,timestamp:t.timeStamp,type:t.isKeyFrame?"key":"delta"});try{this.decoderObj.decode(r)}catch(e){0==this.oVideoRenderHandle.firstFrame?this.decoderObjNeedReset=!0:(this.oVideoRenderHandle.HardDecodeError(),console.log("%cswitch hardVideoDecoder to softVideoDecoder","color: red"))}a=null,e=null,r=null,t.frameType}else if(t.isKeyFrame&&"unconfigured"==this.decoderObj.state){var i=this.formatVideoDecoderConfigure(e,t.codecType,t.width,t.height);if(""==i.codec)return-1;if(null!==this.decoderObj){try{this.decoderObj.configure(i)}catch(e){0==this.oVideoRenderHandle.firstFrame?this.decoderObjNeedReset=!0:(this.oVideoRenderHandle.HardDecodeError(),console.log("%cswitch hardVideoDecoder to softVideoDecoder","color: red"))}a=this.processData(e),this.FirstFrame=!1;var n=new EncodedVideoChunk({data:a,timestamp:t.timeStamp,type:t.isKeyFrame?"key":"delta"});try{this.decoderObj.decode(n)}catch(e){0==this.oVideoRenderHandle.firstFrame?this.decoderObjNeedReset=!0:(this.oVideoRenderHandle.HardDecodeError(),console.log("%cswitch hardVideoDecoder to softVideoDecoder","color: red"))}i=null,a=null,e=null}}}},{key:"checkY",value:function(e,t,a){Uint8Array.prototype.compare=function(e,t,a){for(var r=0;r<a;r++)if(this[e+r]!==this[t+r])return-1;return 0};for(var r=0,i=new Uint8Array(e),n=(a-8)*t,s=0;s<8;s++)for(var x=n+s*t,o=0;o<t-16;o+=24){var l=i.compare(x+o,x+o+8,8),_=i.compare(x+o+8,x+o+16,8);0===l&&0===_&&(i[x+o]>122&&i[x+o]<=128||0===i[x+o])&&r++}return!(r>100)}},{key:"output",value:function(e){var t,a=this;if(this.printfFlag>0&&console.log("VideoDecoder.js output timestamp:"+e.timestamp+",decodeQueueSize:"+this.decoderObj.decodeQueueSize+",length:"+this.ready_frames.length),null!==this.decoderObj)if("configured"==this.decoderObj.state&&this.bVisibility){var r=e.timestamp;if(this.oVideoRenderHandle.VideoPrivateInfoMap.size>0){var i=this.oVideoRenderHandle.VideoPrivateInfoMap.get(r);if(null!=i){for(;i.linesInfo.length>0||i.fontInfo.length>0||i.imageInfo.length>0;)this.oVideoRenderHandle.oVideoRender.InputPrivateInfo(i.linesInfo.shift(),i.fontInfo.shift(),i.imageInfo.shift());this.oVideoRenderHandle.VideoPrivateInfoMap.delete(r)}}if(this.printfFlag>0&&console.log("output1 cb decodeQueueSize:"+this.decoderObj.decodeQueueSize+",length:"+this.ready_frames.length+",timestamp:"+r+",systime:"+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),this.oVideoRenderHandle.DecodeTypeFlagMap.size>0){var n,s=f(this.oVideoRenderHandle.DecodeTypeFlagMap.keys());try{for(s.s();!(n=s.n()).done;){var x=n.value;if(x==ee&&1==this.oVideoRenderHandle.DecodeTypeFlagMap.get(x)&&null!=this.runtimeInfoCBFun&&null!=this.oDecodeTimer){var o=this.oDecodeTimer.GetTimerWalk();o<=0||o>1e7||this.nGetTotalFrameNum>1e5?(this.nGetTotalFrameNum=0,this.oDecodeTimer.Init()):(this.nGetTotalFrameNum++,this.nAverageDecodeTime=o/this.nGetTotalFrameNum,null!=this.runtimeInfoCBFun&&(this.pstRuntimeInfo.nRunTimeModule=2,this.pstRuntimeInfo.nStrVersion=1,this.pstRuntimeInfo.nFrameTimeStamp=r,this.pstRuntimeInfo.nFrameNum=0,this.pstRuntimeInfo.nErrorCode=ee,this.pstRuntimeInfo.nInputDataInterval=0,this.pstRuntimeInfo.nFrameNumInterval=0,this.pstRuntimeInfo.nAverageDecodeTime=this.nAverageDecodeTime,this.runtimeInfoCBFun(this.pstRuntimeInfo)))}}}catch(e){s.e(e)}finally{s.f()}}if(null!=this.player&&null!=this.player.HardDecToJpegCBFun){++this.HardDecFrameCount;var l=e.displayWidth,_=e.displayHeight;(this.HardDecFrameCount-1)%this.player.HardDecToJpegInterval==0&&createImageBitmap(e).then((function(t){a.player?a.player._GetImage(t,"jpeg",0,0,l,_,a.HardDecFrameCount):postMessage({function:"bitmap",value:t,type:"jpeg",sx:0,sy:0,sw:e.displayWidth,sh:e.displayHeight,framenum:a.HardDecFrameCount})}))}if(""!=this.canvas&&null!=this.canvas){if(this.printfFlag>0&&console.log("VideoDecoder.js WaitForFrameFlag:"+this.WaitForFrameFlag+",frame.timestamp:"+e.timestamp+",StartFrameTime:"+this.StartFrameTime),2==this.WaitForFrameFlag&&e.timestamp>this.StartFrameTime&&0!=this.StartFrameTime)return e.close(),1;if(1==this.WaitForFrameFlag&&e.timestamp<this.StartFrameTime&&0!=this.StartFrameTime)return e.close(),1;var c;if(6==this.decoderCurStatus)if(this.back_ready_frames.length>200)e.close();else this.oVideoRenderHandle.findFramebyTime(e.timestamp,0).isKeyFrame?(this.back_ready_frames.reverse(),(c=this.ready_frames).push.apply(c,function(e){if(Array.isArray(e))return h(e)}(t=this.back_ready_frames)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?h(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.back_ready_frames.splice(0,this.back_ready_frames.length),createImageBitmap(e).then((function(t){a.back_ready_frames.push({image:t,timestamp:e.timestamp,displayWidth:e.displayWidth,displayHeight:e.displayHeight}),e.close()}))):(createImageBitmap(e).then((function(t){a.back_ready_frames.push({image:t,timestamp:e.timestamp,displayWidth:e.displayWidth,displayHeight:e.displayHeight}),e.close()})),this.decoderOutSuccess||(this.decoderOutSuccess=!0),this.decoderObj.decodeQueueSize<=1&&this.back_ready_frames.length<=1&&(this.player?this.player.JSPlayM4_GetRawData():postMessage({function:"GetRawData"})));else this.ready_frames.length>100?e.close():(this.ready_frames.push(e),this.decoderOutSuccess||(this.decoderOutSuccess=!0),this.decoderObj.decodeQueueSize<=1&&this.ready_frames.length<=1&&(this.player?this.player.JSPlayM4_GetRawData():postMessage({function:"GetRawData"})))}else if(e.close(),null!=this.player&&null!=this.player.runtimeCBFun&&1==this.GetStreamEnd()&&1==this.bSetStreamEnd){this.player.runtimeCBFun({nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:9}),this.bSetStreamEnd=!1}}else e.close()}},{key:"output2",value:function(e){var t=this;e.timestamp,createImageBitmap(e).then((function(a){e.close(),t.ready_frames.push(a)}))}},{key:"reportError",value:function(e){if(this.oVideoRenderHandle.DecodeTypeFlagMap.size>0){var t,a=f(this.oVideoRenderHandle.DecodeTypeFlagMap.keys());try{for(a.s();!(t=a.n()).done;){var r=t.value;128==r&&1==this.oVideoRenderHandle.DecodeTypeFlagMap.get(r)&&null!=this.runtimeInfoCBFun&&(this.pstRuntimeInfo.nRunTimeModule=2,this.pstRuntimeInfo.nStrVersion=1,this.pstRuntimeInfo.nFrameTimeStamp=timestamp,this.pstRuntimeInfo.nFrameNum=0,this.pstRuntimeInfo.nErrorCode=128,this.runtimeInfoCBFun(this.pstRuntimeInfo))}}catch(e){a.e(e)}finally{a.f()}}console.log("hardDecode reportError:"+e.message+",state:"+this.decoderObj.state+",frameRate:"+this.frameRate+"this.ready_frames.length:"+this.ready_frames.length),0==this.oVideoRenderHandle.firstFrame?this.decoderObjNeedReset=!0:(this.oVideoRenderHandle.HardDecodeError(),console.log("%cswitch hardVideoDecoder to softVideoDecoder","color: red"))}},{key:"destroyDecoder",value:function(){var e=this;return new Promise((function(t,a){e.clearDecoderObjBuffer(),null!=e.decoderObj&&("closed"!=e.decoderObj.state&&e.decoderObj.close(),e.printfFlag>=0&&console.log(">>>JS 01 destroy decoderObj"),e.decoderObj=null),e.decoderCurStatus=4,e.decoderOutSuccess=!1,e.FirstFrame=!0,e.needSetPreSoft=!1,e.decoderObjNeedReset=!1,e.curFrame=null,null!==e.oDecodeTimer&&(e.oDecodeTimer.timerReset(),e.oDecodeTimer=null),t()}))}},{key:"resetDecoder",value:function(){var e=this;return new Promise((function(t,a){e.destroyDecoder().then((function(){e.initDecoder(),console.log("%c reset hard decoder","color:red"),t()}),(function(){a()}))}))}},{key:"clearDecoderObjBuffer",value:function(){if(6==this.decoderCurStatus){for(var e=this.ready_frames.length,t=0;t<e;t++){var a=this.ready_frames.shift();null!=a.image&&null!=a.image&&a.image.close()}this.ready_frames.splice(0,this.ready_frames.length);for(var r=this.back_ready_frames.length,i=0;i<r;i++){var n=this.back_ready_frames.shift();null!=n.image&&null!=n.image&&n.image.close()}this.back_ready_frames.splice(0,this.back_ready_frames.length)}else{for(var s=this.ready_frames.length,x=0;x<s;x++)this.ready_frames.shift().close();this.ready_frames.splice(0,this.ready_frames.length)}this.resetDecoderObj()}},{key:"resetDecoderObj",value:function(){null!=this.decoderObj&&"configured"==this.decoderObj.state&&(this.decoderObj.reset(),this.FirstFrame=!0)}},{key:"SetStreamEnd",value:function(){return null!=this.decoderObj&&0==this.decoderObj.decodeQueueSize&&0==this.ready_frames.length&&(this.decoderObj.flush(),console.log("flush")),this.bSetStreamEnd=!0,1}},{key:"GetStreamEnd",value:function(){return null!=this.decoderObj&&(0==this.decoderObj.decodeQueueSize&&0==this.ready_frames.length||void 0)}},{key:"NotifyBackPlay",value:function(e,t,a){var r=this;return 0!=t?this.resetDecoder().then((function(){r.decoderCurStatus=e?6:2,r.StartFrameTime=t,r.WaitForFrameFlag=a})):(this.decoderCurStatus=e?6:2,this.StartFrameTime=t,this.WaitForFrameFlag=a),1}},{key:"GetFrame",value:function(){var e=this;return new Promise((function(t,a){if(null!=e.curFrame){var r=e.ready_frames.shift();6==e.decoderCurStatus?null!=r.image&&null!=r.image&&r.image.close():r.close(),r=null,e.curFrame=null}0!=e.ready_frames.length?(e.curFrame=e.ready_frames[0],t(e.curFrame)):(e.curFrame=null,t(null))}))}},{key:"GetFrameBufferLength",value:function(){return this.ready_frames.length}},{key:"GetImageYUV",value:function(e,t,a,r,i){var n=this;return new Promise((function(s,x){var o=null;if(null!=n.curFrame?o=n.curFrame:0!=n.ready_frames.length&&(o=n.ready_frames[0]),null!=o){var l=o.displayWidth,_=o.displayHeight,h=o;6==n.decoderCurStatus&&(h=o.image),0==t&&0==a&&0==r&&0==i&&(r=l,i=_),createImageBitmap(h).then((function(s){n.player?n.player._GetImage(s,e,t,a,r,i,0):postMessage({function:"bitmap",value:s,type:e,sx:t,sy:a,sw:r,sh:i,framenum:0})})),x()}else s({yuvFrameBuffer:-1,yuvLength:-1,displayWidth:-1,displayHeight:-1,yuvType:-1})}))}},{key:"SetPrintLogFlag",value:function(e){return this.printfFlag=e,1}},{key:"SetRunTimeInfoCallBackFun",value:function(e,t){return this.runtimeInfoCBFun=t,1}},{key:"SetRunTimeInfoCallbackType",value:function(e,t,a){return t==ee&&(this.nGetTotalFrameNum=0,a?null==this.oDecodeTimer&&(this.oDecodeTimer=new le,this.oDecodeTimer.Init()):null!==this.oDecodeTimer&&(this.oDecodeTimer.timerReset(),this.oDecodeTimer=null)),1}},{key:"IsVisible",value:function(e){return this.bVisibility=e,1}}]),a}(),he={d:function(e,t){for(var a in t)he.o(t,a)&&!he.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},fe={};he.d(fe,{Dv:function(){return We},CF:function(){return He},bC:function(){return ce}});var ce={};he.r(ce),he.d(ce,{ERRCODE:function(){return pe},SRCALLBACKTYPE:function(){return Ee},SRDISPLAYEFFECT:function(){return Se},SRFISHPARAMTYPE:function(){return Pe},SRIMAGEROTATEANGLE:function(){return Ce},SRPIXELFORMAT:function(){return Re},SRPOSTPROCTYPE:function(){return Fe},SRPTZDISPLAYMODE:function(){return ye},SRRENDERSTATETYPE:function(){return ge},SRSETRECTTYPE:function(){return me},SRVIEWTYPE:function(){return be}});var ue=3.1415926,de=.78539815,pe={SR_OK:1,SR_ERR_NOT_SUPPORT:2147483649,SR_ERR_SUBPORT:2147483650,SR_ERR_ALLOC_MEMORY:2147483651,SR_ERR_CALL_ORDER:2147483652,SR_ERR_PARAM:2147483653,SR_ERR_CAPTURE:2147483654,SR_ERR_SUBPORT_FULL:2147483655,SR_ERR_SHADER:2147483656,SR_ERR_3D_MODEL:2147483657,SR_ERR_FONT:2147483658,SR_ERR_MEMORY_LIMIT:2147483659,SR_ERR_WEBGPU_RESOURCE:2147483660,SR_ERR_WEBGL_RESOURCE:2147483661,SR_ERR_CANVAS:2147483662},me={SR_SRT_NULL:0,SR_SRT_SRC:1,SR_SRT_DST:2},Se={SR_DE_NULL:0,SR_DE_FISH_ORIGINAL:1,SR_DE_FISH_PTZ_CEILING:2,SR_DE_FISH_PTZ_FLOOR:3,SR_DE_FISH_PTZ_WALL:4,SR_DE_FISH_PANORAMA_CEILING_360:5,SR_DE_FISH_PANORAMA_CEILING_180:6,SR_DE_FISH_PANORAMA_FLOOR_360:7,SR_DE_FISH_PANORAMA_FLOOR_180:8,SR_DE_FISH_PANORAMA_WALL:9,SR_DE_FISH_SEMISPHERE:10,SR_DE_EAGLEEYE_SEMISPHERE:11,SR_DE_EAGLEEYE_PLANE:12,SR_DE_FISH_CYLINDER_CEILING:13,SR_DE_FISH_CYLINDER_FLOOR:14,SR_DE_FISH_CYLINDER_SPLIT_CEILING:15,SR_DE_FISH_CYLINDER_SPLIT_FLOOR:16,SR_DE_FISH_PLANET:17,SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:18,SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:19,SR_DE_FISH_ANIMATION_SWITCH_CEILING:20,SR_DE_FISH_ANIMATION_SWITCH_FLOOR:21,SR_DE_PANORAMA_SPHERE:22,SR_DE_PANORAMA_PLANET:23},Re={SR_PF_NULL:0,SR_PF_YV12:1,SR_PF_NV12:2,SR_PF_I420:3,SR_PF_RGB565:4,SR_PF_RGBA32:5,SR_PF_NV21:6,SR_PF_SURFACE:256},Pe={SR_FPT_NULL:0,SR_FPT_CENTER:1,SR_FPT_ANGLE:2,SR_FPT_ZOOM:3,SR_FPT_PTZ:4},ye={SR_DM_NULL:0,SR_DM_RECT:1,SR_DM_RANGE:2},be={SR_VT_NULL:0,SR_VT_ROTATION_X:1,SR_VT_ROTATION_Y:2,SR_VT_SCALE:3},Ee={SR_CBT_NULL:0,SR_CBT_OUT:1},ge={SR_RST_NULL:0,SR_RST_VERTICALFLIP:1,SR_RST_BACK_CULL:2,SR_RST_IMAGE_ROTATE:3},Fe={SR_PPT_NULL:0,SR_PPT_BRIGHTNESS:1,SR_PPT_HUE:2,SR_PPT_SATURATION:3,SR_PPT_CONTRAST:4,SR_PPT_SHARPNESS:5},Ce={SR_IRA_0:1,SR_IRA_90:2,SR_IRA_180:3,SR_IRA_270:4},ve=1e-6,Te="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var De,Ae,Ie,Me=function(e,t,a,r,i){var n=1/Math.tan(t/2);if(e[0]=n/a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0){var s=1/(r-i);e[10]=(i+r)*s,e[14]=2*i*r*s}else e[10]=-1,e[14]=-2*r;return e};y(),De=new Te(4),Te!=Float32Array&&(De[0]=0,De[1]=0,De[2]=0,De[3]=0),y(),b(1,0,0),b(0,1,0),E(),E(),Ae=new Te(9),Te!=Float32Array&&(Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[5]=0,Ae[6]=0,Ae[7]=0),Ae[0]=1,Ae[4]=1,Ae[8]=1,Ie=new Te(2),Te!=Float32Array&&(Ie[0]=0,Ie[1]=0);var Le="\nattribute vec4 position; \nattribute vec4 texCoord; \nvarying vec4 pp; \nuniform int bCapture; \n\nvoid main(void) {\n if(bCapture == 1)\n {\n gl_Position = position;\n gl_Position.y = -position.y;\n }\n else\n {\n gl_Position = position;\n }\n pp = texCoord;\n}\n",we="\nprecision mediump float;\nvarying vec4 pp;\nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform int bDataFormat;\nuniform float fAlpha;\nuniform int bDrawImage;\n\nvoid main(void)\n{\n float r,g,b,y,u,v;\n if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, pp.st).r;\n u = texture2D(Utexture, pp.st).r;\n v = texture2D(Vtexture, pp.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n\n gl_FragColor=vec4(r, g, b, 1.0);\n }\n else if(bDataFormat == 1)\n {\n gl_FragColor = texture2D(Ytexture, pp.st);\n }\n \n if(bDrawImage == 1)\n {\n gl_FragColor.a *= fAlpha; \n }\n}\n",Oe="\n varying mediump float pp;\n varying lowp vec4 colorOut;\n void main()\n {\n gl_FragColor = colorOut;\n mediump float fx = abs(pp);\n if (fx > 0.2)\n { \n gl_FragColor.a = colorOut.a*(1.25 - 1.25*fx);\n } \n } \n",Be="\n attribute vec4 position; \n attribute vec4 texCoord; \n uniform mat4 matRotate; \n varying vec4 pp; \n uniform int bCapture;\n\n void main() \n { \n gl_Position = position * matRotate; \n if(bCapture == 1)\n {\n gl_Position.y = -gl_Position.y;\n }\n pp = texCoord; \n } \n",ke="\n precision mediump float; \n uniform sampler2D texture;\n varying lowp vec4 pp; \n uniform float fAlpha;\n void main(void) \n { \n gl_FragColor = texture2D(texture, pp.st); \n gl_FragColor.a *= fAlpha; \n } \n",Ne=function(){function e(){u(this,e),this.fFov=1.57,this.fAspect=1,this.fNear=.1,this.fFar=1e3,this.fTheta=0,this.fAlpha=0,this.fBeta=0,this.fScale=1,this.bOrtho=!1,this.matView=p(),this.matProj=p(),this.vecEye=b(0,0,0),this.vecCenter=b(0,0,100),this.vecUp=b(0,1,0)}return d(e,[{key:"SetYaw",value:function(e){this.fTheta=e}},{key:"GetYaw",value:function(){return this.fTheta}},{key:"SetPitch",value:function(e){this.fAlpha=e}},{key:"GetPitch",value:function(){return this.fAlpha}},{key:"SetRoll",value:function(e){this.fBeta=e}},{key:"GetRoll",value:function(){return this.fBeta}},{key:"SetScale",value:function(e){this.fScale=e}},{key:"GetScale",value:function(){return this.fScale}},{key:"SetFov",value:function(e){this.fFov=e}},{key:"SetAspect",value:function(e){this.fAspect=e}},{key:"SetNear",value:function(e){this.fNear=e}},{key:"SetFar",value:function(e){this.fFar=e}},{key:"SetOrtho",value:function(e){this.bOrtho=e}},{key:"UpdateCamera",value:function(e,t){if(!(e<=0||t<=0)){1==this.bOrtho?(_=this.matProj,h=(2-1.5*this.fAlpha)*(e/t),f=2-1.5*this.fAlpha,c=this.fNear,u=this.fFar,d=1/(0-h),m=1/(0-f),y=1/(c-u),_[0]=-2*d,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=-2*m,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=2*y,_[11]=0,_[12]=(0+h)*d,_[13]=(f+0)*m,_[14]=(u+c)*y,_[15]=1,this.matProj[12]=0,this.matProj[13]=0):Me(this.matProj,this.fFov,e/t,this.fNear,this.fFar),this.vecEye=b(0,0,this.fScale),this.vecCenter=b(0,0,-100),this.vecUp=b(0,1,0);var a=b(1,0,0),r=b(0,1,0),i=b(0,0,1),n=p();P(n,this.vecEye,this.vecCenter,this.vecUp);var s=p(),x=p(),o=p(),l=p();R(x,s,-this.fAlpha,a),R(o,x,-this.fTheta,r),R(l,o,-this.fBeta,i),S(this.matView,n,l)}var _,h,f,c,u,d,m,y}},{key:"GetView",value:function(){return this.matView}},{key:"GetProj",value:function(){return this.matProj}}]),e}(),Ve=function(){function e(){u(this,e),this.fFov=1.57,this.fAspect=1,this.fNear=.1,this.fFar=1e3,this.fAlpha=0,this.fTheta=0,this.fScale=1,this.bPano=!1,this.matView=p(),this.matProj=p(),this.vecEye=b(0,0,.99),this.vecCenter=b(0,0,-100),this.vecUp=b(0,1,0)}return d(e,[{key:"SetPitch",value:function(e){this.fAlpha=e}},{key:"GetPitch",value:function(){return this.fAlpha}},{key:"SetYaw",value:function(e){this.fTheta=e}},{key:"GetYaw",value:function(){return this.fTheta}},{key:"SetScale",value:function(e){this.fScale=e}},{key:"GetScale",value:function(){return this.fScale}},{key:"SetFov",value:function(e){this.fFov=e}},{key:"SetAspect",value:function(e){this.fAspect=e}},{key:"SetNear",value:function(e){this.fNear=e}},{key:"SetPano",value:function(e){this.bPano=e}},{key:"SetFar",value:function(e){this.fFar=e}},{key:"UpdateCamera",value:function(e,t){if(!(e<=0||t<=0)){var a=e/t;1==this.bPano?(Me(this.matProj,this.fScale,a,this.fNear,this.fFar),this.matProj[0]=-1*this.matProj[0],this.matProj[5]*=-1):(Me(this.matProj,this.fFov+this.fScale-1,a,this.fNear,this.fFar),this.matProj[0]=this.matProj[0]*((this.fAlpha- -1.57)/ue*.5-1),this.matProj[5]=this.matProj[0]*a);var r=b(1,0,0),i=b(0,1,0),n=p();P(n,this.vecEye,this.vecCenter,this.vecUp);var s=p(),x=p(),o=p();R(x,s,-this.fAlpha,r),R(o,x,-this.fTheta,i),S(this.matView,n,o)}}},{key:"GetView",value:function(){return this.matView}},{key:"GetProj",value:function(){return this.matProj}}]),e}(),Ue=function(){function e(){u(this,e),this.onlySupportedWebGL1=!1,this.videoShaderProgram=0,this.vertexPosBuffer=0,this.texturePosBuffer=0,this.indicesPosBuffer=0,this.ctx=null,this.enPixelFormat=Re.SR_PF_NULL,this.nTextureNum=0,this.nSurfaceTexture=[],this.nSurfaceTexture[0]=0,this.nSurfaceTexture[1]=0,this.nSurfaceTexture[2]=0,this.frameDisplayWidth=0,this.frameDisplayHeight=0,this.bSrcRect=!1,this.fSrcUseLeft=0,this.fSrcUseRight=1,this.fSrcUseTop=0,this.fSrcUseBottom=1,this.fDstUseLeft=0,this.fDstUseRight=1,this.fDstUseTop=0,this.fDstUseBottom=1,this.nPostProc=0,this.fBrightness=0,this.fHue=0,this.fSaturation=0,this.fContrast=0,this.fSharpness=0,this.nWndWidth=0,this.nWndHeight=0,this.bCullBack=!1,this.nImageRotateAngle=Ce.SR_IRA_0,this.matRotate=p(),this.bIsCapturing=!1,this.nCaptureWidth=0,this.nCaptureHeight=0,this.nCaptureRTTex=0,this.nCaptureFBO=0,this.nCaptureFBOWidth=0,this.nCaptureFBOHeight=0,this.nCaptureDepthbuffer=0,this.bCaptureResInit=!1,this.pFishParamManager=null,this.nFECPort=-1,this.pstFishParam=[],this.fRX1=0,this.fRX2=1,this.fRY1=0,this.fRY2=1,this.b3DPort=!1,this.pCamera=null,this.fRotateX=0,this.fRotateY=0,this.fScale=0,this.fRotateLimitX=0,this.fRotateLimitY=0,this.pSemiSpherePos=null,this.pSemiSphereTex=null,this.nSemiSpherePosNum=0,this.nSemiSpherePosSize=0,this.nSemiSphereTexSize=0,this.pSpherePos=null,this.pSphereTex=null,this.pSphereInd=null,this.nSpherePosNum=0,this.nSpherePosSize=0,this.nSphereTexSize=0,this.pCylinderPos=null,this.pCylinderTex=null,this.nCylinderPosNum=0,this.nCylinderPosSize=0,this.nCylinderTexSize=0,this.fCylinderHeight=0,this.fCylinderRadius=0,this.pArcSpherePos=null,this.pArcSphereTex=null,this.nArcSpherePosNum=0,this.nArcSpherePosSize=0,this.nArcSphereTexSize=0,this.fImageWidth=1,this.fImageHeight=1,this.fTexCenterX=.5,this.fTexCenterY=.5,this.fTexRadius=.5,this.pfuncCBIn=null,this.pUserIn=null,this.pfuncCBOut=null,this.pUserOut=null,this.nMosaicShaderProgram=0,this.nLineShaderProgram=0,this.nMaxPointNum=0,this.pLinePosVertices=null,this.pLineClrVertices=null,this.glLinePosBuffer=0,this.glLineClrBuffer=0,this.nLineTriangleNum=0,this.pFillBlockPosVertices=null,this.pFillBlockClrVertices=null,this.nMaxFillBlockTriNum=0,this.glBlockPosBuffer=0,this.glBlockClrBuffer=0,this.nBlockShaderProgram=0,this.textCanvas=null,this.textCanvasCtx=null,this.nDrawFontWidth=0,this.nDrawFontHeight=0,this.nFontColorTexture=0,this.pFontColorBuffer=0,this.nFontShaderProgram=0,this.nFontBGNum=0,this.pstFontBGLines=[],this.pFontPosVertices=null,this.glFontVertexPosBuffer=0,this.glFontTexturePosBuffer=0,this.nImageShaderProgram=0,this.pImagePosVertices=null,this.pImageClrVertices=null,this.glImagePosBuffer=0,this.glImageClrBuffer=0,this.nImageColorTexture=null,this.nDrawImageWidth=0,this.nDrawImageHeight=0,this.nImageColorTextures=[],this.nImageColorTextures[0]=0,this.nImageColorTextures[1]=0,this.nImageColorTextures[2]=0,this.bFirstDrawImage=!0,this.bAntialias=!1,this.bRenderToTex=!1,this.msaaFrameBuffer=0,this.renderBuffer=0,this.stOriginalDisplayRect={},this.bCaptureOriginal=!1}return d(e,[{key:"SetCanvasSize",value:function(e,t){return e<=0||t<=0?pe.SR_ERR_PARAM:(this.nWndWidth=e,this.nWndHeight=t,pe.SR_OK)}},{key:"Init",value:function(e,t,a,r){if(null==e)return pe.SR_ERR_PARAM;if(null==this.ctx&&(this.ctx=e),t==Re.SR_PF_NULL)return pe.SR_ERR_NOT_SUPPORT;var i=pe.SR_OK;return a!=Se.SR_DE_FISH_SEMISPHERE&&a!=Se.SR_DE_PANORAMA_SPHERE&&a!=Se.SR_DE_PANORAMA_PLANET&&a!=Se.SR_DE_FISH_CYLINDER_CEILING&&a!=Se.SR_DE_FISH_CYLINDER_FLOOR&&a!=Se.SR_DE_FISH_PLANET&&a!=Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING&&a!=Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR&&a!=Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL&&a!=Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL||(this.b3DPort=!0,this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0)),i=this._InitVideoVertex(t,a,r),pe.SR_OK!=i?i:(i=this._InitVideoShader(t,a),pe.SR_OK!=i?i:(i=this._InitCamera(a),pe.SR_OK!=i?i:(this.enPixelFormat=t,this.enDisplayEffect=a,a!=Se.SR_DE_FISH_SEMISPHERE&&a!=Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL&&a!=Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL||this.ctx.enable(this.ctx.CULL_FACE),pe.SR_OK)))}},{key:"DeInit",value:function(){}},{key:"SetTextureNum",value:function(e){return this.nTextureNum=e,pe.SR_OK}},{key:"SetTextures",value:function(e,t){return this.nSurfaceTexture[e]=t,pe.SR_OK}},{key:"SetWndResolution",value:function(e,t){return e<=0||t<=0?pe.SR_ERR_PARAM:(this.nWndWidth=e,this.nWndHeight=t,pe.SR_OK)}},{key:"GetWndResolution",value:function(e){return e.nWndWidth=this.nWndWidth,e.nWndHeight=this.nWndHeight,pe.SR_OK}},{key:"SetDisplayRect",value:function(e,t,a,r,i){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;var n=e,s=t,x=e+a,o=t+r,l=null,_=null;switch(i){case me.SR_SRT_SRC:if(this.frameDisplayWidth>0&&this.frameDisplayHeight>0){if(this.fSrcUseLeft=n/this.frameDisplayWidth,this.fSrcUseLeft<0?this.fSrcUseLeft=0:this.fSrcUseLeft>1&&(this.fSrcUseLeft=1),this.fSrcUseTop=s/this.frameDisplayHeight,this.fSrcUseTop<0?this.fSrcUseTop=0:this.fSrcUseTop>1&&(this.fSrcUseTop=1),this.fSrcUseRight=x/this.frameDisplayWidth,this.fSrcUseRight<0?this.fSrcUseRight=0:this.fSrcUseRight>1&&(this.fSrcUseRight=1),this.fSrcUseBottom=o/this.frameDisplayHeight,this.fSrcUseBottom<0?this.fSrcUseBottom=0:this.fSrcUseBottom>1&&(this.fSrcUseBottom=1),this.fSrcUseLeft>=this.fSrcUseRight||this.fSrcUseTop>=this.fSrcUseBottom)return pe.SR_ERR_PARAM;if(Ce.SR_IRA_0==this.nImageRotateAngle)l=new Float32Array([this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom]);else if(Ce.SR_IRA_90==this.nImageRotateAngle){var h=this.fSrcUseTop,f=this.fSrcUseBottom,c=1-this.fSrcUseRight,u=1-this.fSrcUseLeft;this.fSrcUseLeft=h,this.fSrcUseRight=f,this.fSrcUseTop=c,this.fSrcUseBottom=u,l=new Float32Array([this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop])}else if(Ce.SR_IRA_180==this.nImageRotateAngle){var d=1-this.fSrcUseRight,p=1-this.fSrcUseLeft,m=1-this.fSrcUseBottom,S=1-this.fSrcUseTop;this.fSrcUseLeft=d,this.fSrcUseRight=p,this.fSrcUseTop=m,this.fSrcUseBottom=S,l=new Float32Array([this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop])}else if(Ce.SR_IRA_270==this.nImageRotateAngle){var R=1-this.fSrcUseBottom,P=1-this.fSrcUseTop,y=this.fSrcUseLeft,b=this.fSrcUseRight;this.fSrcUseLeft=R,this.fSrcUseRight=P,this.fSrcUseTop=y,this.fSrcUseBottom=b,l=new Float32Array([this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom])}this.bSrcRect=!0}else l=new Float32Array([this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom]),this.bSrcRect=!1;this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer),this.ctx.bufferSubData(this.ctx.ARRAY_BUFFER,0,l),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),l=null;break;case me.SR_SRT_DST:if(this.frameDisplayWidth>0&&this.frameDisplayHeight>0){if(this.fDstUseLeft=n/this.frameDisplayWidth,this.fDstUseLeft<0?this.fDstUseLeft=0:this.fDstUseLeft>1&&(this.fDstUseLeft=1),this.fDstUseTop=s/this.frameDisplayHeight,this.fDstUseTop<0?this.fDstUseTop=0:this.fDstUseTop>1&&(this.fDstUseTop=1),this.fDstUseRight=x/this.frameDisplayWidth,this.fDstUseRight<0?this.fDstUseRight=0:this.fDstUseRight>1&&(this.fDstUseRight=1),this.fDstUseBottom=o/this.frameDisplayHeight,this.fDstUseBottom<0?this.fDstUseBottom=0:this.fDstUseBottom>1&&(this.fDstUseBottom=1),this.fDstUseLeft>=this.fDstUseRight||this.fDstUseTop>=this.fDstUseBottom)return pe.SR_ERR_PARAM;(_=new Float32Array(12))[0]=2*this.fDstUseLeft-1,_[1]=1-2*this.fDstUseTop,_[2]=2*this.fDstUseLeft-1,_[3]=1-2*this.fDstUseBottom,_[4]=2*this.fDstUseRight-1,_[5]=1-2*this.fDstUseTop,_[6]=2*this.fDstUseRight-1,_[7]=1-2*this.fDstUseTop,_[8]=2*this.fDstUseLeft-1,_[9]=1-2*this.fDstUseBottom,_[10]=2*this.fDstUseRight-1,_[11]=1-2*this.fDstUseBottom,this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer),this.ctx.bufferSubData(this.ctx.ARRAY_BUFFER,0,_),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),_=null}break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"SetImagePostProcess",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(Fe.SR_PPT_SHARPNESS==e||Fe.SR_PPT_HUE==e){if(0-t>1e-6||t-1>1e-6)return pe.SR_ERR_PARAM}else if((Fe.SR_PPT_BRIGHTNESS==e||Fe.SR_PPT_SATURATION==e||Fe.SR_PPT_CONTRAST==e)&&(-1-t>1e-6||t-1>1e-6))return pe.SR_ERR_PARAM;switch(e){case Fe.SR_PPT_BRIGHTNESS:this.fBrightness=t;break;case Fe.SR_PPT_HUE:this.fHue=t;break;case Fe.SR_PPT_SATURATION:this.fSaturation=t;break;case Fe.SR_PPT_CONTRAST:this.fContrast=t;break;case Fe.SR_PPT_SHARPNESS:this.fSharpness=t;break;default:return pe.SR_ERR_NOT_SUPPORT}return Math.abs(this.fBrightness-0)<1e-6&&Math.abs(this.fHue-0)<1e-6&&Math.abs(this.fSaturation-0)<1e-6&&Math.abs(this.fContrast-0)<1e-6&&Math.abs(this.fSharpness-0)<1e-6?this.nPostProc=0:this.nPostProc=1,pe.SR_OK}},{key:"SetRenderState",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;switch(e){case ge.SR_RST_VERTICALFLIP:if(this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;break;case ge.SR_RST_BACK_CULL:if(!this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;Math.abs(t-0)<1e-6?this.bCullBack=!1:this.bCullBack=!0;break;case ge.SR_RST_IMAGE_ROTATE:if(this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;var a=null,r=Ce.SR_IRA_0,i=b(0,0,1),n=p();if(Math.abs(t-0)<1e-6){if(this.nImageRotateAngle==r)break;a=this.bSrcRect?new Float32Array([this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom]):new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]),m(this.matRotate)}else if(Math.abs(t-90)<1e-6){if(r=Ce.SR_IRA_90,this.nImageRotateAngle==r)break;a=this.bSrcRect?new Float32Array([this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop]):new Float32Array([0,1,1,1,0,0,0,0,1,1,1,0]),R(this.matRotate,n,1.5707963,i)}else if(Math.abs(t-180)<1e-6){if(r=Ce.SR_IRA_180,this.nImageRotateAngle==r)break;a=this.bSrcRect?new Float32Array([this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop]):new Float32Array([1,1,1,0,0,1,0,1,1,0,0,0]),R(this.matRotate,n,ue,i)}else{if(!(Math.abs(t-270)<1e-6))return pe.SR_ERR_PARAM;if(r=Ce.SR_IRA_270,this.nImageRotateAngle==r)break;a=this.bSrcRect?new Float32Array([this.fSrcUseRight,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseRight,this.fSrcUseBottom,this.fSrcUseLeft,this.fSrcUseTop,this.fSrcUseLeft,this.fSrcUseBottom]):new Float32Array([1,0,0,0,1,1,1,1,0,0,0,1]),R(this.matRotate,n,3*ue/2,i)}if(null==a)return pe.SR_ERR_NOT_SUPPORT;var s=this.ctx.createBuffer();this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,s),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,a,this.ctx.STATIC_DRAW),this.texturePosBuffer=s,this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.nImageRotateAngle=r;break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"SetVideoResolution",value:function(e,t){return null==this.ctx||e<=0||t<=0?pe.SR_ERR_CALL_ORDER:(this.frameDisplayWidth=e,this.frameDisplayHeight=t,pe.SR_OK)}},{key:"GetCaptureSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==e.nWidth||null==e.nWidth||null==e.nHeight||null==e.nHeight)return pe.SR_ERR_PARAM;if(1==t&&this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;var a=0,r=0;if(0==e.nWidth&&0==e.nHeight)switch(this.enDisplayEffect){case Se.SR_DE_FISH_PTZ_WALL:case Se.SR_DE_FISH_PTZ_CEILING:case Se.SR_DE_FISH_PTZ_FLOOR:a=Math.round(5*this.frameDisplayHeight/8),r=Math.round(3*a/4);break;case Se.SR_DE_NULL:t?(a=Math.round(this.frameDisplayWidth),r=Math.round(this.frameDisplayHeight)):(a=Math.round((this.fSrcUseRight-this.fSrcUseLeft)*this.frameDisplayWidth),r=Math.round((this.fSrcUseBottom-this.fSrcUseTop)*this.frameDisplayHeight));break;case Se.SR_DE_FISH_ORIGINAL:case Se.SR_DE_FISH_SEMISPHERE:case Se.SR_DE_PANORAMA_SPHERE:case Se.SR_DE_PANORAMA_PLANET:case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_FLOOR:case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:case Se.SR_DE_FISH_PLANET:case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:a=Math.round(this.frameDisplayWidth),r=Math.round(this.frameDisplayHeight);break;case Se.SR_DE_FISH_PANORAMA_FLOOR_360:case Se.SR_DE_FISH_PANORAMA_CEILING_360:this.frameDisplayHeight>=2048?(a=6144,r=864):this.frameDisplayHeight>=1536&&2048>this.frameDisplayHeight?(a=4096,r=576):(a=Math.round(3.14*this.frameDisplayHeight/1.6),r=Math.round(9*this.frameDisplayWidth/16),a=Math.round(2*a),r=Math.round(r/2));break;case Se.SR_DE_FISH_PANORAMA_FLOOR_180:case Se.SR_DE_FISH_PANORAMA_CEILING_180:this.frameDisplayHeight>=3072?(a=4096,r=2304):this.frameDisplayHeight>=2048&&3072>this.frameDisplayHeight?(a=3072,r=1728):this.frameDisplayHeight>=1536&&2048>this.frameDisplayHeight?(a=2048,r=1152):(a=Math.round(3.14*this.frameDisplayHeight/1.6),r=Math.round(9*a/16));break;case Se.SR_DE_FISH_PANORAMA_WALL:a=Math.round(this.frameDisplayHeight),r=Math.round(9*a/16);break;default:return pe.SR_ERR_PARAM}else a=Math.round(e.nWidth),r=Math.round(e.nHeight);return a<16||r<16?pe.SR_ERR_PARAM:(this.nCaptureWidth=4*Math.round(a/4),this.nCaptureHeight=Math.round(r),e.nWidth=this.nCaptureWidth,e.nHeight=this.nCaptureHeight,e.nBufferLen=this.nCaptureWidth*this.nCaptureHeight*4,this.bCaptureOriginal=t,pe.SR_OK)}},{key:"CaptureScreen",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;var a=pe.SR_OK;if(a=this._BeginCapture(),pe.SR_OK!=a)return this.bIsCapturing=!1,a;if(1==this.bCaptureOriginal&&(this.stOriginalDisplayRect.fLeft=this.fSrcUseLeft*this.frameDisplayWidth,this.stOriginalDisplayRect.fTop=this.fSrcUseTop*this.frameDisplayHeight,this.stOriginalDisplayRect.fWidth=(this.fSrcUseRight-this.fSrcUseLeft)*this.frameDisplayWidth,this.stOriginalDisplayRect.fHeight=(this.fSrcUseBottom-this.fSrcUseTop)*this.frameDisplayHeight,a=this.SetDisplayRect(0,0,this.frameDisplayWidth,this.frameDisplayHeight,me.SR_SRT_SRC),pe.SR_OK!=a))return this.bIsCapturing=!1,a;if(0==this.videoShaderProgram||0==this.vertexPosBuffer||0==this.texturePosBuffer)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;this.ctx.useProgram(this.videoShaderProgram),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer);var r=this.ctx.getAttribLocation(this.videoShaderProgram,"position");if(r<0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.b3DPort?this.ctx.vertexAttribPointer(r,3,this.ctx.FLOAT,!1,0,0):this.ctx.vertexAttribPointer(r,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(r),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer);var i=this.ctx.getAttribLocation(this.videoShaderProgram,"texCoord");if(i<0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.vertexAttribPointer(i,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(i),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null);var n=this.enDisplayEffect,s=this.ctx.getUniformLocation(this.videoShaderProgram,"bCapture");if(s<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(s,1);var x=this.ctx.getUniformLocation(this.videoShaderProgram,"bDataFormat");if(x<=0)return pe.SR_ERR_WEBGL_RESOURCE;switch(this.enPixelFormat){case Re.SR_PF_YV12:case Re.SR_PF_I420:this.ctx.uniform1i(x,0);break;case Re.SR_PF_NV12:break;case Re.SR_PF_RGBA32:case Re.SR_PF_SURFACE:this.ctx.uniform1i(x,1);break;default:return pe.SR_ERR_NOT_SUPPORT}var o=this.ctx.getUniformLocation(this.videoShaderProgram,"bDrawImage");this.ctx.uniform1i(o,0);var l=this.ctx.getUniformLocation(this.videoShaderProgram,"fAlpha");switch(this.ctx.uniform1f(l,0),n){case Se.SR_DE_NULL:break;case Se.SR_DE_FISH_ORIGINAL:case Se.SR_DE_FISH_PTZ_CEILING:case Se.SR_DE_FISH_PTZ_FLOOR:case Se.SR_DE_FISH_PTZ_WALL:case Se.SR_DE_FISH_PANORAMA_CEILING_360:case Se.SR_DE_FISH_PANORAMA_CEILING_180:case Se.SR_DE_FISH_PANORAMA_FLOOR_360:case Se.SR_DE_FISH_PANORAMA_FLOOR_180:case Se.SR_DE_FISH_PANORAMA_WALL:if(null==this.pFishParamManager)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;var _={},h=pe.SR_OK;if(h=this.pFishParamManager.GetRenderParam(this.nFECPort,_),pe.SR_OK!=h)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),h;if(Se.SR_DE_FISH_ORIGINAL==n){var f=this.ctx.getUniformLocation(this.videoShaderProgram,"bBlack");if(f<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(f,_.bBlack);var c=this.ctx.getUniformLocation(this.videoShaderProgram,"bCut");if(c<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(c,_.bCut)}if(Se.SR_DE_FISH_PTZ_CEILING==n||Se.SR_DE_FISH_PTZ_FLOOR==n||Se.SR_DE_FISH_PTZ_WALL==n){var u=this.ctx.getUniformLocation(this.videoShaderProgram,"fHAngleCos");if(u<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(u,_.fCosH);var d=this.ctx.getUniformLocation(this.videoShaderProgram,"fHAngleSin");if(d<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(d,_.fSinH);var p=this.ctx.getUniformLocation(this.videoShaderProgram,"fVAngleCos");if(p<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(p,_.fCosV);var m=this.ctx.getUniformLocation(this.videoShaderProgram,"fVAngleSin");if(m<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(m,_.fSinV);var S=this.ctx.getUniformLocation(this.videoShaderProgram,"fZoom");if(S<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(S,_.fZoom)}if(Se.SR_DE_FISH_PANORAMA_CEILING_360==n||Se.SR_DE_FISH_PANORAMA_CEILING_180==n||Se.SR_DE_FISH_PANORAMA_FLOOR_360==n||Se.SR_DE_FISH_PANORAMA_FLOOR_180==n){var R=this.ctx.getUniformLocation(this.videoShaderProgram,"fAngle");if(R<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(R,_.fAngle)}var P=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX1");if(P<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(P,_.fRXLeft);var y=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX2");if(y<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(y,_.fRXRight);var b=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY1");if(b<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(b,_.fRYTop);var E=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY2");if(E<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(E,_.fRYBottom);break;case Se.SR_DE_FISH_SEMISPHERE:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(3.14-this.fRotateX),this.pCamera.SetYaw(-this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var g=this.pCamera.GetView(),F=this.pCamera.GetProj(),C=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(C<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(C,!1,g);var v=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(v<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(v,!1,F);break;case Se.SR_DE_PANORAMA_SPHERE:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(3.14-this.fRotateX),this.pCamera.SetYaw(this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var T=this.pCamera.GetView(),D=this.pCamera.GetProj(),A=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(A<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(A,!1,T);var I=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(I<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(I,!1,D);break;case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_FLOOR:case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(-this.fRotateX),this.pCamera.SetYaw(-this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var M=this.pCamera.GetView(),L=this.pCamera.GetProj(),w=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(w<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(w,!1,M);var O=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(O<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(O,!1,L);break;case Se.SR_DE_FISH_PLANET:case Se.SR_DE_PANORAMA_PLANET:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(this.fRotateX),this.pCamera.SetYaw(3.14+this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var B=this.pCamera.GetView(),k=this.pCamera.GetProj(),N=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(N<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(N,!1,B);var V=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(V<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(V,!1,k);break;case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:if(null==this.pFishParamManager)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;var U={},H=pe.SR_OK;if(H=this.pFishParamManager.GetRenderParam(this.nFECPort,U),pe.SR_OK!=H)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),H;this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(-this.fRotateX),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var W=this.pCamera.GetView(),Y=this.pCamera.GetProj(),G=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(G<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(G,!1,W);var X,J=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(J<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(J,!1,Y),X=Math.abs(.785-this.fRotateX)<.0025?.785:this.fRotateX;var Z=new Float32Array([0,1,0,2*-X]),j=this.ctx.getUniformLocation(this.videoShaderProgram,"vecCylinderParam");if(j<=0)return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.uniform4f(j,Z[0],Z[1],Z[2],Z[3]),Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING==this.enDisplayEffect){var z=this.ctx.getUniformLocation(this.videoShaderProgram,"fTextureOffset");if(z<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(z,this.fRotateY)}else{var K=this.ctx.getUniformLocation(this.videoShaderProgram,"fTextureOffset");if(K<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(K,-this.fRotateY)}var q=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX1");if(q<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(q,U.fRXLeft);var Q=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX2");if(Q<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(Q,U.fRXRight);var $=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY1");if($<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f($,U.fRYTop);var ee=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY2");if(ee<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(ee,U.fRYBottom);break;default:return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_NOT_SUPPORT}if(this.nCaptureWidth<=0||this.nCaptureHeight<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CANVAS;if(this.ctx.viewport(0,0,this.nCaptureWidth,this.nCaptureHeight),this.ctx.clearColor(0,0,0,1),this.ctx.clear(this.ctx.COLOR_BUFFER_BIT|this.ctx.DEPTH_BUFFER_BIT),this.b3DPort&&(this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0),1==this.bCullBack?this.ctx.enable(this.ctx.CULL_FACE):this.ctx.disable(this.ctx.CULL_FACE)),this.enPixelFormat==Re.SR_PF_RGBA32||this.enPixelFormat==Re.SR_PF_SURFACE){this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var te=this.ctx.getUniformLocation(this.videoShaderProgram,"Ytexture");this.ctx.uniform1i(te,0)}else{if(this.enPixelFormat!=Re.SR_PF_YV12&&this.enPixelFormat!=Re.SR_PF_I420)return pe.SR_ERR_NOT_SUPPORT;this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var ae=this.ctx.getUniformLocation(this.videoShaderProgram,"Ytexture");this.ctx.uniform1i(ae,0),this.ctx.activeTexture(this.ctx.TEXTURE1),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[1]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var re=this.ctx.getUniformLocation(this.videoShaderProgram,"Utexture");this.ctx.uniform1i(re,1),this.ctx.activeTexture(this.ctx.TEXTURE2),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[2]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var ie=this.ctx.getUniformLocation(this.videoShaderProgram,"Vtexture");this.ctx.uniform1i(ie,2)}if(this.onlySupportedWebGL1||this.ctx.clearBufferfi(this.ctx.DEPTH_STENCIL,0,1,0),0==this.b3DPort)this.ctx.drawArrays(this.ctx.TRIANGLES,0,6);else if(this.enDisplayEffect==Se.SR_DE_FISH_SEMISPHERE||this.enDisplayEffect==Se.SR_DE_FISH_PLANET){if(this.nSemiSpherePosNum<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nSemiSpherePosNum)}else if(this.enDisplayEffect==Se.SR_DE_PANORAMA_SPHERE||this.enDisplayEffect==Se.SR_DE_PANORAMA_PLANET){if(this.nSpherePosNum<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;this.ctx.bindBuffer(this.ctx.ELEMENT_ARRAY_BUFFER,this.indicesPosBuffer),this.ctx.drawElements(this.ctx.TRIANGLES,6*this.nSpherePosNum,this.ctx.UNSIGNED_SHORT,0),this.ctx.bindBuffer(this.ctx.ELEMENT_ARRAY_BUFFER,null)}else if(this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_FLOOR||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR){if(this.nCylinderPosNum<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nCylinderPosNum)}else if(this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL){if(this.nArcSpherePosNum<=0)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nArcSpherePosNum)}if(this.ctx.useProgram(null),t||this.DoCallBack(),1==this.bCaptureOriginal){var ne=this.nImageRotateAngle;if(this.bSrcRect=!1,a=this.SetRenderState(ge.SR_RST_IMAGE_ROTATE,0),pe.SR_OK!=a)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),a;if(a=this.SetDisplayRect(this.stOriginalDisplayRect.fLeft,this.stOriginalDisplayRect.fTop,this.stOriginalDisplayRect.fWidth,this.stOriginalDisplayRect.fHeight,me.SR_SRT_SRC),pe.SR_OK!=a)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),a;switch(this.bSrcRect=!0,ne){case Ce.SR_IRA_0:a=this.SetRenderState(ge.SR_RST_IMAGE_ROTATE,0);break;case Ce.SR_IRA_90:a=this.SetRenderState(ge.SR_RST_IMAGE_ROTATE,90);break;case Ce.SR_IRA_180:a=this.SetRenderState(ge.SR_RST_IMAGE_ROTATE,180);break;case Ce.SR_IRA_270:a=this.SetRenderState(ge.SR_RST_IMAGE_ROTATE,270);break;default:return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_NOT_SUPPORT}if(pe.SR_OK!=a)return this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),a}return a=this._EndCapture(e),pe.SR_OK!=a?a:pe.SR_OK}},{key:"SetWebGL2Support",value:function(e){return this.onlySupportedWebGL1=e,pe.SR_OK}},{key:"SetFishParamManager",value:function(e){return this.pFishParamManager=e,pe.SR_OK}},{key:"SetFECPort",value:function(e){return this.nFECPort=e,pe.SR_OK}},{key:"Render",value:function(e){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;switch(this.ctx.useProgram(this.videoShaderProgram),this.enPixelFormat){case Re.SR_PF_YV12:case Re.SR_PF_I420:this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var t=this.ctx.getUniformLocation(this.videoShaderProgram,"Ytexture");this.ctx.uniform1i(t,0),this.ctx.activeTexture(this.ctx.TEXTURE1),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[1]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var a=this.ctx.getUniformLocation(this.videoShaderProgram,"Utexture");this.ctx.uniform1i(a,1),this.ctx.activeTexture(this.ctx.TEXTURE2),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[2]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var r=this.ctx.getUniformLocation(this.videoShaderProgram,"Vtexture");this.ctx.uniform1i(r,2);break;case Re.SR_PF_SURFACE:this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),!this.onlySupportedWebGL1&&this.bAntialias&&this.ctx.generateMipmap(this.ctx.TEXTURE_2D);var i=this.ctx.getUniformLocation(this.videoShaderProgram,"Ytexture");this.ctx.uniform1i(i,0);break;default:return pe.SR_ERR_NOT_SUPPORT}var n=this.ctx.getUniformLocation(this.videoShaderProgram,"bCapture");if(n<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(n,0);var s=this.ctx.getUniformLocation(this.videoShaderProgram,"bDataFormat");if(s<=0)return pe.SR_ERR_WEBGL_RESOURCE;switch(this.enPixelFormat){case Re.SR_PF_YV12:case Re.SR_PF_I420:this.ctx.uniform1i(s,0);break;case Re.SR_PF_NV12:break;case Re.SR_PF_RGBA32:case Re.SR_PF_SURFACE:this.ctx.uniform1i(s,1)}switch(this.enDisplayEffect){case Se.SR_DE_NULL:if(this.nPostProc){var x=this.ctx.getUniformLocation(this.videoShaderProgram,"fBrightness");if(x<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(x,this.fBrightness);var o=this.ctx.getUniformLocation(this.videoShaderProgram,"fHue");if(o<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(o,this.fHue);var l=this.ctx.getUniformLocation(this.videoShaderProgram,"fSaturation");if(l<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(l,this.fSaturation);var _=this.ctx.getUniformLocation(this.videoShaderProgram,"fContrast");if(_<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(_,this.fContrast);var h=this.ctx.getUniformLocation(this.videoShaderProgram,"fSharpness");if(h<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(h,this.fSharpness);var f=this.ctx.getUniformLocation(this.videoShaderProgram,"fWndWidth");if(f<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(f,this.nWndWidth);var c=this.ctx.getUniformLocation(this.videoShaderProgram,"fWndHeight");if(c<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(c,this.nWndHeight)}var u=this.ctx.getUniformLocation(this.videoShaderProgram,"nPostProc");this.ctx.uniform1i(u,this.nPostProc);break;case Se.SR_DE_FISH_ORIGINAL:case Se.SR_DE_FISH_PTZ_CEILING:case Se.SR_DE_FISH_PTZ_FLOOR:case Se.SR_DE_FISH_PTZ_WALL:case Se.SR_DE_FISH_PANORAMA_CEILING_360:case Se.SR_DE_FISH_PANORAMA_CEILING_180:case Se.SR_DE_FISH_PANORAMA_FLOOR_360:case Se.SR_DE_FISH_PANORAMA_FLOOR_180:case Se.SR_DE_FISH_PANORAMA_WALL:if(Se.SR_DE_FISH_ORIGINAL==this.enDisplayEffect){var d=this.ctx.getUniformLocation(this.videoShaderProgram,"bBlack");if(d<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(d,this.pstFishParam.bBlack);var p=this.ctx.getUniformLocation(this.videoShaderProgram,"bCut");if(p<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(p,this.pstFishParam.bCut)}if(Se.SR_DE_FISH_PTZ_CEILING==this.enDisplayEffect||Se.SR_DE_FISH_PTZ_FLOOR==this.enDisplayEffect||Se.SR_DE_FISH_PTZ_WALL==this.enDisplayEffect){var m=this.ctx.getUniformLocation(this.videoShaderProgram,"fHAngleCos");if(m<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(m,this.pstFishParam.fCosH);var S=this.ctx.getUniformLocation(this.videoShaderProgram,"fHAngleSin");if(S<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(S,this.pstFishParam.fSinH);var R=this.ctx.getUniformLocation(this.videoShaderProgram,"fVAngleCos");if(R<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(R,this.pstFishParam.fCosV);var P=this.ctx.getUniformLocation(this.videoShaderProgram,"fVAngleSin");if(P<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(P,this.pstFishParam.fSinV);var y=this.ctx.getUniformLocation(this.videoShaderProgram,"fZoom");if(y<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(y,this.pstFishParam.fZoom)}if(Se.SR_DE_FISH_PANORAMA_CEILING_360==this.enDisplayEffect||Se.SR_DE_FISH_PANORAMA_CEILING_180==this.enDisplayEffect||Se.SR_DE_FISH_PANORAMA_FLOOR_360==this.enDisplayEffect||Se.SR_DE_FISH_PANORAMA_FLOOR_180==this.enDisplayEffect){var b=this.ctx.getUniformLocation(this.videoShaderProgram,"fAngle");if(b<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(b,this.pstFishParam.fAngle)}var E=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX1");if(E<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(E,this.pstFishParam.fRXLeft);var g=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX2");if(g<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(g,this.pstFishParam.fRXRight);var F=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY1");if(F<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(F,this.pstFishParam.fRYTop);var C=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY2");if(C<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(C,this.pstFishParam.fRYBottom);break;case Se.SR_DE_FISH_SEMISPHERE:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(3.14-this.fRotateX),this.pCamera.SetYaw(-this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var v=this.pCamera.GetView(),T=this.pCamera.GetProj(),D=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(D<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(D,!1,v);var A=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(A<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(A,!1,T);break;case Se.SR_DE_PANORAMA_SPHERE:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(3.14-this.fRotateX),this.pCamera.SetYaw(this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var I=this.pCamera.GetView(),M=this.pCamera.GetProj(),L=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(L<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(L,!1,I);var w=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(w<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(w,!1,M);break;case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_FLOOR:case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(-this.fRotateX),this.pCamera.SetYaw(-this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var O=this.pCamera.GetView(),B=this.pCamera.GetProj(),k=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(k<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(k,!1,O);var N=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(N<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(N,!1,B);break;case Se.SR_DE_FISH_PLANET:case Se.SR_DE_PANORAMA_PLANET:this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(this.fRotateX),this.pCamera.SetYaw(3.14+this.fRotateY),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var V=this.pCamera.GetView(),U=this.pCamera.GetProj(),H=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(H<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(H,!1,V);var W=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(W<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(W,!1,U);var Y=this.ctx.getUniformLocation(this.videoShaderProgram,"bDrawImage");if(Y<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(Y,0);var G=this.ctx.getUniformLocation(this.videoShaderProgram,"fAlpha");if(G<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(G,0);break;case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:if(null==this.pFishParamManager)return pe.SR_ERR_CALL_ORDER;this.pCamera.SetScale(this.fScale),this.pCamera.SetPitch(-this.fRotateX),this.pCamera.UpdateCamera(this.nWndWidth,this.nWndHeight);var X=this.pCamera.GetView(),J=this.pCamera.GetProj(),Z=this.ctx.getUniformLocation(this.videoShaderProgram,"matView");if(Z<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(Z,!1,X);var j,z=this.ctx.getUniformLocation(this.videoShaderProgram,"matProj");if(z<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(z,!1,J),j=Math.abs(.785-this.fRotateX)<.0025?.785:this.fRotateX;var K=new Float32Array([0,1,0,2*-j]),q=this.ctx.getUniformLocation(this.videoShaderProgram,"vecCylinderParam");if(q<=0)return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.uniform4f(q,K[0],K[1],K[2],K[3]),Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING==this.enDisplayEffect){var Q=this.ctx.getUniformLocation(this.videoShaderProgram,"fTextureOffset");if(Q<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(Q,this.fRotateY)}else{var $=this.ctx.getUniformLocation(this.videoShaderProgram,"fTextureOffset");if($<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f($,-this.fRotateY)}var ee={},te=pe.SR_OK;if(te=this.pFishParamManager.GetRenderParam(this.nFECPort,ee),pe.SR_OK!=te)return te;var ae=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX1");if(ae<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(ae,ee.fRXLeft);var re=this.ctx.getUniformLocation(this.videoShaderProgram,"fRX2");if(re<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(re,ee.fRXRight);var ie=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY1");if(ie<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(ie,ee.fRYTop);var ne=this.ctx.getUniformLocation(this.videoShaderProgram,"fRY2");if(ne<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(ne,ee.fRYBottom);var se=this.ctx.getUniformLocation(this.videoShaderProgram,"bDrawImage");if(se<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1i(se,0);var xe=this.ctx.getUniformLocation(this.videoShaderProgram,"fAlpha");if(xe<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(xe,0);break;default:return pe.SR_ERR_NOT_SUPPORT}this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer);var oe=this.ctx.getAttribLocation(this.videoShaderProgram,"position");if(oe<0)return pe.SR_ERR_WEBGL_RESOURCE;this.b3DPort?this.ctx.vertexAttribPointer(oe,3,this.ctx.FLOAT,!1,0,0):this.ctx.vertexAttribPointer(oe,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(oe),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer);var le=this.ctx.getAttribLocation(this.videoShaderProgram,"texCoord");if(le<0)return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.vertexAttribPointer(le,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(le),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.viewport(0,0,this.nWndWidth,this.nWndHeight),this.onlySupportedWebGL1||this.ctx.clearBufferfi(this.ctx.DEPTH_STENCIL,0,1,0),this.ctx.clearColor(0,0,0,1),this.ctx.clear(this.ctx.COLOR_BUFFER_BIT|this.ctx.DEPTH_BUFFER_BIT),this.b3DPort&&(this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0),1==this.bCullBack?this.ctx.enable(this.ctx.CULL_FACE):this.ctx.disable(this.ctx.CULL_FACE)),0==this.b3DPort)this.ctx.drawArrays(this.ctx.TRIANGLES,0,6);else if(this.enDisplayEffect==Se.SR_DE_FISH_SEMISPHERE||this.enDisplayEffect==Se.SR_DE_FISH_PLANET){if(this.nSemiSpherePosNum<=0)return pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nSemiSpherePosNum)}else if(this.enDisplayEffect==Se.SR_DE_PANORAMA_SPHERE||this.enDisplayEffect==Se.SR_DE_PANORAMA_PLANET){if(this.nSpherePosNum<=0)return pe.SR_ERR_CALL_ORDER;this.ctx.bindBuffer(this.ctx.ELEMENT_ARRAY_BUFFER,this.indicesPosBuffer),this.ctx.drawElements(this.ctx.TRIANGLES,6*this.nSpherePosNum,this.ctx.UNSIGNED_SHORT,0),this.ctx.bindBuffer(this.ctx.ELEMENT_ARRAY_BUFFER,null)}else if(this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_FLOOR||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR){if(this.nCylinderPosNum<=0)return pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nCylinderPosNum)}else if(this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL){if(this.nArcSpherePosNum<=0)return pe.SR_ERR_CALL_ORDER;this.ctx.drawArrays(this.ctx.TRIANGLES,0,this.nArcSpherePosNum)}return this.ctx.useProgram(null),pe.SR_OK}},{key:"SetAntialias",value:function(e){return null==this.ctx?pe.SR_ERR_CALL_ORDER:(this.bAntialias=e,pe.SR_OK)}},{key:"DelSubPort",value:function(){return null==this.ctx?pe.SR_ERR_CALL_ORDER:(0!=this.videoShaderProgram&&null!=this.ctx&&(this.ctx.deleteProgram(this.videoShaderProgram),this.videoShaderProgram=0),0!=this.vertexPosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.vertexPosBuffer),this.vertexPosBuffer=0),0!=this.texturePosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.texturePosBuffer),this.texturePosBuffer=0),0!=this.indicesPosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.indicesPosBuffer),this.indicesPosBuffer=0),this.nMaxPointNum=0,this.pLinePosVertices=null,this.pLineClrVertices=null,0!=this.glLinePosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.glLinePosBuffer),this.glLinePosBuffer=0),this.nLineTriangleNum=0,0!=this.nLineShaderProgram&&null!=this.ctx&&(this.ctx.deleteProgram(this.nLineShaderProgram),this.nLineShaderProgram=0),this.pFillBlockPosVertices=null,this.pFillBlockClrVertices=null,this.nMaxFillBlockTriNum=0,0!=this.glBlockPosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.glBlockPosBuffer),this.glBlockPosBuffer=0),0!=this.glBlockClrBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.glBlockClrBuffer),this.glBlockClrBuffer=0),0!=this.nBlockShaderProgram&&null!=this.ctx&&(this.ctx.deleteProgram(this.nBlockShaderProgram),this.nBlockShaderProgram=0),this.nDrawFontWidth=0,this.nDrawFontHeight=0,0!=this.nFontColorTexture&&null!=this.ctx&&(this.ctx.deleteTexture(this.nFontColorTexture),this.nFontColorTexture=0),this.pFontColorBuffer=0,0!=this.nFontShaderProgram&&null!=this.ctx&&(this.ctx.deleteProgram(this.nFontShaderProgram),this.nFontShaderProgram=0),this.pFontPosVertices=null,0!=this.glFontTexturePosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.glFontTexturePosBuffer),this.glFontTexturePosBuffer=0),0!=this.glFontVertexPosBuffer&&null!=this.ctx&&(this.ctx.deleteBuffer(this.glFontVertexPosBuffer),this.glFontVertexPosBuffer=0),0!=this.nCaptureRTTex&&(this.ctx.deleteTexture(this.nCaptureRTTex),this.nCaptureRTTex=0),0!=this.nCaptureFBO&&(this.ctx.deleteFramebuffer(this.nCaptureFBO),this.nCaptureFBO=0),0!=this.nCaptureDepthbuffer&&(this.ctx.deleteRenderbuffer(this.nCaptureDepthbuffer),this.nCaptureDepthbuffer=0),this.bCaptureResInit=!1,this.pSemiSpherePos=null,this.pSemiSphereTex=null,this.nSemiSpherePosNum=0,this.nSemiSpherePosSize=0,this.nSemiSphereTexSize=0,this.pSpherePos=null,this.pSphereTex=null,this.pSphereInd=null,this.nSpherePosNum=0,this.nSpherePosSize=0,this.nSphereTexSize=0,this.pCylinderPos=null,this.pCylinderTex=null,this.nCylinderPosNum=0,this.nCylinderPosSize=0,this.nCylinderTexSize=0,this.fCylinderHeight=0,this.fCylinderRadius=0,this.pArcSpherePos=null,this.pArcSphereTex=null,this.nArcSpherePosNum=0,this.nArcSpherePosSize=0,this.nArcSphereTexSize=0,this.b3DPort=!1,this.pCamera=null,this.fRotateX=0,this.fRotateY=0,this.fScale=0,this.pfuncCBIn=null,this.pfuncCBOut=null,this.pUserIn=null,this.pUserOut=null,this.ctx.disable(this.ctx.CULL_FACE),this.ctx.disable(this.ctx.DEPTH_TEST),pe.SR_OK)}},{key:"SetFishParam",value:function(e){return null==e?pe.SR_ERR_PARAM:(this.pstFishParam=e,pe.SR_OK)}},{key:"DrawLines",value:function(e,t,a,r,i,n){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;var s=[],x={};return x.pstPoints=e,x.nPointNum=t,x.bLoop=a,x.pstColor=r,x.nLineWidth=i,s.push(x),this.DrawLinesEx(s,1,t,n)}},{key:"DrawLinesEx",value:function(e,t,a,r){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==e||t<1||a<2)return pe.SR_ERR_PARAM;if(0==this.nLineShaderProgram){var i=this.CompileProgram("\n attribute vec3 position;\n attribute vec4 color;\n varying float pp;\n varying vec4 colorOut;\n uniform int bCapture; \n uniform mat4 matRotate;\n\n void main()\n {\n if(bCapture == 1)\n {\n gl_Position = vec4(position.x, position.y, 0.0, 1.0) * matRotate;\n gl_Position.y = -gl_Position.y;\n }\n else\n {\n gl_Position = vec4(position.x, position.y, 0.0, 1.0) * matRotate;\n }\n pp = position.z;\n colorOut = color;\n }\n",Oe);if(i<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.nLineShaderProgram=i}if(1==r)return this.DrawFillBlock(e,t,a);for(var n=0,s=0;s<t;++s){if(null==e[s].pstPoints||e[s].nPointNum<=1||e[s].nPointNum>=1024||e[s].nLineWidth<=0||null==e[s].pstColor)return pe.SR_ERR_PARAM;n+=e[s].nPointNum}if(n!=a)return pe.SR_ERR_PARAM;if((n+=t)>this.nMaxPointNum&&(this.nMaxPointNum=n,this.pLinePosVertices=null,this.pLineClrVertices=null),null==this.pLinePosVertices&&(this.pLinePosVertices=new Float32Array(6*this.nMaxPointNum*3),null==this.pLinePosVertices))return pe.SR_ERR_ALLOC_MEMORY;if(this.pLinePosVertices.fill(0),null==this.pLineClrVertices&&(this.pLineClrVertices=new Float32Array(6*this.nMaxPointNum*4),null==this.pLineClrVertices))return pe.SR_ERR_ALLOC_MEMORY;if(this.pLineClrVertices.fill(0),0==this.glLinePosBuffer&&(this.glLinePosBuffer=this.ctx.createBuffer(),0==this.glLinePosBuffer))return pe.SR_ERR_WEBGL_RESOURCE;if(0==this.glLineClrBuffer&&(this.glLineClrBuffer=this.ctx.createBuffer(),0==this.glLineClrBuffer))return pe.SR_ERR_WEBGL_RESOURCE;var x=this.ComputeLinePoint(e,t);if(pe.SR_OK!=x)return x;this.ctx.enable(this.ctx.BLEND),this.ctx.blendFuncSeparate(this.ctx.SRC_ALPHA,this.ctx.ONE_MINUS_SRC_ALPHA,this.ctx.ONE,this.ctx.ONE_MINUS_SRC_ALPHA);var o=this.nLineShaderProgram;this.ctx.useProgram(o);var l=this.ctx.getUniformLocation(this.nLineShaderProgram,"bCapture");if(l<=0)return pe.SR_ERR_WEBGL_RESOURCE;1==this.bIsCapturing?this.ctx.uniform1i(l,1):this.ctx.uniform1i(l,0);var _=this.glLinePosBuffer,h=this.glLineClrBuffer,f=this.nLineTriangleNum,c=this.pLinePosVertices,u=this.pLineClrVertices;this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,_),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,c,this.ctx.STATIC_DRAW);var d=this.ctx.getAttribLocation(o,"position");this.ctx.enableVertexAttribArray(d),this.ctx.vertexAttribPointer(d,3,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,h),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,u,this.ctx.STATIC_DRAW);var p=this.ctx.getAttribLocation(o,"color");this.ctx.enableVertexAttribArray(p),this.ctx.vertexAttribPointer(p,4,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null);var m=this.ctx.getUniformLocation(o,"matRotate");return m<=0?pe.SR_ERR_WEBGL_RESOURCE:(this.ctx.uniformMatrix4fv(m,!1,this.matRotate),1==this.bIsCapturing?this.ctx.viewport(0,0,this.nCaptureWidth,this.nCaptureHeight):this.ctx.viewport(0,0,this.nWndWidth,this.nWndHeight),this.ctx.disable(this.ctx.DEPTH_TEST),this.ctx.drawArrays(this.ctx.TRIANGLES,0,3*f),this.ctx.useProgram(null),this.ctx.disable(this.ctx.BLEND),this.b3DPort&&(this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0),1==this.bCullBack?this.ctx.enable(this.ctx.CULL_FACE):this.ctx.disable(this.ctx.CULL_FACE)),pe.SR_OK)}},{key:"DrawFillBlock",value:function(e,t,a){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==e||t<1||a<2)return pe.SR_ERR_PARAM;for(var r=0,i=0;i<t;++i){if(null==e[i].pstPoints||e[i].nPointNum<3||1!=e[i].bLoop||null==e[i].pstColor)return pe.SR_ERR_PARAM;r+=e[i].nPointNum}if(r!==a)return pe.SR_ERR_PARAM;var n=a-2*t;if(n>this.nMaxFillBlockTriNum&&(this.pFillBlockPosVertices=null,this.pFillBlockClrVertices=null,this.nMaxFillBlockTriNum=n),0==this.glBlockPosBuffer&&(this.glBlockPosBuffer=this.ctx.createBuffer(),0==this.glBlockPosBuffer))return pe.SR_ERR_WEBGL_RESOURCE;if(0==this.glBlockClrBuffer&&(this.glBlockClrBuffer=this.ctx.createBuffer(),0==this.glBlockClrBuffer))return pe.SR_ERR_WEBGL_RESOURCE;if(null==this.pFillBlockPosVertices){var s=this.nMaxFillBlockTriNum;if(this.pFillBlockPosVertices=new Float32Array(3*s*3),null==this.pFillBlockPosVertices)return pe.SR_ERR_ALLOC_MEMORY}if(this.pFillBlockPosVertices.fill(0),null==this.pFillBlockClrVertices){var x=this.nMaxFillBlockTriNum;if(this.pFillBlockClrVertices=new Float32Array(4*x*3),null==this.pFillBlockClrVertices)return pe.SR_ERR_ALLOC_MEMORY}this.pFillBlockClrVertices.fill(0);for(var o=0,l=0,_=0,h=null,f=null,c={},u={},d={},p=0;p<t;++p){_=e[p].nPointNum,h=e[p].pstPoints,f=e[p].pstColor,c.fX=(h[0].fX-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),c.fX=this.fDstUseLeft+c.fX*(this.fDstUseRight-this.fDstUseLeft),c.fX=2*c.fX-1,c.fY=(h[0].fY-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),c.fY=this.fDstUseTop+c.fY*(this.fDstUseBottom-this.fDstUseTop),c.fY=1-2*c.fY;for(var m=1;m<_-1;m++)u.fX=(h[m].fX-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),u.fX=this.fDstUseLeft+u.fX*(this.fDstUseRight-this.fDstUseLeft),u.fX=2*u.fX-1,u.fY=(h[m].fY-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),u.fY=this.fDstUseTop+u.fY*(this.fDstUseBottom-this.fDstUseTop),u.fY=1-2*u.fY,d.fX=(h[m+1].fX-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),d.fX=this.fDstUseLeft+d.fX*(this.fDstUseRight-this.fDstUseLeft),d.fX=2*d.fX-1,d.fY=(h[m+1].fY-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),d.fY=this.fDstUseTop+d.fY*(this.fDstUseBottom-this.fDstUseTop),d.fY=1-2*d.fY,this.pFillBlockPosVertices[o++]=c.fX,this.pFillBlockPosVertices[o++]=c.fY,this.pFillBlockPosVertices[o++]=0,this.pFillBlockClrVertices[l++]=f.fR,this.pFillBlockClrVertices[l++]=f.fG,this.pFillBlockClrVertices[l++]=f.fB,this.pFillBlockClrVertices[l++]=f.fA,this.pFillBlockPosVertices[o++]=u.fX,this.pFillBlockPosVertices[o++]=u.fY,this.pFillBlockPosVertices[o++]=0,this.pFillBlockClrVertices[l++]=f.fR,this.pFillBlockClrVertices[l++]=f.fG,this.pFillBlockClrVertices[l++]=f.fB,this.pFillBlockClrVertices[l++]=f.fA,this.pFillBlockPosVertices[o++]=d.fX,this.pFillBlockPosVertices[o++]=d.fY,this.pFillBlockPosVertices[o++]=0,this.pFillBlockClrVertices[l++]=f.fR,this.pFillBlockClrVertices[l++]=f.fG,this.pFillBlockClrVertices[l++]=f.fB,this.pFillBlockClrVertices[l++]=f.fA}if(0==this.nBlockShaderProgram&&(this.nBlockShaderProgram=this.CompileProgram("\n attribute vec3 position;\n attribute vec4 color;\n varying float pp;\n varying vec4 colorOut;\n uniform int bCapture; \n\n void main()\n {\n if(bCapture == 1)\n {\n gl_Position = vec4(position.x, position.y, 0.0, 1.0);\n gl_Position.y = -gl_Position.y;\n }\n else\n {\n gl_Position = vec4(position.x, position.y, 0.0, 1.0);\n }\n pp = position.z;\n colorOut = color;\n }\n",Oe),this.nBlockShaderProgram<=0))return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.enable(this.ctx.BLEND),this.ctx.blendFuncSeparate(this.ctx.SRC_ALPHA,this.ctx.ONE_MINUS_SRC_ALPHA,this.ctx.ONE,this.ctx.ONE_MINUS_SRC_ALPHA),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glBlockPosBuffer),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,this.pFillBlockPosVertices,this.ctx.STATIC_DRAW),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glBlockClrBuffer),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,this.pFillBlockClrVertices,this.ctx.STATIC_DRAW),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.useProgram(this.nBlockShaderProgram);var S=this.ctx.getUniformLocation(this.nBlockShaderProgram,"bCapture");if(S<=0)return pe.SR_ERR_WEBGL_RESOURCE;1==this.bIsCapturing?this.ctx.uniform1i(S,1):this.ctx.uniform1i(S,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glBlockPosBuffer);var R=this.ctx.getAttribLocation(this.nBlockShaderProgram,"position");this.ctx.enableVertexAttribArray(R),this.ctx.vertexAttribPointer(R,3,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glBlockClrBuffer);var P=this.ctx.getAttribLocation(this.nBlockShaderProgram,"color");return this.ctx.enableVertexAttribArray(P),this.ctx.vertexAttribPointer(P,4,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.drawArrays(this.ctx.TRIANGLES,0,3*n),this.ctx.useProgram(null),this.ctx.disable(this.ctx.BLEND),pe.SR_OK}},{key:"ComputeLinePoint",value:function(e,t){if(null==e||t<1)return pe.SR_ERR_PARAM;if(null==this.pLinePosVertices||null==this.pLineClrVertices)return pe.SR_ERR_CALL_ORDER;var a=0,r=0;1==this.bIsCapturing?(a=(this.fDstUseRight-this.fDstUseLeft)*this.nCaptureWidth,r=(this.fDstUseBottom-this.fDstUseTop)*this.nCaptureHeight):(a=(this.fDstUseRight-this.fDstUseLeft)*this.nWndWidth,r=(this.fDstUseBottom-this.fDstUseTop)*this.nWndHeight);for(var i=0,n=0,s=0,x=0,o=0,l=0,_=0,h=0,f=0,c=0,u=0,d=0;d<t;++d){var p=[];if(!((u=e[d].nPointNum)<=0)){for(var m=0;m<u;++m){var S={};S.fX=(e[d].pstPoints[m].fX-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),S.fX=this.fDstUseLeft+S.fX*(this.fDstUseRight-this.fDstUseLeft),S.fX=2*S.fX-1,S.fY=(e[d].pstPoints[m].fY-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),S.fY=this.fDstUseTop+S.fY*(this.fDstUseBottom-this.fDstUseTop),S.fY=1-2*S.fY,p.push(S)}if(this.nWndWidth<=0||this.nWndHeight<=0)return pe.SR_ERR_CANVAS;if(l=3.5*e[d].nLineWidth/a,_=3.5*e[d].nLineWidth/r,l<=0||_<=0)return pe.SR_ERR_PARAM;var R=e[d].pstColor;if(null==R||null==R)return pe.SR_ERR_PARAM;for(var P=0;P<u-1;++P)n=p[P+1].fX-p[P].fX,s=p[P+1].fY-p[P].fY,i=Math.sqrt(n*n+s*s),Math.abs(i-0)<1e-6||(x=-l*s/i/2,o=_*n/i/2,this.pLinePosVertices[f++]=p[P].fX+x,this.pLinePosVertices[f++]=p[P].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[P+1].fX-x,this.pLinePosVertices[f++]=p[P+1].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[P].fX-x,this.pLinePosVertices[f++]=p[P].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[P].fX+x,this.pLinePosVertices[f++]=p[P].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[P+1].fX+x,this.pLinePosVertices[f++]=p[P+1].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[P+1].fX-x,this.pLinePosVertices[f++]=p[P+1].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,h+=2);1==e[d].bLoop&&2<u&&(n=p[u-1].fX-p[0].fX,s=p[u-1].fY-p[0].fY,i=Math.sqrt(n*n+s*s),Math.abs(i-0)>1e-6&&(x=-l*s/i/2,o=_*n/i/2,this.pLinePosVertices[f++]=p[0].fX+x,this.pLinePosVertices[f++]=p[0].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[u-1].fX-x,this.pLinePosVertices[f++]=p[u-1].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[0].fX-x,this.pLinePosVertices[f++]=p[0].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[0].fX+x,this.pLinePosVertices[f++]=p[0].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[u-1].fX+x,this.pLinePosVertices[f++]=p[u-1].fY+o,this.pLinePosVertices[f++]=-1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,this.pLinePosVertices[f++]=p[u-1].fX-x,this.pLinePosVertices[f++]=p[u-1].fY-o,this.pLinePosVertices[f++]=1,this.pLineClrVertices[c++]=R.fR,this.pLineClrVertices[c++]=R.fG,this.pLineClrVertices[c++]=R.fB,this.pLineClrVertices[c++]=R.fA,h+=2))}}return 0==h?pe.SR_ERR_PARAM:(this.nLineTriangleNum=h,pe.SR_OK)}},{key:"DrawFont",value:function(e,t,a,r,i,n,s,x,o,l,_){return pe.SR_ERR_NOT_SUPPORT}},{key:"DrawFontEx",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(0>t||null==e)return pe.SR_ERR_PARAM;var i,n,s=0,x=0;if(1==this.bIsCapturing){if(0==this.nCaptureWidth||0==this.nCaptureHeight)return pe.SR_ERR_CALL_ORDER;s=Math.round((this.fDstUseRight-this.fDstUseLeft)*this.nCaptureWidth),x=Math.round((this.fDstUseBottom-this.fDstUseTop)*this.nCaptureHeight)}else s=Math.round((this.fDstUseRight-this.fDstUseLeft)*this.nWndWidth),x=Math.round((this.fDstUseBottom-this.fDstUseTop)*this.nWndHeight);if(this.nDrawFontWidth==s&&this.nDrawFontHeight==x||(this.pFontColorBuffer=null,this.nFontColorTexture=0,this.nDrawFontWidth=s,this.nDrawFontHeight=x),0==this.nFontColorTexture){if(this.nFontColorTexture=this.ctx.createTexture(),0==this.nFontColorTexture)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nFontColorTexture),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE)}if(null==this.textCanvas){if(this.textCanvas=r,null==this.textCanvas)return pe.SR_ERR_FONT;if(this.textCanvasCtx=this.textCanvas.getContext("2d"),null==this.textCanvasCtx)return pe.SR_ERR_FONT}this.textCanvasCtx.canvas.width=this.nDrawFontWidth,this.textCanvasCtx.canvas.height=this.nDrawFontHeight,this.textCanvasCtx.clearRect(0,0,this.nDrawFontWidth,this.nDrawFontHeight);for(var o=0;o<t;++o){var l=e[o].nFontWidth,_=e[o].nFontHeight;1==this.bIsCapturing&&(l=Math.round(this.nCaptureWidth/this.nWndWidth*l),_=Math.round(this.nCaptureHeight/this.nWndHeight*_));var h=l<_?l:_;this.textCanvasCtx.font="".concat(h,"px ").concat(e[o].pFontFamily),this.textCanvasCtx.textAlign=e[o].textAlign||"left",this.textCanvasCtx.textBaseline=e[o].textBaseline||"top",this.textCanvasCtx.save();var f=e[o].pstStartPos.fX*this.nDrawFontWidth,c=e[o].pstStartPos.fY*this.nDrawFontHeight;if(this.textCanvasCtx.translate(f,c),this.textCanvasCtx.rotate(e[o].fRotateAngle*Math.PI/180),e[o].bBackGround){var u=e[o].pstStartPos.fX,d=e[o].pstStartPos.fY,m=this.textCanvasCtx.measureText(e[o].pString).width,R=h;switch(this.textCanvasCtx.textAlign){case"center":u-=m/2;break;case"right":case"end":u-=m}switch(this.textCanvasCtx.textBaseline){case"top":case"hanging":break;case"middle":d-=R/2;break;default:d-=R}var P=e[o].pstBGColor;this.textCanvasCtx.fillStyle="rgb(".concat(255*P.fR,", ").concat(255*P.fG,", ").concat(255*P.fB,")"),this.textCanvasCtx.globalAlpha=P.fA,this.textCanvasCtx.fillRect(u,d,m,R)}var y=e[o].pstFontColor;this.textCanvasCtx.fillStyle="rgb(".concat(255*y.fR,", ").concat(255*y.fG,", ").concat(255*y.fB,")"),this.textCanvasCtx.globalAlpha=e[o].pstFontColor.fA,this.textCanvasCtx.fillText(e[o].pString,0,0),this.textCanvasCtx.restore()}if(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nFontColorTexture),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,this.textCanvasCtx.canvas),0==this.nFontShaderProgram&&(this.nFontShaderProgram=this.CompileProgram("\n attribute vec4 position;\n attribute vec4 texCoord;\n varying vec4 pp; \n uniform int bCapture;\n uniform mat4 matRotate;\n\n void main()\n { \n gl_Position.x = position.x;\n gl_Position.y = position.y;\n if(bCapture == 1)\n {\n gl_Position.y = -position.y;\n }\n gl_Position.z = 0.1;\n gl_Position.w = 1.0;\n pp = matRotate * texCoord; \n }\n","\n varying lowp vec4 pp;\n uniform sampler2D texture;\n\n void main(void)\n {\n gl_FragColor = texture2D(texture, pp.st);\n }\n"),this.nFontShaderProgram<=0))return pe.SR_ERR_WEBGL_RESOURCE;if(1==this.bIsCapturing?(i=this.nCaptureWidth,n=this.nCaptureHeight):(i=this.nWndWidth,n=this.nWndHeight),1==a){if(0==this.glFontVertexPosBuffer){var b=new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0]),E=this.ctx.createBuffer();this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,E),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,b,this.ctx.STATIC_DRAW),this.glFontVertexPosBuffer=E,b=0}if(0==this.glFontTexturePosBuffer){var g=new Float32Array([0,1,1,1,1,0,0,0]),F=this.ctx.createBuffer();this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,F),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,g,this.ctx.STATIC_DRAW),this.glFontTexturePosBuffer=F,g=0}}this.ctx.viewport(0,0,i,n),this.ctx.enable(this.ctx.BLEND),this.ctx.blendFuncSeparate(this.ctx.SRC_ALPHA,this.ctx.ONE_MINUS_SRC_ALPHA,this.ctx.ONE,this.ctx.ONE_MINUS_SRC_ALPHA),this.ctx.useProgram(this.nFontShaderProgram);var C=this.ctx.getUniformLocation(this.nFontShaderProgram,"bCapture");if(C<=0)return pe.SR_ERR_WEBGL_RESOURCE;1==this.bIsCapturing?this.ctx.uniform1i(C,1):this.ctx.uniform1i(C,0),this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nFontColorTexture);var v=this.ctx.getUniformLocation(this.nFontShaderProgram,"texture");this.ctx.uniform1i(v,0);var T=p(),D=p(),A=p();S(A,T,D);var I=this.ctx.getUniformLocation(this.nFontShaderProgram,"matRotate");if(I<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(I,!1,A),1==a?this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glFontVertexPosBuffer):this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer);var M=this.ctx.getAttribLocation(this.nFontShaderProgram,"position");this.ctx.enableVertexAttribArray(M),1==a?this.ctx.vertexAttribPointer(M,3,this.ctx.FLOAT,!1,0,0):this.ctx.vertexAttribPointer(M,2,this.ctx.FLOAT,!1,0,0),1==a?this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glFontTexturePosBuffer):this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer);var L=this.ctx.getAttribLocation(this.nFontShaderProgram,"texCoord");return this.ctx.enableVertexAttribArray(L),this.ctx.vertexAttribPointer(L,2,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.disable(this.ctx.DEPTH_TEST),1==a?this.ctx.drawArrays(this.ctx.TRIANGLE_FAN,0,4):this.ctx.drawArrays(this.ctx.TRIANGLES,0,6),this.ctx.bindTexture(this.ctx.TEXTURE_2D,null),this.ctx.useProgram(null),this.ctx.disable(this.ctx.BLEND),this.b3DPort&&(this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0),1==this.bCullBack?this.ctx.enable(this.ctx.CULL_FACE):this.ctx.disable(this.ctx.CULL_FACE)),pe.SR_OK}},{key:"DrawImage",value:function(e,t,a,r,i,n){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==e||t<=0||a<=0||null==r||n<0||n>1)return pe.SR_ERR_PARAM;if(this.nDrawImageWidth=t,this.nDrawImageHeight=a,0==this.glImagePosBuffer&&(this.glImagePosBuffer=this.ctx.createBuffer(),0==this.glImagePosBuffer))return pe.SR_ERR_WEBGL_RESOURCE;if(0==this.glImageClrBuffer&&(this.glImageClrBuffer=this.ctx.createBuffer(),0==this.glImageClrBuffer))return pe.SR_ERR_WEBGL_RESOURCE;if(null==this.pImageClrVertices){if(this.pImageClrVertices=new Float32Array(12),null==this.pImageClrVertices)return pe.SR_ERR_ALLOC_MEMORY;this.pImageClrVertices[0]=0,this.pImageClrVertices[1]=0,this.pImageClrVertices[2]=0,this.pImageClrVertices[3]=1,this.pImageClrVertices[4]=1,this.pImageClrVertices[5]=0,this.pImageClrVertices[6]=1,this.pImageClrVertices[7]=0,this.pImageClrVertices[8]=0,this.pImageClrVertices[9]=1,this.pImageClrVertices[10]=1,this.pImageClrVertices[11]=1}var s={},x={};if(s.fLeft=(r.fLeft-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),s.fRight=(r.fRight-this.fSrcUseLeft)/(this.fSrcUseRight-this.fSrcUseLeft),s.fTop=(r.fTop-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),s.fBottom=(r.fBottom-this.fSrcUseTop)/(this.fSrcUseBottom-this.fSrcUseTop),x.fLeft=this.fDstUseLeft+s.fLeft*(this.fDstUseRight-this.fDstUseLeft),x.fRight=this.fDstUseLeft+s.fRight*(this.fDstUseRight-this.fDstUseLeft),x.fTop=this.fDstUseTop+s.fTop*(this.fDstUseBottom-this.fDstUseTop),x.fBottom=this.fDstUseTop+s.fBottom*(this.fDstUseBottom-this.fDstUseTop),null==this.pImagePosVertices&&(this.pImagePosVertices=new Float32Array(12),null==this.pImagePosVertices))return pe.SR_ERR_ALLOC_MEMORY;switch(this.pImagePosVertices.fill(0),this.pImagePosVertices[0]=2*x.fLeft-1,this.pImagePosVertices[1]=1-2*x.fTop,this.pImagePosVertices[2]=2*x.fLeft-1,this.pImagePosVertices[3]=1-2*x.fBottom,this.pImagePosVertices[4]=2*x.fRight-1,this.pImagePosVertices[5]=1-2*x.fTop,this.pImagePosVertices[6]=2*x.fRight-1,this.pImagePosVertices[7]=1-2*x.fTop,this.pImagePosVertices[8]=2*x.fLeft-1,this.pImagePosVertices[9]=1-2*x.fBottom,this.pImagePosVertices[10]=2*x.fRight-1,this.pImagePosVertices[11]=1-2*x.fBottom,1==this.bIsCapturing?this.ctx.viewport(0,0,this.nCaptureWidth,this.nCaptureHeight):this.ctx.viewport(0,0,this.nWndWidth,this.nWndHeight),this.ctx.enable(this.ctx.BLEND),this.ctx.blendFuncSeparate(this.ctx.SRC_ALPHA,this.ctx.ONE_MINUS_SRC_ALPHA,this.ctx.ONE,this.ctx.ONE_MINUS_SRC_ALPHA),i){case Re.SR_PF_SURFACE:if(null==this.nImageColorTexture){if(this.nImageColorTexture=this.ctx.createTexture(),0==this.nImageColorTexture)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE)}this.ctx.useProgram(this.videoShaderProgram),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer);var o=this.ctx.getAttribLocation(this.videoShaderProgram,"position");if(o<0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.vertexAttribPointer(o,3,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(o),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer);var l=this.ctx.getAttribLocation(this.videoShaderProgram,"texCoord");if(l<0)return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.vertexAttribPointer(l,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(l),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.useProgram(null),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,this.nDrawImageWidth,this.nDrawImageHeight,0,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,e),0==this.nImageShaderProgram){var _=this.CompileProgram(Be,ke);if(_<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.nImageShaderProgram=_}break;case Re.SR_PF_RGBA32:if(null==this.nImageColorTexture){if(this.nImageColorTexture=this.ctx.createTexture(),0==this.nImageColorTexture)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE)}if(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,this.nDrawImageWidth,this.nDrawImageHeight,0,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,e),0==this.nImageShaderProgram){var h=this.CompileProgram(Be,ke);if(h<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.nImageShaderProgram=h}break;case Re.SR_PF_RGB565:if(null==this.nImageColorTexture){if(this.nImageColorTexture=this.ctx.createTexture(),0==this.nImageColorTexture)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE)}if(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGB,this.nDrawImageWidth,this.nDrawImageHeight,0,this.ctx.RGB,this.ctx.UNSIGNED_SHORT_5_6_5,e),0==this.nImageShaderProgram){var f=this.CompileProgram(Be,"\n precision mediump float; \n uniform sampler2D texture; \n varying lowp vec4 pp;\n uniform float fAlpha;\n void main(void) \n { \n gl_FragColor = texture2D(texture, pp.st); \n gl_FragColor.a *= fAlpha; \n } \n");if(f<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.nImageShaderProgram=f}break;default:return pe.SR_ERR_NOT_SUPPORT}var c=this.nImageShaderProgram;this.ctx.useProgram(c);var u=this.ctx.getUniformLocation(this.nImageShaderProgram,"bCapture");if(u<=0)return pe.SR_ERR_WEBGL_RESOURCE;1==this.bIsCapturing?this.ctx.uniform1i(u,1):this.ctx.uniform1i(u,0),this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nImageColorTexture);var d=this.ctx.getUniformLocation(this.nImageShaderProgram,"texture");this.ctx.uniform1i(d,0),d=this.ctx.getUniformLocation(this.nImageShaderProgram,"fAlpha"),this.ctx.uniform1f(d,n);var p=this.ctx.getUniformLocation(this.nImageShaderProgram,"matRotate");if(p<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniformMatrix4fv(p,!1,this.matRotate),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glImagePosBuffer),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,this.pImagePosVertices,this.ctx.STATIC_DRAW);var m=this.ctx.getAttribLocation(this.nImageShaderProgram,"position");this.ctx.enableVertexAttribArray(m),this.ctx.vertexAttribPointer(m,2,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.glImageClrBuffer),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,this.pImageClrVertices,this.ctx.STATIC_DRAW);var S=this.ctx.getAttribLocation(this.nImageShaderProgram,"texCoord");return this.ctx.enableVertexAttribArray(S),this.ctx.vertexAttribPointer(S,2,this.ctx.FLOAT,!1,0,0),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.disable(this.ctx.DEPTH_TEST),this.ctx.drawArrays(this.ctx.TRIANGLES,0,6),this.ctx.useProgram(null),this.ctx.disable(this.ctx.BLEND),this.b3DPort&&(this.ctx.enable(this.ctx.DEPTH_TEST),this.ctx.depthFunc(this.ctx.LESS),this.ctx.depthMask(!0),1==this.bCullBack?this.ctx.enable(this.ctx.CULL_FACE):this.ctx.disable(this.ctx.CULL_FACE)),pe.SR_OK}},{key:"DrawMosaic",value:function(e,t,a,r,i){if(e<0||t<0||a<0||r<0||e>1||t>1||a>1||r>1||i<=0)return pe.SR_ERR_PARAM;if(0==this.nMosaicShaderProgram){var n=this.CompileProgram("\n attribute vec4 position; \n attribute vec4 texCoord; \n varying vec4 out_texCoord; \n uniform int bCapture;\n \n void main() \n { \n gl_Position = position; \n if(bCapture == 1)\n {\n gl_Position.y = -gl_Position.y;\n }\n out_texCoord = texCoord; \n } \n","\n varying lowp vec4 out_texCoord; \n uniform sampler2D texture; \n uniform mediump float videoWidth; \n uniform mediump float videoHeight; \n uniform mediump float mosaicSize; \n uniform mediump float left; \n uniform mediump float right; \n uniform mediump float top; \n uniform mediump float bottom; \n\n void main(void) \n { \n lowp vec2 uv; \n uv.x = floor(out_texCoord.x * videoWidth / mosaicSize) * mosaicSize / videoWidth; \n uv.y = floor(out_texCoord.y * videoHeight / mosaicSize) * mosaicSize / videoHeight; \n gl_FragColor = texture2D(texture, uv); \n if(out_texCoord.x < left || out_texCoord.x > right || out_texCoord.y < top || out_texCoord.y > bottom) \n { \n gl_FragColor.a = 0.0; \n } \n else \n { \n gl_FragColor.a = 1.0; \n } \n } \n");if(n<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.nMosaicShaderProgram=n}this.ctx.viewport(0,0,this.nWndWidth,this.nWndHeight),this.ctx.enable(this.ctx.BLEND),this.ctx.blendFuncSeparate(this.ctx.SRC_ALPHA,this.ctx.ONE_MINUS_SRC_ALPHA,this.ctx.ONE,this.ctx.ONE_MINUS_SRC_ALPHA);var s=this.nMosaicShaderProgram;this.ctx.useProgram(s);var x=this.ctx.getUniformLocation(s,"bCapture");if(x<=0)return pe.SR_ERR_WEBGL_RESOURCE;1==this.bIsCapturing?this.ctx.uniform1i(x,1):this.ctx.uniform1i(x,0),this.ctx.activeTexture(this.ctx.TEXTURE0),this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]);var o=this.ctx.getUniformLocation(s,"texture");this.ctx.uniform1i(o,0);var l=this.ctx.getUniformLocation(s,"videoWidth");if(l<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(l,this.frameDisplayWidth);var _=this.ctx.getUniformLocation(s,"videoHeight");if(_<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(_,this.frameDisplayHeight);var h=this.ctx.getUniformLocation(s,"mosaicSize");if(h<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(h,i);var f=this.ctx.getUniformLocation(s,"left");if(f<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(f,e);var c=this.ctx.getUniformLocation(s,"right");if(c<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(c,t);var u=this.ctx.getUniformLocation(s,"top");if(u<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(u,a);var d=this.ctx.getUniformLocation(s,"bottom");if(d<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.uniform1f(d,r);var p=this.ctx.getAttribLocation(s,"position");this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.vertexPosBuffer),this.ctx.vertexAttribPointer(p,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(p);var m=this.ctx.getAttribLocation(s,"texCoord");return this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,this.texturePosBuffer),this.ctx.vertexAttribPointer(m,2,this.ctx.FLOAT,!1,0,0),this.ctx.enableVertexAttribArray(m),this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),this.ctx.drawArrays(this.ctx.TRIANGLES,0,6),this.ctx.useProgram(null),this.ctx.disable(this.ctx.BLEND),pe.SR_OK}},{key:"SetCallBack",value:function(e,t,a){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;switch(a){case Ee.SR_CBT_NULL:this.pfuncCBIn=e,this.pUserIn=t;break;case Ee.SR_CBT_OUT:this.pfuncCBOut=e,this.pUserOut=t;break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"DoCallBack",value:function(){return null==this.ctx?pe.SR_ERR_CALL_ORDER:(null!=this.pfuncCBIn&&this.pfuncCBIn(this.pUserIn),null!=this.pfuncCBOut&&this.pfuncCBOut(this.pUserOut),pe.SR_OK)}},{key:"SetViewParam",value:function(e,t){if(!this.b3DPort)return pe.SR_ERR_NOT_SUPPORT;switch(e){case be.SR_VT_ROTATION_X:if((this.enDisplayEffect==Se.SR_DE_FISH_PLANET||this.enDisplayEffect==Se.SR_DE_PANORAMA_PLANET)&&(t>1.57||t<-1.57))return pe.SR_ERR_PARAM;if((this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR)&&(t>.78539815||t<0))return pe.SR_ERR_PARAM;if((this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL)&&(t>this.fRotateLimitX||t<-this.fRotateLimitX))return pe.SR_ERR_PARAM;this.fRotateX=t;break;case be.SR_VT_ROTATION_Y:if((this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL)&&(t>this.fRotateLimitY||t<-this.fRotateLimitY))return pe.SR_ERR_PARAM;this.fRotateY=t;break;case be.SR_VT_SCALE:if(this.enDisplayEffect==Se.SR_DE_FISH_PLANET&&(t>1.2||t<-.3))return pe.SR_ERR_PARAM;if(this.enDisplayEffect==Se.SR_DE_FISH_SEMISPHERE){if(t<-.8||t>900)return pe.SR_ERR_PARAM}else if(this.enDisplayEffect==Se.SR_DE_PANORAMA_SPHERE){if(t<-.95||t>.95)return pe.SR_ERR_PARAM}else if(this.enDisplayEffect==Se.SR_DE_PANORAMA_PLANET){if(t<.1||t>2.6)return pe.SR_ERR_PARAM}else if(this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_FLOOR||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_CEILING){if(t<0||t>900)return pe.SR_ERR_PARAM}else if(this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL){if(t<-.3||t>5)return pe.SR_ERR_PARAM;this._ComputeRotateLimits()}else if(this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING||this.enDisplayEffect==Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR)return pe.SR_ERR_NOT_SUPPORT;this.fScale=t;break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"GetViewParam",value:function(e,t){if(!this.b3DPort)return pe.SR_ERR_CALL_ORDER;var a=0;switch(e){case be.SR_VT_ROTATION_X:a=this.fRotateX;break;case be.SR_VT_ROTATION_Y:a=this.fRotateY;break;case be.SR_VT_SCALE:a=this.fScale;break;default:return pe.SR_ERR_NOT_SUPPORT}return t.fValue=a,pe.SR_OK}},{key:"SetRenderMode",value:function(e){return this.bRenderToTex=e,pe.SR_OK}},{key:"_InitVideoShader",value:function(e,t){var a,r;switch(t){case Se.SR_DE_NULL:a=Le,r="\nprecision mediump float;\nvarying highp vec4 pp;\nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform float fWndWidth;\nuniform float fWndHeight;\nuniform float fBrightness;\nuniform float fHue;\nuniform float fSaturation;\nuniform float fContrast;\nuniform float fSharpness;\nuniform int nPostProc;\nuniform int bDataFormat;\n\nvec3 rgb;\nvec3 yuv2rgb(float y, float u, float v)\n{\n float r,g,b; \n y = 1.1643 * (y - 0.0625); \n u = u - 0.5; \n v = v - 0.5; \n r = y + 1.5958 * v; \n g = y - 0.39173 * u - 0.81290 * v; \n b = y + 2.017 * u; \n return vec3(r, g, b);\n}\nvec3 rgb2hsv(vec3 c) \n{ \n vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); \n vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy); \n vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx); \n\n float d = q.x - min(q.w, q.y); \n float e = 1.0e-10; \n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); \n} \n\nvec3 hsv2rgb(vec3 c) \n{ \n vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); \n vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); \n return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); \n} \n\nvec3 sharpen(vec3 c) \n{ \n vec3 sharpenColor; \n\n if(bDataFormat == 0)\n {\n float sharpenColorY;\n float sharpenColorU;\n float sharpenColorV;\n float offWidth = 1.0 / fWndWidth; \n float offHeight = 1.0 / fWndHeight; \n float tempSharpness = fSharpness * 100.0; \n\n sharpenColor = (1.0 + 4.0 * tempSharpness) * c;\n\n vec2 uv = pp.st + vec2(offWidth, 0); \n sharpenColorY = texture2D(Ytexture, uv).r; \n sharpenColorU = texture2D(Utexture, uv).r; \n sharpenColorV = texture2D(Vtexture, uv).r; \n sharpenColor -= tempSharpness * yuv2rgb(sharpenColorY, sharpenColorU, sharpenColorV);\n\n uv = pp.st + vec2(-offWidth, 0); \n sharpenColorY = texture2D(Ytexture, uv).r;\n sharpenColorU = texture2D(Utexture, uv).r; \n sharpenColorV = texture2D(Vtexture, uv).r; \n sharpenColor -= tempSharpness * yuv2rgb(sharpenColorY, sharpenColorU, sharpenColorV);\n\n uv = pp.st + vec2(0, offHeight);\n sharpenColorY = texture2D(Ytexture, uv).r; \n sharpenColorU = texture2D(Utexture, uv).r; \n sharpenColorV = texture2D(Vtexture, uv).r; \n sharpenColor -= tempSharpness * yuv2rgb(sharpenColorY, sharpenColorU, sharpenColorV);\n\n uv = pp.st + vec2(0, -offHeight); \n sharpenColorY = texture2D(Ytexture, uv).r; \n sharpenColorU = texture2D(Utexture, uv).r; \n sharpenColorV = texture2D(Vtexture, uv).r; \n sharpenColor -= tempSharpness * yuv2rgb(sharpenColorY, sharpenColorU, sharpenColorV);\n }\n else if(bDataFormat == 1)\n {\n vec3 sharpenColorY;\n float offWidth = 1.0 / fWndWidth; \n float offHeight = 1.0 / fWndHeight; \n float tempSharpness = fSharpness * 100.0;\n vec2 uv = pp.st;\n sharpenColorY = (1.0 + 4.0 * tempSharpness) * texture2D(Ytexture, uv).rgb;\n\n uv = pp.st + vec2(offWidth, 0); \n sharpenColorY -= tempSharpness * texture2D(Ytexture, uv).rgb;\n\n uv = pp.st + vec2(-offWidth, 0); \n sharpenColorY -= tempSharpness * texture2D(Ytexture, uv).rgb;\n\n uv = pp.st + vec2(0, offHeight);\n sharpenColorY -= tempSharpness * texture2D(Ytexture, uv).rgb;\n\n uv = pp.st + vec2(0, -offHeight); \n sharpenColorY -= tempSharpness * texture2D(Ytexture, uv).rgb;\n\n sharpenColor = sharpenColorY;\n }\n\n return sharpenColor; \n} \nvoid main(void)\n{\n float r, g, b, y, u, v;\n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, pp.st).r; \n g = texture2D(Ytexture, pp.st).g; \n b = texture2D(Ytexture, pp.st).b; \n rgb = vec3(r, g, b);\n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, pp.st).r;\n u = texture2D(Utexture, pp.st).r;\n v = texture2D(Vtexture, pp.st).r;\n rgb = yuv2rgb(y, u, v);\n }\n\n if(1 == nPostProc)\n {\n vec3 fragRGB = sharpen(rgb); //sharpen 锐度\n vec3 fragHSV = rgb2hsv(fragRGB); \n fragHSV.x = fragHSV.x + fHue; //hue 色度\n fragHSV.y = fragHSV.y * (fSaturation + 1.0); //saturation 饱和度\n fragRGB = hsv2rgb(fragHSV); \n if (fBrightness > 0.0) //brightness 亮度\n { \n fragRGB = fragRGB + (1.0 - fragRGB) * fBrightness; \n } \n else \n { \n fragRGB = fragRGB + fragRGB * fBrightness; \n } \n\n float tempContrast = fContrast > 0.0 ? fContrast * 10.0 : fContrast; \n fragRGB = ((fragRGB - 0.5) * max(tempContrast + 1.0, 0.0)) + 0.5; //contrast 对比度\n gl_FragColor = vec4(fragRGB, 1.0); \n }\n else\n {\n gl_FragColor = vec4(rgb, 1.0);\n }\n}\n";break;case Se.SR_DE_FISH_ORIGINAL:a=Le,r="\nprecision mediump float;\nvarying vec4 pp;\nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform float fRX1;\nuniform float fRX2;\nuniform float fRY1;\nuniform float fRY2;\nuniform int bBlack; \nuniform int bCut;\nuniform int bDataFormat;\n\nvoid main()\n{ \n\tfloat r,g,b,y,u,v;\n\tvec4 origin;\n\n\tfloat w;\n\tfloat h;\n\tfloat fCenterX;\n\tfloat fCenterY;\n\tfloat fRadius;\n\tw = 1.0;\n\th = (fRX2 - fRX1) / (fRY2 - fRY1);\n\tfCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n\tfCenterY = (fRY1 + fRY2) / 2.0 * h;\n\tfRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n\tfloat leftCut = 0.0;\n\tfloat rightCut = 1.0;\n\tfloat topCut = 0.0;\n\tfloat bottomCut = 1.0;\n\tif(bCut == 1)\n\t{\n\t\tif(fRX1 > 0.0)\n\t\t{\n\t\t\tleftCut = fRX1;\n\t\t}\n\t\tif(fRX2 < 1.0)\n\t\t{\n\t\t\trightCut = fRX2;\n\t\t}\n\t\tif(fRY1 > 0.0)\n\t\t{\n\t\t\ttopCut = fRY1;\n\t\t}\n\t\tif(fRY2 < 1.0)\n\t\t{\n\t\t\tbottomCut = fRY2;\n\t\t}\n\t}\n\torigin.s = pp.s * (rightCut-leftCut) + leftCut;\n\torigin.t = pp.t * (bottomCut-topCut) + topCut;\n\n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, origin.st).r; \n g = texture2D(Ytexture, origin.st).g; \n b = texture2D(Ytexture, origin.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, origin.st).r;\n u = texture2D(Utexture, origin.st).r;\n v = texture2D(Vtexture, origin.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n\tif(bBlack == 1)\n\t{\n\t\tfloat tmpX, tmpY;\n\t\ttmpX = origin.s * w; \n\t\ttmpY = origin.t * h; \n\t\tfloat d2 = (tmpX-fCenterX)*(tmpX-fCenterX) + (tmpY-fCenterY)*(tmpY-fCenterY);\n\t\tif(d2 > fRadius*fRadius)\n\t\t{\n\t\t\tr = 0.0; \n\t\t\tg = 0.0; \n\t\t\tb = 0.0; \n\t\t}\n\t}\n\n\tgl_FragColor = vec4(r ,g ,b , 1.0);\n}\n";break;case Se.SR_DE_FISH_PTZ_CEILING:a=Le,r="\nprecision mediump float;\nvarying vec4 pp; \nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform float fHAngleCos;\nuniform float fHAngleSin;\nuniform float fVAngleCos;\nuniform float fVAngleSin;\nuniform float fZoom;\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \nuniform int bDataFormat;\n\nvoid main()\n{\n\tfloat r,g,b,y,u,v;\n\n vec4 origin1;\n vec4 origin2;\n vec4 result;\n float z1;\n float z2;\n float dnew;\n\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; \n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; \n\n origin1.s = pp.s - 0.5;\n origin1.t = 0.5 - pp.t;\n z1 = fZoom ;\n\n origin2.s = origin1.s ;\n origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n dnew = sqrt(origin2.s*origin2.s + origin2.t*origin2.t) ;\n float d = sqrt(origin2.s*origin2.s + origin2.t*origin2.t + z2*z2);\n float theta = asin(dnew/d);\n float tmp = theta / 1.5707963 * 0.5;\n origin2.s = tmp*origin2.s / dnew ;\n origin2.t = tmp*origin2.t / dnew ;\n\n result.s = ((origin2.s*fHAngleCos - origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\n result.t = (-(origin2.s*fHAngleSin + origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\n\n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n";break;case Se.SR_DE_FISH_PTZ_FLOOR:a=Le,r="\nprecision mediump float;\nvarying vec4 pp; \nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform float fHAngleCos; \nuniform float fHAngleSin; \nuniform float fVAngleCos; \nuniform float fVAngleSin; \nuniform float fZoom;\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \nuniform int bDataFormat;\n\nvoid main()\n{\n\tfloat r,g,b,y,u,v;\n\n vec4 origin1;\n vec4 origin2;\n vec4 result;\n float z1;\n float z2;\n float dnew;\n\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w;\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w;\n origin1.s = pp.s - 0.5;\n origin1.t = pp.t - 0.5;\n z1 = fZoom ;\n\n origin2.s = origin1.s ;\n origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n dnew = sqrt(origin2.s*origin2.s + origin2.t*origin2.t) ;\n float d = sqrt(origin2.s*origin2.s + origin2.t*origin2.t + z2*z2);\n float theta = asin(dnew/d);\n float tmp = theta / 1.5707963 * 0.5;\n origin2.s = tmp*origin2.s / dnew ;\n origin2.t = tmp*origin2.t / dnew ;\n\n result.s = ((origin2.s*fHAngleCos - origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\n result.t = ((origin2.s*fHAngleSin + origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\n\n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0;\n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n";break;case Se.SR_DE_FISH_PTZ_WALL:a=Le,r="\nprecision mediump float;\nvarying vec4 pp; \nuniform sampler2D Ytexture;\nuniform sampler2D Utexture;\nuniform sampler2D Vtexture;\nuniform float fHAngleCos;\nuniform float fHAngleSin; \nuniform float fVAngleCos; \nuniform float fVAngleSin; \nuniform float fZoom;\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \nuniform int bDataFormat;\n\nvoid main()\n{\n\tfloat r,g,b,y,u,v;\n\n vec4 origin1;\n vec4 origin2;\n vec4 origin3;\n vec4 result;\n float z1;\n float z2;\n float z3;\n float dnew;\n\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w;\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w;\n\n origin1.s = pp.s - 0.5;\n origin1.t = pp.t - 0.5;\n z1 = fZoom ;\n\n origin2.s = origin1.s ;\n origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n origin3.s = origin2.s*fHAngleCos + z2*fHAngleSin ;\n origin3.t = origin2.y;\n z3 = z2*fHAngleCos - origin2.x*fHAngleSin;\n\n dnew = sqrt(origin3.s*origin3.s + origin3.t*origin3.t) ;\n float d = sqrt(origin3.s*origin3.s + origin3.t*origin3.t + z3*z3);\n float theta = asin(dnew/d);\n float tmp = theta / 1.5707963 * 0.5;\n result.s = (tmp*origin3.s / dnew * fRadius * 2.0 + fCenterX)/w;\n result.t = (tmp*origin3.t / dnew * fRadius * 2.0 + fCenterY)/h;\n\n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n";break;case Se.SR_DE_FISH_PANORAMA_CEILING_360:a=Le,r="\n precision highp float;\n varying vec4 pp; \n uniform sampler2D Ytexture;\n uniform sampler2D Utexture;\n uniform sampler2D Vtexture;\n uniform float fAngle;\n uniform float fRX1;\n uniform float fRX2;\n uniform float fRY1;\n uniform float fRY2;\n uniform int bDataFormat;\n \n void main()\n {\n \n float r,g,b,y,u,v;\n \n vec4 origin;\n vec4 result;\n float thetabase;\n float d;\n \n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n float fMax = 0.0;\n if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n {\n float tmp;\n if(fRX1 < 0.0)\n {\n tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRX2 > 1.0)\n {\n tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY1 < 0.0)\n {\n tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY2 > 1.0)\n {\n tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n }\n float topCut = fMax / fRadius; ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n float bottomCut = 0.8; ///<为矫正效果,最终矫正图固定切掉下面一部分\n origin.s = pp.s;\n origin.t = (bottomCut - topCut) * pp.t + topCut;\n thetabase = 6.2831853 * origin.s + fAngle;\n d = fRadius * (1.0 - origin.t);\n result.s = (fCenterX - d*sin(thetabase)) / w;\n result.t = (fCenterY + d*cos(thetabase)) / h;\n \n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0;\n }\n gl_FragColor = vec4(r, g, b, 1.0);\n }\n";break;case Se.SR_DE_FISH_PANORAMA_CEILING_180:a=Le,r="\n precision highp float;\n varying vec4 pp; \n uniform sampler2D Ytexture;\n uniform sampler2D Utexture;\n uniform sampler2D Vtexture;\n uniform float fAngle;\n uniform float fRX1; \n uniform float fRX2; \n uniform float fRY1; \n uniform float fRY2; \n uniform int bDataFormat;\n \n void main()\n {\n float r,g,b,y,u,v;\n \n vec4 origin;\n vec4 result;\n float thetabase;\n float d;\n \n vec4 newpp; ///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\n if (pp.t <= 0.5)\n {\n newpp.s = pp.s / 2.0 + 0.5;\n newpp.t = pp.t * 2.0;\n }\n else\n {\n newpp.s = pp.s / 2.0;\n newpp.t = (pp.t - 0.5) * 2.0;\n }\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n float fMax = 0.0;\n if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n {\n float tmp;\n if(fRX1 < 0.0)\n {\n tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRX2 > 1.0)\n {\n tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY1 < 0.0)\n {\n tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY2 > 1.0)\n {\n tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n }\n float topCut = fMax / fRadius; ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n float bottomCut = 0.8; ///<为矫正效果,最终矫正图固定切掉下面一部分\n origin.s = newpp.s;\n origin.t = (bottomCut - topCut) * newpp.t + topCut;\n thetabase = 6.2831853 * origin.s + fAngle;\n d = fRadius * (1.0 - origin.t);\n result.s = (fCenterX - d*sin(thetabase)) / w;\n result.t = (fCenterY + d*cos(thetabase)) / h;\n \n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0;\n g = 0.0;\n b = 0.0;\n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n }\n";break;case Se.SR_DE_FISH_PANORAMA_FLOOR_360:a=Le,r="\n precision highp float;\n varying vec4 pp; \n uniform sampler2D Ytexture;\n uniform sampler2D Utexture;\n uniform sampler2D Vtexture;\n uniform float fAngle;\n uniform float fRX1;\n uniform float fRX2;\n uniform float fRY1;\n uniform float fRY2;\n uniform int bDataFormat;\n\n void main()\n {\n float r,g,b,y,u,v;\n \n vec4 origin;\n vec4 result;\n float thetabase;\n float d;\n \n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n float fMax = 0.0;\n if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n {\n float tmp;\n if(fRX1 < 0.0)\n {\n tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRX2 > 1.0)\n {\n tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY1 < 0.0)\n {\n tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY2 > 1.0)\n {\n tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n }\n float topCut = fMax / fRadius; ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n float bottomCut = 0.8; ///<为矫正效果,最终矫正图固定切掉下面一部分\n origin.s = 1.0 - pp.s;\n origin.t = (bottomCut - topCut) * (1.0 - pp.t) + topCut;\n thetabase = 6.2831853 * origin.s + fAngle;\n d = fRadius * (1.0 - origin.t);\n result.s = (fCenterX - d*sin(thetabase)) / w;\n result.t = (fCenterY + d*cos(thetabase)) / h;\n \n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n }\n";break;case Se.SR_DE_FISH_PANORAMA_FLOOR_180:a=Le,r="\n precision highp float;\n varying vec4 pp; \n uniform sampler2D Ytexture;\n uniform sampler2D Utexture;\n uniform sampler2D Vtexture;\n uniform float fAngle;\n uniform float fRX1;\n uniform float fRX2;\n uniform float fRY1;\n uniform float fRY2;\n uniform int bDataFormat;\n\n void main()\n {\n float r,g,b,y,u,v;\n\n vec4 origin;\n vec4 result;\n float thetabase;\n float d;\n \n vec4 newpp; ///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\n if (pp.t <= 0.5) \n {\n newpp.s = pp.s / 2.0;\n newpp.t = pp.t * 2.0;\n }\n else\n {\n newpp.s = pp.s / 2.0 + 0.5;\n newpp.t = (pp.t - 0.5) * 2.0;\n }\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n float fMax = 0.0;\n if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n {\n float tmp;\n if(fRX1 < 0.0)\n {\n tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRX2 > 1.0)\n {\n tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY1 < 0.0)\n {\n tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n if(fRY2 > 1.0)\n {\n tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n if(tmp > fMax)\n fMax = tmp;\n }\n }\n float topCut = fMax / fRadius; ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n float bottomCut = 0.8; ///<为矫正效果,最终矫正图固定切掉下面一部分\n origin.s = 1.0 - newpp.s;\n origin.t = (bottomCut - topCut) * (1.0 - newpp.t) + topCut;\n thetabase = 6.2831853 * origin.s + fAngle;\n d = fRadius * (1.0 - origin.t);\n result.s = (fCenterX - d*sin(thetabase)) / w;\n result.t = (fCenterY + d*cos(thetabase)) / h;\n \n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n } \n";break;case Se.SR_DE_FISH_PANORAMA_WALL:a=Le,r="\n precision highp float;\n varying vec4 pp; \n uniform sampler2D Ytexture;\n uniform sampler2D Utexture;\n uniform sampler2D Vtexture;\n uniform float fRX1;\n uniform float fRX2;\n uniform float fRY1; \n uniform float fRY2; \n uniform int bDataFormat;\n\n void main()\n {\n float r,g,b,y,u,v;\n \n vec4 origin;\n vec4 result;\n float d;\n float w;\n float h;\n float fCenterX;\n float fCenterY;\n float fRadius;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w; ///<圆心实际坐标\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n fRadius = (fRX2 - fRX1) / 2.0 * w; ///<半径实际长度\n float defaultTopCut = 0.1;\n float defaultBottomCut = 0.9;\n float leftCut = 0.0; ///<当图像中圆不完整时需要切掉无图像部分,即使图像完整,为了效果,也要切掉上下固定的一部分\n float rightCut = 1.0;\n float topCut = defaultTopCut;\n float bottomCut = defaultBottomCut;\n if(fRX1 < 0.0)\n {\n float tmp;\n tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n tmp = tmp / (2.0*fRadius);\n leftCut = tmp;\n }\n if(fRX2 > 1.0)\n {\n float tmp;\n tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n tmp = tmp / (2.0*fRadius);\n rightCut = 1.0 - tmp;\n }\n if(fRY1 < 0.0)\n {\n float tmp;\n tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n tmp = tmp / (2.0*fRadius);\n if(tmp > defaultTopCut)\n topCut = tmp;\n else\n topCut = defaultTopCut;\n }\n if(fRY2 > 1.0)\n {\n float tmp;\n tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n tmp = tmp / (2.0*fRadius);\n if(tmp > 1.0 - defaultBottomCut)\n bottomCut = 1.0 - tmp;\n else\n bottomCut = defaultBottomCut;\n }\n origin.s = pp.s * (rightCut-leftCut) + leftCut;\n origin.t = pp.t * (bottomCut-topCut) + topCut;\n float tmpx = origin.s * 2.0 * fRadius + fCenterX - fRadius; ///<纹理坐标转化为原图上的实际坐标\n float tmpy = origin.t * 2.0 * fRadius + fCenterY - fRadius;\n d = sqrt(fRadius*fRadius - (tmpy-fCenterY)*(tmpy-fCenterY));\n result.s = ((tmpx-fCenterX) * d / fRadius + fCenterX) / w;\n result.t = tmpy / h;\n \n if(bDataFormat == 1)\n {\n r = texture2D(Ytexture, result.st).r; \n g = texture2D(Ytexture, result.st).g; \n b = texture2D(Ytexture, result.st).b; \n }\n else if(bDataFormat == 0)\n {\n y = texture2D(Ytexture, result.st).r;\n u = texture2D(Utexture, result.st).r;\n v = texture2D(Vtexture, result.st).r;\n \n y=1.1643*(y-0.0625);\n u=u-0.5; \n v=v-0.5; \n\n r=y+1.5958*v; \n g=y-0.39173*u-0.81290*v; \n b=y+2.017*u; \n }\n\n if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n {\n r = 0.0; \n g = 0.0; \n b = 0.0; \n }\n gl_FragColor = vec4(r ,g ,b , 1.0);\n }\n";break;case Se.SR_DE_FISH_SEMISPHERE:case Se.SR_DE_PANORAMA_SPHERE:case Se.SR_DE_PANORAMA_PLANET:case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_FLOOR:case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:case Se.SR_DE_FISH_PLANET:a="\n precision lowp float;\n attribute vec4 position;\n attribute vec4 texCoord;\n varying vec4 pp; \n uniform int bCapture;\n\n uniform mat4 matProj;\n uniform mat4 matView;\n void main(void) {\n gl_Position = matProj * matView * position;\n pp = texCoord;\n if(bCapture == 1)\n {\n gl_Position.y = - gl_Position.y;\n }\n }\n",r=we;break;case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:a="\n attribute vec4 position;\n attribute vec4 texCoord;\n varying vec4 pp; \n uniform int bCapture;\n\n uniform mat4 matProj;\n uniform mat4 matView;\n uniform highp vec4 vecCylinderParam;\n uniform highp float fTextureOffset;\n uniform mediump float fRX1;\n uniform mediump float fRX2;\n uniform mediump float fRY1;\n uniform mediump float fRY2;\n void main(void) {\n highp float w;\n highp float h;\n highp float fCenterX;\n highp float fCenterY;\n w = 1.0;\n h = (fRX2 - fRX1) / (fRY2 - fRY1);\n fCenterX = (fRX1 + fRX2) / 2.0 * w;\n fCenterY = (fRY1 + fRY2) / 2.0 * h;\n\n highp float dx = position.x - vecCylinderParam.x;\n highp float dz = position.z - (vecCylinderParam.z + vecCylinderParam.y); \n highp float theta = atan(abs(dx/dz));\n highp float fDis = (3.1415926 - 2.0 * theta) * 1.0;\n highp float fdx = 0.0;\n if (dx > 0.0)\n {\n fdx = 1.0;\n }\n else\n {\n fdx = -1.0;\n }\n fDis = fdx * fDis; \n highp float lx = fDis; \n highp float lz = vecCylinderParam.z + vecCylinderParam.y; \n highp float fRate = (3.1415926 / 2.0 + vecCylinderParam.w) / 3.1415926 * 2.0; \n highp vec4 newPos = position; \n newPos.x = fRate * (lx - newPos.x) + newPos.x; \n newPos.z = fRate * (lz - newPos.z) + newPos.z; \n gl_Position = matProj * matView * newPos; \n if(bCapture == 1)\n {\n gl_Position.y = - gl_Position.y;\n }\n\n highp float s = texCoord.s * w - fCenterX; \n highp float t = fCenterY - texCoord.t * h; \n pp.s = (s*cos(fTextureOffset) - t*sin(fTextureOffset) + fCenterX) / w; \n pp.t = (fCenterY - (s*sin(fTextureOffset) + t*cos(fTextureOffset))) / h;\n }\n",r=we;break;default:return pe.SR_ERR_NOT_SUPPORT}var i=this.CompileProgram(a,r);return i<=0?pe.SR_ERR_WEBGL_RESOURCE:(this.videoShaderProgram=i,pe.SR_OK)}},{key:"_InitVideoVertex",value:function(e,t,a){var r=null,i=null,n=null,s=pe.SR_OK;if(0==this.b3DPort)r=new Float32Array([-1,1,-1,-1,1,1,1,1,-1,-1,1,-1]),i=new Float32Array([0,0,0,1,1,0,1,0,0,1,1,1]);else{if(this.fRX1=a.fRXLeft,this.fRX2=a.fRXRight,this.fRY1=a.fRYTop,this.fRY2=a.fRYBottom,t==Se.SR_DE_FISH_SEMISPHERE||t==Se.SR_DE_FISH_PLANET)s=this._CreateSemiSphere(this.fRX1,this.fRX2,this.fRY1,this.fRY2),r=this.pSemiSpherePos,i=this.pSemiSphereTex;else if(t==Se.SR_DE_PANORAMA_SPHERE||t==Se.SR_DE_PANORAMA_PLANET)s=this._CreateSphere(this.fRX1,this.fRX2,this.fRY1,this.fRY2),r=this.pSpherePos,i=this.pSphereTex,n=this.pSphereInd;else if(t==Se.SR_DE_FISH_CYLINDER_CEILING||t==Se.SR_DE_FISH_CYLINDER_FLOOR||t==Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING||t==Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR)s=this._CreateCylinder(t,this.fRX1,this.fRX2,this.fRY1,this.fRY2,0,0),r=this.pCylinderPos,i=this.pCylinderTex;else{if(t!=Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL&&t!=Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL)return pe.SR_ERR_NOT_SUPPORT;s=t==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._CreateArcSphere(t,.05,.95,-.3,1.3):this._CreateArcSphere(t,-.16,1.16,.005,.995),r=this.pArcSpherePos,i=this.pArcSphereTex}if(s!=pe.SR_OK)return s}if(null==r||null==i)return pe.SR_ERR_NOT_SUPPORT;var x=this.ctx.createBuffer();if(this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,x),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,r,this.ctx.STATIC_DRAW),this.vertexPosBuffer=x,t==Se.SR_DE_PANORAMA_SPHERE||t==Se.SR_DE_PANORAMA_PLANET){var o=this.ctx.createBuffer();this.ctx.bindBuffer(this.ctx.ELEMENT_ARRAY_BUFFER,o),this.ctx.bufferData(this.ctx.ELEMENT_ARRAY_BUFFER,n,this.ctx.STATIC_DRAW),this.indicesPosBuffer=o}var l=this.ctx.createBuffer();return this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,l),this.ctx.bufferData(this.ctx.ARRAY_BUFFER,i,this.ctx.STATIC_DRAW),this.texturePosBuffer=l,this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null),r=null,i=null,pe.SR_OK}},{key:"_InitCamera",value:function(e){if(null!=this.pCamera)return pe.SR_ERR_CALL_ORDER;switch(e){case Se.SR_DE_NULL:case Se.SR_DE_FISH_ORIGINAL:case Se.SR_DE_FISH_PTZ_CEILING:case Se.SR_DE_FISH_PTZ_FLOOR:case Se.SR_DE_FISH_PTZ_WALL:case Se.SR_DE_FISH_PANORAMA_CEILING_360:case Se.SR_DE_FISH_PANORAMA_CEILING_180:case Se.SR_DE_FISH_PANORAMA_FLOOR_360:case Se.SR_DE_FISH_PANORAMA_FLOOR_180:case Se.SR_DE_FISH_PANORAMA_WALL:return pe.SR_OK;case Se.SR_DE_FISH_SEMISPHERE:if(this.pCamera=new Ne,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetFov(de),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fRotateX=4.71,this.pCamera.SetPitch(3.14-this.fRotateX),this.fScale=3,this.pCamera.SetScale(this.fScale);break;case Se.SR_DE_PANORAMA_SPHERE:if(this.pCamera=new Ne,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetFov(de),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fRotateX=0,this.pCamera.SetPitch(3.14-this.fRotateX),this.fScale=0,this.pCamera.SetScale(this.fScale);break;case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_FLOOR:if(this.pCamera=new Ne,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetFov(de),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fRotateX=.785,this.pCamera.SetPitch(-this.fRotateX),this.fScale=6,this.pCamera.SetScale(this.fScale);break;case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:if(this.pCamera=new Ne,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetOrtho(!0),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fScale=3,this.pCamera.SetScale(this.fScale);break;case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:if(this.pCamera=new Ne,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetFov(1.25663704),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fScale=2,this.pCamera.SetScale(this.fScale),Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL==e?(this.fRotateLimitX=.17453292222222222,this.fRotateLimitY=1.0471975333333334):(this.fRotateLimitX=.5235987666666667,this.fRotateLimitY=.34906584444444444);break;case Se.SR_DE_FISH_PLANET:if(this.pCamera=new Ve,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetFov(2.16),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fRotateX=1.57,this.pCamera.SetPitch(this.fRotateX),this.pCamera.SetYaw(ue+this.fRotateY),this.fScale=1,this.pCamera.SetScale(this.fScale);break;case Se.SR_DE_PANORAMA_PLANET:if(this.pCamera=new Ve,null==this.pCamera)return pe.SR_ERR_ALLOC_MEMORY;this.pCamera.SetPano(!0),this.pCamera.SetNear(.02),this.pCamera.SetFar(1e3),this.fRotateX=1.57,this.pCamera.SetPitch(this.fRotateX),this.fRotateY=-1.57,this.pCamera.SetYaw(ue+this.fRotateY),this.fScale=2.6,this.pCamera.SetScale(this.fScale);break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"CompileProgram",value:function(e,t){var a=this.ctx;if(null==a||null==e||null==t)return-1;var r=a.createShader(a.VERTEX_SHADER);if(a.shaderSource(r,e),a.compileShader(r),!a.getShaderParameter(r,a.COMPILE_STATUS))return-1;var i=a.createShader(a.FRAGMENT_SHADER);if(a.shaderSource(i,t),a.compileShader(i),!a.getShaderParameter(i,a.COMPILE_STATUS))return-1;var n=a.createProgram();return a.attachShader(n,r),a.attachShader(n,i),a.linkProgram(n),a.getProgramParameter(n,a.LINK_STATUS)?(a.deleteShader(r),a.deleteShader(i),n):-1}},{key:"_CreateSemiSphere",value:function(e,t,a,r){if(null!=this.pSemiSpherePos||null!=this.pSemiSphereTex)return pe.SR_ERR_CALL_ORDER;this.pSemiSpherePos=new Float32Array(43200),this.pSemiSphereTex=new Float32Array(28800);for(var i=(t-e)/(r-a),n=(t-e)/2*1,s=6.2831852/60,x=.0392699075,o=0,l=0,_=0,h=0;h<60;++h)for(var f=0;f<40;++f){var c=h*s;0==h&&(o=c);var u=59==h?o:(h+1)*s,d=-f*x,p=-(f+1)*x,m=void 0,S=void 0;this.pSemiSpherePos[l]=-1*Math.cos(d)*Math.cos(c),this.pSemiSpherePos[l+1]=1*Math.sin(d),this.pSemiSpherePos[l+2]=-1*Math.cos(d)*Math.sin(c),S=.5-.5*(1+d/1.5707963)*Math.sin(c),m=.5-.5*(1+d/1.5707963)*Math.cos(c),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3,this.pSemiSpherePos[l]=-1*Math.cos(p)*Math.cos(c),this.pSemiSpherePos[l+1]=1*Math.sin(p),this.pSemiSpherePos[l+2]=-1*Math.cos(p)*Math.sin(c),S=.5-.5*(1+p/1.5707963)*Math.sin(c),m=.5-.5*(1+p/1.5707963)*Math.cos(c),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3,this.pSemiSpherePos[l]=-1*Math.cos(d)*Math.cos(u),this.pSemiSpherePos[l+1]=1*Math.sin(d),this.pSemiSpherePos[l+2]=-1*Math.cos(d)*Math.sin(u),S=.5-.5*(1+d/1.5707963)*Math.sin(u),m=.5-.5*(1+d/1.5707963)*Math.cos(u),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3,this.pSemiSpherePos[l]=-1*Math.cos(d)*Math.cos(u),this.pSemiSpherePos[l+1]=1*Math.sin(d),this.pSemiSpherePos[l+2]=-1*Math.cos(d)*Math.sin(u),S=.5-.5*(1+d/1.5707963)*Math.sin(u),m=.5-.5*(1+d/1.5707963)*Math.cos(u),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3,this.pSemiSpherePos[l]=-1*Math.cos(p)*Math.cos(c),this.pSemiSpherePos[l+1]=1*Math.sin(p),this.pSemiSpherePos[l+2]=-1*Math.cos(p)*Math.sin(c),S=.5-.5*(1+p/1.5707963)*Math.sin(c),m=.5-.5*(1+p/1.5707963)*Math.cos(c),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3,this.pSemiSpherePos[l]=-1*Math.cos(p)*Math.cos(u),this.pSemiSpherePos[l+1]=1*Math.sin(p),this.pSemiSpherePos[l+2]=-1*Math.cos(p)*Math.sin(u),S=.5-.5*(1+p/1.5707963)*Math.sin(u),m=.5-.5*(1+p/1.5707963)*Math.cos(u),this.pSemiSphereTex[_++]=(2*m*n+1*e)/1,this.pSemiSphereTex[_++]=(2*S*n+a*i)/i,l+=3}return this.nSemiSpherePosNum=l/3,this.nSemiSpherePosSize=3,this.nSemiSphereTexSize=2,pe.SR_OK}},{key:"_CreateSphere",value:function(){if(null!=this.pSpherePos||null!=this.pSphereTex)return pe.SR_ERR_CALL_ORDER;this.pSpherePos=new Float32Array(7803),this.pSphereTex=new Float32Array(5202),this.pSphereInd=new Uint16Array(15e3);for(var e=0,t=0,a=0;a<=50;++a)for(var r=a*ue/50-1.5707963,i=Math.sin(r),n=Math.cos(r),s=0;s<=50;++s){var x=2*s*ue/50-ue,o=Math.sin(x),l=1*n*Math.cos(x),_=1*i,h=1*n*o;this.pSpherePos[e]=-l,this.pSpherePos[e+1]=_,this.pSpherePos[e+2]=h;var f=s/50,c=a/50;this.pSphereTex[t++]=f,this.pSphereTex[t++]=c,e+=3}for(var u=0,d=0;d<50;++d)for(var p=0;p<50;++p){var m=51*d+p,S=m+50+1;this.pSphereInd[u+0]=m,this.pSphereInd[u+1]=S,this.pSphereInd[u+2]=m+1,this.pSphereInd[u+3]=S,this.pSphereInd[u+4]=S+1,this.pSphereInd[u+5]=m+1,u+=6}return this.nSpherePosNum=2500,this.nSpherePosSize=3,this.nSphereTexSize=2,pe.SR_OK}},{key:"_CreateCylinder",value:function(e,t,a,r,i,n,s){if(null!=this.pCylinderPos||null!=this.pCylinderTex)return pe.SR_ERR_CALL_ORDER;if(Math.abs(n-0)<1e-6)this.fCylinderHeight=2;else{if(n<.5||n>6)return pe.SR_ERR_PARAM;this.fCylinderHeight=n}if(Math.abs(s-0)<1e-6)e==Se.SR_DE_FISH_CYLINDER_FLOOR||e==Se.SR_DE_FISH_CYLINDER_CEILING?this.fCylinderRadius=2:this.fCylinderRadius=1;else{if(s<.5||s>4)return pe.SR_ERR_PARAM;this.fCylinderRadius=s}if(this.pCylinderPos=new Float32Array(43200),this.pCylinderTex=new Float32Array(28800),null==this.pCylinderPos||null==this.pCylinderTex)return this.pCylinderPos=null,this.pCylinderTex=null,pe.SR_ERR_ALLOC_MEMORY;for(var x=(a-t)/(i-r),o=(a-t)/2*1,l=6.2831852/60,_=this.fCylinderHeight/40,h=0,f=0,c=0;c<60;++c)for(var u=0;u<40;++u){var d=c*l,p=(c+1)*l,m=void 0,S=void 0;this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(d),this.pCylinderPos[h+1]=this.fCylinderHeight/2-u*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(d),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*u)*Math.sin(d),S=.5+(.1+.01*u)*Math.cos(d)):(m=.5-(.5-.01*u)*Math.sin(d),S=.5+(.5-.01*u)*Math.cos(d)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3,this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(d),this.pCylinderPos[h+1]=this.fCylinderHeight/2-(u+1)*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(d),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*(u+1))*Math.sin(d),S=.5+(.1+.01*(u+1))*Math.cos(d)):(m=.5-(.5-.01*(u+1))*Math.sin(d),S=.5+(.5-.01*(u+1))*Math.cos(d)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3,this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(p),this.pCylinderPos[h+1]=this.fCylinderHeight/2-u*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(p),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*u)*Math.sin(p),S=.5+(.1+.01*u)*Math.cos(p)):(m=.5-(.5-.01*u)*Math.sin(p),S=.5+(.5-.01*u)*Math.cos(p)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3,this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(p),this.pCylinderPos[h+1]=this.fCylinderHeight/2-u*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(p),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*u)*Math.sin(p),S=.5+(.1+.01*u)*Math.cos(p)):(m=.5-(.5-.01*u)*Math.sin(p),S=.5+(.5-.01*u)*Math.cos(p)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3,this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(d),this.pCylinderPos[h+1]=this.fCylinderHeight/2-(u+1)*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(d),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*(u+1))*Math.sin(d),S=.5+(.1+.01*(u+1))*Math.cos(d)):(m=.5-(.5-.01*(u+1))*Math.sin(d),S=.5+(.5-.01*(u+1))*Math.cos(d)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3,this.pCylinderPos[h]=-this.fCylinderRadius*Math.sin(p),this.pCylinderPos[h+1]=this.fCylinderHeight/2-(u+1)*_,this.pCylinderPos[h+2]=-this.fCylinderRadius*Math.cos(p),Se.SR_DE_FISH_CYLINDER_FLOOR==e||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==e?(m=.5+(.1+.01*(u+1))*Math.sin(p),S=.5+(.1+.01*(u+1))*Math.cos(p)):(m=.5-(.5-.01*(u+1))*Math.sin(p),S=.5+(.5-.01*(u+1))*Math.cos(p)),this.pCylinderTex[f++]=(2*m*o+1*t)/1,this.pCylinderTex[f++]=(2*S*o+r*x)/x,h+=3}return this.nCylinderPosNum=h/3,this.nCylinderPosSize=3,this.nCylinderTexSize=2,pe.SR_OK}},{key:"_CreateArcSphere",value:function(e,t,a,r,i){if(null!=this.pArcSpherePos||null!=this.pArcSphereTex)return pe.SR_ERR_CALL_ORDER;if(e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL){if(r>0||i<1)return pe.SR_ERR_PARAM}else{if(e!=Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL)return pe.SR_ERR_NOT_SUPPORT;if(t>0||a<1)return pe.SR_ERR_PARAM}if(this.fImageWidth=1,this.fImageHeight=(a-t)/(i-r),this.fTexCenterX=(t+a)/2*this.fImageWidth,this.fTexCenterY=(r+i)/2*this.fImageHeight,this.fTexRadius=(a-t)/2*this.fImageWidth,null==this.pArcSphereTex&&(this.pArcSphereTex=new Float32Array(14688),null==this.pArcSphereTex))return pe.SR_ERR_ALLOC_MEMORY;if(null==this.pArcSpherePos&&(this.pArcSpherePos=new Float32Array(22032),null==this.pArcSpherePos))return pe.SR_ERR_ALLOC_MEMORY;var n=new Float32Array(64);if(null==n)return pe.SR_ERR_ALLOC_MEMORY;var s=pe.SR_OK;if(e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?s=this._ComputeLatitudeHorizontal(n,25,40,1):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&(s=this._ComputeLatitudeVertical(n,25,40,1)),pe.SR_OK!=s)return this.pArcSpherePos=null,this.pArcSphereTex=null,s;this.fFirstLatitude=n[12],this.fLastLatitude=n[51];var x=0,o=0,l=new Float32Array(5);if(null==l)return this.pArcSpherePos=null,this.pArcSphereTex=null,pe.SR_ERR_ALLOC_MEMORY;for(var _=ue/24,h=-12;h<12;++h)for(var f=h<0?-h:h,c=h<0?f:f+1,u=h<0?64-2*(f-1)-2:64-2*f-2,d=0;d<u;++d,++c)e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*h,n[c],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*h,n[c],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3,e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*(h+1),n[c],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*(h+1),n[c],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3,h>=0&&0==d?e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*h,n[c-1],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*h,n[c-1],l):e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*(h+1),n[c-1],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*(h+1),n[c-1],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3,e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*(h+1),n[c],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*(h+1),n[c],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3,e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*h,n[c],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*h,n[c],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3,h<0&&d==u-1?e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*(h+1),n[c+1],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*(h+1),n[c+1],l):e==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?this._ComputeVertexAndTexturePosHorizontal(1,1.5707963-_*h,n[c+1],l):e==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL&&this._ComputeVertexAndTexturePosVertical(1,1.5707963-_*h,n[c+1],l),this.pArcSpherePos[x]=l[0],this.pArcSpherePos[x+1]=l[1],this.pArcSpherePos[x+2]=l[2],this.pArcSphereTex[o++]=l[3],this.pArcSphereTex[o++]=l[4],x+=3;return this.nArcSpherePosNum=x/3,this.nArcSpherePosSize=3,this.nArcSphereTexSize=2,n=null,l=null,pe.SR_OK}},{key:"_ComputeIntersectionOfPlaneAndLongtitude",value:function(e,t,a){if(null==e)return pe.SR_ERR_PARAM;var r,i=e[1]*a,n=e[2]*a*Math.sin(t),s=-e[3],x=0;if(e[1]>0){var o=i*i*s*s-(i*i+n*n)*(s*s-n*n);x=(-i*s-Math.sqrt(o))/(i*i+n*n),o=n*n*s*s-(i*i+n*n)*(s*s-i*i)}if(e[1]<0){var l=i*i*s*s-(i*i+n*n)*(s*s-n*n);x=(-i*s+Math.sqrt(l))/(i*i+n*n),l=n*n*s*s-(i*i+n*n)*(s*s-i*i)}return r=-a*x,Math.asin(r/a)}},{key:"_ComputeLatitudeHorizontal",value:function(e,t,a,r){if(null==e)return pe.SR_ERR_PARAM;var i=0,n=(this.fTexCenterY,ue/(t-1)),s=ue*this.fTexCenterY/(2*this.fTexRadius),x=Math.asin(this.fTexCenterY/this.fTexRadius),o=Math.atan(Math.cos(s)/(Math.sin(s)-Math.sin(x))),l=new Float32Array(4);l[0]=0,l[1]=Math.sin(o),l[2]=Math.cos(o),l[3]=-r*Math.sin(o)*Math.sin(x),e[i++]=s;for(var _=1;_<=(t-3)/2;++_){var h=this._ComputeIntersectionOfPlaneAndLongtitude(l,1.5707963-n*_,r);e[i++]=h}for(var f=-Math.asin((this.fImageHeight-this.fTexCenterY)/this.fTexRadius),c=x,u=(c-f)/(a-1),d=0;d<a;++d)e[i++]=c-d*u;var p=f,m=ue*(this.fTexCenterY-this.fImageHeight)/(2*this.fTexRadius);o=Math.atan(Math.cos(m)/(Math.sin(p)-Math.sin(m)));var S=new Float32Array(4);S[0]=0,S[1]=-Math.sin(o),S[2]=Math.cos(o),S[3]=r*Math.sin(o)*Math.sin(p);for(var R=1;R<=(t-3)/2;++R){var P=this._ComputeIntersectionOfPlaneAndLongtitude(S,n*R,r);e[i++]=P}return e[i++]=m,l=null,S=null,pe.SR_OK}},{key:"_ComputeVertexAndTexturePosHorizontal",value:function(e,t,a,r){if(null==r)return pe.SR_ERR_PARAM;r[2]=-e*Math.cos(a)*Math.sin(t),r[0]=e*Math.cos(a)*Math.cos(t),r[1]=e*Math.sin(a);var i,n=-Math.asin(-r[2]/e)/ue;i=a>=0?Math.acos(r[0]/Math.sqrt(r[0]*r[0]+r[1]*r[1])):6.2831852-Math.acos(r[0]/Math.sqrt(r[0]*r[0]+r[1]*r[1]));var s=this.fTexCenterX-this.fTexRadius,x=this.fTexRadius-this.fTexCenterY;return r[3]=(Math.cos(i)*this.fTexRadius*(1+2*n)+this.fTexRadius+s)/this.fImageWidth,r[4]=(Math.sin(i)*this.fTexRadius*(-1-2*n)+this.fTexRadius-x)/this.fImageHeight,pe.SR_OK}},{key:"_ComputeLatitudeVertical",value:function(e,t,a,r){if(null==e)return pe.SR_ERR_PARAM;var i=0,n=ue/(t-1),s=ue*this.fTexCenterX/(2*this.fTexRadius),x=Math.asin(this.fTexCenterX/this.fTexRadius),o=Math.atan(Math.cos(s)/(Math.sin(s)-Math.sin(x))),l=new Float32Array(4);l[0]=0,l[1]=Math.sin(o),l[2]=Math.cos(o),l[3]=-r*Math.sin(o)*Math.sin(x),e[i++]=s;for(var _=1;_<=(t-3)/2;++_){var h=this._ComputeIntersectionOfPlaneAndLongtitude(l,1.5707963-n*_,r);e[i++]=h}for(var f=-Math.asin((this.fImageWidth-this.fTexCenterX)/this.fTexRadius),c=x,u=(c-f)/(a-1),d=0;d<a;++d)e[i++]=c-d*u;var p=f,m=ue*(this.fTexCenterX-this.fImageWidth)/(2*this.fTexRadius);o=Math.atan(Math.cos(m)/(Math.sin(p)-Math.sin(m)));var S=new Float32Array(4);S[0]=0,S[1]=-Math.sin(o),S[2]=Math.cos(o),S[3]=r*Math.sin(o)*Math.sin(p);for(var R=1;R<=(t-3)/2;++R){var P=this._ComputeIntersectionOfPlaneAndLongtitude(S,n*R,r);e[i++]=P}return e[i++]=m,l=null,S=null,pe.SR_OK}},{key:"_ComputeVertexAndTexturePosVertical",value:function(e,t,a,r){if(null==r)return pe.SR_ERR_PARAM;r[2]=-e*Math.cos(a)*Math.sin(t),r[1]=e*Math.cos(a)*Math.cos(t),r[0]=-e*Math.sin(a);var i,n=-Math.asin(-r[2]/e)/ue;i=t<=1.5707963?Math.acos(r[0]/Math.sqrt(r[0]*r[0]+r[1]*r[1])):6.2831852-Math.acos(r[0]/Math.sqrt(r[0]*r[0]+r[1]*r[1]));var s=this.fTexCenterX-this.fTexRadius,x=this.fTexRadius-this.fTexCenterY;return r[3]=(Math.cos(i)*this.fTexRadius*(1+2*n)+this.fTexRadius+s)/this.fImageWidth,r[4]=(Math.sin(i)*this.fTexRadius*(-1-2*n)+this.fTexRadius-x)/this.fImageHeight,pe.SR_OK}},{key:"_BeginCapture",value:function(){var e=pe.SR_OK;return 0==this.bCaptureResInit&&(e=this._InitRenderTarget(this.nWndWidth,this.nWndHeight,!1,!0),pe.SR_OK!=e)?e:(e=this._Resize(this.nWndWidth,this.nWndHeight,!1,!0),pe.SR_OK!=e?e:(this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,this.nCaptureFBO),this.bIsCapturing=!0,pe.SR_OK))}},{key:"_InitRenderTarget",value:function(e,t,a,r){if(0!=this.nCaptureRTTex||0!=this.nCaptureFBO)return pe.SR_ERR_CALL_ORDER;if(e<=0||t<=0)return pe.SR_ERR_PARAM;if(this.nCaptureRTTex=this.ctx.createTexture(),this.nCaptureRTTex<=0)return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nCaptureRTTex),this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MINMAP_LINEAR):this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,e,t,0,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,null),0==this.nCaptureFBO&&(this.nCaptureFBO=this.ctx.createFramebuffer(),this.nCaptureFBO<=0))return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,this.nCaptureFBO),this.ctx.framebufferTexture2D(this.ctx.FRAMEBUFFER,this.ctx.COLOR_ATTACHMENT0,this.ctx.TEXTURE_2D,this.nCaptureRTTex,0),1==r&&0==this.nCaptureDepthbuffer){if(this.nCaptureDepthbuffer=this.ctx.createRenderbuffer(),this.nCaptureDepthbuffer<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindRenderbuffer(this.ctx.RENDERBUFFER,this.nCaptureDepthbuffer),this.ctx.renderbufferStorage(this.ctx.RENDERBUFFER,this.ctx.DEPTH_COMPONENT16,e,t),this.ctx.framebufferRenderbuffer(this.ctx.FRAMEBUFFER,this.ctx.DEPTH_ATTACHMENT,this.ctx.RENDERBUFFER,this.nCaptureDepthbuffer)}return this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),this.nCaptureFBOWidth=e,this.nCaptureFBOHeight=t,this.bCaptureResInit=!0,pe.SR_OK}},{key:"_Resize",value:function(e,t,a,r){if(this.nCaptureFBOWidth!=e||this.nCaptureFBOHeight!=t){if(this.nCaptureFBOWidth=e,this.nCaptureFBOHeight=t,0!=this.nCaptureRTTex&&(this.ctx.deleteTexture(this.nCaptureRTTex),this.nCaptureRTTex=0),0!=this.nCaptureDepthbuffer&&(this.ctx.deleteRenderbuffer(this.nCaptureDepthbuffer),this.nCaptureDepthbuffer=0),0==this.nCaptureRTTex&&(this.nCaptureRTTex=this.ctx.createTexture(),this.nCaptureRTTex<=0))return pe.SR_ERR_WEBGL_RESOURCE;if(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nCaptureRTTex),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MINMAP_LINEAR):this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,this.nCaptureFBOWidth,this.nCaptureFBOHeight,0,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,null),this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,this.nCaptureFBO),this.ctx.framebufferTexture2D(this.ctx.FRAMEBUFFER,this.ctx.COLOR_ATTACHMENT0,this.ctx.TEXTURE_2D,this.nCaptureRTTex,0),1==r&&0==this.nCaptureDepthbuffer){if(this.nCaptureDepthbuffer=this.ctx.createRenderbuffer(),this.nCaptureDepthbuffer<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindRenderbuffer(this.ctx.RENDERBUFFER,this.nCaptureDepthbuffer),this.ctx.renderbufferStorage(this.ctx.RENDERBUFFER,this.ctx.DEPTH_COMPONENT16,e,t),this.ctx.framebufferRenderbuffer(this.ctx.FRAMEBUFFER,this.ctx.DEPTH_ATTACHMENT,this.ctx.RENDERBUFFER,this.nCaptureDepthbuffer)}this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null)}return pe.SR_OK}},{key:"_EndCapture",value:function(e){return null==this.ctx?(this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_CALL_ORDER):null==e.pBuffer||null==e.pBuffer?(this.bIsCapturing=!1,this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),pe.SR_ERR_PARAM):(this.ctx.readPixels(0,0,this.nCaptureWidth,this.nCaptureHeight,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,e.pBuffer),this.ctx.bindFramebuffer(this.ctx.FRAMEBUFFER,null),this.bIsCapturing=!1,pe.SR_OK)}},{key:"_ComputeRotateLimits",value:function(){if(this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL||this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL){var e,t;if(this.enDisplayEffect==Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL?(e=.17453292222222222,t=1.0471975333333334):(e=.5235987666666667,t=.34906584444444444),0==this.nWndWidth||0==this.nWndHeight)this.fRotateLimitX=e,this.fRotateLimitY=t;else{var a=Math.tan(2.748893525);if(Math.abs(a*this.fScale)<1){var r=a*a+1,i=-2*a*a*this.fScale,n=a*a*this.fScale*this.fScale-1,s=(-i-Math.sqrt(i*i-4*r*n))/(2*r),x=a*(s-this.fScale);this.fRotateLimitX=Math.acos(x/Math.sqrt(s*s+x*x)),this.fRotateLimitX<e&&(this.fRotateLimitX=e)}else this.fRotateLimitX=e;var o=Math.atan(this.nWndWidth/this.nWndHeight*Math.tan(.392699075));if(a=Math.tan(ue-o),Math.abs(a*this.fScale)<1){var l=a*a+1,_=-2*a*a*this.fScale,h=a*a*this.fScale*this.fScale-1,f=(-_-Math.sqrt(_*_-4*l*h))/(2*l),c=a*(f-this.fScale);this.fRotateLimitY=Math.acos(c/Math.sqrt(f*f+c*c)),this.fRotateLimitY<t&&(this.fRotateLimitY=t)}else this.fRotateLimitY=t}this.fRotateX>this.fRotateLimitX&&(this.fRotateX=this.fRotateLimitX),this.fRotateX<-this.fRotateLimitX&&(this.fRotateX=-this.fRotateLimitX),this.fRotateY>this.fRotateLimitY&&(this.fRotateY=this.fRotateLimitX),this.fRotateY<-this.fRotateLimitX&&(this.fRotateY=-this.fRotateLimitX)}return pe.SR_OK}},{key:"SetMSAACache",value:function(e,t){return this.msaaFrameBuffer=e,this.renderBuffer=t,pe.SR_OK}}]),e}(),He=function(){function e(){u(this,e),this.canvas=null,this.ctx=null,this.pFrameData=null,this.frameDisplayWidth=0,this.frameDisplayHeight=0,this.onlySupportedWebGL1=!1,this.bAntialias=!1,this.bAntialiasStateNeedChange=!1,this.bRecreateTex=!0,this.nSurfaceTexture=[],this.nSurfaceTexture[0]=0,this.nSurfaceTexture[1]=0,this.nSurfaceTexture[2]=0,this.bOpenMsaa=!1,this.nMsaaFBO=0,this.nResolveFBO=0,this.nMsaaColorBuffer=0,this.nResolveTexture=0,this.nMsaaSample=0,this.pFishParamManager=null,this.enDisplayEffect=Se.SR_DE_NULL,this.nFECPort=-1,this.enPixelFormat=Re.SR_PF_NULL,this.nTextureNum=0,this.nCaptureWidth=0,this.nCaptureHeight=0,this.pSubDisplay=null,this.nRTWidth=0,this.nRTHeight=0,this.pRenderToTex=null,this.bRenderToTex=!1,this.b3DPort=!1,this.preDisplayRectnX=0,this.preDisplayRectnY=0,this.preDisplayRectnW=0,this.preDisplayRectnH=0,this.preImageRotateValue=0}return d(e,[{key:"SR_Init",value:function(e,t){if(null==e)return pe.SR_ERR_PARAM;if(this.canvas=e,this.ctx=this.canvas.getContext("webgl2"),!this.ctx){if(this.ctx=this.canvas.getContext("webgl")||this.canvas.getContext("experimental-webgl"),!this.ctx)return pe.SR_ERR_CANVAS;this.onlySupportedWebGL1=!0}if(t==Re.SR_PF_NV12||t==Re.SR_PF_NV21)return pe.SR_ERR_NOT_SUPPORT;switch(t){case Re.SR_PF_YV12:case Re.SR_PF_I420:this.nTextureNum=3;break;case Re.SR_PF_SURFACE:this.nTextureNum=1;break;default:return pe.SR_ERR_NOT_SUPPORT}return this.enPixelFormat=t,pe.SR_OK}},{key:"SR_AddSubPort",value:function(e){var t=-1;if(null==this.ctx)return t;if(null!=this.pFishParamManager?(t=this.pFishParamManager.GetFECPort(e),this.b3DPort=!0):e==Se.SR_DE_NULL&&(t=0),-1==t)return-1;this.nFECPort=t;var a=pe.SR_OK;if(null==this.pSubDisplay&&(this.pSubDisplay=new Ue,null==this.pSubDisplay))return pe.SR_ERR_ALLOC_MEMORY;if((a=this.pSubDisplay.SetCanvasSize(this.canvas.width,this.canvas.height))!=pe.SR_OK)return a;if((a=this.pSubDisplay.SetWebGL2Support(this.onlySupportedWebGL1))!=pe.SR_OK)return a;var r={};if(null!=this.pFishParamManager){this.pSubDisplay.SetFishParamManager(this.pFishParamManager),this.pSubDisplay.SetFECPort(this.nFECPort);for(var i=0;i<32&&pe.SR_OK!=this.pFishParamManager.GetRenderParam(i,r);++i);}if((a=this.pSubDisplay.Init(this.ctx,this.enPixelFormat,e,r))!=pe.SR_OK)return a;if(Se.SR_DE_NULL!=e){a=this.pFishParamManager.SetPTZDisplayMode(ye.SR_DM_NULL);var n={};if((a=this.pFishParamManager.GetFishParam(this.nFECPort,n))!=pe.SR_OK)return a;if(Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL==e){if(n.nFishParamType=Pe.SR_FPT_CENTER,n.fRXLeft=.05,n.fRXRight=.95,n.fRYTop=-.3,n.fRYBottom=1.3,(a=this.pFishParamManager.SetFishParam(this.nFECPort,n))!=pe.SR_OK)return a}else if(Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL==e&&(n.nFishParamType=Pe.SR_FPT_CENTER,n.fRXLeft=-.16,n.fRXRight=1.16,n.fRYTop=.005,n.fRYBottom=.995,(a=this.pFishParamManager.SetFishParam(this.nFECPort,n))!=pe.SR_OK))return a}return null!=this.pFishParamManager&&this.pFishParamManager.ComputePTZPoints(),this.enDisplayEffect=e,this.nFECPort}},{key:"SR_UpdateFrameData",value:function(e,t,a,r,i){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==e||t<=0||a<=0)return pe.SR_ERR_PARAM;this.frameDisplayWidth==t&&this.frameDisplayHeight==a||(this.bRecreateTex=!0);var n=pe.SR_OK;if(Re.SR_PF_SURFACE==this.enPixelFormat)this.frameDisplayWidth=t,this.frameDisplayHeight=a;else if(n=this._ResizeFrameData(e,t,a,r),pe.SR_OK!=n)return n;if(1==this.bRecreateTex){if(this.enPixelFormat==Re.SR_PF_SURFACE){if(0!=this.nSurfaceTexture[0]){var s=this.nSurfaceTexture[0];this.ctx.deleteTexture(s),this.nSurfaceTexture[0]=0}var x=this.ctx.createTexture();if(x<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,x),this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE),this.ctx.bindTexture(this.ctx.TEXTURE_2D,null),this.nSurfaceTexture[0]=x}else if(this.enPixelFormat==Re.SR_PF_YV12||this.enPixelFormat==Re.SR_PF_I420)for(var o=0;o<this.nTextureNum;o++){if(0!=this.nSurfaceTexture[o]){var l=this.nSurfaceTexture[o];this.ctx.deleteTexture(l),this.nSurfaceTexture[o]=0}var _=this.ctx.createTexture();if(_<=0)return pe.SR_ERR_WEBGL_RESOURCE;this.ctx.bindTexture(this.ctx.TEXTURE_2D,_),this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MAG_FILTER,this.ctx.LINEAR),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_S,this.ctx.CLAMP_TO_EDGE),this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_WRAP_T,this.ctx.CLAMP_TO_EDGE),this.nSurfaceTexture[o]=_,this.ctx.bindTexture(this.ctx.TEXTURE_2D,null)}this.bRecreateTex=!1}if(Re.SR_PF_YV12==this.enPixelFormat){var h=this.pFrameData.subarray(0,t*a);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t,a,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,h),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)));var f=this.pFrameData.subarray(t*a+t/2*a/2,t*a+t/2*a/2+t/2*a/2);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[1]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t/2,a/2,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,f),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)));var c=this.pFrameData.subarray(t*a,t*a+t/2*a/2);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[2]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t/2,a/2,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,c),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)),this.bAntialiasStateNeedChange=!1),h=null,f=null,c=null}else if(Re.SR_PF_I420==this.enPixelFormat){var u=this.pFrameData.subarray(0,t*a);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t,a,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,u),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)));var d=this.pFrameData.subarray(t*a,t*a+t/2*a/2);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[1]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t/2,a/2,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,d),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)));var p=this.pFrameData.subarray(t*a+t/2*a/2,t*a+t/2*a/2+t/2*a/2);this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[2]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.LUMINANCE,t/2,a/2,0,this.ctx.LUMINANCE,this.ctx.UNSIGNED_BYTE,p),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)),this.bAntialiasStateNeedChange=!1),u=null,d=null,p=null}else Re.SR_PF_SURFACE==this.enPixelFormat&&(this.ctx.bindTexture(this.ctx.TEXTURE_2D,this.nSurfaceTexture[0]),this.ctx.texImage2D(this.ctx.TEXTURE_2D,0,this.ctx.RGBA,t,a,0,this.ctx.RGBA,this.ctx.UNSIGNED_BYTE,e),this.bAntialiasStateNeedChange&&(this.onlySupportedWebGL1||1!=this.bAntialias?this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR):(this.ctx.texParameteri(this.ctx.TEXTURE_2D,this.ctx.TEXTURE_MIN_FILTER,this.ctx.LINEAR_MIPMAP_NEAREST),this.ctx.generateMipmap(this.ctx.TEXTURE_2D)),this.bAntialiasStateNeedChange=!1));return pe.SR_OK}},{key:"SR_Display",value:function(e){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;this.pSubDisplay.SetTextureNum(this.nTextureNum);for(var t=0;t<this.nTextureNum;t++)this.pSubDisplay.SetTextures(t,this.nSurfaceTexture[t]);if(null!=this.pFishParamManager){var a={};this.pFishParamManager.GetRenderParam(this.nFECPort,a),this.pSubDisplay.SetFishParam(a)}var r=this.pSubDisplay.Render(!1);if(pe.SR_OK!=r)return r;if(null!=this.pFishParamManager){var i=this.pFishParamManager.GetWndPort();-1!=i&&i==this.nFECPort&&this.DrawPTZLines()}return this.pSubDisplay.SetVideoResolution(this.frameDisplayWidth,this.frameDisplayHeight),e||this.pSubDisplay.DoCallBack(),pe.SR_OK}},{key:"SR_SetDisplayRect",value:function(e,t,a,r,i){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var n=pe.SR_OK;return(n=this.pSubDisplay.SetDisplayRect(e,t,a,r,i))!=pe.SR_OK?n:(this.preDisplayRectnX=e,this.preDisplayRectnY=t,this.preDisplayRectnW=a,this.preDisplayRectnH=r,pe.SR_OK)}},{key:"SR_SetImagePostProcess",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay&&(this.pSubDisplay=new Ue,null==this.pSubDisplay))return pe.SR_ERR_ALLOC_MEMORY;var a=pe.SR_OK;return(a=this.pSubDisplay.SetImagePostProcess(e,t))!=pe.SR_OK?a:pe.SR_OK}},{key:"SR_SetRenderState",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var a=pe.SR_OK;return(a=this.pSubDisplay.SetRenderState(e,t))!=pe.SR_OK?a:(e==ge.SR_RST_IMAGE_ROTATE&&(this.preImageRotateValue=t),pe.SR_OK)}},{key:"SR_GetCaptureSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e)return pe.SR_ERR_PARAM;if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var a=pe.SR_OK;return(a=this.pSubDisplay.GetCaptureSize(e,t))!=pe.SR_OK?a:(this.nCaptureWidth=e.nWidth,this.nCaptureHeight=e.nHeight,pe.SR_OK)}},{key:"SR_CaptureScreen",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0==this.nSurfaceTexture[0])return pe.SR_ERR_CALL_ORDER;if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var a={nWndWidth:0,nWndHeight:0};this.pSubDisplay.GetWndResolution(a),this.pSubDisplay.SetWndResolution(this.nCaptureWidth,this.nCaptureHeight);var r=pe.SR_OK;return(r=this.pSubDisplay.CaptureScreen(e,t))!=pe.SR_OK?r:(this.pSubDisplay.SetWndResolution(a.nWndWidth,a.nWndHeight),pe.SR_OK)}},{key:"SR_DrawMosaic",value:function(e,t,a,r,i){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var n=pe.SR_OK;return(n=this.pSubDisplay.DrawMosaic(e,t,a,r,i))!=pe.SR_OK?n:pe.SR_OK}},{key:"DrawPTZLines",value:function(){if(null==this.pFishParamManager)return pe.SR_ERR_CALL_ORDER;var e=this.pFishParamManager.GetPTZDisplayMode();if(e==ye.SR_DM_RANGE||e==ye.SR_DM_RECT)for(var t=0,a={fR:0,fG:0,fB:0,fA:0},r=pe.SR_OK,i=0;i<32;++i)if(0!=this.pFishParamManager.IsPortAllocated(i)&&(t=2,r=this.pFishParamManager.GetPTZColor(i,a),pe.SR_OK==r)){1==this.pFishParamManager.IsPTZSelected(i)&&(t+=1);var n=this.pFishParamManager.GetWndPort();if(i!=n&&ye.SR_DM_RANGE==e)if(Se.SR_DE_FISH_ORIGINAL==this.pFishParamManager.GetDisplayEffect(n)){var s={};if(r=this.pFishParamManager.GetPTZPoints(i,s,ye.SR_DM_RANGE),pe.SR_OK!=r)continue;if(null!=s.pstPoints&&0!=s.nPointNum&&(r=this.SR_DrawLines(s.pstPoints,s.nPointNum,!0,a,t,!1),pe.SR_OK!=r))continue}else{var x;if((x=this.pFishParamManager.GetPTZFragmentNum(i))<=0)continue;for(var o=0;o<x;o++){var l={};this.pFishParamManager.GetPTZFragmentPoints(i,l,o),null!=l.pstPoints&&0!=l.nPointNum&&this.SR_DrawLines(l.pstPoints,l.nPointNum,!1,a,t,!1)}}else if(i!=n&&ye.SR_DM_RECT==e){var _={};if(r=this.pFishParamManager.GetPTZPoints(i,_,ye.SR_DM_RECT),pe.SR_OK!=r)continue;if(null!=_.pstPoints&&0!=_.nPointNum&&(r=this.SR_DrawLines(_.pstPoints,_.nPointNum,!0,a,t,!1),pe.SR_OK!=r))continue}}return pe.SR_OK}},{key:"SR_DrawLines",value:function(e,t,a,r,i,n){return null==this.ctx||null==this.pSubDisplay?pe.SR_ERR_CALL_ORDER:this.pSubDisplay.DrawLines(e,t,a,r,i,n)}},{key:"SR_DrawLinesEx",value:function(e,t,a,r){return null==this.ctx||null==this.pSubDisplay?pe.SR_ERR_CALL_ORDER:this.pSubDisplay.DrawLinesEx(e,t,a,r)}},{key:"SR_DrawFont",value:function(e,t,a,r,i,n,s,x,o,l,_){return pe.SR_ERR_NOT_SUPPORT}},{key:"SR_DrawFontEx",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;return null==this.ctx||null==this.pSubDisplay?pe.SR_ERR_CALL_ORDER:this.pSubDisplay.DrawFontEx(e,t,a,r)}},{key:"SR_DrawImage",value:function(e,t,a,r,i,n){return null==this.ctx||null==this.pSubDisplay?pe.SR_ERR_CALL_ORDER:this.pSubDisplay.DrawImage(e,t,a,r,i,n)}},{key:"SR_DelSubPort",value:function(e){return null==this.ctx||null==this.pSubDisplay?pe.SR_ERR_CALL_ORDER:(this.pSubDisplay.DelSubPort(),null!=this.pFishParamManager&&this.nFECPort==e&&this.pFishParamManager.FreeFECPort(this.nFECPort),this.enDisplayEffect=Se.SR_DE_NULL,this.pSubDisplay=null,pe.SR_OK)}},{key:"SR_GetFishParam",value:function(e){return null==e?pe.SR_ERR_PARAM:null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.GetFishParam(this.nFECPort,e)}},{key:"SR_SetFishParam",value:function(e){return null==e?pe.SR_ERR_PARAM:null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.SetFishParam(this.nFECPort,e)}},{key:"SR_Destroy",value:function(){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;this.frameDisplayWidth=0,this.frameDisplayHeight=0,this.pFrameData=null;for(var e=0;e<this.nTextureNum;e++)0!=this.nSurfaceTexture[e]&&null!=this.ctx&&(this.ctx.deleteTexture(this.nSurfaceTexture[e]),this.nSurfaceTexture[e]=0);return this.SR_DelSubPort(this.nFECPort),this.ctx=null,this.onlySupportedWebGL1=!1,this.bAntialias=!1,this.bAntialiasStateNeedChange=!1,this.bOpenMsaa=!1,this.bRecreateTex=!0,this.pFishParamManager=null,pe.SR_OK}},{key:"SR_SetCanvasSize",value:function(e,t){if(!this.pSubDisplay||!this.canvas)return pe.SR_ERR_CALL_ORDER;this.canvas.width=e,this.canvas.height=t;var a=this.pSubDisplay.SetCanvasSize(e,t);return a!=pe.SR_OK?a:pe.SR_OK}},{key:"SR_GetCanvasSize",value:function(){return this.canvas?pe.SR_OK:pe.SR_ERR_CALL_ORDER}},{key:"SR_SetAntialias",value:function(e){if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;if(1==this.onlySupportedWebGL1)return pe.SR_ERR_NOT_SUPPORT;this.bAntialias!=e&&(this.bAntialias=e,this.bAntialiasStateNeedChange=!0);var t=this.pSubDisplay.SetAntialias(this.bAntialias);return t!=pe.SR_OK?t:pe.SR_OK}},{key:"SR_SetRenderMode",value:function(e){return pe.SR_ERR_NOT_SUPPORT}},{key:"SR_SetPTZDisplayMode",value:function(e){return null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.SetPTZDisplayMode(e)}},{key:"SR_SetFishParamManager",value:function(e){return null!=this.pFishParamManager?pe.SR_ERR_NOT_SUPPORT:(this.pFishParamManager=e,pe.SR_OK)}},{key:"SR_SetViewParam",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var a=this.pSubDisplay.SetViewParam(e,t);return a!=pe.SR_OK?a:pe.SR_OK}},{key:"SR_GetViewParam",value:function(e,t){if(null==this.ctx)return pe.SR_ERR_CALL_ORDER;if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var a=this.pSubDisplay.GetViewParam(e,t);return a!=pe.SR_OK?a:pe.SR_OK}},{key:"SR_SetCallBack",value:function(e,t,a){if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var r=pe.SR_OK;return(r=this.pSubDisplay.SetCallBack(e,t,a))!=pe.SR_OK?r:pe.SR_OK}},{key:"SR_SetPTZColor",value:function(e,t){return null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.SetPTZColor(e,t)}},{key:"SR_GetPTZColor",value:function(e,t){return null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.GetPTZColor(e,t)}},{key:"SR_SetPTZPort",value:function(e){return null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:this.pFishParamManager.SetPTZPort(e)}},{key:"SR_GetPTZPort",value:function(e,t,a){return null==this.pFishParamManager?pe.SR_ERR_CALL_ORDER:null==a?pe.SR_ERR_PARAM:this.pFishParamManager.GetPTZPort(e,t,a)}},{key:"SR_GetDllVersion",value:function(){return"V1.1.0.3_build20250820_svn96751"}},{key:"_ResizeFrameData",value:function(e,t,a,r){if(0==t%8&&null==r)return this.frameDisplayWidth=Math.round(t),this.frameDisplayHeight=Math.round(a),this.pFrameData=e,pe.SR_OK;if(null!=r&&0==r.nCropBottom&&0==r.nCropLeft&&0==r.nCropRight&&0==r.nCropTop&&0==t%8)return this.frameDisplayWidth=Math.round(t),this.frameDisplayHeight=Math.round(a),this.pFrameData=e,pe.SR_OK;if((null==this.pFrameData||this.frameDisplayWidth!=t/8*8||this.frameDisplayHeight!=a)&&(this.frameDisplayWidth=8*Math.round(t/8),this.frameDisplayHeight=Math.round(a),this.pFrameData=null,this.pFrameData=new Uint8Array(this.frameDisplayWidth*this.frameDisplayHeight*3/2),null==this.pFrameData))return pe.SR_ERR_ALLOC_MEMORY;var i=0,n=0,s=Math.round(r.nCodeWidth),x=Math.round(r.nCodeHeight),o=0;if(Re.SR_PF_YV12==this.enPixelFormat||Re.SR_PF_I420==this.enPixelFormat){var l,_,h;null!=r?(i=Math.round(r.nCropLeft),n=Math.round(r.nCropTop),l=e.subarray(i*s+n,s*x),_=e.subarray(s*x+n*s/4+i/2,s*x*5/4),h=e.subarray(s*x*5/4+n*s/4+i/2,s*x*3/2),o=s):(l=e.subarray(0,t*a),_=e.subarray(t*a,t*a*5/4),h=e.subarray(t*a*5/4,t*a*3/2),o=this.frameDisplayWidth);for(var f=null,c=0;c<this.frameDisplayHeight;++c){var u=Math.round(c*o),d=Math.round(c*o+this.frameDisplayWidth);f=l.slice(u,d);var p=Math.round(c*this.frameDisplayWidth);this.pFrameData.set(f,p)}for(var m=0;m<this.frameDisplayHeight/2;++m){var S=Math.round(m*o/2),R=Math.round(m*o/2+this.frameDisplayWidth/2);f=_.slice(S,R);var P=Math.round(this.frameDisplayWidth*this.frameDisplayHeight+m*this.frameDisplayWidth/2);this.pFrameData.set(f,P)}for(var y=0;y<this.frameDisplayHeight/2;++y){var b=Math.round(y*o/2),E=Math.round(y*o/2+this.frameDisplayWidth/2);f=h.slice(b,E);var g=Math.round(this.frameDisplayWidth*this.frameDisplayHeight*5/4+y*this.frameDisplayWidth/2);this.pFrameData.set(f,g)}l=null,_=null,h=null,f=null}else if(Re.SR_PF_NV12==this.enPixelFormat){var F,C,v;null!=r?(i=Math.round(r.nCropLeft),n=Math.round(r.nCropTop),F=e.subarray(n*s+i,s*x),C=e.subarray(s*x+n*s/4+i/2,s*x*3/2),o=Math.round(r.nCodeWidth)):(F=e.subarray(0,s*x),C=e.subarray(s*x,s*x*3/2),o=this.frameDisplayWidth);for(var T=0;T<this.frameDisplayHeight;++T){var D=Math.round(T*o),A=Math.round(T*o+this.frameDisplayWidth);v=F.slice(D,A);var I=Math.round(T*this.frameDisplayWidth);this.pFrameData.set(v,I)}for(var M=0;M<this.frameDisplayHeight/2;++M){var L=Math.round(M*o),w=Math.round(M*o+this.frameDisplayWidth);v=C.slice(L,w);var O=Math.round(this.frameDisplayWidth*this.frameDisplayHeight+M*this.frameDisplayWidth);this.pFrameData.set(v,O)}F=null,C=null,v=null}return pe.SR_OK}},{key:"_RenderToTarget",value:function(e){return pe.SR_ERR_NOT_SUPPORT}},{key:"_SetRenderMode",value:function(e){if(null==this.pSubDisplay)return pe.SR_ERR_CALL_ORDER;var t=pe.SR_OK;if(e==this.bRenderToTex)return pe.SR_OK;this.bRenderToTex=e;var a={};if(null!=this.pFishParamManager){this.pSubDisplay.SetFishParamManager(this.pFishParamManager),this.pSubDisplay.SetFECPort(this.nFECPort);for(var r=0;r<32&&pe.SR_OK!=this.pFishParamManager.GetRenderParam(r,a);++r);}return(t=this.bRenderToTex?this.pSubDisplay.Init(this.ctx,Re.SR_PF_RGBA32,this.enDisplayEffect,a):this.pSubDisplay.Init(this.ctx,this.enPixelFormat,this.enDisplayEffect,a))!=pe.SR_OK?t:0==this.preDisplayRectnX&&0==this.preDisplayRectnY&&0==this.preDisplayRectnW&&0==this.preDisplayRectnH||(t=this.pSubDisplay.SetDisplayRect(this.preDisplayRectnX,this.preDisplayRectnY,this.preDisplayRectnW,this.preDisplayRectnH,me.SR_SRT_SRC))==pe.SR_OK?(this.pSubDisplay.nImageRotateAngle=Ce.SR_IRA_0,(t=this.pSubDisplay.SetRenderState(ge.SR_RST_IMAGE_ROTATE,this.preImageRotateValue))!=pe.SR_OK?t:pe.SR_OK):t}}]),e}(),We=function(){function e(){u(this,e),this.bPortAllocated=[],this.pRenderParam=[],this.pFishParam=[],this.stPTZColor=[],this.pPTZSetColor=[];for(var t=0;t<32;++t)this.pPTZSetColor[t]={},this.pPTZSetColor[t].fR=0,this.pPTZSetColor[t].fG=0,this.pPTZSetColor[t].fB=0,this.pPTZSetColor[t].fA=1,this.pPTZSetColor[t].bSetColor=!1;this.nBasePTZPointNum=[],this.nOriPTZPointNum=[],this.nPanoPTZPointNum=[],this.nPTZFragmentNum=[],this.pBasePTZPoints=[],this.pPanoPTZPoints=[],this.pRectPoints=[],this.nPTZRectNum=[],this.nPTZDisplayMode=ye.SR_DM_NULL,this.fRX1=0,this.fRX2=1,this.fRY1=0,this.fRY2=1,this.bBlack=!1,this.pOriPTZPoints=[],this.nWndPort=-1,this.nPlaceType=0,this.nPTZFragmentNode=[],this.bPTZSelected=[],this.nPTZDisplayMode=ye.SR_DM_RANGE;for(var a=0;a<32;++a){this.bPortAllocated[a]=!1,this.bPTZSelected[a]=!1,this.pRenderParam[a]=null,this.pFishParam[a]=null,this.stPTZColor[a]={},this.stPTZColor[a].fR=0,this.stPTZColor[a].fG=0,this.stPTZColor[a].fB=0,this.stPTZColor[a].fA=0,this.nBasePTZPointNum[a]=0,this.nOriPTZPointNum[a]=0,this.nPanoPTZPointNum[a]=0,this.nPTZRectNum[a]=0,this.pPanoPTZPoints[a]=[],this.pRectPoints[a]=[],this.pBasePTZPoints[a]=[],this.pOriPTZPoints[a]=[];for(var r=0;r<4;++r)this.pRectPoints[a][r]={},this.pRectPoints[a][r].fX=0,this.pRectPoints[a][r].fY=0;for(var i=0;i<1024;++i)this.pBasePTZPoints[a][i]={},this.pBasePTZPoints[a][i].fX=0,this.pBasePTZPoints[a][i].fY=0,this.pOriPTZPoints[a][i]={},this.pOriPTZPoints[a][i].fX=0,this.pOriPTZPoints[a][i].fY=0,this.pPanoPTZPoints[a][i]={},this.pPanoPTZPoints[a][i].fX=0,this.pPanoPTZPoints[a][i].fY=0;this.nPTZFragmentNum[a]=0,this.nPTZFragmentNode[a]=[];for(var n=0;n<100;++n)this.nPTZFragmentNode[a][n]=0}this.InitColorList()}return d(e,[{key:"GetFECPort",value:function(e){for(var t=-1,a=0;a<32;++a)if(0==this.bPortAllocated[a]){t=a;break}if(-1==t)return t;if(e==Se.SR_DE_NULL)return t;var r=this.JudgeDisplayEffect(e);if(pe.SR_OK!=r)return this.FreeFECPort(t),-1;if(Se.SR_DE_FISH_PANORAMA_CEILING_360==e||Se.SR_DE_FISH_PANORAMA_CEILING_180==e||Se.SR_DE_FISH_PANORAMA_FLOOR_360==e||Se.SR_DE_FISH_PANORAMA_FLOOR_180==e||Se.SR_DE_FISH_PANORAMA_WALL==e||Se.SR_DE_FISH_ORIGINAL==e){if(-1!=this.nWndPort)return this.FreeFECPort(t),-1;this.nWndPort=t}if(!(Se.SR_DE_FISH_PTZ_CEILING!=e&&Se.SR_DE_FISH_PTZ_FLOOR!=e&&Se.SR_DE_FISH_PTZ_WALL!=e||-1==this.nWndPort||null==this.pRenderParam[this.nWndPort]||Se.SR_DE_FISH_PANORAMA_CEILING_180!=this.pRenderParam[this.nWndPort].nDisplayEffect&&Se.SR_DE_FISH_PANORAMA_FLOOR_180!=this.pRenderParam[this.nWndPort].nDisplayEffect))return this.FreeFECPort(t),-1;if(Se.SR_DE_FISH_PANORAMA_CEILING_180==e||Se.SR_DE_FISH_PANORAMA_FLOOR_180==e)for(var i=0;i<32;++i)if(null!=this.pRenderParam[i]&&(Se.SR_DE_FISH_PTZ_CEILING==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_FLOOR==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_WALL==this.pRenderParam[i].nDisplayEffect))return this.FreeFECPort(t),-1;if(Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL==e)for(var n=0;n<32;++n)if(null!=this.pRenderParam[n]&&Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL==this.pRenderParam[n].nDisplayEffect)return this.FreeFECPort(t),-1;if(Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL==e)for(var s=0;s<32;++s)if(null!=this.pRenderParam[s]&&Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL==this.pRenderParam[s].nDisplayEffect)return this.FreeFECPort(t),-1;return this.pRenderParam[t]={},this.pRenderParam[t].fCosH=1,this.pRenderParam[t].fSinH=0,this.pRenderParam[t].fCosV=1,this.pRenderParam[t].fSinV=0,this.pRenderParam[t].fAngle=0,this.pRenderParam[t].fRX1=this.fRX1,this.pRenderParam[t].fRX2=this.fRX2,this.pRenderParam[t].fRY1=this.fRY1,this.pRenderParam[t].fRY2=this.fRY2,this.pRenderParam[t].bBlack=this.bBlack,this.pRenderParam[t].fZoom=.035+.8,this.pRenderParam[t].nDisplayEffect=e,this.pRenderParam[t].bBlack=!1,this.pRenderParam[t].bCut=!1,this.pFishParam[t]={},this.pFishParam[t].nFishParamType=0,this.pFishParam[t].bCut=!1,this.pFishParam[t].fAngle=this.pRenderParam[t].fAngle,this.pFishParam[t].fPTZX=.5,this.pFishParam[t].fPTZY=.5,this.pFishParam[t].fRXLeft=this.pRenderParam[t].fRX1,this.pFishParam[t].fRXRight=this.pRenderParam[t].fRX2,this.pFishParam[t].fRYTop=this.pRenderParam[t].fRY1,this.pFishParam[t].fRYBottom=this.pRenderParam[t].fRY2,this.pFishParam[t].bBlack=this.pRenderParam[t].bBlack,this.pFishParam[t].fZoom=(this.pRenderParam[t].fZoom-.8)/7,this.bPortAllocated[t]=!0,t}},{key:"FreeFECPort",value:function(e){if(e<0||e>=32)return pe.SR_ERR_PARAM;this.nWndPort==e&&(this.nWndPort=-1),null!=this.pRenderParam[e]&&(this.pRenderParam[e].fCosH=1,this.pRenderParam[e].fSinH=0,this.pRenderParam[e].fCosV=1,this.pRenderParam[e].fSinV=0,this.pRenderParam[e].fAngle=0,this.pRenderParam[e].fZoom=0,this.pRenderParam[e].fRX1=0,this.pRenderParam[e].fRX2=1,this.pRenderParam[e].fRY1=0,this.pRenderParam[e].fRY2=1,this.pRenderParam[e].nDisplayEffect=0,this.pRenderParam[e].bBlack=!1,this.pRenderParam[e].bCut=!1),null!=this.pFishParam[e]&&(this.pFishParam[e].nFishParamType=0,this.pFishParam[e].fRXLeft=0,this.pFishParam[e].fRXRight=1,this.pFishParam[e].fRYTop=0,this.pFishParam[e].fRYBottom=1,this.pFishParam[e].bBlack=!1,this.pFishParam[e].bCut=!1,this.pFishParam[e].fAngle=0,this.pFishParam[e].fZoom=0,this.pFishParam[e].fPTZX=.5,this.pFishParam[e].fPTZY=.5),this.nBasePTZPointNum[e]=0,this.nOriPTZPointNum[e]=0,this.nPanoPTZPointNum[e]=0,this.nPTZRectNum[e]=0;for(var t=0;t<4;++t)this.pRectPoints[e][t].fX=0,this.pRectPoints[e][t].fY=0;for(var a=0;a<1024;++a)this.pBasePTZPoints[e][a].fX=0,this.pBasePTZPoints[e][a].fY=0,this.pOriPTZPoints[e][a].fX=0,this.pOriPTZPoints[e][a].fY=0,this.pPanoPTZPoints[e][a].fX=0,this.pPanoPTZPoints[e][a].fY=0;if(this.pPTZSetColor[e].bSetColor&&(this.pPTZSetColor[e].fA=0,this.pPTZSetColor[e].fR=0,this.pPTZSetColor[e].fG=0,this.pPTZSetColor[e].fB=0,this.pPTZSetColor[e].bSetColor=!1),this.bPTZSelected[e]=!1,0!=this.nPlaceType){for(var r=!1,i=0;i<32;++i)if(null!=this.pRenderParam[i]&&(Se.SR_DE_FISH_PTZ_CEILING==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_FLOOR==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_WALL==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_CEILING_360==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_CEILING_180==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_FLOOR_360==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_FLOOR_180==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_WALL==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_CYLINDER_CEILING==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_CYLINDER_FLOOR==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL==this.pRenderParam[i].nDisplayEffect)){r=!0;break}r||(this.nPlaceType=0)}for(var n=!1,s=0;s<32;++s)if(null!=this.pRenderParam[s]){n=!0;break}n||(this.fRX1=0,this.fRX2=1,this.fRY1=0,this.fRY2=1,this.bBlack=!1),this.nPTZFragmentNum[e]=0;for(var x=0;x<100;++x)this.nPTZFragmentNode[e][x]=0;return this.bPortAllocated[e]=!1,pe.SR_OK}},{key:"DeInit",value:function(){for(var e=0;e<32;++e){for(var t=0;t<4;++t)this.pRectPoints[e][t]=null;for(var a=0;a<1024;++a)this.pBasePTZPoints[e][a]=null,this.pOriPTZPoints[e][a]=null,this.pPanoPTZPoints[e][a]=null;this.nPTZFragmentNum[e]=0,this.nPTZFragmentNode[e]=null,this.bPortAllocated[e]=!1,this.bPTZSelected[e]=!1,this.pRenderParam[e]=null,this.pFishParam[e]=null,this.stPTZColor[e]=null,this.nBasePTZPointNum[e]=0,this.nOriPTZPointNum[e]=0,this.nPanoPTZPointNum[e]=0,this.nPTZRectNum[e]=0,this.pPanoPTZPoints[e]=null,this.pRectPoints[e]=null,this.pBasePTZPoints[e]=null,this.pOriPTZPoints[e]=null}return this.bPortAllocated=null,this.pRenderParam=null,this.pFishParam=null,this.stPTZColor=null,this.nBasePTZPointNum=null,this.nOriPTZPointNum=null,this.nPanoPTZPointNum=null,this.nPTZFragmentNum=null,this.pBasePTZPoints=null,this.pPanoPTZPoints=null,this.pRectPoints=null,this.nPTZRectNum=null,this.nPTZDisplayMode=ye.SR_DM_NULL,this.fRX1=0,this.fRX2=1,this.fRY1=0,this.fRY2=1,this.bBlack=!1,this.pOriPTZPoints=null,this.pBasePTZPoints=null,this.nWndPort=-1,this.nPlaceType=0,this.nPTZFragmentNode=null,this.bPTZSelected=null,this.nPTZDisplayMode=ye.SR_DM_RANGE,pe.SR_OK}},{key:"InitColorList",value:function(){this.stPTZColor[0].fR=.5,this.stPTZColor[0].fG=.5,this.stPTZColor[0].fB=0,this.stPTZColor[0].fA=1,this.stPTZColor[1].fR=1,this.stPTZColor[1].fG=0,this.stPTZColor[1].fB=0,this.stPTZColor[1].fA=1,this.stPTZColor[2].fR=0,this.stPTZColor[2].fG=1,this.stPTZColor[2].fB=0,this.stPTZColor[2].fA=1,this.stPTZColor[3].fR=0,this.stPTZColor[3].fG=0,this.stPTZColor[3].fB=1,this.stPTZColor[3].fA=1,this.stPTZColor[4].fR=1,this.stPTZColor[4].fG=1,this.stPTZColor[4].fB=0,this.stPTZColor[4].fA=1,this.stPTZColor[5].fR=.5,this.stPTZColor[5].fG=0,this.stPTZColor[5].fB=1,this.stPTZColor[5].fA=1,this.stPTZColor[6].fR=0,this.stPTZColor[6].fG=1,this.stPTZColor[6].fB=1,this.stPTZColor[6].fA=1,this.stPTZColor[7].fR=1,this.stPTZColor[7].fG=.5,this.stPTZColor[7].fB=0,this.stPTZColor[7].fA=1,this.stPTZColor[8].fR=0,this.stPTZColor[8].fG=.5,this.stPTZColor[8].fB=.5,this.stPTZColor[8].fA=1;for(var e=9;e<32;e++)this.stPTZColor[e].fR=1*e/32,this.stPTZColor[e].fG=1*e/32,this.stPTZColor[e].fB=1*e/32,this.stPTZColor[e].fA=1;return pe.SR_OK}},{key:"GetRangePoints",value:function(e){if(e<0||e>=32)return pe.SR_ERR_PARAM;if(null==this.pRenderParam[e])return pe.SR_ERR_CALL_ORDER;var t=0,a=0;switch(this.nOriPTZPointNum[e]=0,this.nBasePTZPointNum[e]=0,this.pRenderParam[e].nDisplayEffect){case Se.SR_DE_FISH_PTZ_CEILING:for(a=0;a<1;a+=.01)this.GetFishPTZCeiling(t,a,e);for(a=.9995,t=0;t<1;t+=.02)this.GetFishPTZCeiling(t,a,e);for(t=.999,a=.9995;a>=0;a-=.01)this.GetFishPTZCeiling(t,a,e);for(a=0,t=.999;t>=0;t-=.02)this.GetFishPTZCeiling(t,a,e);break;case Se.SR_DE_FISH_PTZ_FLOOR:for(a=0;a<1;a+=.01)this.GetFishPTZFloor(t,a,e);for(a=.9995,t=0;t<1;t+=.02)this.GetFishPTZFloor(t,a,e);for(t=.999,a=.9995;a>=0;a-=.01)this.GetFishPTZFloor(t,a,e);for(a=0,t=.999;t>=0;t-=.02)this.GetFishPTZFloor(t,a,e);break;case Se.SR_DE_FISH_PTZ_WALL:for(a=0;a<1;a+=.01)this.GetFishPTZWALL(t,a,e);for(a=.9995,t=0;t<1;t+=.02)this.GetFishPTZWALL(t,a,e);for(t=.999,a=.9995;a>=0;a-=.01)this.GetFishPTZWALL(t,a,e);for(a=0,t=.999;t>=0;t-=.02)this.GetFishPTZWALL(t,a,e);break;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_OK}},{key:"TransformPTZRangePoints",value:function(e){if(-1==this.nWndPort)return pe.SR_ERR_CALL_ORDER;if(null==this.pBasePTZPoints[e]||null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;this.nPanoPTZPointNum[e]=0;var t=pe.SR_OK,a=this.nWndPort;switch(this.pRenderParam[a].nDisplayEffect){case Se.SR_DE_FISH_PANORAMA_WALL:if(t=this.GetPanoPTZWall(e),pe.SR_OK!=t)return t;break;case Se.SR_DE_FISH_PANORAMA_FLOOR_360:if(t=this.GetPanoPTZFloor(e),pe.SR_OK!=t)return t;break;case Se.SR_DE_FISH_PANORAMA_CEILING_360:if(t=this.GetPanoPTZCeiling(e),pe.SR_OK!=t)return t}return this.CalcPTZFragmentPoints(e),pe.SR_OK}},{key:"GetRectPoints",value:function(e){if(e<0||e>=32)return pe.SR_ERR_PARAM;if(-1==this.nWndPort)return pe.SR_ERR_CALL_ORDER;if(null==this.pRenderParam[this.nWndPort]||null==this.pFishParam[e])return pe.SR_ERR_CALL_ORDER;var t=this.pRenderParam[this.nWndPort].nDisplayEffect,a=pe.SR_OK,r={fX:0,fY:0};switch(t){case Se.SR_DE_FISH_PANORAMA_WALL:if(a=this.GetPointFish2PanoWall(r,this.pFishParam[e].fPTZX,this.pFishParam[e].fPTZY),pe.SR_OK!=a)return a;break;case Se.SR_DE_FISH_PANORAMA_FLOOR_360:if(a=this.GetPointFish2PanoFloor(r,this.pFishParam[e].fPTZX,this.pFishParam[e].fPTZY),pe.SR_OK!=a)return pe.SR_ERR_NOT_SUPPORT==a&&(this.pRectPoints[e]=null),a;break;case Se.SR_DE_FISH_PANORAMA_CEILING_360:if(a=this.GetPointFish2PanoCeiling(r,this.pFishParam[e].fPTZX,this.pFishParam[e].fPTZY),pe.SR_OK!=a)return pe.SR_ERR_NOT_SUPPORT==a&&(this.pRectPoints[e]=null),a;break;case Se.SR_DE_FISH_ORIGINAL:r.fX=this.pFishParam[e].fPTZX,r.fY=this.pFishParam[e].fPTZY}if(null==this.pRectPoints[e]){this.pRectPoints[e]=[];for(var i=0;i<4;++i)this.pRectPoints[e][i]={},this.pRectPoints[e][i].fX=0,this.pRectPoints[e][i].fY=0}return this.pRectPoints[e][0].fX=r.fX-.05,this.pRectPoints[e][0].fY=r.fY-.05,this.pRectPoints[e][1].fX=r.fX+.05,this.pRectPoints[e][1].fY=r.fY-.05,this.pRectPoints[e][2].fX=r.fX+.05,this.pRectPoints[e][2].fY=r.fY+.05,this.pRectPoints[e][3].fX=r.fX-.05,this.pRectPoints[e][3].fY=r.fY+.05,this.nPTZRectNum[e]=4,pe.SR_OK}},{key:"GetFishPTZCeiling",value:function(e,t,a){var r,i,n,s,x,o,l,_={fX:0,fY:0},h={fX:0,fY:0},f={fX:0,fY:0},c={};s=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),x=(this.fRX1+this.fRX2)/2*1,o=(this.fRY1+this.fRY2)/2*s,l=(this.fRX2-this.fRX1)/2*1,_.fX=t-.5,_.fY=.5-e,r=this.pRenderParam[a].fZoom,h.fX=_.fX,h.fY=_.fY*this.pRenderParam[a].fCosV+r*this.pRenderParam[a].fSinV,i=r*this.pRenderParam[a].fCosV-_.fY*this.pRenderParam[a].fSinV,n=Math.sqrt(h.fX*h.fX+h.fY*h.fY);var u=Math.sqrt(h.fX*h.fX+h.fY*h.fY+i*i),d=Math.asin(n/u)/1.5707963*.5;h.fX=d*h.fX/n,h.fY=d*h.fY/n,f.fX=h.fX*this.pRenderParam[a].fCosH-h.fY*this.pRenderParam[a].fSinH,f.fY=h.fX*this.pRenderParam[a].fSinH+h.fY*this.pRenderParam[a].fCosH,c.fX=2*f.fX*l+x,c.fY=2*-f.fY*l+o;var p=this.nBasePTZPointNum[a];this.pBasePTZPoints[a][p].fX=f.fX+.5,this.pBasePTZPoints[a][p].fY=.5-f.fY,this.nBasePTZPointNum[a]=this.nBasePTZPointNum[a]+1;var m=this.fRX1<=0?0:1*this.fRX1,S=this.fRY1<=0?0:this.fRY1*s,R=this.fRX2>=1?1-m:1*this.fRX2-m,P=this.fRY2>=1?s-S:this.fRY2*s-S;if(c.fX=(c.fX-m)/R,c.fY=(c.fY-S)/P,c.fX<=1&&c.fY<=1&&c.fX>=0&&c.fY>=0){var y=this.nOriPTZPointNum[a];this.pOriPTZPoints[a][y].fX=c.fX,this.pOriPTZPoints[a][y].fY=c.fY,this.nOriPTZPointNum[a]=this.nOriPTZPointNum[a]+1}return pe.SR_OK}},{key:"GetFishPTZFloor",value:function(e,t,a){var r,i,n,s,x,o,l,_={fX:0,fY:0},h={fX:0,fY:0},f={fX:0,fY:0},c={};s=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),x=(this.fRX1+this.fRX2)/2*1,o=(this.fRY1+this.fRY2)/2*s,l=(this.fRX2-this.fRX1)/2*1,_.fX=e-.5,_.fY=t-.5,r=this.pRenderParam[a].fZoom,h.fX=_.fX,h.fY=_.fY*this.pRenderParam[a].fCosV+r*this.pRenderParam[a].fSinV,i=r*this.pRenderParam[a].fCosV-_.fY*this.pRenderParam[a].fSinV,n=Math.sqrt(h.fX*h.fX+h.fY*h.fY);var u=Math.sqrt(h.fX*h.fX+h.fY*h.fY+i*i),d=Math.asin(n/u)/1.5707963*.5;h.fX=d*h.fX/n,h.fY=d*h.fY/n,f.fX=h.fX*this.pRenderParam[a].fCosH-h.fY*this.pRenderParam[a].fSinH,f.fY=h.fX*this.pRenderParam[a].fSinH+h.fY*this.pRenderParam[a].fCosH,c.fX=2*f.fX*l+x,c.fY=2*f.fY*l+o;var p=this.nBasePTZPointNum[a];this.pBasePTZPoints[a][p].fX=f.fX+.5,this.pBasePTZPoints[a][p].fY=f.fY+.5,this.nBasePTZPointNum[a]=this.nBasePTZPointNum[a]+1;var m=this.fRX1<=0?0:1*this.fRX1,S=this.fRY1<=0?0:this.fRY1*s,R=this.fRX2>=1?1-m:1*this.fRX2-m,P=this.fRY2>=1?s-S:this.fRY2*s-S;if(c.fX=(c.fX-m)/R,c.fY=(c.fY-S)/P,c.fX<=1&&c.fY<=1&&c.fX>=0&&c.fY>=0){var y=this.nOriPTZPointNum[a];this.pOriPTZPoints[a][y].fX=c.fX,this.pOriPTZPoints[a][y].fY=c.fY,this.nOriPTZPointNum[a]=this.nOriPTZPointNum[a]+1}return pe.SR_OK}},{key:"GetFishPTZWALL",value:function(e,t,a){var r,i,n,s,x,o,l,_,h={fX:0,fY:0},f={fX:0,fY:0},c={fX:0,fY:0},u={};x=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),o=(this.fRX1+this.fRX2)/2*1,l=(this.fRY1+this.fRY2)/2*x,_=(this.fRX2-this.fRX1)/2*1,h.fX=t-.5,h.fY=e-.5,r=this.pRenderParam[a].fZoom,f.fX=h.fX,f.fY=h.fY*this.pRenderParam[a].fCosV+r*this.pRenderParam[a].fSinV,i=r*this.pRenderParam[a].fCosV-h.fY*this.pRenderParam[a].fSinV,c.fX=f.fX*this.pRenderParam[a].fCosH+i*this.pRenderParam[a].fSinH,c.fY=f.fY,n=i*this.pRenderParam[a].fCosH-f.fX*this.pRenderParam[a].fSinH,s=Math.sqrt(c.fX*c.fX+c.fY*c.fY);var d=Math.sqrt(c.fX*c.fX+c.fY*c.fY+n*n),p=Math.asin(s/d)/1.5707963*.5;u.fX=p*c.fX/s*_*2+o,u.fY=p*c.fY/s*_*2+l;var m=this.nBasePTZPointNum[a];this.pBasePTZPoints[a][m].fX=p*c.fX/s+.5,this.pBasePTZPoints[a][m].fY=p*c.fY/s+.5,this.nBasePTZPointNum[a]=this.nBasePTZPointNum[a]+1;var S=this.fRX1<=0?0:1*this.fRX1,R=this.fRY1<=0?0:this.fRY1*x,P=this.fRX2>=1?1-S:1*this.fRX2-S,y=this.fRY2>=1?x-R:this.fRY2*x-R;if(u.fX=(u.fX-S)/P,u.fY=(u.fY-R)/y,u.fX<=1&&u.fY<=1&&u.fX>=0&&u.fY>=0){var b=this.nOriPTZPointNum[a];this.pOriPTZPoints[a][b].fX=u.fX,this.pOriPTZPoints[a][b].fY=u.fY,this.nOriPTZPointNum[a]=this.nOriPTZPointNum[a]+1}return pe.SR_OK}},{key:"GetPanoPTZCeiling",value:function(e){if(null==this.pRenderParam[e]||null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==this.pBasePTZPoints[e])return pe.SR_ERR_CALL_ORDER;var t,a,r=this.nBasePTZPointNum[e];t=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),a=(this.fRX2-this.fRX1)/2*1;var i,n=0;(this.fRX2>1||this.fRY2>1||this.fRY1<0||this.fRX1<0)&&(this.fRX1<0&&(i=1*-this.fRX1)>n&&(n=i),this.fRX2>1&&(i=1*(this.fRX2-1))>n&&(n=i),this.fRY1<0&&(i=-this.fRY1*t)>n&&(n=i),this.fRY2>1&&(i=(this.fRY2-1)*t)>n&&(n=i));for(var s,x=n/a,o={fX:0,fY:0},l={fX:0,fY:0},_=0;_<r;++_)if(l.fX=this.pBasePTZPoints[e][_].fX,l.fY=this.pBasePTZPoints[e][_].fY,!(Math.abs(l.fX-.5)<1e-6&&Math.abs(l.fY-.5)<1e-6)){var h={fX:0,fY:0},f={fX:0,fY:0};h.fX=l.fX-.5,h.fY=l.fY-.5,f.fX=-.5*Math.sin(this.pRenderParam[this.nWndPort].fAngle),f.fY=.5*Math.cos(this.pRenderParam[this.nWndPort].fAngle);var c=Math.sqrt(h.fX*h.fX+h.fY*h.fY),u=Math.sqrt(f.fX*f.fX+f.fY*f.fY);if(s=Math.acos((h.fX*f.fX+h.fY*f.fY)/(c*u)),h.fX*f.fY-h.fY*f.fX>0&&(s=6.2831852-s),o.fX=s/6.2831853,o.fY=(2*(.5-c)-x)/(.8-x),o.fY>=0&&o.fX>=0&&o.fY<=1&&o.fX<=1){var d=this.nPanoPTZPointNum[e];this.pPanoPTZPoints[e][d].fX=o.fX,this.pPanoPTZPoints[e][d].fY=o.fY,this.nPanoPTZPointNum[e]=this.nPanoPTZPointNum[e]+1}}return pe.SR_OK}},{key:"GetPanoPTZFloor",value:function(e){if(null==this.pRenderParam[e]||null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==this.pBasePTZPoints[e])return pe.SR_ERR_CALL_ORDER;var t,a,r=this.nBasePTZPointNum[e];t=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),a=(this.fRX2-this.fRX1)/2*1;var i,n=0;(this.fRX2>1||this.fRY2>1||this.fRY1<0||this.fRX1<0)&&(this.fRX1<0&&(i=1*-this.fRX1)>n&&(n=i),this.fRX2>1&&(i=1*(this.fRX2-1))>n&&(n=i),this.fRY1<0&&(i=-this.fRY1*t)>n&&(n=i),this.fRY2>1&&(i=(this.fRY2-1)*t)>n&&(n=i));for(var s,x=n/a,o={fX:0,fY:0},l={fX:0,fY:0},_=0;_<r;++_)if(l.fX=this.pBasePTZPoints[e][_].fX,l.fY=this.pBasePTZPoints[e][_].fY,!(Math.abs(l.fX-.5)<1e-6&&Math.abs(l.fY-.5)<1e-6)){var h={fX:0,fY:0},f={fX:0,fY:0};h.fX=l.fX-.5,h.fY=l.fY-.5,f.fX=-.5*Math.sin(this.pRenderParam[this.nWndPort].fAngle),f.fY=.5*Math.cos(this.pRenderParam[this.nWndPort].fAngle);var c=Math.sqrt(h.fX*h.fX+h.fY*h.fY),u=Math.sqrt(f.fX*f.fX+f.fY*f.fY);if(s=Math.acos((h.fX*f.fX+h.fY*f.fY)/(c*u)),h.fX*f.fY-h.fY*f.fX>0&&(s=6.2831852-s),o.fX=1-s/6.2831853,o.fY=1-(2*(.5-c)-x)/(.8-x),o.fY>=0&&o.fX>=0&&o.fY<=1&&o.fX<=1){var d=this.nPanoPTZPointNum[e];this.pPanoPTZPoints[e][d].fX=o.fX,this.pPanoPTZPoints[e][d].fY=o.fY,this.nPanoPTZPointNum[e]=this.nPanoPTZPointNum[e]+1}}return pe.SR_OK}},{key:"GetPanoPTZWall",value:function(e){if(null==this.pRenderParam[e]||null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==this.pBasePTZPoints[e])return pe.SR_ERR_CALL_ORDER;var t,a,r=this.nBasePTZPointNum[e];t=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),a=(this.fRX2-this.fRX1)/2*1;var i,n,s,x,o,l=0,_=1,h=.1,f=.9;this.fRX1<0&&(i=1*-this.fRX1,l=i/=2*a),this.fRX2>1&&(n=1*(this.fRX2-1),_=1-(n/=2*a)),this.fRY1<0&&(s=-this.fRY1*t,h=(s/=2*a)>.1?s:.1),this.fRY2>1&&(x=(this.fRY2-1)*t,f=(x/=2*a)>1-.9?1-x:.9);for(var c={fX:0,fY:0},u={fX:0,fY:0},d=0;d<r;++d){u.fX=this.pBasePTZPoints[e][d].fX,u.fY=this.pBasePTZPoints[e][d].fY;var p=2*u.fX*a,m=2*u.fY*a;if(o=Math.sqrt(a*a-(m-a)*(m-a)),!(Math.abs(o)<1e-6)&&(u.fX=a*(p-a)/o+a,u.fY=m,c.fX=(u.fX-2*l*a)/(2*(_-l)*a),c.fY=(u.fY-2*h*a)/(2*(f-h)*a),c.fY>=0&&c.fX>=0&&c.fY<=1&&c.fX<=1)){var S=this.nPanoPTZPointNum[e];this.pPanoPTZPoints[e][S].fX=c.fX,this.pPanoPTZPoints[e][S].fY=c.fY,this.nPanoPTZPointNum[e]=this.nPanoPTZPointNum[e]+1}}return pe.SR_OK}},{key:"GetPointPano2FishCeiling",value:function(e,t,a){if(null==e||null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s=0,x=1,o=0,l=1,_=0;(this.fRX2>1||this.fRY2>1||this.fRX1<0||this.fRY1<0)&&(this.fRX1<0&&((n=1*-this.fRX1)>_&&(_=n),s=n/=2*i),this.fRX2>1&&((n=1*(this.fRX2-1))>_&&(_=n),x=1-(n/=2*i)),this.fRY1<0&&((n=-this.fRY1*r)>_&&(_=n),o=n/=2*i),this.fRY2>1&&((n=(this.fRY2-1)*r)>_&&(_=n),l=1-(n/=2*i)));var h,f,c=_/i,u={},d={};return u.fX=t,u.fY=(.8-c)*a+c,h=6.2831853*u.fX+this.pRenderParam[this.nWndPort].fAngle,f=.5*(1-u.fY),d.fX=.5-f*Math.sin(h),d.fY=.5+f*Math.cos(h),d.fX=(d.fX-s)/(x-s),d.fY=(d.fY-o)/(l-o),e.fX=d.fX,e.fY=d.fY,pe.SR_OK}},{key:"GetPointPano2FishFloor",value:function(e,t,a){if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==e)return pe.SR_ERR_PARAM;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s=0,x=1,o=0,l=1,_=0;(this.fRX2>1||this.fRY2>1||this.fRX1<0||this.fRY1<0)&&(this.fRX1<0&&((n=1*-this.fRX1)>_&&(_=n),s=n/=2*i),this.fRX2>1&&((n=1*(this.fRX2-1))>_&&(_=n),x=1-(n/=2*i)),this.fRY1<0&&((n=-this.fRY1*r)>_&&(_=n),o=n/=2*i),this.fRY2>1&&((n=(this.fRY2-1)*r)>_&&(_=n),l=1-(n/=2*i)));var h,f,c=_/i,u={},d={};return u.fX=1-t,u.fY=(.8-c)*(1-a)+c,h=6.2831853*u.fX+this.pRenderParam[this.nWndPort].fAngle,f=.5*(1-u.fY),d.fX=.5-f*Math.sin(h),d.fY=.5+f*Math.cos(h),d.fX=(d.fX-s)/(x-s),d.fY=(d.fY-o)/(l-o),e.fX=d.fX,e.fY=d.fY,pe.SR_OK}},{key:"GetPointPano2FishWall",value:function(e,t,a){if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==e)return pe.SR_ERR_PARAM;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s,x,o,l=0,_=1,h=.1,f=.9,c=0,u=1,d=0,p=1;this.fRX1<0&&(n=1*-this.fRX1,l=n/=2*i,c=n),this.fRX2>1&&(s=1*(this.fRX2-1),_=1-(s/=2*i),u=1-s),this.fRY1<0&&(x=-this.fRY1*r,h=(x/=2*i)>.1?x:.1,d=x),this.fRY2>1&&(o=(this.fRY2-1)*r,f=(o/=2*i)>1-.9?1-o:.9,p=1-o);var m={},S={};m.fX=t*(_-l)+l,m.fY=a*(f-h)+h;var R=Math.sqrt(.25-(m.fY-.5)*(m.fY-.5));return S.fX=(m.fX-.5)*R/.5+.5,S.fY=m.fY,S.fX=(S.fX-c)/(u-c),S.fY=(S.fY-d)/(p-d),e.fX=S.fX,e.fY=S.fY,pe.SR_OK}},{key:"UpdatePTZPosition",value:function(e,t,a){if(null==this.pRenderParam[e])return pe.SR_ERR_CALL_ORDER;var r={fHAngleSin:0,fHAngleCos:0,fVAngleSin:0,fVAngleCos:0},i=pe.SR_OK;if(Se.SR_DE_FISH_PTZ_FLOOR==this.pRenderParam[e].nDisplayEffect||Se.SR_DE_FISH_PTZ_CEILING==this.pRenderParam[e].nDisplayEffect){if((i=this.ComputeAngleVertical(t,a,r,this.pRenderParam[e].nDisplayEffect))!=pe.SR_OK)return i}else{if(Se.SR_DE_FISH_PTZ_WALL!=this.pRenderParam[e].nDisplayEffect)return pe.SR_ERR_NOT_SUPPORT;if((i=this.ComputeAngleHorizontal(t,a,r))!=pe.SR_OK)return i}return 0==this.IsInImage(this.fRX1,this.fRX2,this.fRY1,this.fRY2,r,this.pRenderParam[e].fZoom,this.pRenderParam[e].nDisplayEffect)?pe.SR_ERR_PARAM:(this.pRenderParam[e].fCosH=r.fHAngleCos,this.pRenderParam[e].fSinH=r.fHAngleSin,this.pRenderParam[e].fCosV=r.fVAngleCos,this.pRenderParam[e].fSinV=r.fVAngleSin,pe.SR_OK)}},{key:"JudgeDisplayEffect",value:function(e){var t=0;switch(t){case 0:return t=this.GetPlaceType(e),4==this.nPlaceType&&(this.nPlaceType=0),pe.SR_OK;case 3:return(t=this.GetPlaceType(e))==this.nPlaceType||4==this.nPlaceType?pe.SR_OK:pe.SR_ERR_NOT_SUPPORT;case 2:case 1:return(t=this.GetPlaceType(e))==this.nPlaceType||4==t?pe.SR_OK:pe.SR_ERR_NOT_SUPPORT;default:return pe.SR_ERR_NOT_SUPPORT}return pe.SR_ERR_NOT_SUPPORT}},{key:"GetPlaceType",value:function(e){switch(e){case Se.SR_DE_FISH_PTZ_CEILING:case Se.SR_DE_FISH_PANORAMA_CEILING_360:case Se.SR_DE_FISH_PANORAMA_CEILING_180:case Se.SR_DE_FISH_CYLINDER_CEILING:case Se.SR_DE_FISH_CYLINDER_SPLIT_CEILING:return 3;case Se.SR_DE_FISH_PTZ_FLOOR:case Se.SR_DE_FISH_PANORAMA_FLOOR_360:case Se.SR_DE_FISH_PANARAMA_FLOOR_180:case Se.SR_DE_FISH_CYLINDER_FLOOR:case Se.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:return 2;case Se.SR_DE_FISH_PTZ_WALL:case Se.SR_DE_FISH_PANORAMA_WALL:case Se.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:case Se.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:return 1;case Se.SR_DE_FISH_SEMISPHERE:case Se.SR_DE_FISH_ORIGINAL:case Se.SR_DE_FISH_PLANET:case Se.SR_DE_PANORAMA_SPHERE:case Se.SR_DE_PANORAMA_PLANET:return 4;default:return 0}return 0}},{key:"SetFishParam",value:function(e,t){if(e<0||e>=32)return pe.SR_ERR_PARAM;if(null==t)return pe.SR_ERR_PARAM;if(null==this.pRenderParam[e])return pe.SR_ERR_CALL_ORDER;var a=pe.SR_OK;switch(t.nFishParamType){case Pe.SR_FPT_CENTER:if((a=this.UpdateCircyeParam(t.fRXLeft,t.fRXRight,t.fRYTop,t.fRYBottom))!=pe.SR_OK)return a;this.pRenderParam[e].bCut=t.bCut,this.bBlack=t.bBlack;break;case Pe.SR_FPT_ANGLE:if(Se.SR_DE_FISH_PANORAMA_CEILING_360!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PANORAMA_CEILING_180!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PANORAMA_FLOOR_360!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PANORAMA_FLOOR_180!=this.pRenderParam[e].nDisplayEffect)return pe.SR_ERR_NOT_SUPPORT;if((a=this.UpdateWideScanAngle(e,t.fAngle))!=pe.SR_OK)return a;this.pFishParam[e].fAngle=t.fAngle;break;case Pe.SR_FPT_ZOOM:if(Se.SR_DE_FISH_PTZ_WALL!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_CEILING!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_FLOOR!=this.pRenderParam[e].nDisplayEffect)return pe.SR_ERR_NOT_SUPPORT;if((a=this.UpdateRangeParam(e,t.fZoom))!=pe.SR_OK)return a;this.pFishParam[e].fZoom=t.fZoom;break;case Pe.SR_FPT_PTZ:if(Se.SR_DE_FISH_PTZ_WALL!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_CEILING!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_FLOOR!=this.pRenderParam[e].nDisplayEffect)return pe.SR_ERR_NOT_SUPPORT;if((a=this.UpdatePTZPosition(e,t.fPTZX,t.fPTZY,this.pRenderParam[e].fZoom,!0))!=pe.SR_OK)return a;this.pFishParam[e].fPTZX=t.fPTZX,this.pFishParam[e].fPTZY=t.fPTZY;break;case Pe.SR_FPT_NULL:default:return pe.SR_ERR_NOT_SUPPORT}return this.ComputePTZPoints(),pe.SR_OK}},{key:"GetFishParam",value:function(e,t){return e<0||e>=32||null==t||null==this.pFishParam[e]?pe.SR_ERR_PARAM:(t.fRXLeft=this.fRX1,t.fRXRight=this.fRX2,t.fRYTop=this.fRY1,t.fRYBottom=this.fRY2,t.bBlack=this.bBlack,t.bCut=this.pRenderParam[e].bCut,t.nFishParamType=this.pFishParam[e].nFishParamType,t.fAngle=this.pFishParam[e].fAngle,t.fZoom=this.pFishParam[e].fZoom,t.fPTZX=this.pFishParam[e].fPTZX,t.fPTZY=this.pFishParam[e].fPTZY,pe.SR_OK)}},{key:"GetRenderParam",value:function(e,t){return e<0||e>=32||null==t||null==this.pRenderParam[e]?pe.SR_ERR_PARAM:(t.fRXLeft=this.fRX1,t.fRXRight=this.fRX2,t.fRYTop=this.fRY1,t.fRYBottom=this.fRY2,t.bBlack=this.bBlack,t.fCosH=this.pRenderParam[e].fCosH,t.fSinH=this.pRenderParam[e].fSinH,t.fCosV=this.pRenderParam[e].fCosV,t.fSinV=this.pRenderParam[e].fSinV,t.fAngle=this.pRenderParam[e].fAngle,t.fZoom=this.pRenderParam[e].fZoom,t.nDisplayEffect=this.pRenderParam[e].nDisplayEffect,t.bCut=this.pRenderParam[e].bCut,pe.SR_OK)}},{key:"UpdateCircyeParam",value:function(e,t,a,r){if(e<=-.5||e>=.4||t<=.6||t>=1.5||a<=-.5||a>=.4||r<=.6||r>=1.5||e+t<=.8||e+t>=1.2||a+r<=.8||a+r>=1.2)return pe.SR_ERR_PARAM;if(e<0||t>1||a<0||r>1)for(var i=0;i<32;++i)if(null!=this.pRenderParam[i]&&(Se.SR_DE_FISH_PTZ_CEILING==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_FLOOR==this.pRenderParam[i].nDisplayEffect||Se.SR_DE_FISH_PTZ_WALL==this.pRenderParam[i].nDisplayEffect)){var n={};if(n.fHAngleCos=this.pRenderParam[i].fCosH,n.fHAngleSin=this.pRenderParam[i].fSinH,n.fVAngleCos=this.pRenderParam[i].fCosV,n.fVAngleSin=this.pRenderParam[i].fSinV,0==this.IsInImage(e,t,a,r,n,this.pRenderParam[i].fZoom,this.pRenderParam[i].nDisplayEffect))return pe.SR_ERR_PARAM}return this.fRX1=e,this.fRX2=t,this.fRY1=a,this.fRY2=r,pe.SR_OK}},{key:"UpdateWideScanAngle",value:function(e,t){return null==this.pRenderParam[e]?pe.SR_ERR_CALL_ORDER:(Se.SR_DE_FISH_PANORAMA_FLOOR_360==this.pRenderParam[e].nDisplayEffect||Se.SR_DE_FISH_PANORAMA_FLOOR_180==this.pRenderParam[e].nDisplayEffect?this.pRenderParam[e].fAngle=t:Se.SR_DE_FISH_PANORAMA_CEILING_360!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PANORAMA_CEILING_180!=this.pRenderParam[e].nDisplayEffect||(this.pRenderParam[e].fAngle=-t),pe.SR_OK)}},{key:"ComputeAngleVertical",value:function(e,t,a,r){var i=e,n=t,s=Math.sqrt((n-.5)*(n-.5)+(i-.5)*(i-.5));if(s>.5)return pe.SR_ERR_PARAM;if(s<.001)return a.fVAngleCos=1,a.fVAngleSin=0,a.fHAngleCos=1,a.fHAngleSin=0,pe.SR_OK;if(r==Se.SR_DE_FISH_PTZ_CEILING){a.fHAngleCos=(.5-n)/s,a.fHAngleSin=(.5-i)/s;var x=s*ue;a.fVAngleCos=Math.cos(x),a.fVAngleSin=Math.sin(x)}else{if(r!=Se.SR_DE_FISH_PTZ_FLOOR)return pe.SR_ERR_PARAM;a.fHAngleCos=(n-.5)/s,a.fHAngleSin=(.5-i)/s;var o=s*ue;a.fVAngleCos=Math.cos(o),a.fVAngleSin=Math.sin(o)}return pe.SR_OK}},{key:"ComputeAngleHorizontal",value:function(e,t,a){var r,i,n,s,x,o,l,_=e,h=t;return(h-(x=.5))*(h-x)+(_-x)*(_-x)>.25?pe.SR_ERR_PARAM:(o=(h-x)/x*ue/2,r=Math.cos(o),i=Math.sin(o),(_-x)/x/r>1||(_-x)/x/r<-1?pe.SR_ERR_PARAM:(l=(_-x)/x/r*ue/2,n=Math.cos(l),s=Math.sin(l),a.fVAngleCos=r,a.fVAngleSin=i,a.fHAngleCos=n,a.fHAngleSin=s,pe.SR_OK))}},{key:"IsInImage",value:function(e,t,a,r,i,n,s){return 1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,1,.5,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,0,.5,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,.5,1,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,.5,0,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,0,0,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,0,1,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,1,1,s)&&1!=this.IsOutofImage(e,t,a,r,i.fHAngleCos,i.fHAngleSin,i.fVAngleCos,i.fVAngleSin,n,1,0,s)}},{key:"IsOutofImage",value:function(e,t,a,r,i,n,s,x,o,l,_,h){var f,c,u,d,p,m,S,R,P,y,b,E,g;if(b=(e+t)/2*1,E=(a+r)/2*(y=(t-e)/(r-a)),g=(t-e)/2*1,h==Se.SR_DE_FISH_PTZ_CEILING){if(c=l-.5,u=(f=.5-_)*s+(m=o)*x,(S=m*s-f*x)<=0)return!0;P=Math.sqrt(c*c+u*u);var F=Math.sqrt(c*c+u*u+S*S),C=Math.asin(P/F)/1.5707963*.5;if(p=(-((c=C*c/P)*n+(u=C*u/P)*i)*g*2+E)/y,(d=((c*i-u*n)*g*2+b)/1)<0||d>1||p<0||p>1)return!0}if(h==Se.SR_DE_FISH_PTZ_FLOOR){if(c=l-.5,u=(f=_-.5)*s+(m=o)*x,(S=m*s-f*x)<=0)return!0;P=Math.sqrt(c*c+u*u);var v=Math.sqrt(c*c+u*u+S*S),T=Math.asin(P/v)/1.5707963*.5;if(p=(((c=T*c/P)*n+(u=T*u/P)*i)*g*2+E)/y,(d=((c*i-u*n)*g*2+b)/1)<0||d>1||p<0||p>1)return!0}if(h==Se.SR_DE_FISH_PTZ_WALL){if(d=(c=l-.5)*i+(S=(m=o)*s-(f=_-.5)*x)*n,p=u=f*s+m*x,(R=S*i-c*n)<=0)return!0;P=Math.sqrt(d*d+p*p);var D=Math.sqrt(d*d+p*p+R*R),A=Math.asin(P/D)/1.5707963*.5;if(p=(A*p/P*g*2+E)/y,(d=(A*d/P*g*2+b)/1)<0||d>1||p<0||p>1)return!0}return!1}},{key:"ComputePTZPoints",value:function(){if(-1==this.nWndPort)return pe.SR_ERR_CALL_ORDER;for(var e=0;e<32;++e)if(null!=this.pRenderParam[e]&&(Se.SR_DE_FISH_PTZ_CEILING==this.pRenderParam[e].nDisplayEffect||Se.SR_DE_FISH_PTZ_FLOOR==this.pRenderParam[e].nDisplayEffect||Se.SR_DE_FISH_PTZ_WALL==this.pRenderParam[e].nDisplayEffect)){var t=pe.SR_OK;if(this.nPTZDisplayMode==ye.SR_DM_RANGE){if(t=this.GetRangePoints(e),pe.SR_OK!=t)continue;if(t=this.TransformPTZRangePoints(e),pe.SR_OK!=t)continue}else if(this.nPTZDisplayMode==ye.SR_DM_RECT&&(t=this.GetRectPoints(e),pe.SR_OK!=t))continue}return pe.SR_OK}},{key:"GetWndPort",value:function(){return this.nWndPort}},{key:"GetPTZDisplayMode",value:function(){return this.nPTZDisplayMode}},{key:"GetPTZColor",value:function(e,t){return e<0||e>=32||null==t?pe.SR_ERR_PARAM:(t.fA=this.stPTZColor[e].fA,t.fR=this.stPTZColor[e].fR,t.fG=this.stPTZColor[e].fG,t.fB=this.stPTZColor[e].fB,this.pPTZSetColor[e].bSetColor&&(Math.abs(this.pPTZSetColor[e].fA)<1e-6||Math.abs(this.pPTZSetColor[e].fR)<1e-6||Math.abs(this.pPTZSetColor[e].fG)<1e-6||Math.abs(this.pPTZSetColor[e].fB)<1e-6)&&(t.fA=this.pPTZSetColor[e].fA,t.fR=this.pPTZSetColor[e].fR,t.fG=this.pPTZSetColor[e].fG,t.fB=this.pPTZSetColor[e].fB),pe.SR_OK)}},{key:"SetPTZColor",value:function(e,t){return e<0||e>=32||null==t?pe.SR_ERR_PARAM:(this.pPTZSetColor[e].fR=t.fR,this.pPTZSetColor[e].fG=t.fG,this.pPTZSetColor[e].fB=t.fB,this.pPTZSetColor[e].fA=t.fA,this.pPTZSetColor[e].bSetColor=!0,pe.SR_OK)}},{key:"IsPTZSelected",value:function(e){return!(e<0||e>=32)&&this.bPTZSelected[e]}},{key:"GetPTZPort",value:function(e,t,a){if(-1==this.nWndPort)return pe.SR_ERR_CALL_ORDER;if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;var r=32,i={};i.fX=e,i.fY=t;for(var n=0;n<32;++n)this.bPTZSelected[n]=!1;if(this.nPTZDisplayMode==ye.SR_DM_RANGE){switch(this.pRenderParam[this.nWndPort].nDisplayEffect){case Se.SR_DE_FISH_PANORAMA_FLOOR_360:this.GetPointPano2FishFloor(i,e,t);break;case Se.SR_DE_FISH_PANORAMA_CEILING_360:this.GetPointPano2FishCeiling(i,e,t);break;case Se.SR_DE_FISH_PANORAMA_WALL:this.GetPointPano2FishWall(i,e,t)}for(var s=0;s<32;++s)if(0!=this.nOriPTZPointNum[s]){var x={};x.fX=this.pOriPTZPoints[s][0].fX,x.fY=this.pOriPTZPoints[s][0].fY;var o={};o.fX=this.pOriPTZPoints[s][0].fX,o.fY=this.pOriPTZPoints[s][0].fY;for(var l=1;l<this.nOriPTZPointNum[s];++l)this.GetPTZRectange(x,o,this.pOriPTZPoints[s][l]);if(i.fX<=x.fX&&i.fX>=o.fX&&i.fY>=o.fY&&i.fY<=x.fY){r=s;break}}}else{if(this.nPTZDisplayMode!=ye.SR_DM_RECT)return pe.SR_ERR_NOT_SUPPORT;for(var _=0;_<32;++_)if(i.fX<=this.pRectPoints[_][2].fX&&i.fX>=this.pRectPoints[_][0].fX&&i.fY>=this.pRectPoints[_][0].fY&&i.fY<=this.pRectPoints[_][2].fY){r=_;break}}return r<32?(this.bPTZSelected[r]=!0,a.nPTZPort=r,pe.SR_OK):pe.SR_ERR_NOT_SUPPORT}},{key:"SetPTZPort",value:function(e){if(e<0||e>=32)return pe.SR_ERR_PARAM;for(var t=0;t<32;++t)this.bPTZSelected[t]=!1;if(this.nPTZDisplayMode==ye.SR_DM_RANGE){if(0==this.nOriPTZPointNum[e])return pe.SR_ERR_PARAM;this.bPTZSelected[e]=!0}else{if(0==this.nPTZRectNum[e])return pe.SR_ERR_PARAM;this.bPTZSelected[e]=!0}return pe.SR_OK}},{key:"GetPTZRectange",value:function(e,t,a){return a.fX<t.fX&&(t.fX=a.fX),a.fY<t.fY&&(t.fY=a.fY),a.fX>e.fX&&(e.fX=a.fX),a.fY>e.fY&&(e.fY=a.fY),pe.SR_OK}},{key:"GetPTZPoints",value:function(e,t,a){return e<0||e>=32?pe.SR_ERR_PARAM:null==this.pRenderParam[this.nWndPort]?pe.SR_ERR_CALL_ORDER:(ye.SR_DM_RANGE==a?null!=this.pOriPTZPoints[e]&&0!=this.nOriPTZPointNum[e]&&(t.pstPoints=this.pOriPTZPoints[e],t.nPointNum=this.nOriPTZPointNum[e]):ye.SR_DM_RECT==a&&null!=this.pRectPoints[e]&&(t.pstPoints=this.pRectPoints[e],t.nPointNum=4),pe.SR_OK)}},{key:"SetPTZDisplayMode",value:function(e){return this.nPTZDisplayMode=e,this.ComputePTZPoints()}},{key:"GetDisplayEffect",value:function(e){return e<0||e>=32||null==this.pRenderParam?Se.SR_DE_NULL:this.pRenderParam[e].nDisplayEffect}},{key:"GetPTZFragmentPoints",value:function(e,t,a){if(e<0||e>=32)return pe.SR_ERR_PARAM;if(null==this.pPanoPTZPoints[e]||0==this.nPanoPTZPointNum[e])return pe.SR_ERR_PARAM;var r=this.nPTZFragmentNode[e][a];if(t.nPointNum=this.nPTZFragmentNode[e][a+1]-this.nPTZFragmentNode[e][a],t.nPointNum<0)return pe.SR_ERR_CALL_ORDER;t.pstPoints=[];for(var i=0;i<t.nPointNum;++i){var n={};n.fX=this.pPanoPTZPoints[e][r+i].fX,n.fY=this.pPanoPTZPoints[e][r+i].fY,t.pstPoints.push(n)}return pe.SR_OK}},{key:"GetPTZFragmentNum",value:function(e){return e<0||e>=32||0==this.nPTZFragmentNum[e]?0:this.nPTZFragmentNum[e]}},{key:"CalcPTZFragmentPoints",value:function(e){if(e<0||e>=32)return pe.SR_ERR_PARAM;if(null==this.pPanoPTZPoints[e]||0==this.nPanoPTZPointNum[e])return pe.SR_ERR_CALL_ORDER;this.nPTZFragmentNode[e][0]=0,this.nPTZFragmentNum[e]=1;for(var t=0,a=0;a<this.nPanoPTZPointNum[e]-1;a++)Math.abs(this.pPanoPTZPoints[e][a+1].fX-this.pPanoPTZPoints[e][a].fX)>.5&&(t=this.nPTZFragmentNum[e],this.nPTZFragmentNode[e][t]=a+1,this.nPTZFragmentNum[e]=this.nPTZFragmentNum[e]+1);var r=this.nPanoPTZPointNum[e];return Math.abs(this.pPanoPTZPoints[e][0].fX-this.pPanoPTZPoints[e][r-1].fX)<.5&&(this.pPanoPTZPoints[e][r].fX=this.pPanoPTZPoints[e][0].fX,this.pPanoPTZPoints[e][r].fY=this.pPanoPTZPoints[e][0].fY,this.nPanoPTZPointNum[e]=this.nPanoPTZPointNum[e]+1),t=this.nPTZFragmentNum[e],this.nPTZFragmentNode[e][t]=this.nPanoPTZPointNum[e],pe.SR_OK}},{key:"IsPortAllocated",value:function(e){return this.bPortAllocated[e]}},{key:"GetPointFish2PanoCeiling",value:function(e,t,a){if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==e)return pe.SR_ERR_PARAM;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s=0;(this.fRX2>1||this.fRY2>1||this.fRX1<0||this.fRY1<0)&&(this.fRX1<0&&(n=1*-this.fRX1)>s&&(s=n),this.fRX2>1&&(n=1*(this.fRX2-1))>s&&(s=n),this.fRY1<0&&(n=-this.fRY1*r)>s&&(s=n),this.fRY2>1&&(n=(this.fRY2-1)*r)>s&&(s=n));var x,o=s/i,l={fX:0,fY:0};if(Math.abs(t-.5)<1e-6&&Math.abs(a-.5)<1e-6)return pe.SR_ERR_NOT_SUPPORT;var _={},h={};_.fX=t-.5,_.fY=a-.5,h.fX=-.5*Math.sin(this.pRenderParam[this.nWndPort].fAngle),h.fY=.5*Math.cos(this.pRenderParam[this.nWndPort].fAngle);var f=Math.sqrt(_.fX*_.fX+_.fY*_.fY),c=Math.sqrt(h.fX*h.fX+h.fY*h.fY);return x=Math.acos((_.fX*h.fX+_.fY*h.fY)/(f*c)),_.fX*h.fY-_.fY*h.fX>0&&(x=6.2831852-x),l.fX=x/6.2831853,l.fY=(2*(.5-f)-o)/(.8-o),l.fY>=0&&l.fX>=0&&l.fY<=1&&l.fX<=1?(e.fX=l.fX,e.fY=l.fY,pe.SR_OK):pe.SR_ERR_PARAM}},{key:"GetPointFish2PanoFloor",value:function(e,t,a){if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==e)return pe.SR_ERR_PARAM;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s=0;(this.fRX2>1||this.fRY2>1||this.fRX1<0||this.fRY1<0)&&(this.fRX1<0&&(n=1*-this.fRX1)>s&&(s=n),this.fRX2>1&&(n=1*(this.fRX2-1))>s&&(s=n),this.fRY1<0&&(n=-this.fRY1*r)>s&&(s=n),this.fRY2>1&&(n=(this.fRY2-1)*r)>s&&(s=n));var x,o=s/i,l={fX:0,fY:0};if(Math.abs(t-.5)<1e-6&&Math.abs(a-.5)<1e-6)return pe.SR_ERR_NOT_SUPPORT;var _={},h={};_.fX=t-.5,_.fY=a-.5,h.fX=-.5*Math.sin(this.pRenderParam[this.nWndPort].fAngle),h.fY=.5*Math.cos(this.pRenderParam[this.nWndPort].fAngle);var f=Math.sqrt(_.fX*_.fX+_.fY*_.fY),c=Math.sqrt(h.fX*h.fX+h.fY*h.fY);return x=Math.acos((_.fX*h.fX+_.fY*h.fY)/(f*c)),_.fX*h.fY-_.fY*h.fX>0&&(x=6.2831852-x),l.fX=1-x/6.2831853,l.fY=1-(2*(.5-f)-o)/(.8-o),l.fY>=0&&l.fX>=0&&l.fY<=1&&l.fX<=1?(e.fX=l.fX,e.fY=l.fY,pe.SR_OK):pe.SR_ERR_PARAM}},{key:"GetPointFish2PanoWall",value:function(e,t,a){if(null==this.pRenderParam[this.nWndPort])return pe.SR_ERR_CALL_ORDER;if(null==e)return pe.SR_ERR_PARAM;var r,i;r=(this.fRX2-this.fRX1)/(this.fRY2-this.fRY1),i=(this.fRX2-this.fRX1)/2*1;var n,s,x,o,l,_=0,h=1,f=.1,c=.9;this.fRX1<0&&(n=1*-this.fRX1,_=n/=2*i),this.fRX2>1&&(s=1*(this.fRX2-1),h=1-(s/=2*i)),this.fRY1<0&&(x=-this.fRY1*r,f=(x/=2*i)>.1?x:.1),this.fRY2>1&&(o=(this.fRY2-1)*r,c=(o/=2*i)>1-.9?1-o:.9);var u={fX:0,fY:0},d=2*t*i,p=2*a*i;return l=Math.sqrt(i*i-(p-i)*(p-i)),Math.abs(l)<1e-6?pe.SR_ERR_PARAM:(t=i*(d-i)/l+i,a=p,u.fX=(t-2*_*i)/(2*(h-_)*i),u.fY=(a-2*f*i)/(2*(c-f)*i),u.fY>=0&&u.fX>=0&&u.fY<=1&&u.fX<=1?(e.fX=u.fX,e.fY=u.fY,pe.SR_OK):pe.SR_ERR_PARAM)}},{key:"UpdateRangeParam",value:function(e,t){if(null==this.pRenderParam[e])return pe.SR_ERR_CALL_ORDER;if(t<1e-5||t>.6)return pe.SR_ERR_PARAM;var a=0;return Se.SR_DE_FISH_PTZ_WALL!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_CEILING!=this.pRenderParam[e].nDisplayEffect&&Se.SR_DE_FISH_PTZ_FLOOR!=this.pRenderParam[e].nDisplayEffect||(a=7*t+.8,this.IsInImage(this.fRX1,this.fRX2,this.fRY1,this.fRY2,this.pRenderParam[e].fCosH,this.pRenderParam[e].fSinH,this.pRenderParam[e].fCosV,this.pRenderParam[e].fSinV,a,this.pRenderParam[e].nDisplayEffect))?(this.pRenderParam[e].fZoom=a,pe.SR_OK):pe.SR_ERR_PARAM}}]),e}(),Ye=fe.Dv,Ge=fe.CF,Xe=fe.bC,Je=function(){function a(){e(this,a),this.canvas=null,this.ctx=null,this.regionSx=0,this.regionSy=0,this.regionSw=0,this.regionSh=0,this.needRect=!1,this.bAntialias=!1,this.bRecreateAntia=!1,this.pfuncCBIn=null,this.pUserIn=null,this.pfuncCBOut=null,this.pUserOut=null}return t(a,[{key:"SR_Init",value:function(e){this.canvas=e,this.ctx=this.canvas.getContext("2d"),console.log("2d render init"),this.ctx||console.log("your browser does not support 2d render")}},{key:"SR_Draw",value:function(e){return this.needRect?this.ctx.drawImage(e,this.regionSx,this.regionSy,this.regionSw,this.regionSh,0,0,this.canvas.width,this.canvas.height):this.ctx.drawImage(e,0,0,e.displayWidth,e.displayHeight,0,0,this.canvas.width,this.canvas.height),null!=this.pfuncCBIn&&this.pfuncCBIn(this.pUserIn),1}},{key:"SR_UpdateFrameData",value:function(e,t,a,r,i){return this.needRect?this.ctx.drawImage(e,this.regionSx,this.regionSy,this.regionSw,this.regionSh,0,0,this.canvas.width,this.canvas.height):this.ctx.drawImage(e,0,0,t,a,0,0,this.canvas.width,this.canvas.height),null!=this.pfuncCBIn&&this.pfuncCBIn(this.pUserIn),1}},{key:"SR_Display",value:function(e){return 1}},{key:"SR_GetCaptureSize",value:function(){return 0}},{key:"GetCanvasData",value:function(e){console.log("%c start time:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds(),"color: blue");var t=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height);console.log("%c 2 time:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds(),"color: blue");var a=document.createElement("canvas"),r=a.getContext("2d");a.width=this.canvas.width,a.height=this.canvas.height,r.putImageData(t,0,0);var i=a.toDataURL(),n=document.createElement("a");n.download=(new Date).getTime()+".jpeg",n.href=i,n.dataset.downloadurl=["image/jpeg",n.download,n.href].join(":"),document.body.appendChild(n),n.click(),document.body.removeChild(n),console.log("%c end time:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds(),"color: blue")}},{key:"SR_DelSubPort",value:function(e){return 0}},{key:"SR_AddSubPort",value:function(e){return 0}},{key:"SR_SetDisplayRect",value:function(e,t,a,r){this.regionSx=e,this.regionSy=t,this.regionSw=a,this.regionSh=r,this.needRect=!0}},{key:"SR_Destroy",value:function(){this.canvas=null,this.ctx=null,this.regionSx=0,this.regionSy=0,this.regionSw=0,this.regionSh=0,this.needRect=!1}},{key:"SR_SetCanvasSize",value:function(e,t){this.canvas.width=e,this.canvas.height=t}},{key:"SR_GetCanvasSize",value:function(){console.log("canvas width:"+this.canvas.width+",height:"+this.canvas.height)}},{key:"SR_SetAntialias",value:function(e){return e!=this.bAntialias?(this.bAntialias=e,this.bRecreateAntia=!0):this.bRecreateAntia=!1,this.bRecreateAntia&&(this.bAntialias?(this.canvas.width=5*this.canvas.width,this.canvas.height=5*this.canvas.height,this.canvas.style.transform="scale(0.2)",this.canvas.style.transformOrigin="0 0"):(this.canvas.width=this.canvas.width/5,this.canvas.height=this.canvas.height/5,this.canvas.style.transform="scale(1)",this.canvas.style.transformOrigin="0 0")),1}},{key:"SR_SetCallBack",value:function(e,t,a){switch(a){case Xe.SRCALLBACKTYPE.SR_CBT_NULL:this.pfuncCBIn=e,this.pUserIn=t;break;case Xe.SRCALLBACKTYPE.SR_CBT_OUT:this.pfuncCBOut=e,this.pUserOut=t;break;default:return 0}return 1}},{key:"SR_DrawFont",value:function(e,t,a,r,i,n,s,x,o){var l=[],_={};return _.bBackground=n,_.nFontWidth=r,_.nFontHeight=i,_.pstBGColor=s,_.pstFontColor=a,_.pString=e,_.pstStartPos=t,_.fRotateAngle=x,_.pFontFamily=o,l.push(_),this.SR_DrawFontEx(l,1),1}},{key:"SR_DrawFontEx",value:function(e,t){for(var a=0;a<t;a++){this.ctx.textBaseline="top";var r=e[a].nFontWidth,i=e[a].nFontHeight,n=(r=Math.round(r))<(i=Math.round(i))?r:i;this.ctx.font=n.toString()+"px "+e[a].pFontFamily;var s=parseInt(255*e[a].pstFontColor.fR),x=parseInt(255*e[a].pstFontColor.fG),o=parseInt(255*e[a].pstFontColor.fB),l=s<16?"0"+s.toString(16):s.toString(16),_=x<16?"0"+x.toString(16):x.toString(16),h=o<16?"0"+o.toString(16):o.toString(16);this.ctx.fillStyle="#"+l+_+h,this.ctx.globalAlpha=e[a].pstFontColor.fA,this.ctx.fillText(e[a].pString,e[a].pstStartPos.fX*this.canvas.width,e[a].pstStartPos.fY*this.canvas.height)}return 1}},{key:"SR_DrawImage",value:function(e,t,a,r,i,n){return 1}},{key:"SR_DrawLinesEx",value:function(e,t,a,r){return 1}}]),a}(),Ze=16,je=16,ze=30,Ke=function(){function a(t){e(this,a),this.oVideoRenderHandle=t,this.renderEngine="webgl",this.oVideoHandle=null,this.mainCanvasID=null,this.curTimestamp=0,this.mainSubPort=0,this.mainVaildSubPort=0,this.mainFECCorrect=Xe.SRDISPLAYEFFECT.SR_DE_NULL,this.FECErrorCode=0,this.subPortNum=0,this.FECShowMode=Xe.SRPTZDISPLAYMODE.SR_DM_RANGE,this.pFishParamManager=null,this.enPixelFormat=Xe.SRPIXELFORMAT.SR_PF_NULL,this.InitFECParam(),this.nTimePerFrame=0,this.nFrameRate=0,this.privateNormalLinesInfo=[],this.maxNormalPrivateLineTimeStamp=0,this.curNormalLinesInfo=null,this.privateThermalLinesInfo=[],this.curThermalLinesInfo=null,this.privateTemLinesInfo=[],this.maxTemPrivateLineTimeStamp=0,this.curTemLinesInfo=null,this.m_nTEMDrawLinescount=0,this.m_nTEMDrawFontscount=0,this.privateTargetLinesInfo=[],this.maxTargetPrivateLineTimeStamp=0,this.curTargetLinesInfo=null,this.privateMDLinesInfo=[],this.maxMDPrivateLineTimeStamp=0,this.curMDLinesInfo=null,this.privateExactLinesInfo=[],this.maxExactPrivateLineTimeStamp=0,this.curExactLinesInfo=null,this.privateExactRuleLinesInfo=[],this.maxExactRulePrivateLineTimeStamp=0,this.curExactRuleLinesInfo=null,this.DrawlinesParamArray=[],this.DrawlinesParamArrayAllPointNum=0,this.bDrawlinesParamArrayFill=0,this.DrawMosaiclinesParamArray=[],this.DrawTargetlinesParamArray=[],this.DrawPOSFontsParamArray=[],this.DrawTargetEventIDList=[],this.privateNormalFontsInfo=[],this.maxNormalPrivateFontTimeStamp=0,this.curNormalFontsInfo=null,this.curNormalPOSFontsInfo=null,this.privateTemFontsInfo=[],this.maxTemPrivateFontTimeStamp=0,this.curTemFontsInfo=null,this.privateTargetFontsInfo=[],this.maxTargetPrivateFontTimeStamp=0,this.curTargetFontsInfo=null,this.privateExactPOSFontsInfo=[],this.maxExactPOSPrivateFontTimeStamp=0,this.curExactPOSFontsInfo=null,this.privateExactFontsInfo=[],this.maxExactPrivateFontTimeStamp=0,this.curExactFontsInfo=null,this.DrawFontParamArray=[],this.privateImageInfo=[],this.maxPrivateImageTimeStamp=0,this.curImagesInfo={},this.privatePNGImageInfo=[],this.m_bEnableIVSEx=!0,this.m_bEnableMDEx=!0,this.m_bEnablePICEx=!1,this.m_bDisPos=!1,this.m_bEnableTEMEx=!1,this.m_bEnableTEMBox=!1,this.m_bEnableTEMLine=!1,this.m_bEnableTEMPoint=!1,this.m_bEnableTrackEx=!1,this.m_bEnableTrackPeople=!0,this.m_bEnableTrackVehicle=!0,this.m_bEnableThermal=!1,this.m_bEnableThermalFireMask=!1,this.m_bEnableThermalRuleGas=!1,this.m_bEnableThermalTargetGas=!1,this.m_bEnableFIREEx=!0,this.m_bEnableFireDis=!0,this.m_bEnableFireMax=!1,this.m_bEnableFireMaxPos=!0,this.m_bEnableFireDistance=!0,this.bSRCallBackFlag=!1,this.hasSetFECParamManager=!1,this.panoramaDisplayEffect=0,this.viewParamType=3,this.viewParamValue=.2,this.pstWaterFontParamArray=[];for(var r=0;r<Ze;r++)this.pstWaterFontParamArray[r]=[];this.pstWaterFontParam=null,this.pWaterImageParam=[],this.waterMarkImageIndex=0,this.waterMarkImageMax=1,this.baseWaterMarkImageTime=0,this.finishDecodeImage=!1,this.aPOSAdaptBuf=[],this.textCanvas=null,this.MosaicType=0,this.MosaicSize=0,this.MosaicColorR=0,this.MosaicColorG=0,this.MosaicColorB=0,this.MosaicColorA=0}return t(a,[{key:"InitDisplay",value:function(e,t,a){if(this.renderEngine=t,this.mainCanvasID=e,this.printfFlag=this.oVideoRenderHandle.printfFlag,"2d"===this.renderEngine||"2D"===this.renderEngine)this.oVideoHandle=new Je,this.printfFlag>=0&&console.log("2d render");else{if(this.oVideoHandle=new Ge,this.mainFECCorrect!=Xe.SRDISPLAYEFFECT.SR_DE_NULL)null==this.pFishParamManager&&(this.pFishParamManager=new Ye),this.oVideoHandle.SR_SetFishParamManager(this.pFishParamManager),this.hasSetFECParamManager=!0;else{null==this.pFishParamManager&&(this.pFishParamManager=new Ye),this.oVideoHandle.SR_SetFishParamManager(this.pFishParamManager),this.hasSetFECParamManager=!0;var r=Xe.SRDISPLAYEFFECT.SR_DE_NULL;r=1==this.panoramaDisplayEffect?Xe.SRDISPLAYEFFECT.SR_DE_PANORAMA_SPHERE:3==this.panoramaDisplayEffect?Xe.SRDISPLAYEFFECT.SR_DE_PANORAMA_PLANET:Xe.SRDISPLAYEFFECT.SR_DE_NULL,this.mainFECCorrect=r}this.printfFlag>=0&&console.log("webgl render this.printfFlag:"+this.printfFlag)}return this.enPixelFormat=a,this.oVideoHandle.SR_Init(e,a),this.mainVaildSubPort=this.oVideoHandle.SR_AddSubPort(this.mainFECCorrect),-1==this.mainVaildSubPort?(console.info("%c InitDisplay SR_AddSubPort error subport:%d","color: red",this.mainVaildSubPort),0):(this.mainFECCorrect==Xe.SRDISPLAYEFFECT.SR_DE_PANORAMA_SPHERE&&this.oVideoHandle.SR_SetViewParam(this.viewParamType,this.viewParamValue),1)}},{key:"ReleaseDisplay",value:function(){if(null!=this.oVideoHandle&&(this.oVideoHandle.SR_DelSubPort(this.mainVaildSubPort),this.oVideoHandle.SR_Destroy(),this.oVideoHandle=null),this.subPortNum>0)for(var e=1;e<Ze;e++)0!=this.stFishEyeManager[e].nSubPort&&null!=this.stFishEyeManager[e].sCanvasID&&0!=this.stFishEyeManager[e].bInited&&(this.FEC_Disable(e),this.FEC_DelPort(e));for(var t=0;t<Ze;t++)this.stFishEyeManager[t].pRender=null;return this.stFishEyeManager.splice(0,this.stFishEyeManager.length),this.stFishParam.splice(0,this.stFishParam.length),null!=this.pFishParamManager&&(this.pFishParamManager.DeInit(),this.pFishParamManager=null),this.FECShowMode=Xe.SRPTZDISPLAYMODE.SR_DM_RANGE,this.DeInitPrivateParam(),1}},{key:"DeInitPrivateParam",value:function(){this.privateNormalLinesInfo.splice(0,this.privateNormalLinesInfo.length),this.curNormalLinesInfo=null,this.privateThermalLinesInfo.splice(0,this.privateThermalLinesInfo.length),this.curThermalLinesInfo=null,this.privateTemLinesInfo.splice(0,this.privateTemLinesInfo.length),this.curTemLinesInfo=null,this.privateTargetLinesInfo.splice(0,this.privateTargetLinesInfo.length),this.curTargetLinesInfo=null,this.privateMDLinesInfo.splice(0,this.privateMDLinesInfo.length),this.curMDLinesInfo=null,this.privateExactLinesInfo.splice(0,this.privateExactLinesInfo.length),this.curExactLinesInfo=null,this.privateExactRuleLinesInfo.splice(0,this.privateExactRuleLinesInfo.length),this.curExactRuleLinesInfo=null,this.privateNormalFontsInfo.splice(0,this.privateNormalFontsInfo.length),this.curNormalFontsInfo=null,this.curNormalPOSFontsInfo=null,this.privateTemFontsInfo.splice(0,this.privateTemFontsInfo.length),this.curTemFontsInfo=null,this.privateTargetFontsInfo.splice(0,this.privateTargetFontsInfo.length),this.curTargetFontsInfo=null,this.privateExactPOSFontsInfo.splice(0,this.privateExactPOSFontsInfo.length),this.curExactPOSFontsInfo=null,this.privateExactFontsInfo.splice(0,this.privateExactFontsInfo.length),this.curExactFontsInfo=null,this.privateImageInfo.splice(0,this.privateImageInfo.length),this.curImagesInfo=null,this.privatePNGImageInfo.splice(0,this.privatePNGImageInfo.length),this.DrawlinesParamArray.splice(0,this.DrawlinesParamArray.length),this.DrawTargetlinesParamArray.splice(0,this.DrawTargetlinesParamArray.length),this.DrawMosaiclinesParamArray.splice(0,this.DrawMosaiclinesParamArray.length),this.DrawPOSFontsParamArray.splice(0,this.DrawPOSFontsParamArray.length),this.DrawTargetEventIDList.splice(0,this.DrawTargetEventIDList.length),this.DrawFontParamArray.splice(0,this.DrawFontParamArray.length);for(var e=0;e<Ze;e++)this.pstWaterFontParamArray[e].splice(0,this.pstWaterFontParamArray[e].length);this.pWaterImageParam.splice(0,this.pWaterImageParam.length),this.bSRCallBackFlag=!1,this.textCanvas=null,this.curLinesInfo=null,this.pstWaterFontParam=null}},{key:"DisplayFrame",value:function(e,t,a,r,i,n,s,x){var o=this;return new Promise((function(l){null!=e&&(o.curTimestamp=r),o.bSRCallBackFlag||(null!=o.oVideoHandle&&o.oVideoHandle.SR_SetCallBack(o.WebGLDisplayCallBack,o,Xe.SRCALLBACKTYPE.SR_CBT_NULL),o.bSRCallBackFlag=!0);var _=1;if(2==o.panoramaDisplayEffect&&(t==2*a?o.SetPanoramaDisplayEffect(1):o.SetPanoramaDisplayEffect(0)),null!=e&&(o.nFrameRate=s,o.nTimePerFrame=1e3/s,0==x&&(o.FindIntelNodefromList(o.curTimestamp),o.CheckLinesInfo(),o.CheckFontsInfo()),null!=o.oVideoHandle&&1==(_=o.oVideoHandle.SR_UpdateFrameData(e,t,a,i,n))&&(_=o.oVideoHandle.SR_Display(!1)),o.subPortNum>0))for(var h=1;h<Ze;h++)0!=o.stFishEyeManager[h].nSubPort&&null!=o.stFishEyeManager[h].sCanvasID&&0!=o.stFishEyeManager[h].bInited&&null!=o.stFishEyeManager[h].pRender&&1==(_=o.stFishEyeManager[h].pRender.SR_UpdateFrameData(e,t,a,null,null))&&(_=o.stFishEyeManager[h].pRender.SR_Display(!1));l({timestamp:o.curTimestamp,DrawRet:_})}))}},{key:"SetDisplayRect",value:function(e,t,a,r){return null!=this.oVideoHandle&&(this.oVideoHandle.SR_SetDisplayRect(e,t,a,r,Xe.SRSETRECTTYPE.SR_SRT_SRC),null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[0].splice(0,this.pstWaterFontParamArray[0].length),this.CalculateWaterMarkParam(this.oVideoHandle,0,this.pstWaterFontParam))),1}},{key:"SetCanvasSize",value:function(e,t,a){var r=this.oVideoHandle;if(a>0&&(r=this.stFishEyeManager[a].pRender),null!=r){if(r.SR_SetCanvasSize(e,t),0!=this.pstWaterFontParamArray[a].length&&null!=this.pstWaterFontParam)if(1==this.pstWaterFontParam.pstCanvasAdapt.nCanvasAdaptMode)this.pstWaterFontParamArray[a].splice(0,this.pstWaterFontParamArray[a].length),this.CalculateWaterMarkParam(r,a,this.pstWaterFontParam);else if(2==this.pstWaterFontParam.pstCanvasAdapt.nCanvasAdaptMode){var i=this.mainCanvasID.width,n=this.mainCanvasID.height;a>0&&(i=this.stFishEyeManager[a].sCanvasID.width,n=this.stFishEyeManager[a].sCanvasID.height);for(var s=0;s<this.pstWaterFontParamArray[a].length;++s)this.pstWaterFontParamArray[a][s].nFontWidth=this.pstWaterFontParam.pstFontSize.nFontWidth*i/this.pstWaterFontParam.pstCanvasAdapt.nBaseCanvasWidth,this.pstWaterFontParamArray[a][s].nFontHeight=this.pstWaterFontParam.pstFontSize.nFontHeight*n/this.pstWaterFontParam.pstCanvasAdapt.nBaseCanvasHeight}return 1}return 0}},{key:"GetCanvasSize",value:function(){return null!=this.oVideoHandle?this.oVideoHandle.SR_GetCanvasSize():0}},{key:"SetAntialias",value:function(e){return null!=this.oVideoHandle?this.oVideoHandle.SR_SetAntialias(e):0}},{key:"SetD3DPostProcess",value:function(e,t){var a=1;return null!=this.oVideoHandle?(a=this.oVideoHandle.SR_SetImagePostProcess(e,t),null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[0].splice(0,this.pstWaterFontParamArray[0].length),this.CalculateWaterMarkParam(this.oVideoHandle,0,this.pstWaterFontParam))):a=0,a}},{key:"InitFECParam",value:function(){this.stFishEyeManager=[];for(var e=0;e<Ze;e++)this.stFishEyeManager[e]={},this.stFishEyeManager[e].pRender=null,this.stFishEyeManager[e].nSubPort=0,this.stFishEyeManager[e].sCanvasID=null,this.stFishEyeManager[e].bUsed=0,this.stFishEyeManager[e].bInited=0,this.stFishEyeManager[e].nValidSubPort=0,this.stFishEyeManager[e].emPlaceType=3,this.stFishEyeManager[e].emCorrectType=0,this.stFishEyeManager[e].emEffect=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;this.stFishParam=[];for(var t=0;t<Ze;t++)this.stFishParam[t]={},this.stFishParam[t].nUpDateType=0,this.stFishParam[t].stPTZParam={},this.stFishParam[t].stPTZParam.fPTZPositionX=0,this.stFishParam[t].stPTZParam.fPTZPositionY=0,this.stFishParam[t].stCycleParam={},this.stFishParam[t].stCycleParam.fRadiusLeft=0,this.stFishParam[t].stCycleParam.fRadiusRight=0,this.stFishParam[t].stCycleParam.fRadiusTop=0,this.stFishParam[t].stCycleParam.fRadiusBottom=0,this.stFishParam[t].fZoom=0,this.stFishParam[t].fWideScanOffset=0,this.stFishParam[t].stPTZColor={},this.stFishParam[t].stPTZColor.nR=0,this.stFishParam[t].stPTZColor.nG=0,this.stFishParam[t].stPTZColor.nB=0,this.stFishParam[t].stPTZColor.nAlpha=0,this.stFishParam[t].stPTZSelect={},this.stFishParam[t].stPTZSelect.fTop=0,this.stFishParam[t].stPTZSelect.fBottom=0,this.stFishParam[t].stPTZSelect.fLeft=0,this.stFishParam[t].stPTZSelect.fRight=0,this.stFishParam[t].nCut=0}},{key:"FEC_SetCanvasID",value:function(e){return this.mainFECCorrect=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL,1}},{key:"FEC_ResetCorrectType",value:function(e,t,a){if(!1===this.hasSetFECParamManager&&(null==this.pFishParamManager&&(this.pFishParamManager=new Ye),this.oVideoHandle.SR_SetFishParamManager(this.pFishParamManager),this.hasSetFECParamManager=!0),0!=a&&a!=G&&a!=X&&a!=Z&&a!=Y&&a!=J&&a!=j&&a!=z&&a!=K&&a!=q&&a!=Q)return console.log("%c hardDecoder not support correctType:%d","color:red",a),this.FECErrorCode=w,0;if(1!=this.FECParamJudge(e,t,a))return 0;var r=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;if(r=this._ConvertDisplayEffect(t,a),0==e&&null==this.stFishEyeManager[e].pRender&&(this.stFishEyeManager[e].pRender=this.oVideoHandle,this.stFishEyeManager[e].nSubPort=e,this.stFishEyeManager[e].sCanvasID=this.mainCanvasID,this.stFishEyeManager[e].bUsed=1,this.stFishEyeManager[e].bInited=1,this.stFishEyeManager[e].nValidSubPort=this.mainVaildSubPort,this.stFishEyeManager[e].emPlaceType=t,this.stFishEyeManager[e].emCorrectType=a,this.stFishEyeManager[e].emEffect=r,this.mainFECCorrect=r),null!=this.stFishEyeManager[e].pRender){this.stFishEyeManager[e].pRender.SR_DelSubPort(this.stFishEyeManager[e].nValidSubPort);var i=this.stFishEyeManager[e].pRender.SR_AddSubPort(r);if(0==e?this.oVideoHandle.SR_SetCallBack(this.WebGLDisplayCallBack,this,Xe.SRCALLBACKTYPE.SR_CBT_NULL):this.stFishEyeManager[e].pRender.SR_SetCallBack(this.WebGLDisplaySubCallBack,{nUser:this,handle:this.stFishEyeManager[e].pRender,nSubPort:e},Xe.SRCALLBACKTYPE.SR_CBT_NULL),null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[e].splice(0,this.pstWaterFontParamArray[e].length),this.CalculateWaterMarkParam(this.stFishEyeManager[e].pRender,e,this.pstWaterFontParam)),-1==i)return console.info("%c FEC_ResetCorrectType SR_AddSubPort error subport:%d","color: red",i),0;if(this.stFishEyeManager[e].nValidSubPort=i,this.stFishEyeManager[e].emPlaceType=t,this.stFishEyeManager[e].emCorrectType=a,this.stFishEyeManager[e].emEffect=r,Z<=this.stFishEyeManager[e].emCorrectType){var n=this.stFishEyeManager[e].pRender.SR_SetRenderState(Xe.SRRENDERSTATETYPE.SR_RST_BACK_CULL,0);Xe.ERRCODE.SR_OK!=n&&console.log(">>>VideoRender.js SR_SetRenderState failed ret:%08x\n",n)}}return this.FECShowMode>0&&null!=this.stFishEyeManager[e].pRender&&this.stFishEyeManager[e].pRender.SR_SetPTZDisplayMode(this.FECShowMode),0==e&&(this.mainVaildSubPort=this.stFishEyeManager[e].nValidSubPort),1}},{key:"FEC_GetPort",value:function(e,t){if(0!=t&&t!=G&&t!=X&&t!=Z&&t!=Y&&t!=J&&t!=j&&t!=q&&t!=Q)return console.log("%c 20231112 hardDecoder not support emCorrectType:%d","color:red",t),this.FECErrorCode=w,-1;var a;if(1!=this.FECParamJudge(-1,e,t))return console.log("VideoRender.js FEC_GetPort FECParamJudge Get error"),-1;var r=0;for(a=1;a<Ze;a++)if(0==this.stFishEyeManager[a].nSubPort&&0==this.stFishEyeManager[a].bUsed){this.stFishEyeManager[a].nSubPort=a,this.stFishEyeManager[a].nValidSubPort=-1,this.stFishEyeManager[a].bUsed=1,this.stFishEyeManager[a].emPlaceType=e,this.stFishEyeManager[a].emCorrectType=t,r=a;break}if(Ze==a)return console.info("%c FEC_GetPort-12 fish subport max","color: red"),this.FECErrorCode=1284,-1;var i=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;return i=this._ConvertDisplayEffect(this.stFishEyeManager[r].emPlaceType,this.stFishEyeManager[r].emCorrectType),Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL!=i?(0==this.stFishEyeManager[r].bInited&&(this.stFishEyeManager[r].emEffect=i,this.stFishEyeManager[r].bInited=0,this.stFishParam[r].fZoom=.005,this.stFishParam[r].stPTZParam.fPTZPositionX=.5,this.stFishParam[r].stPTZParam.fPTZPositionY=.5,this.stFishParam[r].fWideScanOffset=0),this.FECErrorCode=0,this.subPortNum++,r):r<Ze&&0==this.stFishEyeManager[r].bInited?(this.stFishEyeManager[r].emEffect=i,this.stFishEyeManager[r].bInited=0,this.stFishParam[r].fZoom=0,this.stFishParam[r].stPTZParam.fPTZPositionX=0,this.stFishParam[r].stPTZParam.fPTZPositionY=0,this.stFishParam[r].fWideScanOffset=0,this.FECErrorCode=0,this.subPortNum++,r):(this.stFishEyeManager[a].pRender=null,this.stFishEyeManager[a].nSubPort=0,this.stFishEyeManager[a].sCanvasID=null,this.stFishEyeManager[a].bUsed=0,this.stFishEyeManager[a].bInited=0,this.stFishEyeManager[a].nValidSubPort=0,this.stFishEyeManager[a].emPlaceType=3,this.stFishEyeManager[a].emCorrectType=0,this.stFishEyeManager[a].emEffect=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL,this.FECErrorCode=k,-1)}},{key:"FECParamJudge",value:function(e,t,a){if(0!=e){if(0==a||a==G||a==X||a==J||a==K||a==q||a==Q)return console.log("VideoRender.js FECParamJudge 1 emCorrectType:"+a),this.FECErrorCode=k,0;if(this.stFishEyeManager[0].emCorrectType==Q||this.stFishEyeManager[0].emCorrectType==q)return this.FECErrorCode=k,console.log("VideoRender.js FECParamJudge 2 emCorrectType:"+a),0}if(0==e&&(q==a||Q==a))for(var r=1;r<Ze;r++)if(this.stFishEyeManager[r].bUsed)return this.FECErrorCode=k,console.log("VideoRender.js FECParamJudge 3 subPort:"+e+",emCorrectType:"+a),0;if(!(2!=t&&3!=t||J!=a&&q!=a&&Q!=a))return console.info("%c VideoRender.js FECParamJudge 4 floor and ceiling not support lat","color: red"),this.FECErrorCode=k,0;if(1==t&&(j==a||z==a||G==a))return console.info("%c VideoRender.js FECParamJudge 5 wall not support cylinger","color: red"),this.FECErrorCode=k,0;if(1!=t&&2!=t&&3!=t)return console.info("%c VideoRender.js FECParamJudge 6 emPlaceType only support floor, ceiling and wall","color: red"),this.FECErrorCode=MP_E_SUPPORT,0;if(0!=a&&a!=Y&&a!=G&&a!=X&&a!=J&&a!=Z&&a!=j&&a!=z&&a!=K&&a!=q&&a!=Q)return console.info("%c VideoRender.js FECParamJudge 7 emCorrectType error","color: red"),this.FECErrorCode=MP_E_SUPPORT,0;for(var i=0;i<Ze;i++){if(this.stFishEyeManager[i].bUsed&&this.stFishEyeManager[i].emPlaceType!=t)return console.info("%c VideoRender.js FECParamJudge 8 emPlaceType changed","color: red"),this.FECErrorCode=1303,0;if(i!=e){if(this.stFishEyeManager[i].bUsed&&this.stFishEyeManager[i].emCorrectType!=Y&&this.stFishEyeManager[i].emCorrectType!=Z&&this.stFishEyeManager[i].emCorrectType!=j&&this.stFishEyeManager[i].emCorrectType!=z&&this.stFishEyeManager[i].emCorrectType!=K&&this.stFishEyeManager[i].emCorrectType!=q&&this.stFishEyeManager[i].emCorrectType!=Q&&a!=Y&&a!=Z&&a!=j&&a!=z&&a!=K&&a!=q&&a!=Q)return console.info("%c VideoRender.js FECParamJudge 9 origin/180/360/lat only display one port","color: red"),this.FECErrorCode=1304,0;if(this.stFishEyeManager[i].bUsed&&(this.stFishEyeManager[i].emCorrectType==Y&&a==G||this.stFishEyeManager[i].emCorrectType==G&&a==Y))return console.info("%c VideoRender.js FECParamJudge 10 180 cannot support ptz","color: red"),this.FECErrorCode=1304,0}}return 1}},{key:"FEC_Enable",value:function(e){return e<1||e>31||null==e?(console.info("%c FEC_Enable-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):null!==this.stFishEyeManager[e].pRender?(console.info("%c FEC_Enable-2 nSubPort:%d","color: red",e),this.FECErrorCode=1301,0):(null==this.stFishEyeManager[e].pRender&&(this.stFishEyeManager[e].pRender=new Ge,null==this.pFishParamManager&&(this.pFishParamManager=new Ye),this.stFishEyeManager[e].pRender.SR_SetFishParamManager(this.pFishParamManager)),1)}},{key:"FEC_SetWnd",value:function(e,t){if(e<1||e>31||null==e)return console.info("%c FEC_SetWnd-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0;if(null==this.stFishEyeManager[e].pRender)return console.info("%c FEC_SetWnd-2 nSubPort:%d pRender is null","color: red",e),this.FECErrorCode=O,0;if(0==this.stFishEyeManager[e].bUsed)return console.info("%c FEC_SetWnd-3 nSubPort:%d bUsed:%d","color: red",e,this.stFishEyeManager[e].bUsed),this.FECErrorCode=B,0;if(null==t)return console.info("%c FEC_SetWnd-4 nSubPort:%d sCanvasID:%s","color: red",e,t),this.FECErrorCode=1305,0;if(0!=this.stFishEyeManager[e].nSubPort&&0!=this.stFishEyeManager[e].bUsed){if(0!=this.stFishEyeManager[e].bInited&&null!=this.stFishEyeManager[e].sCanvasID)return t!=this.stFishEyeManager[e].sCanvasID?(console.info("%c FEC_SetWnd-5 nSubPort:%d sCanvasID:%s already init","color: red",e,t),this.FECErrorCode=1286,0):1;var a=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;a=this._ConvertDisplayEffect(this.stFishEyeManager[e].emPlaceType,this.stFishEyeManager[e].emCorrectType);var r=this.stFishEyeManager[e].pRender.SR_Init(t,this.enPixelFormat),i=this.stFishEyeManager[e].pRender.SR_AddSubPort(a);if(-1==i)return console.info("%c FEC_SetWnd SR_AddSubPort error subport:%d","color: red",e),0;if(this.stFishEyeManager[e].nValidSubPort=i,Xe.ERRCODE.SR_OK!=r)return this.stFishEyeManager[e].bInited=0,this.stFishEyeManager[e].sCanvasID=null,this.FECErrorCode=B,0;if(this.stFishEyeManager[e].bInited=1,this.stFishEyeManager[e].sCanvasID=t,Z<=this.stFishEyeManager[e].emCorrectType){var n=this.stFishEyeManager[e].pRender.SR_SetRenderState(Xe.SRRENDERSTATETYPE.SR_RST_BACK_CULL,0);Xe.ERRCODE.SR_OK!=n&&console.log(">>>VideoRender.js SR_SetRenderState failed ret:%08x\n",n)}return this.stFishEyeManager[e].pRender.SR_SetCallBack(this.WebGLDisplaySubCallBack,{nUser:this,handle:this.stFishEyeManager[e].pRender,nSubPort:e},Xe.SRCALLBACKTYPE.SR_CBT_NULL),null!=this.pstWaterFontParam&&this.SetWaterMarkFont(this.pstWaterFontParam),this.FECShowMode>0&&this.stFishEyeManager[e].pRender.SR_SetPTZDisplayMode(this.FECShowMode),1}return this.FECErrorCode=B,0}},{key:"FEC_Disable",value:function(e,t,a){if(e<1||e>31||null==e)return console.info("%c FEC_Disable-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0;if(1==this.stFishEyeManager[e].bInited&&null!=this.stFishEyeManager[e].pRender){if(Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_DelSubPort(this.stFishEyeManager[e].nValidSubPort))return console.info("%c FEC_Disable-2 SR_DelSubPort error nSubPort:%d","color: red",e),0;this.stFishEyeManager[e].bInited=0,this.stFishEyeManager[e].nValidSubPort=-1,this.stFishEyeManager[e].pRender.SR_Destroy(),this.stFishEyeManager[e].pRender=null}return 1}},{key:"FEC_DelPort",value:function(e){return e<1||e>31||null==e?(console.info("%c FEC_DelPort-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):0==this.stFishEyeManager[e].bUsed?(console.info("%c FEC_DelPort-2 nSubPort:%d bUsed:%d","color: red",e,this.stFishEyeManager[e].bUsed),this.FECErrorCode=B,0):(this.stFishEyeManager[e].nSubPort=0,this.stFishEyeManager[e].sCanvasID=null,this.stFishEyeManager[e].bUsed=0,this.stFishEyeManager[e].bInited=0,this.stFishEyeManager[e].nValidSubPort=0,this.stFishEyeManager[e].emPlaceType=3,this.stFishEyeManager[e].emCorrectType=0,this.stFishEyeManager[e].emEffect=Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL,this.stFishParam[e].stCycleParam.fRadiusLeft=0,this.stFishParam[e].stCycleParam.fRadiusRight=1,this.stFishParam[e].stCycleParam.fRadiusTop=0,this.stFishParam[e].stCycleParam.fRadiusBottom=1,this.subPortNum>0&&this.subPortNum--,1)}},{key:"FEC_SetParam",value:function(e,t){if(this.FECErrorCode=0,e<0||e>31||null==e)return console.info("%c FEC_SetParam-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0;if(null==this.stFishEyeManager[e].pRender)return console.info("%c FEC_SetParam-2 nSubPort:%d pRender:%d","color: red",e,this.stFishEyeManager[e].pRender),this.FECErrorCode=O,0;if(0==this.stFishEyeManager[e].bUsed)return console.info("%c FEC_SetParam-3 nSubPort:%d bUsed:%d","color: red",e,this.stFishEyeManager[e].bUsed),this.FECErrorCode=B,0;if(this.stFishEyeManager[e].emCorrectType>=Z&&this.stFishEyeManager[e].emCorrectType<=Q&&30&t.upDateType)return console.info("%c FEC_SetParam-4 nSubPort:%d not 3D","color: red",e),this.FECErrorCode=U,0;if(1&t.upDateType){if(null==t.stCycleParam)return this.FECErrorCode=V,0;for(var a=1;a<Ze;a++){if(this.stFishEyeManager[a].bUsed&&this.stFishEyeManager[a].nSubPort&&q==this.stFishEyeManager[a].emCorrectType&&(t.stCycleParam.fRadiusLeft<=-.5||t.stCycleParam.fRadiusLeft>=.4||t.stCycleParam.fRadiusRight<=.6||t.stCycleParam.fRadiusRight>=1.5||t.stCycleParam.fRadiusTop<=-.5||t.stCycleParam.fRadiusTop>0||t.stCycleParam.fRadiusBottom<1||t.stCycleParam.fRadiusBottom>=1.5||t.stCycleParam.fRadiusLeft+t.stCycleParam.fRadiusRight<=.8||t.stCycleParam.fRadiusLeft+t.stCycleParam.fRadiusRight>=1.2||t.stCycleParam.fRadiusTop+t.stCycleParam.fRadiusBottom<=.8||t.stCycleParam.fRadiusTop+t.stCycleParam.fRadiusBottom>=1.2))return this.FECErrorCode=V,0;if(this.stFishEyeManager[a].bUsed&&this.stFishEyeManager[a].nSubPort&&Q==this.stFishEyeManager[a].emCorrectType&&(t.stCycleParam.fRadiusLeft<=-.5||t.stCycleParam.fRadiusLeft>0||t.stCycleParam.fRadiusRight<1||t.stCycleParam.fRadiusRight>=1.5||t.stCycleParam.fRadiusTop<=-.5||t.stCycleParam.fRadiusTop>=.4||t.stCycleParam.fRadiusBottom<=.6||t.stCycleParam.fRadiusBottom>=1.5||t.stCycleParam.fRadiusLeft+t.stCycleParam.fRadiusRight<=.8||t.stCycleParam.fRadiusLeft+t.stCycleParam.fRadiusRight>=1.2||t.stCycleParam.fRadiusTop+t.stCycleParam.fRadiusBottom<=.8||t.stCycleParam.fRadiusTop+t.stCycleParam.fRadiusBottom>=1.2))return this.FECErrorCode=V,0}}if(0==this.stFishEyeManager[e].bInited){if(4&t.upDateType){if(G!=this.stFishEyeManager[e].emCorrectType&&X!=this.stFishEyeManager[e].emCorrectType||1==this.stFishEyeManager[e].emPlaceType)return this.FECErrorCode=U,0;for(var r=1;r<Ze;r++)if(this.stFishEyeManager[r].nSubPort&&this.stFishEyeManager[r].bUsed&&this.stFishEyeManager[r].emCorrectType==Y)return this.FECErrorCode=N,0;this.stFishParam[e].fWideScanOffset=t.fValue}if(16&t.upDateType){if(null==t.stPTZColor)return this.FECErrorCode=V,0;if(t.stPTZColor.nR>255||t.stPTZColor.nG>255||t.stPTZColor.nB>255||t.stPTZColor.nAlpha>255)return this.FECErrorCode=U,0;this.stFishParam[e].stPTZColor.nR=t.stPTZColor.nR,this.stFishParam[e].stPTZColor.nG=t.stPTZColor.nG,this.stFishParam[e].stPTZColor.nB=t.stPTZColor.nB,this.stFishParam[e].stPTZColor.nAlpha=t.stPTZColor.nAlpha}if(8&t.upDateType){if(Y!=this.stFishEyeManager[e].emCorrectType)return this.FECErrorCode=U,0;this.stFishParam[e].stPTZParam.fPTZPositionX=t.fPTZParam.fPTZPositionX,this.stFishParam[e].stPTZParam.fPTZPositionY=t.fPTZParam.fPTZPositionY}if(2&t.upDateType){if(Y!=this.stFishEyeManager[e].emCorrectType)return this.FECErrorCode=U,0;this.stFishParam[e].fZoom=t.fPTZZoom}if(32&t.upDateType){if(null==this.stFishParam.stPTZSelect)return 0;if(Y!=this.stFishEyeManager[e].emCorrectType)return this.FECErrorCode=U,0;this.stFishParam.stPTZSelect.fTop=t.stPTZSelect.fTop,this.stFishParam.stPTZSelect.fBottom=t.stPTZSelect.fBottom,this.stFishParam.stPTZSelect.fLeft=t.stPTZSelect.fLeft,this.stFishParam.stPTZSelect.fRight=t.stPTZSelect.fRight}if(1&t.upDateType){if(null==t.stCycleParam)return this.FECErrorCode=V,0;if(0==this._IsValidRadiusParam(t.stCycleParam))return this.FECErrorCode=V,0;this.stFishParam[0].stCycleParam.fRadiusLeft=t.stCycleParam.fRadiusLeft,this.stFishParam[0].stCycleParam.fRadiusRight=t.stCycleParam.fRadiusRight,this.stFishParam[0].stCycleParam.fRadiusTop=t.stCycleParam.fRadiusTop,this.stFishParam[0].stCycleParam.fRadiusBottom=t.stCycleParam.fRadiusBottom}return 1}if(4&t.upDateType){if(G!=this.stFishEyeManager[e].emCorrectType&&X!=this.stFishEyeManager[e].emCorrectType||1==this.stFishEyeManager[e].emPlaceType)return this.FECErrorCode=U,0;for(var i=1;i<Ze;i++)if(this.stFishEyeManager[i].nSubPort&&this.stFishEyeManager[i].bUsed&&this.stFishEyeManager[i].emCorrectType==Y)return this.FECErrorCode=N,0;var n={};if(n.nFishParamType=Xe.SRFISHPARAMTYPE.SR_FPT_ANGLE,n.bBlack=0,n.fAngle=t.fValue,Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetFishParam(n))return this.FECErrorCode=N,0;this.stFishParam[e].fWideScanOffset=t.fValue}if(16&t.upDateType){if(null==t.stPTZColor)return this.FECErrorCode=U,0;if(t.stPTZColor.nR>255||t.stPTZColor.nG>255||t.stPTZColor.nB>255||t.stPTZColor.nAlpha>255)return this.FECErrorCode=U,0;var s={};if(s.fR=t.stPTZColor.nR/255,s.fG=t.stPTZColor.nG/255,s.fB=t.stPTZColor.nB/255,s.fA=t.stPTZColor.nAlpha/255,Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetPTZColor(e,s))return this.FECErrorCode=N,N;this.stFishParam[e].stPTZColor.nR=t.stPTZColor.nR,this.stFishParam[e].stPTZColor.nG=t.stPTZColor.nG,this.stFishParam[e].stPTZColor.nB=t.stPTZColor.nB,this.stFishParam[e].stPTZColor.nAlpha=t.stPTZColor.nAlpha}if(8&t.upDateType){if(Y!=this.stFishEyeManager[e].emCorrectType)return this.FECErrorCode=U,0;var x={};x.nFishParamType=Xe.SRFISHPARAMTYPE.SR_FPT_PTZ,x.bBlack=0,x.fPTZX=t.fPTZParam.fPTZPositionX,x.fPTZY=t.fPTZParam.fPTZPositionY;var o=this.stFishEyeManager[e].pRender.SR_SetFishParam(x);if(Xe.ERRCODE.SR_OK!=o)return this.FECErrorCode=N,0;this.stFishParam[e].stPTZParam.fPTZPositionX=t.fPTZParam.fPTZPositionX,this.stFishParam[e].stPTZParam.fPTZPositionY=t.fPTZParam.fPTZPositionY}if(2&t.upDateType){if(Y!=this.stFishEyeManager[e].emCorrectType)return this.FECErrorCode=U,0;var l={};if(l.nFishParamType=Xe.SRFISHPARAMTYPE.SR_FPT_ZOOM,l.bBlack=0,l.fZoom=t.fPTZZoom,Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetFishParam(l))return this.FECErrorCode=N,0;this.stFishParam[e].fZoom=t.fPTZZoom}if(1&t.upDateType){if(0==this._IsValidRadiusParam(t.stCycleParam))return this.FECErrorCode=V,0;var _={};if(_.nFishParamType=Xe.SRFISHPARAMTYPE.SR_FPT_CENTER,_.bBlack=1,_.fRXLeft=t.stCycleParam.fRadiusLeft,_.fRXRight=t.stCycleParam.fRadiusRight,_.fRYTop=t.stCycleParam.fRadiusTop,_.fRYBottom=t.stCycleParam.fRadiusBottom,Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetFishParam(this.stFishEyeManager[e].nValidSubPort,_))return this.FECErrorCode=V,0;this.stFishParam[0].stCycleParam.fRadiusLeft=t.stCycleParam.fRadiusLeft,this.stFishParam[0].stCycleParam.fRadiusRight=t.stCycleParam.fRadiusRight,this.stFishParam[0].stCycleParam.fRadiusTop=t.stCycleParam.fRadiusTop,this.stFishParam[0].stCycleParam.fRadiusBottom=t.stCycleParam.fRadiusBottom}return 32&t.upDateType&&Y==this.stFishEyeManager[e].emCorrectType&&Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetFishParam(this.stFishEyeManager[e].stPTZSelect)?(this.FECErrorCode=1299,0):(null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[e].splice(e,this.pstWaterFontParamArray[e].length),this.CalculateWaterMarkParam(this.stFishEyeManager[e].pRender,e,this.pstWaterFontParam)),1)}},{key:"FEC_GetParam",value:function(e,t){return e<0||e>31||null==e?(console.info("%c FEC_GetParam-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):null==this.stFishEyeManager[e].pRender?(console.info("%c FEC_GetParam-2 pRender:%d","color: red",this.stFishEyeManager[e].pRender),this.FECErrorCode=O,0):(this.stFishEyeManager[e].pRender.SR_GetFishParam(t),t.emCorrectType=this.stFishEyeManager[e].emCorrectType,1)}},{key:"_IsValidRadiusParam",value:function(e){return e.fRadiusBottom<=e.fRadiusTop||e.fRadiusRight<=e.fRadiusLeft?0:1}},{key:"FEC_SetViewParam",value:function(e,t,a){return e<0||e>31||null==e?(console.info("%c FEC_SetViewParam-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):null==this.stFishEyeManager[e].pRender?(console.info("%c FEC_SetViewParam-2 pRender:%d","color: red",this.stFishEyeManager[e].pRender),this.FECErrorCode=O,0):t<Xe.SRVIEWTYPE.SR_VT_ROTATION_X||t>Xe.SRVIEWTYPE.SR_VT_SCALE?(this.FECErrorCode=W,0):(this.FECErrorCode=0,0==this.stFishEyeManager[e].bInited?(this.FECErrorCode=B,0):Z<=this.stFishEyeManager[e].emCorrectType?Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetViewParam(t,a)?(this.FECErrorCode=W,0):(null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[e].splice(0,this.pstWaterFontParamArray[e].length),this.CalculateWaterMarkParam(this.stFishEyeManager[e].pRender,e,this.pstWaterFontParam)),1):(this.FECErrorCode=U,0))}},{key:"FEC_GetViewParam",value:function(e,t,a){return a.fValue=-1,e<0||e>31||null==e?(console.info("%c FEC_GetViewParam-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):null==this.stFishEyeManager[e].pRender?(console.info("%c FEC_GetViewParam-2 pRender:%d","color: red",this.stFishEyeManager[e].pRender),this.FECErrorCode=O,0):t<1||t>3||0==this.stFishEyeManager[e].bInited?0:(Z<=this.stFishEyeManager[e].emCorrectType&&this.stFishEyeManager[e].pRender.SR_GetViewParam(t,a),1)}},{key:"FEC_SetDisplayRegion",value:function(e,t,a,r,i,n,s){return e<0||e>31||null==e?(console.info("%c FEC_SetDisplayRegion-1 nSubPort:%d","color: red",e),this.FECErrorCode=H,0):null==this.stFishEyeManager[e].pRender?(console.info("%c FEC_SetDisplayRegion-2 pRender:%d","color: red",this.stFishEyeManager[e].pRender),this.FECErrorCode=O,0):0!=t||0!=a?(this.FECErrorCode=W,0):0!=this.stFishEyeManager[e].emCorrectType&&this.stFishEyeManager[e].emCorrectType!=G&&this.stFishEyeManager[e].emCorrectType!=X&&this.stFishEyeManager[e].emCorrectType!=J?(this.FECErrorCode=k,0):0==this.stFishEyeManager[e].bInited?(this.FECErrorCode=B,0):r<0||i<0||n<0||s<0?(this.FECErrorCode=W,0):Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetDisplayRect(r,i,n,s,Xe.SRSETRECTTYPE.SR_SRT_SRC)?(this.FECErrorCode=1297,0):(null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[e].splice(0,this.pstWaterFontParamArray[e].length),this.CalculateWaterMarkParam(this.stFishEyeManager[e].pRender,e,this.pstWaterFontParam)),1)}},{key:"FEC_SetBackCilling",value:function(e,t){return e<0||e>31||null==e?(this.FECErrorCode=H,0):null==this.stFishEyeManager[e].pRender?(this.FECErrorCode=O,0):0==this.stFishEyeManager[e].bInited?(this.FECErrorCode=B,0):Xe.ERRCODE.SR_OK!=this.stFishEyeManager[e].pRender.SR_SetRenderState(Xe.SRRENDERSTATETYPE.SR_RST_BACK_CULL,t)?(this.FECErrorCode=1297,0):(null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[e].splice(0,this.pstWaterFontParamArray[e].length),this.CalculateWaterMarkParam(this.stFishEyeManager[e].pRender,e,this.pstWaterFontParam)),1)}},{key:"FEC_GetPTZPort",value:function(e,t,a){if(null!=this.stFishEyeManager[e].pRender){var r={nPTZPort:-1};if(this.stFishEyeManager[e].pRender.SR_GetPTZPort(t,a,r)==Xe.ERRCODE.SR_OK)return r.nPTZPort}return-1}},{key:"FEC_SetPTZDisplayMode",value:function(e){return e>=0&&e<=2?(null!=this.stFishEyeManager[0].pRender&&this.stFishEyeManager[0].pRender.SR_SetPTZDisplayMode(e),this.FECShowMode=e,1):(console.info("%c FEC_SetPTZDisplayMode ptzMode:%d","color: red",e),0)}},{key:"FEC_Capture",value:function(e,t){if(null!=this.stFishEyeManager[e].pRender){var a={nWidth:0,nHeight:0,nBufferLen:0},r=this.stFishEyeManager[e].pRender.SR_GetCaptureSize(a);if(Xe.ERRCODE.SR_OK!=r||a.nBufferLen<=0)return t(null,0,0,e),0;var i=new Uint8Array(a.nBufferLen);if(null==i)return t(null,0,0,e),0;var n={};return n.pBuffer=i,this.stFishEyeManager[e].pRender.SR_CaptureScreen(n),t(i,a.nWidth,a.nHeight,e),i=null,1}return t(null,0,0,e),0}},{key:"CheckFrameRGB",value:function(e,t,a,r,i,n){if(null==e||null==e.width||null==e.height||null==e.pBuffer||e.width<=0||e.height<=0||e.pBuffer.length<=0)return 0;for(var s=e.width/(r-1),x=e.height/(a-1),o=0,l=0,_=[],h=0;h<a*r;h++)_[h]=0,this.aPOSAdaptBuf[h]=0;if(t){for(var f=0,c=0;c<e.height;c++)for(var u=0;u<e.width;u++){o=(o=Math.round(u/(s/2)/2))<r?o:r-1,l=(l=Math.round(c/(x/2)/2))<a?l:a-1;var d=e.pBuffer[f],p=e.pBuffer[f+1],m=e.pBuffer[f+2],S=Math.round(.299*d+.587*p+.114*m);this.aPOSAdaptBuf[o+l*r]+=S,_[o+l*r]++,f+=4}for(var R=0,P=0;P<a*r;P++)R=this.aPOSAdaptBuf[P]/_[P],this.aPOSAdaptBuf[P]=R>128?0:1}else{var y=Math.round(i*e.width),b=Math.round(n*e.height),E=y-2;E=(E=E>0?E:0)<e.width?E:e.width-1;var g=y+2;g=(g=g>0?g:0)<e.width?g:e.width-1;var F=b-2;F=(F=F>0?F:0)<e.height?F:e.height-1;var C=b+2;C=(C=C>0?C:0)<e.height?C:e.height-1;for(var v=F;v<C;v++)for(var T=E;T<g;T++){var D=4*Math.floor((4*T+v*e.width*4)/4),A=e.pBuffer[D],I=e.pBuffer[D+1],M=e.pBuffer[D+2],L=Math.round(.299*A+.587*I+.114*M);this.aPOSAdaptBuf[0]+=L,_[0]++}this.aPOSAdaptBuf[0]=this.aPOSAdaptBuf[0]/_[0]>128?0:1}return 1}},{key:"GetWaterFontParam",value:function(e,t,a,r,i,n,s){var x=a.pFontString.length,o=a.pstFontRotate.fRotateAngle%360/360*2*Math.PI,l=Math.min(a.pstFontSize.nFontWidth,a.pstFontSize.nFontHeight);if(2==a.pstCanvasAdapt.nCanvasAdaptMode){var _=a.pstFontSize.nFontWidth*r/a.pstCanvasAdapt.nBaseCanvasWidth,h=a.pstFontSize.nFontHeight*i/a.pstCanvasAdapt.nBaseCanvasHeight;l=Math.min(_,h)}var f=l/r,c=l/i,u=f*Math.cos(Math.PI/2-o)*a.pSpace,d=c*Math.sin(Math.PI/2-o)*a.pSpace,p=[],m=[],S=[];if(a.nFontAlign)for(var R=0;R<x;R++)p[R]=a.pFontString[0].length*f/6,m[R]=Math.atan2(p[0],d),S[R]=Math.sqrt(p[0]*p[0],d*d);else for(var P=0;P<x;P++)p[P]=0,m[P]=0,S[P]=0;var y={};if(this.pstWaterFontParam.nColorAdapt){var b={nWidth:16,nHeight:16,nBufferLen:0},E=e.SR_GetCaptureSize(b);if(Xe.ERRCODE.SR_OK==E){var g=new Uint8Array(b.nBufferLen);y.pBuffer=g,e.SR_CaptureScreen(y,!0),y.width=b.nWidth,y.height=b.nHeight,g=null}}var F=n*s;if(a.pstFontRotate.fFillFullScreen){var C=[],v=[];if(1==a.pstCanvasAdapt.nCanvasAdaptMode){if(s<je)for(var T=0;T*a.pstCanvasAdapt.ntotalColSpace<=r;T++)v[T]=(T*a.pstCanvasAdapt.ntotalColSpace+a.pstCanvasAdapt.nColSpace/2)/r;else for(var D=1/(s-1),A=0;A<s;A++)v[A]=D*A+u*((x-1)/2);if(n<je)for(var I=0;I*a.pstCanvasAdapt.ntotalRowSpace<=i;I++)C[I]=(I*a.pstCanvasAdapt.ntotalRowSpace+a.pstCanvasAdapt.nRowSpace/2)/i;else for(var M=1/(n-1),L=0;L<n;L++)C[L]=M*L-d*((x-1)/2);for(var w=0;w<x;w++)p[w]=0,m[w]=0,S[w]=0}else{if(1==n)C[0]=.5;else for(var O=1/(n-1),B=0;B<n;B++)C[B]=O*B-d*((x-1)/2);if(1==s)v[0]=.5;else for(var k=1/(s-1),N=0;N<s;N++)v[N]=k*N+u*((x-1)/2)}this.pstWaterFontParamArray[t]=[];for(var V=0;V<F;++V)for(var U=0;U<x;U++){this.pstWaterFontParamArray[t][x*V+U]={},this.pstWaterFontParamArray[t][x*V+U].pString=a.pFontString[U],this.pstWaterFontParamArray[t][x*V+U].nFontWidth=l,this.pstWaterFontParamArray[t][x*V+U].nFontHeight=l,this.pstWaterFontParamArray[t][x*V+U].pstStartPos={};var H=V%s,W=Math.floor(V/s),Y=Math.PI/2-o+m[U];this.pstWaterFontParamArray[t][x*V+U].pstStartPos.fX=v[H]-U*u+S[U]*Math.cos(Y),this.pstWaterFontParamArray[t][x*V+U].pstStartPos.fY=C[W]+U*d-S[U]*Math.sin(Y),a.nColorAdapt?(0==U&&this.CheckFrameRGB(y,0,1,1,this.pstWaterFontParamArray[t][x*V+U].pstStartPos.fX,this.pstWaterFontParamArray[t][x*V+U].pstStartPos.fY),this.pstWaterFontParamArray[t][x*V+U].pstFontColor={},this.pstWaterFontParamArray[t][x*V+U].pstFontColor.fR=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][x*V+U].pstFontColor.fG=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][x*V+U].pstFontColor.fB=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][x*V+U].pstFontColor.fA=a.pstFontColor.fA):this.pstWaterFontParamArray[t][x*V+U].pstFontColor=a.pstFontColor,this.pstWaterFontParamArray[t][x*V+U].bBackGround=!1,this.pstWaterFontParamArray[t][x*V+U].pstBGColor=null,this.pstWaterFontParamArray[t][x*V+U].fRotateAngle=a.pstFontRotate.fRotateAngle,this.pstWaterFontParamArray[t][x*V+U].pFontFamily=a.pFontFamily,a.nFontAlign?(this.pstWaterFontParamArray[t][x*V+U].textAlign="left",this.pstWaterFontParamArray[t][x*V+U].textBaseline="top"):(this.pstWaterFontParamArray[t][x*V+U].textAlign="center",this.pstWaterFontParamArray[t][x*V+U].textBaseline="middle")}}else for(var G=0;G<a.pFontString.length;G++)this.pstWaterFontParamArray[t][G]={},this.pstWaterFontParamArray[t][G].pString=a.pFontString[G],this.pstWaterFontParamArray[t][G].nFontWidth=l,this.pstWaterFontParamArray[t][G].nFontHeight=l,this.pstWaterFontParamArray[t][G].pstStartPos={},this.pstWaterFontParamArray[t][G].pstStartPos.fX=a.pstStartPos.fX-G*u,this.pstWaterFontParamArray[t][G].pstStartPos.fY=a.pstStartPos.fY+G*d,a.nColorAdapt?(this.CheckFrameRGB(y,0,1,1,this.pstWaterFontParamArray[t][G].pstStartPos.fX,this.pstWaterFontParamArray[t][G].pstStartPos.fY),this.pstWaterFontParamArray[t][G].pstFontColor={},this.pstWaterFontParamArray[t][G].pstFontColor.fR=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][G].pstFontColor.fG=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][G].pstFontColor.fB=this.aPOSAdaptBuf[0],this.pstWaterFontParamArray[t][G].pstFontColor.fA=a.pstFontColor.fA):this.pstWaterFontParamArray[t][G].pstFontColor=a.pstFontColor,this.pstWaterFontParamArray[t][G].bBackGround=!1,this.pstWaterFontParamArray[t][G].pstBGColor=null,this.pstWaterFontParamArray[t][G].fRotateAngle=a.pstFontRotate.fRotateAngle,this.pstWaterFontParamArray[t][G].pFontFamily=a.pFontFamily,a.nFontAlign?(this.pstWaterFontParamArray[t][G].textAlign="left",this.pstWaterFontParamArray[t][G].textBaseline="top"):(this.pstWaterFontParamArray[t][G].textAlign="center",this.pstWaterFontParamArray[t][G].textBaseline="middle");return 1}},{key:"CalculateWaterMarkParam",value:function(e,t,a){var r=this.mainCanvasID.width,i=this.mainCanvasID.height;t>0&&(r=this.stFishEyeManager[t].sCanvasID.width,i=this.stFishEyeManager[t].sCanvasID.height);var n=Math.floor(a.pstFontNumber.nRowNumber),s=Math.floor(a.pstFontNumber.nColNumber);1==a.pstCanvasAdapt.nCanvasAdaptMode&&(n=(n=(n=Math.floor(i/a.pstCanvasAdapt.ntotalRowSpace+1))<1?1:n)>je?je:n,s=(s=(s=Math.floor(r/a.pstCanvasAdapt.ntotalColSpace+1))<1?1:s)>je?je:s),this.GetWaterFontParam(e,t,a,r,i,n,s)}},{key:"SetWaterMarkFont",value:function(e){if(0!=this.pstWaterFontParamArray.length)for(var t=0;t<Ze;t++)this.pstWaterFontParamArray[t].splice(0,this.pstWaterFontParamArray[t].length);if(this.pstWaterFontParam=e,null===e)return 1;this.CalculateWaterMarkParam(this.oVideoHandle,0,e);for(var a=1;a<Ze;a++)null!=this.stFishEyeManager[a].pRender&&this.CalculateWaterMarkParam(this.stFishEyeManager[a].pRender,a,e);return 1}},{key:"SetMosaicType",value:function(e){return this.MosaicType=e.nMosaicType,this.MosaicSize=e.nMosaicSize,this.MosaicColorR=e.pstMosaicColor.fMosaicColorR/255,this.MosaicColorG=e.pstMosaicColor.fMosaicColorG/255,this.MosaicColorB=e.pstMosaicColor.fMosaicColorB/255,this.MosaicColorA=e.pstMosaicColor.fMosaicColorA/100,1}},{key:"SetTextCanvas",value:function(e){return this.textCanvas=e,1}},{key:"SetPrintLogFlag",value:function(e){return this.printfFlag=e,1}},{key:"SetRotateAngle",value:function(e){var t;if(null!=this.oVideoHandle&&(t=this.oVideoHandle.SR_SetRenderState(Xe.SRRENDERSTATETYPE.SR_RST_IMAGE_ROTATE,e),null!=this.pstWaterFontParam&&this.pstWaterFontParam.nColorAdapt&&(this.pstWaterFontParamArray[0].splice(0,this.pstWaterFontParamArray[0].length),this.CalculateWaterMarkParam(this.oVideoHandle,0,this.pstWaterFontParam)),t==Xe.ERRCODE.SR_OK))return 1;return 0}},{key:"ImageDecoder",value:function(e,t,a){var r=this;e.decode({frameIndex:a}).then((function(i){r.pWaterImageParam[a]={},r.pWaterImageParam[a].videoStream=i.image,r.pWaterImageParam[a].nImageWidth=i.image.displayWidth,r.pWaterImageParam[a].nImageHeight=i.image.displayHeight,r.pWaterImageParam[a].timeStamp=i.image.timestamp/1e3,r.pWaterImageParam[a].duration=i.image.duration/1e3,null!=t.pstRectPos?r.pWaterImageParam[a].pstRectPos=t.pstRectPos:r.pWaterImageParam[a].pstRectPos={fLeft:0,fRight:.1,fTop:0,fBottom:.1},null!=t.fAlpha&&t.fAlpha<=1&&t.fAlpha>=0?r.pWaterImageParam[a].fAlpha=t.fAlpha:r.pWaterImageParam[a].fAlpha=1,r.waterMarkImageMax=e.tracks.selectedTrack.frameCount,a<e.tracks.selectedTrack.frameCount-1?r.ImageDecoder(e,t,a+1):(r.baseWaterMarkImageTime=r.curTimestamp,r.finishDecodeImage=!0)}))}},{key:"SetWaterMarkImage",value:function(e){var t=this;if(this.pWaterImageParam.splice(0,this.pWaterImageParam.length),null===e)return 1;if(null!=e.pImageData){var a=new ImageDecoder({data:e.pImageData,type:"image/"+e.pImageType});a.tracks.ready.then((function(){a.completed.then((function(){t.ImageDecoder(a,e,0)}))}))}return this.waterMarkImageIndex=0,1}},{key:"SelectIntelInfoFeatureToDraw",value:function(e){if(this.DrawTargetEventIDList.splice(0,this.DrawTargetEventIDList.length),null===e)return 0;if(pImageParam.NodeNumber>0)for(var t=0;t<pImageParam.NodeNumber;t++)this.DrawTargetEventIDList.push(e.pIntelInfoNode[t]);return 1}},{key:"_ConvertDisplayEffect",value:function(e,t){switch(e){case 1:return Y==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PTZ_WALL:X==t||J==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PANORAMA_WALL:Z==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_SEMISPHERE:K==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PLANET:q==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:Q==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;case 2:return Y==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PTZ_FLOOR:X==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PANORAMA_FLOOR_360:G==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PANORAMA_FLOOR_180:Z==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_SEMISPHERE:j==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_CYLINDER_FLOOR:z==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_CYLINDER_SPLIT_FLOOR:K==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PLANET:Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;case 3:return Y==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PTZ_CEILING:X==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PANORAMA_CEILING_360:G==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PANORAMA_CEILING_180:Z==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_SEMISPHERE:j==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_CYLINDER_CEILING:z==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_CYLINDER_SPLIT_CEILING:K==t?Xe.SRDISPLAYEFFECT.SR_DE_FISH_PLANET:Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL;default:return Xe.SRDISPLAYEFFECT.SR_DE_FISH_ORIGINAL}}},{key:"GetCanvasData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i={};i.nWidth=t,i.nHeight=a,i.nBufferLen=0;var n=this.oVideoHandle.SR_GetCaptureSize(i,r);if(Xe.ERRCODE.SR_OK!=n||i.nBufferLen<=0)e(null);else{var s=new Uint8Array(i.nBufferLen);if(null!=s){var x={};x.pBuffer=s,this.oVideoHandle.SR_CaptureScreen(x),e(s,i.nWidth,i.nHeight)}else e(null)}}},{key:"FindIntelNodefromList",value:function(e){if(0!=this.privateNormalLinesInfo.length){for(var t=!1,a=0,r=!1,i=0,n=0,s=1e8,x=0;x<this.privateNormalLinesInfo.length;x++){if(0==(n=Math.abs(this.privateNormalLinesInfo[x].absTimeStamp-e))){r=!0,i=x;break}n<=this.nTimePerFrame+1e3&&n<s&&(t=!0,a=x,s=n)}r?(this.curNormalLinesInfo=this.privateNormalLinesInfo[i],this.privateNormalLinesInfo.shift()):t&&(this.curNormalLinesInfo=this.privateNormalLinesInfo[a],this.privateNormalLinesInfo.shift())}if(0!=this.privateThermalLinesInfo.length&&(this.curThermalLinesInfo=this.privateThermalLinesInfo[0]),0!=this.privateTemLinesInfo.length){for(var o=!1,l=0,_=!1,h=0,f=0,c=1e8,u=0;u<this.privateTemLinesInfo.length;u++){if(0==(f=Math.abs(this.privateTemLinesInfo[u].absTimeStamp-e))){_=!0,h=u;break}f<=this.nTimePerFrame+1e3&&f<c&&(o=!0,l=u,c=f)}_?(this.curTemLinesInfo=this.privateTemLinesInfo[h],this.privateTemLinesInfo.shift()):o?(this.curTemLinesInfo=this.privateTemLinesInfo[l],this.privateTemLinesInfo.shift()):this.nFrameRate<=30?this.m_nTEMDrawLinescount<=30?this.m_nTEMDrawLinescount++:this.curTemLinesInfo=null:this.m_nTEMDrawLinescount<=60?this.m_nTEMDrawLinescount++:this.curTemLinesInfo=null}else this.nFrameRate<=30?this.m_nTEMDrawLinescount<=30?this.m_nTEMDrawLinescount++:this.curTemLinesInfo=null:this.m_nTEMDrawLinescount<=60?this.m_nTEMDrawLinescount++:this.curTemLinesInfo=null;if(0!=this.privateTargetLinesInfo.length){for(var d=!1,p=0,m=!1,S=0,R=0,P=1e8,y=0;y<this.privateTargetLinesInfo.length;y++){if(0==(R=Math.abs(this.privateTargetLinesInfo[y].absTimeStamp-e))){m=!0,S=y;break}R<=this.nTimePerFrame+1e3&&R<P&&(d=!0,p=y,P=R)}m?(this.curTargetLinesInfo=this.privateTargetLinesInfo[S],this.privateTargetLinesInfo.shift()):d?(this.curTargetLinesInfo=this.privateTargetLinesInfo[p],this.privateTargetLinesInfo.shift()):this.curTargetLinesInfo=null}else this.curTargetLinesInfo=null;if(0!=this.privateMDLinesInfo.length){for(var b=!1,E=0,g=!1,F=0,C=0,v=1e8,T=0;T<this.privateMDLinesInfo.length;T++){if(0==(C=Math.abs(this.privateMDLinesInfo[T].absTimeStamp-e))){g=!0,F=T;break}C<=this.nTimePerFrame+1e3&&C<v&&(b=!0,E=T,v=C)}g?(this.curMDLinesInfo=this.privateMDLinesInfo[F],this.privateMDLinesInfo.shift()):b?(this.curMDLinesInfo=this.privateMDLinesInfo[E],this.privateMDLinesInfo.shift()):this.curMDLinesInfo=null}else this.curMDLinesInfo=null;if(0!=this.privateExactLinesInfo.length){for(var D=!1,A=0,I=!1,M=0,L=0,w=1e8,O=0;O<this.privateExactLinesInfo.length;O++){if(0==(L=Math.abs(this.privateExactLinesInfo[O].absTimeStamp-e))){I=!0,M=O;break}L<=this.nTimePerFrame/2&&L<w&&(D=!0,A=O,w=L)}I?(this.curExactLinesInfo=this.privateExactLinesInfo[M],this.privateExactLinesInfo.shift()):D?(this.curExactLinesInfo=this.privateExactLinesInfo[A],this.privateExactLinesInfo.shift()):this.curExactLinesInfo=null}else this.curExactLinesInfo=null;if(0!=this.privateExactRuleLinesInfo.length){for(var B=!1,k=0,N=!1,V=0,U=0,H=1e8,W=0;W<this.privateExactRuleLinesInfo.length;W++){if(0==(U=Math.abs(this.privateExactRuleLinesInfo[W].absTimeStamp-e))){N=!0,V=W;break}U<=this.nTimePerFrame/2&&U<H&&(B=!0,k=W,H=U)}N?(this.curExactRuleLinesInfo=this.privateExactRuleLinesInfo[V],this.privateExactRuleLinesInfo.shift()):B&&(this.curExactRuleLinesInfo=this.privateExactRuleLinesInfo[k],this.privateExactRuleLinesInfo.shift())}if(0!=this.privateNormalFontsInfo.length){for(var Y=!1,G=0,X=!1,J=0,Z=0,j=1e8,z=0;z<this.privateNormalFontsInfo.length;z++){if(0==(Z=Math.abs(this.privateNormalFontsInfo[z].absTimeStamp-e))){X=!0,J=z;break}Z<=this.nTimePerFrame+1e3&&Z<j&&(Y=!0,G=z,j=Z)}X?(this.curNormalFontsInfo=this.privateNormalFontsInfo[J],this.privateNormalFontsInfo.shift()):Y&&(this.curNormalFontsInfo=this.privateNormalFontsInfo[G],this.privateNormalFontsInfo.shift())}if(0!=this.privateTemFontsInfo.length){for(var K=!1,q=0,Q=!1,$=0,ee=0,te=1e8,ae=0;ae<this.privateTemFontsInfo.length;ae++){if(0==(ee=Math.abs(this.privateTemFontsInfo[ae].absTimeStamp-e))){Q=!0,$=ae;break}ee<=this.nTimePerFrame+1e3&&ee<te&&(K=!0,q=ae,te=ee)}Q?(this.curTemFontsInfo=this.privateTemFontsInfo[$],this.privateTemFontsInfo.shift()):K?(this.curTemFontsInfo=this.privateTemFontsInfo[q],this.privateTemFontsInfo.shift()):this.nFrameRate<=30?this.m_nTEMDrawFontscount<=30?this.m_nTEMDrawFontscount++:this.curTemFontsInfo=null:this.m_nTEMDrawFontscount<=60?this.m_nTEMDrawFontscount++:this.curTemFontsInfo=null}else this.nFrameRate<=30?this.m_nTEMDrawFontscount<=30?this.m_nTEMDrawFontscount++:this.curTemFontsInfo=null:this.m_nTEMDrawFontscount<=60?this.m_nTEMDrawFontscount++:this.curTemFontsInfo=null;if(0!=this.privateTargetFontsInfo.length){for(var re=!1,ie=0,ne=!1,se=0,xe=0,oe=1e8,le=0;le<this.privateTargetFontsInfo.length;le++){if(0==(xe=Math.abs(this.privateTargetFontsInfo[le].absTimeStamp-e))){ne=!0,se=le;break}xe<=this.nTimePerFrame+1e3&&xe<oe&&(re=!0,ie=le,oe=xe)}ne?(this.curTargetFontsInfo=this.privateTargetFontsInfo[se],this.privateTargetFontsInfo.shift()):re?(this.curTargetFontsInfo=this.privateTargetFontsInfo[ie],this.privateTargetFontsInfo.shift()):this.curTargetFontsInfo=null}else this.curTargetFontsInfo=null;if(0!=this.privateExactPOSFontsInfo.length){for(var _e=!1,he=0,fe=!1,ce=0,ue=0,de=1e8,pe=0;pe<this.privateExactPOSFontsInfo.length;pe++){if(0==(ue=Math.abs(this.privateExactPOSFontsInfo[pe].absTimeStamp-e))){fe=!0,ce=pe;break}ue<=this.nTimePerFrame/2&&ue<de&&(_e=!0,he=pe,de=ue)}fe?(this.curExactPOSFontsInfo=this.privateExactPOSFontsInfo[ce],this.privateExactPOSFontsInfo.shift()):_e?(this.curExactPOSFontsInfo=this.privateExactPOSFontsInfo[he],this.privateExactPOSFontsInfo.shift()):this.curExactPOSFontsInfo=null}else this.curExactPOSFontsInfo=null;if(0!=this.privateExactFontsInfo.length){for(var me=!1,Se=0,Re=!1,Pe=0,ye=0,be=1e8,Ee=0;Ee<this.privateExactFontsInfo.length;Ee++){if(0==(ye=Math.abs(this.privateExactFontsInfo[Ee].absTimeStamp-e))){Re=!0,Pe=Ee;break}ye<=this.nTimePerFrame/2&&ye<be&&(me=!0,Se=Ee,be=ye)}Re?(this.curExactFontsInfo=this.privateExactFontsInfo[Pe],this.privateExactFontsInfo.shift()):me?(this.curExactFontsInfo=this.privateExactFontsInfo[Se],this.privateExactFontsInfo.shift()):this.curExactFontsInfo=null}else this.curExactFontsInfo=null;if(0!=this.privateImageInfo.length){for(var ge=!1,Fe=0,Ce=!1,ve=0,Te=0,De=1e8,Ae=0;Ae<this.privateImageInfo.length;Ae++){if(0==(Te=Math.abs(this.privateImageInfo[Ae].absTimeStamp-e))){Ce=!0,ve=Ae;break}Te<=this.nTimePerFrame+1e8&&Te<De&&(ge=!0,Fe=Ae,De=Te)}Ce?(this.curImagesInfo=this.privateImageInfo[ve],this.privateImageInfo.shift()):ge&&(this.curImagesInfo=this.privateImageInfo[Fe],this.privateImageInfo.shift())}return 1}},{key:"RenderPrivateData",value:function(e,t){return 1&e&&(this.m_bEnableIVSEx=t),2&e&&(this.m_bEnableMDEx=t),4&e&&(this.m_bDisPos=t),8&e&&(this.m_bEnablePICEx=t),16&e&&(this.m_bEnableFIREEx=t),32&e&&(this.m_bEnableTEMEx=t),64&e&&(this.m_bEnableTrackEx=t),128&e&&(this.m_bEnableThermal=t),1}},{key:"RenderPrivateDataEx",value:function(e,t,a){return 16==e&&(1&t&&(this.m_bEnableFireDis=a),4&t&&(this.m_bEnableFireMaxPos=a),8&t&&(this.m_bEnableFireDistance=a)),32==e&&(1&t&&(this.m_bEnableTEMBox=a),2&t&&(this.m_bEnableTEMLine=a),4&t&&(this.m_bEnableTEMPoint=a)),64==e&&(1&t&&(this.m_bEnableTrackPeople=a),2&t&&(this.m_bEnableTrackVehicle=a)),128==e&&(1&t&&(this.m_bEnableThermalFireMask=a),2&t&&(this.m_bEnableThermalRuleGas=a),4&t&&(this.m_bEnableThermalTargetGas=a)),1}},{key:"InputPrivateInfo",value:function(e,t,a){var r=this,i=!1,n=0;if(e.linesNum>0){var s={linesNum:0};s.absTimeStamp=e.absTimeStamp,s.stDrawLinesArray=[];var x={linesNum:0};x.absTimeStamp=e.absTimeStamp,x.stDrawLinesArray=[];var o={linesNum:0};o.absTimeStamp=e.absTimeStamp,o.stDrawLinesArray=[];var l={linesNum:0};l.absTimeStamp=e.absTimeStamp,l.stDrawLinesArray=[];var _={linesNum:0};_.absTimeStamp=e.absTimeStamp,_.stDrawLinesArray=[];var h={linesNum:0};h.absTimeStamp=e.absTimeStamp,h.stDrawLinesArray=[];var f={linesNum:0};f.absTimeStamp=e.absTimeStamp,f.stDrawLinesArray=[];for(var c=0;c<e.linesNum;c++)1==e.stDrawLinesArray[c].dwMatchType?2==e.stDrawLinesArray[c].dwIntelFlag?(h.stDrawLinesArray.push(e.stDrawLinesArray[c]),++h.linesNum):(_.stDrawLinesArray.push(e.stDrawLinesArray[c]),++_.linesNum):1==e.stDrawLinesArray[c].dwIntelFlag?(s.stDrawLinesArray.push(e.stDrawLinesArray[c]),++s.linesNum):4==e.stDrawLinesArray[c].dwIntelFlag?(this.m_nTEMDrawLinescount=0,x.stDrawLinesArray.push(e.stDrawLinesArray[c]),++x.linesNum):6==e.stDrawLinesArray[c].dwIntelFlag?(o.stDrawLinesArray.push(e.stDrawLinesArray[c]),++o.linesNum):8!=e.stDrawLinesArray[c].dwIntelFlag||1!=e.stDrawLinesArray[c].dwSubIntelFlag&&2!=e.stDrawLinesArray[c].dwSubIntelFlag?(l.stDrawLinesArray.push(e.stDrawLinesArray[c]),++l.linesNum):(f.stDrawLinesArray.push(e.stDrawLinesArray[c]),++f.linesNum);if(_.linesNum>0){if(_.absTimeStamp<=this.maxExactPrivateLineTimeStamp){var u=0;for(u=0;u<this.privateExactLinesInfo.length;u++)if(this.privateExactLinesInfo[u].absTimeStamp==_.absTimeStamp){i=!0,n=u;break}}if(i){this.privateExactLinesInfo[n].linesNum=_.linesNum;for(var d=0;d<_.linesNum;d++){this.privateExactLinesInfo[n].stDrawLinesArray[d]={},this.privateExactLinesInfo[n].stDrawLinesArray[d].vertex_num=_.stDrawLinesArray[d].vertex_num,this.privateExactLinesInfo[n].stDrawLinesArray[d].lineWidth=_.stDrawLinesArray[d].lineWidth,this.privateExactLinesInfo[n].stDrawLinesArray[d].bFill=_.stDrawLinesArray[d].bFill,this.privateExactLinesInfo[n].stDrawLinesArray[d].bLoop=_.stDrawLinesArray[d].bLoop,this.privateExactLinesInfo[n].stDrawLinesArray[d].dwMatchType=_.stDrawLinesArray[d].dwMatchType,this.privateExactLinesInfo[n].stDrawLinesArray[d].dwIntelFlag=_.stDrawLinesArray[d].dwIntelFlag,this.privateExactLinesInfo[n].stDrawLinesArray[d].dwSubIntelFlag=_.stDrawLinesArray[d].dwSubIntelFlag,this.privateExactLinesInfo[n].stDrawLinesArray[d].color={},this.privateExactLinesInfo[n].stDrawLinesArray[d].color.R=_.stDrawLinesArray[d].color.R,this.privateExactLinesInfo[n].stDrawLinesArray[d].color.G=_.stDrawLinesArray[d].color.G,this.privateExactLinesInfo[n].stDrawLinesArray[d].color.B=_.stDrawLinesArray[d].color.B,this.privateExactLinesInfo[n].stDrawLinesArray[d].color.A=_.stDrawLinesArray[d].color.A,this.privateExactLinesInfo[n].stDrawLinesArray[d].stPoint=[];for(var p=0;p<_.stDrawLinesArray[d].vertex_num;p++)this.privateExactLinesInfo[n].stDrawLinesArray[d].stPoint[p]={},this.privateExactLinesInfo[n].stDrawLinesArray[d].stPoint[p].x=_.stDrawLinesArray[d].stPoint[p].x,this.privateExactLinesInfo[n].stDrawLinesArray[d].stPoint[p].y=_.stDrawLinesArray[d].stPoint[p].y;this.privateExactLinesInfo[n].stDrawLinesArray[d].dwFillPicID=_.stDrawLinesArray[d].dwFillPicID,this.privateExactLinesInfo[n].stDrawLinesArray[d].eventid=_.stDrawLinesArray[d].dwEventID}}else this.maxExactPrivateLineTimeStamp<_.absTimeStamp&&(this.maxExactPrivateLineTimeStamp=_.absTimeStamp),this.privateExactLinesInfo.push(_)}if(i=!1,n=0,l.linesNum>0){if(this.privateNormalLinesInfo.length>=ze&&this.privateNormalLinesInfo.shift(),l.absTimeStamp<=this.maxNormalPrivateLineTimeStamp){var m=0;for(m=0;m<this.privateNormalLinesInfo.length;m++)if(this.privateNormalLinesInfo[m].absTimeStamp==l.absTimeStamp){i=!0,n=m;break}}if(i)for(var S=0;S<l.linesNum;S++)this.privateNormalLinesInfo[n].stDrawLinesArray.push(l.stDrawLinesArray[S]),++this.privateNormalLinesInfo[n].linesNum;else this.maxNormalPrivateLineTimeStamp<l.absTimeStamp&&(this.maxNormalPrivateLineTimeStamp=l.absTimeStamp),this.privateNormalLinesInfo.push(l)}if(f.linesNum>0)if(this.privateThermalLinesInfo.length>=ze&&this.privateThermalLinesInfo.shift(),0!=this.privateThermalLinesInfo.length){this.privateThermalLinesInfo[0].linesNum=f.linesNum;for(var R=0;R<f.linesNum;R++){this.privateThermalLinesInfo[0].stDrawLinesArray[R]={},this.privateThermalLinesInfo[0].stDrawLinesArray[R].vertex_num=f.stDrawLinesArray[R].vertex_num,this.privateThermalLinesInfo[0].stDrawLinesArray[R].lineWidth=f.stDrawLinesArray[R].lineWidth,this.privateThermalLinesInfo[0].stDrawLinesArray[R].bFill=f.stDrawLinesArray[R].bFill,this.privateThermalLinesInfo[0].stDrawLinesArray[R].bLoop=f.stDrawLinesArray[R].bLoop,this.privateThermalLinesInfo[0].stDrawLinesArray[R].dwMatchType=f.stDrawLinesArray[R].dwMatchType,this.privateThermalLinesInfo[0].stDrawLinesArray[R].dwIntelFlag=f.stDrawLinesArray[R].dwIntelFlag,this.privateThermalLinesInfo[0].stDrawLinesArray[R].dwSubIntelFlag=f.stDrawLinesArray[R].dwSubIntelFlag,this.privateThermalLinesInfo[0].stDrawLinesArray[R].color={},this.privateThermalLinesInfo[0].stDrawLinesArray[R].color.R=f.stDrawLinesArray[R].color.R,this.privateThermalLinesInfo[0].stDrawLinesArray[R].color.G=f.stDrawLinesArray[R].color.G,this.privateThermalLinesInfo[0].stDrawLinesArray[R].color.B=f.stDrawLinesArray[R].color.B,this.privateThermalLinesInfo[0].stDrawLinesArray[R].color.A=f.stDrawLinesArray[R].color.A,this.privateThermalLinesInfo[0].stDrawLinesArray[R].stPoint=[];for(var P=0;P<f.stDrawLinesArray[R].vertex_num;P++)this.privateThermalLinesInfo[0].stDrawLinesArray[R].stPoint[P]={},this.privateThermalLinesInfo[0].stDrawLinesArray[R].stPoint[P].x=f.stDrawLinesArray[R].stPoint[P].x,this.privateThermalLinesInfo[0].stDrawLinesArray[R].stPoint[P].y=f.stDrawLinesArray[R].stPoint[P].y}}else this.privateThermalLinesInfo.push(f);if(i=!1,n=0,h.linesNum>0){if(h.absTimeStamp<=this.maxExactRulePrivateLineTimeStamp){var y=0;for(y=0;y<this.privateExactRuleLinesInfo.length;y++)if(this.privateExactRuleLinesInfo[y].absTimeStamp==h.absTimeStamp){i=!0,n=y;break}}if(i){this.privateExactRuleLinesInfo[n].linesNum=h.linesNum;for(var b=0;b<h.linesNum;b++){this.privateExactRuleLinesInfo[n].stDrawLinesArray[b]={},this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].vertex_num=h.stDrawLinesArray[b].vertex_num,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].lineWidth=h.stDrawLinesArray[b].lineWidth,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].bFill=h.stDrawLinesArray[b].bFill,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].bLoop=h.stDrawLinesArray[b].bLoop,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].dwMatchType=h.stDrawLinesArray[b].dwMatchType,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].dwIntelFlag=h.stDrawLinesArray[b].dwIntelFlag,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].dwSubIntelFlag=h.stDrawLinesArray[b].dwSubIntelFlag,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].color={},this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].color.R=h.stDrawLinesArray[b].color.R,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].color.G=h.stDrawLinesArray[b].color.G,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].color.B=h.stDrawLinesArray[b].color.B,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].color.A=h.stDrawLinesArray[b].color.A,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].stPoint=[];for(var E=0;E<h.stDrawLinesArray[b].vertex_num;E++)this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].stPoint[E]={},this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].stPoint[E].x=h.stDrawLinesArray[b].stPoint[E].x,this.privateExactRuleLinesInfo[n].stDrawLinesArray[b].stPoint[E].y=h.stDrawLinesArray[b].stPoint[E].y}}else this.maxExactRulePrivateLineTimeStamp<h.absTimeStamp&&(this.maxExactRulePrivateLineTimeStamp=h.absTimeStamp),this.privateExactRuleLinesInfo.push(h)}if(i=!1,n=0,s.linesNum>0){if(s.absTimeStamp<=this.maxTargetPrivateLineTimeStamp){var g=0;for(g=0;g<this.privateTargetLinesInfo.length;g++)if(this.privateTargetLinesInfo[g].absTimeStamp==s.absTimeStamp){i=!0,n=g;break}}if(i){this.privateTargetLinesInfo[n].linesNum=s.linesNum;for(var C=0;C<s.linesNum;C++){this.privateTargetLinesInfo[n].stDrawLinesArray[C]={},this.privateTargetLinesInfo[n].stDrawLinesArray[C].vertex_num=s.stDrawLinesArray[C].vertex_num,this.privateTargetLinesInfo[n].stDrawLinesArray[C].lineWidth=s.stDrawLinesArray[C].lineWidth,this.privateTargetLinesInfo[n].stDrawLinesArray[C].bFill=s.stDrawLinesArray[C].bFill,this.privateTargetLinesInfo[n].stDrawLinesArray[C].bLoop=s.stDrawLinesArray[C].bLoop,this.privateTargetLinesInfo[n].stDrawLinesArray[C].dwMatchType=s.stDrawLinesArray[C].dwMatchType,this.privateTargetLinesInfo[n].stDrawLinesArray[C].dwIntelFlag=s.stDrawLinesArray[C].dwIntelFlag,this.privateTargetLinesInfo[n].stDrawLinesArray[C].dwSubIntelFlag=s.stDrawLinesArray[C].dwSubIntelFlag,this.privateTargetLinesInfo[n].stDrawLinesArray[C].color={},this.privateTargetLinesInfo[n].stDrawLinesArray[C].color.R=s.stDrawLinesArray[C].color.R,this.privateTargetLinesInfo[n].stDrawLinesArray[C].color.G=s.stDrawLinesArray[C].color.G,this.privateTargetLinesInfo[n].stDrawLinesArray[C].color.B=s.stDrawLinesArray[C].color.B,this.privateTargetLinesInfo[n].stDrawLinesArray[C].color.A=s.stDrawLinesArray[C].color.A,this.privateTargetLinesInfo[n].stDrawLinesArray[C].stPoint=[];for(var v=0;v<s.stDrawLinesArray[C].vertex_num;v++)this.privateTargetLinesInfo[n].stDrawLinesArray[C].stPoint[v]={},this.privateTargetLinesInfo[n].stDrawLinesArray[C].stPoint[v].x=s.stDrawLinesArray[C].stPoint[v].x,this.privateTargetLinesInfo[n].stDrawLinesArray[C].stPoint[v].y=s.stDrawLinesArray[C].stPoint[v].y;this.privateTargetLinesInfo[n].stDrawLinesArray[C].dwFillPicID=s.stDrawLinesArray[C].dwFillPicID,this.privateTargetLinesInfo[n].stDrawLinesArray[C].eventid=s.stDrawLinesArray[C].dwEventID}}else this.maxTargetPrivateLineTimeStamp<s.absTimeStamp&&(this.maxTargetPrivateLineTimeStamp=s.absTimeStamp),this.privateTargetLinesInfo.push(s)}if(i=!1,n=0,o.linesNum>0){if(this.privateMDLinesInfo.length>=ze&&this.privateMDLinesInfo.shift(),o.absTimeStamp<=this.maxMDPrivateLineTimeStamp){var T=0;for(T=0;T<this.privateMDLinesInfo.length;T++)if(this.privateMDLinesInfo[T].absTimeStamp==o.absTimeStamp){i=!0,n=T;break}}if(i){this.privateMDLinesInfo[n].linesNum=o.linesNum;for(var D=0;D<o.linesNum;D++){this.privateMDLinesInfo[n].stDrawLinesArray[D]={},this.privateMDLinesInfo[n].stDrawLinesArray[D].vertex_num=o.stDrawLinesArray[D].vertex_num,this.privateMDLinesInfo[n].stDrawLinesArray[D].lineWidth=o.stDrawLinesArray[D].lineWidth,this.privateMDLinesInfo[n].stDrawLinesArray[D].bFill=o.stDrawLinesArray[D].bFill,this.privateMDLinesInfo[n].stDrawLinesArray[D].bLoop=o.stDrawLinesArray[D].bLoop,this.privateMDLinesInfo[n].stDrawLinesArray[D].dwMatchType=o.stDrawLinesArray[D].dwMatchType,this.privateMDLinesInfo[n].stDrawLinesArray[D].dwIntelFlag=o.stDrawLinesArray[D].dwIntelFlag,this.privateMDLinesInfo[n].stDrawLinesArray[D].dwSubIntelFlag=o.stDrawLinesArray[D].dwSubIntelFlag,this.privateMDLinesInfo[n].stDrawLinesArray[D].color={},this.privateMDLinesInfo[n].stDrawLinesArray[D].color.R=o.stDrawLinesArray[D].color.R,this.privateMDLinesInfo[n].stDrawLinesArray[D].color.G=o.stDrawLinesArray[D].color.G,this.privateMDLinesInfo[n].stDrawLinesArray[D].color.B=o.stDrawLinesArray[D].color.B,this.privateMDLinesInfo[n].stDrawLinesArray[D].color.A=o.stDrawLinesArray[D].color.A,this.privateMDLinesInfo[n].stDrawLinesArray[D].stPoint=[];for(var A=0;A<o.stDrawLinesArray[D].vertex_num;A++)this.privateMDLinesInfo[n].stDrawLinesArray[D].stPoint[A]={},this.privateMDLinesInfo[n].stDrawLinesArray[D].stPoint[A].x=o.stDrawLinesArray[D].stPoint[A].x,this.privateMDLinesInfo[n].stDrawLinesArray[D].stPoint[A].y=o.stDrawLinesArray[D].stPoint[A].y}}else this.maxMDPrivateLineTimeStamp<o.absTimeStamp&&(this.maxMDPrivateLineTimeStamp=o.absTimeStamp),this.privateMDLinesInfo.push(o)}if(i=!1,n=0,x.linesNum>0){if(this.privateTemLinesInfo.length>=ze&&this.privateTemLinesInfo.shift(),x.absTimeStamp<=this.maxTemPrivateLineTimeStamp){var I=0;for(I=0;I<this.privateTemLinesInfo.length;I++)if(this.privateTemLinesInfo[I].absTimeStamp==x.absTimeStamp){i=!0,n=I;break}}if(i){this.privateTemLinesInfo[n].linesNum=x.linesNum;for(var M=0;M<x.linesNum;M++){this.privateTemLinesInfo[n].stDrawLinesArray[M]={},this.privateTemLinesInfo[n].stDrawLinesArray[M].vertex_num=x.stDrawLinesArray[M].vertex_num,this.privateTemLinesInfo[n].stDrawLinesArray[M].lineWidth=x.stDrawLinesArray[M].lineWidth,this.privateTemLinesInfo[n].stDrawLinesArray[M].bFill=x.stDrawLinesArray[M].bFill,this.privateTemLinesInfo[n].stDrawLinesArray[M].bLoop=x.stDrawLinesArray[M].bLoop,this.privateTemLinesInfo[n].stDrawLinesArray[M].dwMatchType=x.stDrawLinesArray[M].dwMatchType,this.privateTemLinesInfo[n].stDrawLinesArray[M].dwIntelFlag=x.stDrawLinesArray[M].dwIntelFlag,this.privateTemLinesInfo[n].stDrawLinesArray[M].dwSubIntelFlag=x.stDrawLinesArray[M].dwSubIntelFlag,this.privateTemLinesInfo[n].stDrawLinesArray[M].color={},this.privateTemLinesInfo[n].stDrawLinesArray[M].color.R=x.stDrawLinesArray[M].color.R,this.privateTemLinesInfo[n].stDrawLinesArray[M].color.G=x.stDrawLinesArray[M].color.G,this.privateTemLinesInfo[n].stDrawLinesArray[M].color.B=x.stDrawLinesArray[M].color.B,this.privateTemLinesInfo[n].stDrawLinesArray[M].color.A=x.stDrawLinesArray[M].color.A,this.privateTemLinesInfo[n].stDrawLinesArray[M].stPoint=[];for(var L=0;L<x.stDrawLinesArray[M].vertex_num;L++)this.privateTemLinesInfo[n].stDrawLinesArray[M].stPoint[L]={},this.privateTemLinesInfo[n].stDrawLinesArray[M].stPoint[L].x=x.stDrawLinesArray[M].stPoint[L].x,this.privateTemLinesInfo[n].stDrawLinesArray[M].stPoint[L].y=x.stDrawLinesArray[M].stPoint[L].y}}else this.maxTemPrivateLineTimeStamp<x.absTimeStamp&&(this.maxTemPrivateLineTimeStamp=x.absTimeStamp),this.privateTemLinesInfo.push(x)}}if(t.nFontsNum>0){var w={nFontsNum:0};w.absTimeStamp=t.absTimeStamp,w.stDrawFontsArray=[];var O={nFontsNum:0};O.absTimeStamp=t.absTimeStamp,O.stDrawFontsArray=[];var B={nFontsNum:0};B.absTimeStamp=t.absTimeStamp,B.stDrawFontsArray=[];var k={nFontsNum:0};k.absTimeStamp=t.absTimeStamp,k.stDrawFontsArray=[];var N={nFontsNum:0};N.absTimeStamp=t.absTimeStamp,N.stDrawFontsArray=[];var V={nFontsNum:0};V.absTimeStamp=t.absTimeStamp,V.stDrawFontsArray=[];for(var U=0;U<t.nFontsNum;U++)1==t.stDrawFontsArray[U].dwMatchType?1==t.stDrawFontsArray[U].dwIntelFlag?(N.stDrawFontsArray.push(t.stDrawFontsArray[U]),++N.nFontsNum):3==t.stDrawFontsArray[U].dwIntelFlag&&(V.stDrawFontsArray.push(t.stDrawFontsArray[U]),++V.nFontsNum):1==t.stDrawFontsArray[U].dwIntelFlag?(w.stDrawFontsArray.push(t.stDrawFontsArray[U]),++w.nFontsNum):4==t.stDrawFontsArray[U].dwIntelFlag?(this.m_nTEMDrawFontscount=0,O.stDrawFontsArray.push(t.stDrawFontsArray[U]),++O.nFontsNum):3==t.stDrawFontsArray[U].dwIntelFlag?t.stDrawFontsArray[U].NeedClearNormalPos?this.curNormalPOSFontsInfo=null:(k.stDrawFontsArray.push(t.stDrawFontsArray[U]),++k.nFontsNum):(B.stDrawFontsArray.push(t.stDrawFontsArray[U]),++B.nFontsNum);if(i=!1,n=0,V.nFontsNum>0){if(this.privateExactPOSFontsInfo.length>=ze&&this.privateExactPOSFontsInfo.shift(),V.absTimeStamp<=this.maxExactPOSPrivateFontTimeStamp){var H=0;for(H=0;H<this.privateExactPOSFontsInfo.length;H++)if(this.privateExactPOSFontsInfo[H].absTimeStamp==V.absTimeStamp){i=!0,n=H;break}}if(i){this.privateExactPOSFontsInfo[n].nFontsNum=V.nFontsNum;for(var W=0;W<V.nFontsNum;W++)this.privateExactPOSFontsInfo[n].stDrawFontsArray[W]={},this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].nFontSizeW=V.stDrawFontsArray[W].nFontSizeW,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].nFontSizeH=V.stDrawFontsArray[W].nFontSizeH,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].dwMatchType=V.stDrawFontsArray[W].dwMatchType,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].dwIntelFlag=V.stDrawFontsArray[W].dwIntelFlag,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].dwSubIntelFlag=V.stDrawFontsArray[W].dwSubIntelFlag,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].color={},this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].color.R=V.stDrawFontsArray[W].color.R,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].color.G=V.stDrawFontsArray[W].color.G,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].color.B=V.stDrawFontsArray[W].color.B,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].color.A=V.stDrawFontsArray[W].color.A,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].stPoint={},this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].stPoint.x=V.stDrawFontsArray[W].stPoint.x,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].stPoint.y=V.stDrawFontsArray[W].stPoint.y,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].fontString=V.stDrawFontsArray[W].fontString,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].BGcolor={},this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].BGcolor.R=V.stDrawFontsArray[W].BGcolor.R,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].BGcolor.G=V.stDrawFontsArray[W].BGcolor.G,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].BGcolor.B=V.stDrawFontsArray[W].BGcolor.B,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].BGcolor.A=V.stDrawFontsArray[W].BGcolor.A,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].bBackGround=V.stDrawFontsArray[W].bBackGround,this.privateExactPOSFontsInfo[n].stDrawFontsArray[W].EventID=V.stDrawFontsArray[W].dwEventID}else this.maxExactPOSPrivateFontTimeStamp<V.absTimeStamp&&(this.maxExactPOSPrivateFontTimeStamp=V.absTimeStamp),this.privateExactPOSFontsInfo.push(V)}if(i=!1,n=0,N.nFontsNum>0){if(this.privateExactFontsInfo.length>=ze&&this.privateExactFontsInfo.shift(),N.absTimeStamp<=this.maxExactPrivateFontTimeStamp){var Y=0;for(Y=0;Y<this.privateExactFontsInfo.length;Y++)if(this.privateExactFontsInfo[Y].absTimeStamp==N.absTimeStamp){i=!0,n=Y;break}}if(i)for(var G=0;G<N.nFontsNum;G++)this.privateExactFontsInfo[n].stDrawFontsArray.push(N.stDrawFontsArray[G]),++this.privateExactFontsInfo[n].nFontsNum;else this.maxExactPrivateFontTimeStamp<N.absTimeStamp&&(this.maxExactPrivateFontTimeStamp=N.absTimeStamp),this.privateExactFontsInfo.push(N)}if(i=!1,n=0,B.nFontsNum>0){if(this.privateNormalFontsInfo.length>=ze&&this.privateNormalFontsInfo.shift(),B.absTimeStamp<=this.maxNormalPrivateFontTimeStamp){var X=0;for(X=0;X<this.privateNormalFontsInfo.length;X++)if(this.privateNormalFontsInfo[X].absTimeStamp==B.absTimeStamp){i=!0,n=X;break}}if(i)for(var J=0;J<B.nFontsNum;J++)this.privateNormalFontsInfo[n].stDrawFontsArray.push(B.stDrawFontsArray[J]),++this.privateNormalFontsInfo[n].nFontsNum;else this.maxNormalPrivateFontTimeStamp<B.absTimeStamp&&(this.maxNormalPrivateFontTimeStamp=B.absTimeStamp),this.privateNormalFontsInfo.push(B)}if(k.nFontsNum>0)if(null==this.curNormalPOSFontsInfo)this.curNormalPOSFontsInfo=k;else{this.curNormalPOSFontsInfo.nFontsNum=k.nFontsNum,this.curNormalPOSFontsInfo.absTimeStamp=k.absTimeStamp;for(var Z=0;Z<k.nFontsNum;Z++)this.curNormalPOSFontsInfo.stDrawFontsArray[Z]={},this.curNormalPOSFontsInfo.stDrawFontsArray[Z].nFontSizeW=k.stDrawFontsArray[Z].nFontSizeW,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].nFontSizeH=k.stDrawFontsArray[Z].nFontSizeH,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].dwMatchType=k.stDrawFontsArray[Z].dwMatchType,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].dwIntelFlag=k.stDrawFontsArray[Z].dwIntelFlag,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].dwSubIntelFlag=k.stDrawFontsArray[Z].dwSubIntelFlag,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].color={},this.curNormalPOSFontsInfo.stDrawFontsArray[Z].color.R=k.stDrawFontsArray[Z].color.R,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].color.G=k.stDrawFontsArray[Z].color.G,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].color.B=k.stDrawFontsArray[Z].color.B,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].color.A=k.stDrawFontsArray[Z].color.A,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].stPoint={},this.curNormalPOSFontsInfo.stDrawFontsArray[Z].stPoint.x=k.stDrawFontsArray[Z].stPoint.x,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].stPoint.y=k.stDrawFontsArray[Z].stPoint.y,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].fontString=k.stDrawFontsArray[Z].fontString,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].BGcolor={},this.curNormalPOSFontsInfo.stDrawFontsArray[Z].BGcolor.R=k.stDrawFontsArray[Z].BGcolor.R,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].BGcolor.G=k.stDrawFontsArray[Z].BGcolor.G,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].BGcolor.B=k.stDrawFontsArray[Z].BGcolor.B,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].BGcolor.A=k.stDrawFontsArray[Z].BGcolor.A,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].bBackGround=k.stDrawFontsArray[Z].bBackGround,this.curNormalPOSFontsInfo.stDrawFontsArray[Z].EventID=k.stDrawFontsArray[Z].dwEventID}if(i=!1,n=0,w.nFontsNum>0){if(this.privateTargetFontsInfo.length>=ze&&this.privateTargetFontsInfo.shift(),w.absTimeStamp<=this.maxTargetPrivateFontTimeStamp){var j=0;for(j=0;j<this.privateTargetFontsInfo.length;j++)if(this.privateTargetFontsInfo[j].absTimeStamp==w.absTimeStamp){i=!0,n=j;break}}if(i){this.privateTargetFontsInfo[n].nFontsNum=w.nFontsNum;for(var z=0;z<w.nFontsNum;z++)this.privateTargetFontsInfo[n].stDrawFontsArray[z]={},this.privateTargetFontsInfo[n].stDrawFontsArray[z].nFontSizeW=w.stDrawFontsArray[z].nFontSizeW,this.privateTargetFontsInfo[n].stDrawFontsArray[z].nFontSizeH=w.stDrawFontsArray[z].nFontSizeH,this.privateTargetFontsInfo[n].stDrawFontsArray[z].dwMatchType=w.stDrawFontsArray[z].dwMatchType,this.privateTargetFontsInfo[n].stDrawFontsArray[z].dwIntelFlag=w.stDrawFontsArray[z].dwIntelFlag,this.privateTargetFontsInfo[n].stDrawFontsArray[z].dwSubIntelFlag=w.stDrawFontsArray[z].dwSubIntelFlag,this.privateTargetFontsInfo[n].stDrawFontsArray[z].color={},this.privateTargetFontsInfo[n].stDrawFontsArray[z].color.R=w.stDrawFontsArray[z].color.R,this.privateTargetFontsInfo[n].stDrawFontsArray[z].color.G=w.stDrawFontsArray[z].color.G,this.privateTargetFontsInfo[n].stDrawFontsArray[z].color.B=w.stDrawFontsArray[z].color.B,this.privateTargetFontsInfo[n].stDrawFontsArray[z].color.A=w.stDrawFontsArray[z].color.A,this.privateTargetFontsInfo[n].stDrawFontsArray[z].stPoint={},this.privateTargetFontsInfo[n].stDrawFontsArray[z].stPoint.x=w.stDrawFontsArray[z].stPoint.x,this.privateTargetFontsInfo[n].stDrawFontsArray[z].stPoint.y=w.stDrawFontsArray[z].stPoint.y,this.privateTargetFontsInfo[n].stDrawFontsArray[z].fontString=w.stDrawFontsArray[z].fontString,this.privateTargetFontsInfo[n].stDrawFontsArray[z].BGcolor={},this.privateTargetFontsInfo[n].stDrawFontsArray[z].BGcolor.R=w.stDrawFontsArray[z].BGcolor.R,this.privateTargetFontsInfo[n].stDrawFontsArray[z].BGcolor.G=w.stDrawFontsArray[z].BGcolor.G,this.privateTargetFontsInfo[n].stDrawFontsArray[z].BGcolor.B=w.stDrawFontsArray[z].BGcolor.B,this.privateTargetFontsInfo[n].stDrawFontsArray[z].BGcolor.A=w.stDrawFontsArray[z].BGcolor.A,this.privateTargetFontsInfo[n].stDrawFontsArray[z].bBackGround=w.stDrawFontsArray[z].bBackGround}else this.maxTargetPrivateFontTimeStamp<w.absTimeStamp&&(this.maxTargetPrivateFontTimeStamp=w.absTimeStamp),this.privateTargetFontsInfo.push(w)}if(i=!1,n=0,O.nFontsNum>0){if(this.privateTemFontsInfo.length>=ze&&this.privateTemFontsInfo.shift(),O.absTimeStamp<=this.maxTemPrivateFontTimeStamp){var K=0;for(K=0;K<this.privateTemFontsInfo.length;K++)if(this.privateTemFontsInfo[K].absTimeStamp==O.absTimeStamp){i=!0,n=K;break}}if(i){this.privateTemFontsInfo[n].nFontsNum=O.nFontsNum;for(var q=0;q<O.nFontsNum;q++)this.privateTemFontsInfo[n].stDrawFontsArray[q]={},this.privateTemFontsInfo[n].stDrawFontsArray[q].nFontSizeW=O.stDrawFontsArray[q].nFontSizeW,this.privateTemFontsInfo[n].stDrawFontsArray[q].nFontSizeH=O.stDrawFontsArray[q].nFontSizeH,this.privateTemFontsInfo[n].stDrawFontsArray[q].dwMatchType=O.stDrawFontsArray[q].dwMatchType,this.privateTemFontsInfo[n].stDrawFontsArray[q].dwIntelFlag=O.stDrawFontsArray[q].dwIntelFlag,this.privateTemFontsInfo[n].stDrawFontsArray[q].dwSubIntelFlag=O.stDrawFontsArray[q].dwSubIntelFlag,this.privateTemFontsInfo[n].stDrawFontsArray[q].color={},this.privateTemFontsInfo[n].stDrawFontsArray[q].color.R=O.stDrawFontsArray[q].color.R,this.privateTemFontsInfo[n].stDrawFontsArray[q].color.G=O.stDrawFontsArray[q].color.G,this.privateTemFontsInfo[n].stDrawFontsArray[q].color.B=O.stDrawFontsArray[q].color.B,this.privateTemFontsInfo[n].stDrawFontsArray[q].color.A=O.stDrawFontsArray[q].color.A,this.privateTemFontsInfo[n].stDrawFontsArray[q].stPoint={},this.privateTemFontsInfo[n].stDrawFontsArray[q].stPoint.x=O.stDrawFontsArray[q].stPoint.x,this.privateTemFontsInfo[n].stDrawFontsArray[q].stPoint.y=O.stDrawFontsArray[q].stPoint.y,this.privateTemFontsInfo[n].stDrawFontsArray[q].fontString=O.stDrawFontsArray[q].fontString}else this.maxTemPrivateFontTimeStamp<O.absTimeStamp&&(this.maxTemPrivateFontTimeStamp=O.absTimeStamp),this.privateTemFontsInfo.push(O)}}if(i=!1,n=0,4==a.nPixelFormat){if(this.privateImageInfo.length>=ze&&this.privateImageInfo.shift(),a.absTimeStamp<=this.maxPrivateImageTimeStamp){var Q=0;for(Q=0;Q<this.privateImageInfo.length;Q++)if(this.privateImageInfo[Q].absTimeStamp==a.absTimeStamp){i=!0,n=Q;break}}i?(this.privateImageInfo[n].nWidth=a.nWidth,this.privateImageInfo[n].nHeight=a.nHeight,this.privateImageInfo[n].pstRect={},this.privateImageInfo[n].pstRect.fTop=a.pstRect.fTop,this.privateImageInfo[n].pstRect.fBottom=a.pstRect.fBottom,this.privateImageInfo[n].pstRect.fLeft=a.pstRect.fLeft,this.privateImageInfo[n].pstRect.fRight=a.pstRect.fRight,this.privateImageInfo[n].nPixelFormat=a.nPixelFormat,this.privateImageInfo[n].fAlpha=a.fAlpha,this.privateImageInfo[n].picImageData=a.picImageData):(this.maxPrivateImageTimeStamp<a.absTimeStamp&&(this.maxPrivateImageTimeStamp=a.absTimeStamp),this.privateImageInfo.push(a))}else if(256==a.nPixelFormat&&null!=a.picImageData)try{var $=new ImageDecoder({data:a.picImageData,type:"image/png"});$.tracks.ready.then((function(){return $.completed})).then((function(){return $.decode({frameIndex:0})})).then((function(e){r.privatePNGImageInfo.length>=20&&r.privatePNGImageInfo.shift();var t=r.privatePNGImageInfo.findIndex((function(e){return e.PicID===a.PicID}));-1!==t?r.privatePNGImageInfo[t]=F(F({},r.privatePNGImageInfo[t]),{},{PicID:a.PicID,videoStream:e.image,nImageWidth:e.image.displayWidth,nImageHeight:e.image.displayHeight,pstRectPos:{fTop:a.pstRect.fTop,fBottom:a.pstRect.fBottom,fLeft:a.pstRect.fLeft,fRight:a.pstRect.fRight},nPixelFormat:a.nPixelFormat,fAlpha:a.fAlpha}):r.privatePNGImageInfo.push({PicID:a.PicID,videoStream:e.image,nImageWidth:e.image.displayWidth,nImageHeight:e.image.displayHeight,pstRectPos:{fTop:a.pstRect.fTop,fBottom:a.pstRect.fBottom,fLeft:a.pstRect.fLeft,fRight:a.pstRect.fRight},nPixelFormat:a.nPixelFormat,fAlpha:a.fAlpha})})).catch((function(e){console.error("Image processing failed:",e)}))}catch(e){console.error("ImageDecoder initialization failed:",e)}return 1}},{key:"CheckLinesInfo",value:function(){if(this.DrawlinesParamArray.splice(0,this.DrawlinesParamArray.length),this.DrawlinesParamArrayAllPointNum=0,this.bDrawlinesParamArrayFill=0,this.DrawMosaiclinesParamArray.splice(0,this.DrawMosaiclinesParamArray.length),this.DrawTargetlinesParamArray.splice(0,this.DrawTargetlinesParamArray.length),null!=this.curNormalLinesInfo)for(var e=[],t=0,a=0;a<this.curNormalLinesInfo.linesNum;a++)if(2==this.curNormalLinesInfo.stDrawLinesArray[a].dwIntelFlag&&1==this.m_bEnableIVSEx||7==this.curNormalLinesInfo.stDrawLinesArray[a].dwIntelFlag&&1==this.m_bEnableFIREEx&&(1==this.curNormalLinesInfo.stDrawLinesArray[a].dwSubIntelFlag&&1==this.m_bEnableFireDis||4==this.curNormalLinesInfo.stDrawLinesArray[a].dwSubIntelFlag&&1==this.m_bEnableFireMaxPos)||8==this.curNormalLinesInfo.stDrawLinesArray[a].dwIntelFlag&&1==this.m_bEnableThermal&&4==this.curNormalLinesInfo.stDrawLinesArray[a].dwSubIntelFlag&&1==this.m_bEnableThermalTargetGas||9==this.curNormalLinesInfo.stDrawLinesArray[a].dwIntelFlag&&1==this.m_bEnableTrackEx&&(1==this.curNormalLinesInfo.stDrawLinesArray[a].dwSubIntelFlag&&1==this.m_bEnableTrackPeople||2==this.curNormalLinesInfo.stDrawLinesArray[a].dwSubIntelFlag&&1==this.m_bEnableTrackVehicle)){e[t]={},e[t].nPointNum=this.curNormalLinesInfo.stDrawLinesArray[a].vertex_num,e[t].nLineWidth=this.curNormalLinesInfo.stDrawLinesArray[a].lineWidth,this.curNormalLinesInfo.stDrawLinesArray[a].bFill,e[t].bLoop=this.curNormalLinesInfo.stDrawLinesArray[a].bLoop,e[t].pstColor={},e[t].pstColor.fR=this.curNormalLinesInfo.stDrawLinesArray[a].color.R,e[t].pstColor.fG=this.curNormalLinesInfo.stDrawLinesArray[a].color.G,e[t].pstColor.fB=this.curNormalLinesInfo.stDrawLinesArray[a].color.B,e[t].pstColor.fA=this.curNormalLinesInfo.stDrawLinesArray[a].color.A,e[t].pstPoints=[];for(var r=0;r<e[t].nPointNum;r++)e[t].pstPoints[r]={},e[t].pstPoints[r].fX=this.curNormalLinesInfo.stDrawLinesArray[a].stPoint[r].x,e[t].pstPoints[r].fY=this.curNormalLinesInfo.stDrawLinesArray[a].stPoint[r].y;e[t].dwMosaictype=this.curNormalLinesInfo.stDrawLinesArray[a].dwMosaictype,e[t].dwMosaictype?this.DrawMosaiclinesParamArray.push(e[t]):(this.DrawlinesParamArray.push(e[t]),this.DrawlinesParamArrayAllPointNum+=e[t].nPointNum,e[t].nPointNum),++t}if(null!=this.curThermalLinesInfo)for(var i=[],n=0,s=0;s<this.curThermalLinesInfo.linesNum;s++)if(8==this.curThermalLinesInfo.stDrawLinesArray[s].dwIntelFlag&&1==this.m_bEnableThermal&&(1==this.curThermalLinesInfo.stDrawLinesArray[s].dwSubIntelFlag&&1==this.m_bEnableThermalFireMask||2==this.curThermalLinesInfo.stDrawLinesArray[s].dwSubIntelFlag&&1==this.m_bEnableThermalRuleGas)){i[n]={},i[n].nPointNum=this.curThermalLinesInfo.stDrawLinesArray[s].vertex_num,i[n].nLineWidth=this.curThermalLinesInfo.stDrawLinesArray[s].lineWidth,this.curThermalLinesInfo.stDrawLinesArray[s].bFill,i[n].bLoop=this.curThermalLinesInfo.stDrawLinesArray[s].bLoop,i[n].pstColor={},i[n].pstColor.fR=this.curThermalLinesInfo.stDrawLinesArray[s].color.R,i[n].pstColor.fG=this.curThermalLinesInfo.stDrawLinesArray[s].color.G,i[n].pstColor.fB=this.curThermalLinesInfo.stDrawLinesArray[s].color.B,i[n].pstColor.fA=this.curThermalLinesInfo.stDrawLinesArray[s].color.A,i[n].pstPoints=[];for(var x=0;x<i[n].nPointNum;x++)i[n].pstPoints[x]={},i[n].pstPoints[x].fX=this.curThermalLinesInfo.stDrawLinesArray[s].stPoint[x].x,i[n].pstPoints[x].fY=this.curThermalLinesInfo.stDrawLinesArray[s].stPoint[x].y;this.DrawlinesParamArray.push(i[n]),this.DrawlinesParamArrayAllPointNum+=i[n].nPointNum,i[n].nPointNum,++n}if(null!=this.curTemLinesInfo)for(var o=[],l=0,_=0;_<this.curTemLinesInfo.linesNum;_++)if(1==this.m_bEnableTEMEx&&(1==this.curTemLinesInfo.stDrawLinesArray[_].dwSubIntelFlag&&1==this.m_bEnableTEMBox||2==this.curTemLinesInfo.stDrawLinesArray[_].dwSubIntelFlag&&1==this.m_bEnableTEMLine||4==this.curTemLinesInfo.stDrawLinesArray[_].dwSubIntelFlag&&1==this.m_bEnableTEMPoint)){o[l]={},o[l].nPointNum=this.curTemLinesInfo.stDrawLinesArray[_].vertex_num,o[l].nLineWidth=this.curTemLinesInfo.stDrawLinesArray[_].lineWidth,this.curTemLinesInfo.stDrawLinesArray[_].bFill,o[l].bLoop=this.curTemLinesInfo.stDrawLinesArray[_].bLoop,o[l].pstColor={},o[l].pstColor.fR=this.curTemLinesInfo.stDrawLinesArray[_].color.R,o[l].pstColor.fG=this.curTemLinesInfo.stDrawLinesArray[_].color.G,o[l].pstColor.fB=this.curTemLinesInfo.stDrawLinesArray[_].color.B,o[l].pstColor.fA=this.curTemLinesInfo.stDrawLinesArray[_].color.A,o[l].pstPoints=[];for(var h=0;h<o[l].nPointNum;h++)o[l].pstPoints[h]={},o[l].pstPoints[h].fX=this.curTemLinesInfo.stDrawLinesArray[_].stPoint[h].x,o[l].pstPoints[h].fY=this.curTemLinesInfo.stDrawLinesArray[_].stPoint[h].y;this.DrawlinesParamArray.push(o[l]),this.DrawlinesParamArrayAllPointNum+=o[l].nPointNum,o[l].nPointNum,++l}if(null!=this.curTargetLinesInfo)for(var f=[],c=0,u=0;u<this.curTargetLinesInfo.linesNum;u++)if(1==this.m_bEnableIVSEx){f[c]={},f[c].nPointNum=this.curTargetLinesInfo.stDrawLinesArray[u].vertex_num,f[c].nLineWidth=this.curTargetLinesInfo.stDrawLinesArray[u].lineWidth,this.curTargetLinesInfo.stDrawLinesArray[u].bFill,f[c].bLoop=this.curTargetLinesInfo.stDrawLinesArray[u].bLoop,f[c].pstColor={},f[c].pstColor.fR=this.curTargetLinesInfo.stDrawLinesArray[u].color.R,f[c].pstColor.fG=this.curTargetLinesInfo.stDrawLinesArray[u].color.G,f[c].pstColor.fB=this.curTargetLinesInfo.stDrawLinesArray[u].color.B,f[c].pstColor.fA=this.curTargetLinesInfo.stDrawLinesArray[u].color.A,f[c].pstPoints=[];for(var d=0;d<f[c].nPointNum;d++)f[c].pstPoints[d]={},f[c].pstPoints[d].fX=this.curTargetLinesInfo.stDrawLinesArray[u].stPoint[d].x,f[c].pstPoints[d].fY=this.curTargetLinesInfo.stDrawLinesArray[u].stPoint[d].y;f[c].dwFillPicID=this.curTargetLinesInfo.stDrawLinesArray[u].dwFillPicID,f[c].eventid=this.curTargetLinesInfo.stDrawLinesArray[u].eventid,this.DrawTargetlinesParamArray.push(f[c]),++c}if(null!=this.curMDLinesInfo)for(var p=[],m=0,S=0;S<this.curMDLinesInfo.linesNum;S++)if(1==this.m_bEnableMDEx){p[m]={},p[m].nPointNum=this.curMDLinesInfo.stDrawLinesArray[S].vertex_num,p[m].nLineWidth=this.curMDLinesInfo.stDrawLinesArray[S].lineWidth,this.curMDLinesInfo.stDrawLinesArray[S].bFill,p[m].bLoop=this.curMDLinesInfo.stDrawLinesArray[S].bLoop,p[m].pstColor={},p[m].pstColor.fR=this.curMDLinesInfo.stDrawLinesArray[S].color.R,p[m].pstColor.fG=this.curMDLinesInfo.stDrawLinesArray[S].color.G,p[m].pstColor.fB=this.curMDLinesInfo.stDrawLinesArray[S].color.B,p[m].pstColor.fA=this.curMDLinesInfo.stDrawLinesArray[S].color.A,p[m].pstPoints=[];for(var R=0;R<p[m].nPointNum;R++)p[m].pstPoints[R]={},p[m].pstPoints[R].fX=this.curMDLinesInfo.stDrawLinesArray[S].stPoint[R].x,p[m].pstPoints[R].fY=this.curMDLinesInfo.stDrawLinesArray[S].stPoint[R].y;this.DrawlinesParamArray.push(p[m]),this.DrawlinesParamArrayAllPointNum+=p[m].nPointNum,p[m].nPointNum,++m}if(null!=this.curExactLinesInfo)for(var P=[],y=0,b=0;b<this.curExactLinesInfo.linesNum;b++)if(1==this.curExactLinesInfo.stDrawLinesArray[b].dwIntelFlag&&1==this.m_bEnableIVSEx||9==this.curExactLinesInfo.stDrawLinesArray[b].dwIntelFlag&&1==this.m_bEnableTrackEx&&(1==this.curExactLinesInfo.stDrawLinesArray[b].dwSubIntelFlag&&1==this.m_bEnableTrackPeople||2==this.curExactLinesInfo.stDrawLinesArray[b].dwSubIntelFlag&&1==this.m_bEnableTrackVehicle)){P[y]={},P[y].nPointNum=this.curExactLinesInfo.stDrawLinesArray[b].vertex_num,P[y].nLineWidth=this.curExactLinesInfo.stDrawLinesArray[b].lineWidth,this.curExactLinesInfo.stDrawLinesArray[b].bFill,P[y].bLoop=this.curExactLinesInfo.stDrawLinesArray[b].bLoop,P[y].pstColor={},P[y].pstColor.fR=this.curExactLinesInfo.stDrawLinesArray[b].color.R,P[y].pstColor.fG=this.curExactLinesInfo.stDrawLinesArray[b].color.G,P[y].pstColor.fB=this.curExactLinesInfo.stDrawLinesArray[b].color.B,P[y].pstColor.fA=this.curExactLinesInfo.stDrawLinesArray[b].color.A,P[y].pstPoints=[];for(var E=0;E<P[y].nPointNum;E++)P[y].pstPoints[E]={},P[y].pstPoints[E].fX=this.curExactLinesInfo.stDrawLinesArray[b].stPoint[E].x,P[y].pstPoints[E].fY=this.curExactLinesInfo.stDrawLinesArray[b].stPoint[E].y;P[y].dwFillPicID=this.curExactLinesInfo.stDrawLinesArray[b].dwFillPicID,P[y].eventid=this.curExactLinesInfo.stDrawLinesArray[b].eventid,P[y].dwMosaictype=this.curExactLinesInfo.stDrawLinesArray[b].dwMosaictype,P[y].dwMosaictype?this.DrawMosaiclinesParamArray.push(P[y]):this.DrawTargetlinesParamArray.push(P[y]),++y}if(null!=this.curExactRuleLinesInfo)for(var g=[],F=0,C=0;C<this.curExactRuleLinesInfo.linesNum;C++)if(1==this.m_bEnableIVSEx){g[F]={},g[F].nPointNum=this.curExactRuleLinesInfo.stDrawLinesArray[C].vertex_num,g[F].nLineWidth=this.curExactRuleLinesInfo.stDrawLinesArray[C].lineWidth,this.curExactRuleLinesInfo.stDrawLinesArray[C].bFill,g[F].bLoop=this.curExactRuleLinesInfo.stDrawLinesArray[C].bLoop,g[F].pstColor={},g[F].pstColor.fR=this.curExactRuleLinesInfo.stDrawLinesArray[C].color.R,g[F].pstColor.fG=this.curExactRuleLinesInfo.stDrawLinesArray[C].color.G,g[F].pstColor.fB=this.curExactRuleLinesInfo.stDrawLinesArray[C].color.B,g[F].pstColor.fA=this.curExactRuleLinesInfo.stDrawLinesArray[C].color.A,g[F].pstPoints=[];for(var v=0;v<g[F].nPointNum;v++)g[F].pstPoints[v]={},g[F].pstPoints[v].fX=this.curExactRuleLinesInfo.stDrawLinesArray[C].stPoint[v].x,g[F].pstPoints[v].fY=this.curExactRuleLinesInfo.stDrawLinesArray[C].stPoint[v].y;this.DrawlinesParamArray.push(g[F]),this.DrawlinesParamArrayAllPointNum+=g[F].nPointNum,g[F].nPointNum,++F}}},{key:"CheckFontsInfo",value:function(){if(this.DrawFontParamArray.splice(0,this.DrawFontParamArray.length),this.DrawPOSFontsParamArray.splice(0,this.DrawPOSFontsParamArray.length),null!=this.curNormalFontsInfo)for(var e=[],t=0,a=0;a<this.curNormalFontsInfo.nFontsNum;a++)7==this.curNormalFontsInfo.stDrawFontsArray[a].dwIntelFlag&&1==this.m_bEnableFIREEx&&(1==this.curNormalFontsInfo.stDrawFontsArray[a].dwSubIntelFlag&&1==this.m_bEnableFireDis||8==this.curNormalFontsInfo.stDrawFontsArray[a].dwSubIntelFlag&&1==this.m_bEnableFireDistance)&&(e[t]={},e[t].pString=this.curNormalFontsInfo.stDrawFontsArray[a].fontString,e[t].nFontWidth=this.curNormalFontsInfo.stDrawFontsArray[a].nFontSizeW,e[t].nFontHeight=this.curNormalFontsInfo.stDrawFontsArray[a].nFontSizeH,e[t].pstStartPos={},e[t].pstStartPos.fX=this.curNormalFontsInfo.stDrawFontsArray[a].stPoint.x,e[t].pstStartPos.fY=this.curNormalFontsInfo.stDrawFontsArray[a].stPoint.y,e[t].pstFontColor={},e[t].pstFontColor.fR=this.curNormalFontsInfo.stDrawFontsArray[a].color.R,e[t].pstFontColor.fG=this.curNormalFontsInfo.stDrawFontsArray[a].color.G,e[t].pstFontColor.fB=this.curNormalFontsInfo.stDrawFontsArray[a].color.B,e[t].pstFontColor.fA=this.curNormalFontsInfo.stDrawFontsArray[a].color.A,e[t].bBackGround=!1,e[t].pstBGColor=null,e[t].fRotateAngle=0,e[t].pFontFamily="sans-serif",this.DrawFontParamArray.push(e[t]),++t);if(null!=this.curNormalPOSFontsInfo)for(var r=[],i=0,n=0;n<this.curNormalPOSFontsInfo.nFontsNum;n++)1==this.m_bDisPos&&(r[i]={},r[i].pString=this.curNormalPOSFontsInfo.stDrawFontsArray[n].fontString,r[i].nFontWidth=this.curNormalPOSFontsInfo.stDrawFontsArray[n].nFontSizeW,r[i].nFontHeight=this.curNormalPOSFontsInfo.stDrawFontsArray[n].nFontSizeH,r[i].pstStartPos={},r[i].pstStartPos.fX=this.curNormalPOSFontsInfo.stDrawFontsArray[n].stPoint.x,r[i].pstStartPos.fY=this.curNormalPOSFontsInfo.stDrawFontsArray[n].stPoint.y,r[i].pstFontColor={},r[i].pstFontColor.fR=this.curNormalPOSFontsInfo.stDrawFontsArray[n].color.R,r[i].pstFontColor.fG=this.curNormalPOSFontsInfo.stDrawFontsArray[n].color.G,r[i].pstFontColor.fB=this.curNormalPOSFontsInfo.stDrawFontsArray[n].color.B,r[i].pstFontColor.fA=this.curNormalPOSFontsInfo.stDrawFontsArray[n].color.A,r[i].bBackGround=this.curNormalPOSFontsInfo.stDrawFontsArray[n].bBackGround,r[i].pstBGColor={},r[i].pstBGColor.fR=this.curNormalPOSFontsInfo.stDrawFontsArray[n].BGcolor.R,r[i].pstBGColor.fG=this.curNormalPOSFontsInfo.stDrawFontsArray[n].BGcolor.G,r[i].pstBGColor.fB=this.curNormalPOSFontsInfo.stDrawFontsArray[n].BGcolor.B,r[i].pstBGColor.fA=this.curNormalPOSFontsInfo.stDrawFontsArray[n].BGcolor.A,r[i].fRotateAngle=0,r[i].pFontFamily="sans-serif",r[i].EventID=this.curNormalPOSFontsInfo.stDrawFontsArray[n].EventID,this.DrawPOSFontsParamArray.push(r[i]),++i);if(null!=this.curTemFontsInfo)for(var s=[],x=0,o=0;o<this.curTemFontsInfo.nFontsNum;o++)1==this.m_bEnableTEMEx&&(1==this.curTemFontsInfo.stDrawFontsArray[o].dwSubIntelFlag&&1==this.m_bEnableTEMBox||2==this.curTemFontsInfo.stDrawFontsArray[o].dwSubIntelFlag&&1==this.m_bEnableTEMLine||4==this.curTemFontsInfo.stDrawFontsArray[o].dwSubIntelFlag&&1==this.m_bEnableTEMPoint)&&(s[x]={},s[x].pString=this.curTemFontsInfo.stDrawFontsArray[o].fontString,s[x].nFontWidth=this.curTemFontsInfo.stDrawFontsArray[o].nFontSizeW,s[x].nFontHeight=this.curTemFontsInfo.stDrawFontsArray[o].nFontSizeH,s[x].pstStartPos={},s[x].pstStartPos.fX=this.curTemFontsInfo.stDrawFontsArray[o].stPoint.x,s[x].pstStartPos.fY=this.curTemFontsInfo.stDrawFontsArray[o].stPoint.y,s[x].pstFontColor={},s[x].pstFontColor.fR=this.curTemFontsInfo.stDrawFontsArray[o].color.R,s[x].pstFontColor.fG=this.curTemFontsInfo.stDrawFontsArray[o].color.G,s[x].pstFontColor.fB=this.curTemFontsInfo.stDrawFontsArray[o].color.B,s[x].pstFontColor.fA=this.curTemFontsInfo.stDrawFontsArray[o].color.A,s[x].bBackGround=!1,s[x].pstBGColor=null,s[x].fRotateAngle=0,s[x].pFontFamily="sans-serif",this.DrawFontParamArray.push(s[x]),++x);if(null!=this.curTargetFontsInfo)for(var l=[],_=0,h=0;h<this.curTargetFontsInfo.nFontsNum;h++)1==this.m_bEnableIVSEx&&(l[_]={},l[_].pString=this.curTargetFontsInfo.stDrawFontsArray[h].fontString,l[_].nFontWidth=this.curTargetFontsInfo.stDrawFontsArray[h].nFontSizeW,l[_].nFontHeight=this.curTargetFontsInfo.stDrawFontsArray[h].nFontSizeH,l[_].pstStartPos={},l[_].pstStartPos.fX=this.curTargetFontsInfo.stDrawFontsArray[h].stPoint.x,l[_].pstStartPos.fY=this.curTargetFontsInfo.stDrawFontsArray[h].stPoint.y,l[_].pstFontColor={},l[_].pstFontColor.fR=this.curTargetFontsInfo.stDrawFontsArray[h].color.R,l[_].pstFontColor.fG=this.curTargetFontsInfo.stDrawFontsArray[h].color.G,l[_].pstFontColor.fB=this.curTargetFontsInfo.stDrawFontsArray[h].color.B,l[_].pstFontColor.fA=this.curTargetFontsInfo.stDrawFontsArray[h].color.A,l[_].bBackGround=this.curTargetFontsInfo.stDrawFontsArray[h].bBackGround,l[_].pstBGColor={},l[_].pstBGColor.fR=this.curTargetFontsInfo.stDrawFontsArray[h].BGcolor.R,l[_].pstBGColor.fG=this.curTargetFontsInfo.stDrawFontsArray[h].BGcolor.G,l[_].pstBGColor.fB=this.curTargetFontsInfo.stDrawFontsArray[h].BGcolor.B,l[_].pstBGColor.fA=this.curTargetFontsInfo.stDrawFontsArray[h].BGcolor.A,l[_].fRotateAngle=0,l[_].pFontFamily="sans-serif",this.DrawFontParamArray.push(l[_]),++_);if(null!=this.curExactFontsInfo)for(var f=[],c=0,u=0;u<this.curExactFontsInfo.nFontsNum;u++)1==this.curExactFontsInfo.stDrawFontsArray[u].dwIntelFlag&&1==this.m_bEnableIVSEx&&(f[c]={},f[c].pString=this.curExactFontsInfo.stDrawFontsArray[u].fontString,f[c].nFontWidth=this.curExactFontsInfo.stDrawFontsArray[u].nFontSizeW,f[c].nFontHeight=this.curExactFontsInfo.stDrawFontsArray[u].nFontSizeH,f[c].pstStartPos={},f[c].pstStartPos.fX=this.curExactFontsInfo.stDrawFontsArray[u].stPoint.x,f[c].pstStartPos.fY=this.curExactFontsInfo.stDrawFontsArray[u].stPoint.y,f[c].pstFontColor={},f[c].pstFontColor.fR=this.curExactFontsInfo.stDrawFontsArray[u].color.R,f[c].pstFontColor.fG=this.curExactFontsInfo.stDrawFontsArray[u].color.G,f[c].pstFontColor.fB=this.curExactFontsInfo.stDrawFontsArray[u].color.B,f[c].pstFontColor.fA=this.curExactFontsInfo.stDrawFontsArray[u].color.A,f[c].bBackGround=this.curExactFontsInfo.stDrawFontsArray[u].bBackGround,f[c].pstBGColor={},f[c].pstBGColor.fR=this.curExactFontsInfo.stDrawFontsArray[u].BGcolor.R,f[c].pstBGColor.fG=this.curExactFontsInfo.stDrawFontsArray[u].BGcolor.G,f[c].pstBGColor.fB=this.curExactFontsInfo.stDrawFontsArray[u].BGcolor.B,f[c].pstBGColor.fA=this.curExactFontsInfo.stDrawFontsArray[u].BGcolor.A,f[c].fRotateAngle=0,f[c].pFontFamily="sans-serif",this.DrawFontParamArray.push(f[c]),++c);if(null!=this.curExactPOSFontsInfo)for(var d=[],p=0,m=0;m<this.curExactPOSFontsInfo.nFontsNum;m++)3==this.curExactPOSFontsInfo.stDrawFontsArray[m].dwIntelFlag&&1==this.m_bDisPos&&(d[p]={},d[p].pString=this.curExactPOSFontsInfo.stDrawFontsArray[m].fontString,d[p].nFontWidth=this.curExactPOSFontsInfo.stDrawFontsArray[m].nFontSizeW,d[p].nFontHeight=this.curExactPOSFontsInfo.stDrawFontsArray[m].nFontSizeH,d[p].pstStartPos={},d[p].pstStartPos.fX=this.curExactPOSFontsInfo.stDrawFontsArray[m].stPoint.x,d[p].pstStartPos.fY=this.curExactPOSFontsInfo.stDrawFontsArray[m].stPoint.y,d[p].pstFontColor={},d[p].pstFontColor.fR=this.curExactPOSFontsInfo.stDrawFontsArray[m].color.R,d[p].pstFontColor.fG=this.curExactPOSFontsInfo.stDrawFontsArray[m].color.G,d[p].pstFontColor.fB=this.curExactPOSFontsInfo.stDrawFontsArray[m].color.B,d[p].pstFontColor.fA=this.curExactPOSFontsInfo.stDrawFontsArray[m].color.A,d[p].bBackGround=this.curExactPOSFontsInfo.stDrawFontsArray[m].bBackGround,d[p].pstBGColor={},d[p].pstBGColor.fR=this.curExactPOSFontsInfo.stDrawFontsArray[m].BGcolor.R,d[p].pstBGColor.fG=this.curExactPOSFontsInfo.stDrawFontsArray[m].BGcolor.G,d[p].pstBGColor.fB=this.curExactPOSFontsInfo.stDrawFontsArray[m].BGcolor.B,d[p].pstBGColor.fA=this.curExactPOSFontsInfo.stDrawFontsArray[m].BGcolor.A,d[p].fRotateAngle=0,d[p].pFontFamily="sans-serif",d[p].EventID=this.curExactPOSFontsInfo.stDrawFontsArray[m].EventID,this.DrawPOSFontsParamArray.push(d[p]),++p)}},{key:"WebGLDisplaySubCallBack",value:function(e){null!=e.handle&&0!=e.nUser.pstWaterFontParamArray[e.nSubPort]&&null!=e.nUser.pstWaterFontParam&&e.handle.SR_DrawFontEx(e.nUser.pstWaterFontParamArray[e.nSubPort],e.nUser.pstWaterFontParamArray[e.nSubPort].length,1,e.nUser.textCanvas)}},{key:"WebGLDisplayCallBack",value:function(e){0!=e.DrawlinesParamArray.length&&e.oVideoHandle.SR_DrawLinesEx(e.DrawlinesParamArray,e.DrawlinesParamArray.length,e.DrawlinesParamArrayAllPointNum,e.bDrawlinesParamArrayFill);for(var t=0;t<e.DrawMosaiclinesParamArray.length;t++){var a=e.DrawMosaiclinesParamArray[t].dwMosaictype,r=0,i={};i.fR=e.DrawMosaiclinesParamArray[t].pstColor.fR,i.fG=e.DrawMosaiclinesParamArray[t].pstColor.fG,i.fB=e.DrawMosaiclinesParamArray[t].pstColor.fB,i.fA=e.DrawMosaiclinesParamArray[t].pstColor.fA,0!=e.MosaicType&&(a=e.MosaicType,r=e.MosaicSize,i.fR=e.MosaicColorR,i.fG=e.MosaicColorG,i.fB=e.MosaicColorB,i.fA=e.MosaicColorA),r=0==r?50:r,5==(a=0==a?1:a)?e.oVideoHandle.SR_DrawLines(e.DrawMosaiclinesParamArray[t].pstPoints,e.DrawMosaiclinesParamArray[t].nPointNum,1,e.DrawMosaiclinesParamArray[t].pstColor,e.DrawMosaiclinesParamArray[t].nLineWidth,0):3==a?e.oVideoHandle.SR_DrawLines(e.DrawMosaiclinesParamArray[t].pstPoints,e.DrawMosaiclinesParamArray[t].nPointNum,1,i,e.DrawMosaiclinesParamArray[t].nLineWidth,1):e.oVideoHandle.SR_DrawMosaic(e.DrawMosaiclinesParamArray[t].pstPoints[0].fX,e.DrawMosaiclinesParamArray[t].pstPoints[2].fX,e.DrawMosaiclinesParamArray[t].pstPoints[0].fY,e.DrawMosaiclinesParamArray[t].pstPoints[2].fY,r)}for(var n=0;n<e.DrawTargetlinesParamArray.length;n++)if(e.privatePNGImageInfo.length>0&&-1!=e.DrawTargetlinesParamArray[n].dwFillPicID){for(var s=-1,x=0,o=0;o<e.privatePNGImageInfo.length;o++)if(e.DrawTargetlinesParamArray[n].dwFillPicID==e.privatePNGImageInfo[o].PicID){if(s=o,e.DrawTargetEventIDList.length>0){for(var l=0;l<e.DrawTargetEventIDList.length;l++)if(e.DrawTargetEventIDList[l].nID==e.DrawTargetlinesParamArray[n].eventid){x=1;break}}else x=1;break}-1!=s&&1==x&&(e.privatePNGImageInfo[s].pstRectPos.fTop=e.DrawTargetlinesParamArray[n].pstPoints[0].fY,e.privatePNGImageInfo[s].pstRectPos.fBottom=e.DrawTargetlinesParamArray[n].pstPoints[2].fY,e.privatePNGImageInfo[s].pstRectPos.fLeft=e.DrawTargetlinesParamArray[n].pstPoints[0].fX,e.privatePNGImageInfo[s].pstRectPos.fRight=e.DrawTargetlinesParamArray[n].pstPoints[2].fX,e.oVideoHandle.SR_DrawImage(e.privatePNGImageInfo[s].videoStream,e.privatePNGImageInfo[s].nImageWidth,e.privatePNGImageInfo[s].nImageHeight,e.privatePNGImageInfo[s].pstRectPos,Xe.SRPIXELFORMAT.SR_PF_SURFACE,e.privatePNGImageInfo[s].fAlpha))}else e.oVideoHandle.SR_DrawLines(e.DrawTargetlinesParamArray[n].pstPoints,e.DrawTargetlinesParamArray[n].nPointNum,e.DrawTargetlinesParamArray[n].bLoop,e.DrawTargetlinesParamArray[n].pstColor,e.DrawTargetlinesParamArray[n].nLineWidth,e.DrawTargetlinesParamArray[n].bFill);0!=e.DrawFontParamArray.length&&e.oVideoHandle.SR_DrawFontEx(e.DrawFontParamArray,e.DrawFontParamArray.length,0,e.textCanvas);for(var _=e.DrawPOSFontsParamArray.length-1;_>=0;_--){var h=0;if(-1!=e.DrawPOSFontsParamArray[_].EventID&&e.DrawTargetEventIDList.length>0){for(var f=0;f<e.DrawTargetEventIDList.length;f++)if(e.DrawTargetEventIDList[f].nID==e.DrawPOSFontsParamArray[_].EventID){h=1;break}}else h=1;1!=h&&e.DrawPOSFontsParamArray.splice(_,1)}if(0!=e.DrawPOSFontsParamArray.length&&e.oVideoHandle.SR_DrawFontEx(e.DrawPOSFontsParamArray,e.DrawPOSFontsParamArray.length,0,e.textCanvas),null!=e.curImagesInfo&&0!=e.curImagesInfo.nWidth&&0!=e.curImagesInfo.nHeight&&1==e.m_bEnablePICEx){var c=null;null!=e.curImagesInfo&&null!=e.curImagesInfo&&null!=e.curImagesInfo.picImageData&&null!=e.curImagesInfo.picImageData&&(c=new Uint16Array(e.curImagesInfo.picImageData.buffer)),null!=e.curImagesInfo&&e.curImagesInfo.nPixelFormat>0&&e.oVideoHandle.SR_DrawImage(c,e.curImagesInfo.nWidth,e.curImagesInfo.nHeight,e.curImagesInfo.pstRect,e.curImagesInfo.nPixelFormat,e.curImagesInfo.fAlpha)}if(0!==e.pstWaterFontParamArray[0].length&&null!=e.pstWaterFontParam&&e.oVideoHandle.SR_DrawFontEx(e.pstWaterFontParamArray[0],e.pstWaterFontParamArray[0].length,1,e.textCanvas),0!==e.pWaterImageParam.length&&e.finishDecodeImage){e.baseWaterMarkImageTime<=0&&(e.baseWaterMarkImageTime=e.curTimestamp);var u=e.curTimestamp-e.baseWaterMarkImageTime;u<0&&(e.baseWaterMarkImageTime=e.curTimestamp,u=0,e.waterMarkImageIndex=0),u>=e.pWaterImageParam[e.waterMarkImageIndex].timeStamp-e.pWaterImageParam[0].timeStamp&&e.waterMarkImageIndex++,e.waterMarkImageIndex>=e.waterMarkImageMax&&(e.waterMarkImageIndex=0,e.baseWaterMarkImageTime=e.curTimestamp);var d=e.waterMarkImageIndex;e.oVideoHandle.SR_DrawImage(e.pWaterImageParam[d].videoStream,e.pWaterImageParam[d].nImageWidth,e.pWaterImageParam[d].nImageHeight,e.pWaterImageParam[d].pstRectPos,Xe.SRPIXELFORMAT.SR_PF_SURFACE,e.pWaterImageParam[d].fAlpha)}}},{key:"SetPanoramaDisplayEffect",value:function(e){if("2d"===this.renderEngine||"2D"===this.renderEngine)return 0;if(null!=this.oVideoHandle){if(e!=this.panoramaDisplayEffect){this.panoramaDisplayEffect=e,this.oVideoHandle.SR_DelSubPort(this.mainVaildSubPort),this.oVideoHandle.SR_Destroy(),this.oVideoHandle=null,this.oVideoHandle=new Ge,null==this.pFishParamManager&&(this.pFishParamManager=new Ye),this.oVideoHandle.SR_SetFishParamManager(this.pFishParamManager),this.hasSetFECParamManager=!0;var t=Xe.SRDISPLAYEFFECT.SR_DE_NULL;if(t=1==this.panoramaDisplayEffect?Xe.SRDISPLAYEFFECT.SR_DE_PANORAMA_SPHERE:3==this.panoramaDisplayEffect?Xe.SRDISPLAYEFFECT.SR_DE_PANORAMA_PLANET:Xe.SRDISPLAYEFFECT.SR_DE_NULL,this.oVideoHandle.SR_Init(this.mainCanvasID,this.enPixelFormat),this.mainVaildSubPort=this.oVideoHandle.SR_AddSubPort(t),-1==this.mainVaildSubPort)return console.info("%c InitDisplay SR_AddSubPort error subport:%d","color: red",this.mainVaildSubPort),0}}else this.panoramaDisplayEffect=e;return 1}},{key:"SetPanoramaSphereViewParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine||null==t||null==t||e<1||e>3?0:(this.viewParamType=e,this.viewParamValue=t,null!=this.oVideoHandle?(1!=this.panoramaDisplayEffect&&this.panoramaDisplayEffect,this.oVideoHandle.SR_SetViewParam(e,t)!=Xe.ERRCODE.SR_OK?0:1):0)}},{key:"GetPanoramaSphereViewParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine||null==t||null==t||e<1||e>3?0:null!=this.oVideoHandle?(1!=this.panoramaDisplayEffect&&this.panoramaDisplayEffect,t.fValue=-1,this.oVideoHandle.SR_GetViewParam(e,t)!=Xe.ERRCODE.SR_OK?0:1):0}}]),a}(),qe=function(){function a(t,r){e(this,a),this.EncoderObj=null,this.FirstFrame=!0,this.frameRate=25,this.EncoderCurStatus=2,this.frameCounter=0,this.frameNum=0,this.stopEncodflag=!1,this.encodeFrameGlobalTime=[],this.oPlayCtrlHandle=null,null!=t&&(this.oPlayCtrlHandle=t),this.player=null,null!=r&&(this.player=r),this.output=this.output.bind(this),this.reportError=this.reportError.bind(this),this.userAgent=0,this.bWriteData=!1,this.aTotalBuffer=[],this.iFrameNum=0}return t(a,[{key:"initEncoder",value:function(e,t,a){if(this.codecString=e,this.encodeWidth=t.encodeWidth,this.encodeHeight=t.encodeHeight,this.bitrate=t.bitrate,this.frameRate=t.frameRate,0==t.bitrateMode?this.bitrateMode="variable":this.bitrateMode="constant",0==t.latencyMode?this.latencyMode="realtime":this.latencyMode="quality",this.rawDataCB=a,this.FirstFrame=!0,this.EncoderCurStatus=2,this.frameCounter=0,this.frameNum=0,this.stopEncodflag=!1,null==this.EncoderObj){var r={output:this.output,error:this.reportError};this.EncoderObj=new VideoEncoder(r)}this.format="annexb";var i=navigator.userAgent||navigator.vendor||window.opera;i.indexOf("Windows NT")>-1?this.userAgent=0:i.indexOf("Linux")>-1?this.userAgent=1:i.indexOf("Mac OS X")>-1?(this.userAgent=2,this.format="avc"):/Android/.test(i)?this.userAgent=3:/like Mac OS X/.test(i)?this.userAgent=4:this.userAgent=0;var n={codec:e,width:this.encodeWidth,height:this.encodeHeight,displayWidth:this.encodeWidth,displayHeight:this.encodeHeight,bitrate:this.bitrate,framerate:this.frameRate,bitrateMode:this.bitrateMode,latencyMode:this.latencyMode,avc:{format:this.format}};console.log("1videoEncode config width:"+this.encodeWidth+",height:"+this.encodeHeight+",bitrate:"+this.bitrate+",framerate:"+this.frameRate+",bitrateMode:"+this.bitrateMode+",latencMode:"+this.latencyMode),this.EncoderObj.configure(n)}},{key:"inputData",value:function(e,t){null==this.EncoderObj||this.stopEncodflag||("configured"==this.EncoderObj.state||this.FirstFrame)&&this.EncodeProcess(e,t)}},{key:"EncodeProcess",value:function(e,t){if(4!=this.EncoderCurStatus&&null!=this.EncoderObj&&"configured"==this.EncoderObj.state&&this.EncoderObj.encodeQueueSize<10){var a=this.frameCounter%50==0;1==a&&this.encodeFrameGlobalTime.push(t),this.EncoderObj.encode(e,{keyFrame:a}),this.frameCounter++}}},{key:"output",value:function(e,t){if("configured"==this.EncoderObj.state){t.decoderConfig,t.svc,t.alphaSideData,e.type;var a=e.timestamp;if(e.byteLength,!this.stopEncodflag){var r=new Uint8Array(e.byteLength);e.copyTo(r);var i={dataType:1};if(i.width=this.encodeWidth,i.height=this.encodeHeight,i.frameRate=this.frameRate,i.timeStamp=a/1e3,i.frameNum=this.frameNum,i.bitrate=0,i.globalTime={},"key"==e.type){var n=this.encodeFrameGlobalTime.shift();"year"in n?(i.globalTime.year=n.year,i.globalTime.month=n.month,i.globalTime.day=n.day,i.globalTime.hour=n.hour,i.globalTime.minute=n.minute,i.globalTime.second=n.second,i.globalTime.milliseconds=n.milliseconds):(i.globalTime.year=2024,i.globalTime.month=0,i.globalTime.day=0,i.globalTime.hour=0,i.globalTime.minute=0,i.globalTime.second=0,i.globalTime.milliseconds=0)}var s=null,x=new Uint8Array(4);x[0]=0,x[1]=0,x[2]=0,x[3]=1;var o=null,l=0,_=null,h=0,f=null,c=null,u=0,d=0,p=0;if("key"==e.type){if("decoderConfig"in t&&"description"in t.decoderConfig&&(c=new Uint8Array(t.decoderConfig.description)),2==this.userAgent){for(null!=c&&(l=256*(o=c.slice(6,c.length))[0]+o[1],_=o.slice(2,2+l),h=256*o[3+l]+o[4+l],f=o.slice(5+l,5+l+h),l+=4,h+=4);d<r.length;)p=256*r[d]*256*256+256*r[d+1]*256+256*r[d+2]+r[d+3],r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=1,d=d+4+p;u=l+h+r.length,s=new Uint8Array(u);var m=0;null!=_&&(s.set(x,0),s.set(_,x.length),m=x.length+_.length),null!=f&&(s.set(x,m),s.set(f,m+x.length),m=x.length+_.length+x.length+f.length),s.set(r,m),i.rawData=s}else{for(var S=r.slice(6,r.length),R=0;R<S.length&&(0!=S[R]||0!=S[R+1]||1!=S[R+2]||110!=S[R+3]);R++);o=S.slice(0,R);for(var P=S.slice(R,S.length),y=0;y<P.length&&(0!=P[y]||0!=P[y+1]||1!=P[y+2]||101!=P[y+3]);y++);var b=P.slice(y-1,P.length);b[0]=0,u=o.length+b.length,(s=new Uint8Array(u)).set(o,0),s.set(b,o.length),S=null,P=null,b=null}i.rawData=s,this.player?this.rawDataCB&&this.rawDataCB(i):postMessage({function:"VideoRecoderInfo",videoInfo:i},[i.rawData.buffer])}else{if(2==this.userAgent){for(;d<r.length;)p=256*r[d]*256*256+256*r[d+1]*256+256*r[d+2]+r[d+3],r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=1,d=d+4+p;i.rawData=r}else i.rawData=r;this.player?this.rawDataCB&&this.rawDataCB(i):postMessage({function:"VideoRecoderInfo",videoInfo:i},[i.rawData.buffer])}r=null,s=null,x=null,o=null,_=null,f=null,c=null,this.frameNum++}}}},{key:"_downloadFile",value:function(e,t){var a=e;i(e,Blob)||i(e,File)||(a=new Blob([e]));var r=window.URL.createObjectURL(a),n=window.document.createElement("a");n.href=r,n.download=t;var s=document.createEvent("MouseEvents");s.initEvent("click",!0,!0),n.dispatchEvent(s)}},{key:"downloadData",value:function(e){if(this.bWriteData){for(var t=e,a=this.aTotalBuffer.length,r=0,i=t.length;r<i;r++)this.aTotalBuffer[a+r]=t[r];this.iFrameNum++,t=null,console.log("downloadEncodedata iFrameNum:"+this.iFrameNum)}if(this.bWriteData&&(this.iFrameNum>=600||this.stopEncodflag)){console.log("download600encodeData");var n=new Uint8Array(this.aTotalBuffer);this._downloadFile(n,"Encode600.data"),this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.bWriteData=!1,this.iFrameNum=0,n=null}}},{key:"stopEncode",value:function(){if(this.EncoderCurStatus=4,this.frameCounter=0,this.frameNum=0,this.stopEncodflag=!0,this.destroyEncoder(),this.bWriteData&&this.stopEncodflag){console.log("download600encodeData");var e=new Uint8Array(this.aTotalBuffer);this._downloadFile(e,"Encode600.data"),this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.bWriteData=!1,this.iFrameNum=0,e=null}}},{key:"reportError",value:function(e){console.log("hardEncode reportError:"+e.message+",state:"+this.EncoderObj.state+",frameRate:"+this.frameRate)}},{key:"destroyEncoder",value:function(){var e=this;return new Promise((function(t,a){e.clearEncoderObjBuffer().then((function(){null!=e.EncoderObj&&("closed"!=e.EncoderObj.state&&e.EncoderObj.close(),console.log(">>>JS 11 destroy VideoEncoderObj"),e.EncoderObj=null),e.EncoderCurStatus=4,e.FirstFrame=!0,t()}),(function(){a()}))}))}},{key:"resetEncoder",value:function(){var e=this;return new Promise((function(t,a){e.destroyEncoder().then((function(){var a={encodeWidth:e.encodeWidth,encodeHeight:e.encodeHeight,bitrate:e.bitrate,frameRate:e.frameRate,bitrateMode:e.bitrateMode,latencyMode:e.latencyMode};e.initEncoder(e.codecString,a,e.rawDataCB),console.log("%c reset hard Encoder","color:red"),t()}),(function(){a()}))}))}},{key:"clearEncoderObjBuffer",value:function(){var e=this;return new Promise((function(t,a){null!=e.EncoderObj&&"configured"==e.EncoderObj.state&&e.EncoderObj.reset(),t()}))}}]),a}(),Qe=function(){function a(t,r){e(this,a),this.AudioEncoderObj=null,this.FirstFrame=!0,this.EncoderCurStatus=2,this.stopEncodflag=!1,this.aTimeStamp=0,this.oPlayCtrlHandle=null,null!=t&&(this.oPlayCtrlHandle=t),this.player=null,null!=r&&(this.player=r),this.output=this.output.bind(this),this.reportError=this.reportError.bind(this)}var r;return t(a,[{key:"initEncoder",value:(r=l(ne().mark((function e(t,a,r){var i,n;return ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.codecString=t,this.sampleRate=a.sampleRate,this.numberOfChannels=a.numberOfChannels,this.bitrate=a.bitrate,this.AudioDataCB=r,this.FirstFrame=!0,this.EncoderCurStatus=2,this.stopEncodflag=!1,this.aTimeStamp=0,null==this.AudioEncoderObj&&(i={output:this.output,error:this.reportError},this.AudioEncoderObj=new AudioEncoder(i)),this.format="adts",n={codec:t,sampleRate:this.sampleRate,numberOfChannels:this.numberOfChannels,bitrate:this.bitrate,aac:{format:this.format}},console.log("2audioEncode config sampleRate:"+this.sampleRate+",numberOfChannels:"+this.numberOfChannels+",bitrate:"+this.bitrate),this.AudioEncoderObj.configure(n);case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,a){return r.apply(this,arguments)})},{key:"inputData",value:function(e){null!=this.AudioEncoderObj&&("configured"==this.AudioEncoderObj.state||this.FirstFrame)&&this.EncodeProcess(e),this.FirstFrame&&(1==this.oPlayCtrlHandle.recoderBaseTimestampMode?this.audioBaseTimeStamp=e.timestamp:0==this.oPlayCtrlHandle.recoderBaseTimestampMode&&(this.audioBaseTimeStamp=0),this.FirstFrame=!1)}},{key:"EncodeProcess",value:function(e){4!=this.EncoderCurStatus&&null!=this.AudioEncoderObj&&"configured"==this.AudioEncoderObj.state&&this.AudioEncoderObj.encode(e)}},{key:"output",value:function(e,t){if("configured"==this.AudioEncoderObj.state&&(e.type,e.timestamp,e.byteLength,!this.stopEncodflag)){this.aTimeStamp+=e.duration/1e3;var a={dataType:2,width:1,height:16,frameRate:48e3};a.timeStamp=this.aTimeStamp+this.audioBaseTimeStamp,a.frameNum=0,a.bitrate=128e3,a.globalTime={};var r=new Uint8Array(e.byteLength);e.copyTo(r),a.rawData=r,this.player?null!=this.AudioDataCB&&this.AudioDataCB(a):postMessage({function:"AudioRecoderInfo",audioInfo:a},[a.rawData.buffer]),r=null}}},{key:"stopEncode",value:function(){this.stopEncodflag=!0,this.destroyEncoder()}},{key:"reportError",value:function(e){console.log("hardEncode reportError:"+e.message+",state:"+this.AudioEncoderObj.state)}},{key:"destroyEncoder",value:function(){var e=this;return new Promise((function(t,a){e.clearEncoderObjBuffer().then((function(){null!=e.AudioEncoderObj&&("closed"!=e.AudioEncoderObj.state&&e.AudioEncoderObj.close(),console.log(">>>JS 12 destroy AudioEncoderObj"),e.AudioEncoderObj=null),e.EncoderCurStatus=4,e.FirstFrame=!0,t()}),(function(){a()}))}))}},{key:"resetEncoder",value:function(){var e=this;return new Promise((function(t,a){e.destroyEncoder().then((function(){var a={sampleRate:e.sampleRate,numberOfChannels:e.numberOfChannels,bitrate:e.bitrate};e.initEncoder(e.codecString,a,e.AudioDataCB),console.log("%c reset hard Encoder","color:red"),t()}),(function(){a()}))}))}},{key:"clearEncoderObjBuffer",value:function(){var e=this;return new Promise((function(t,a){null!=e.AudioEncoderObj&&"configured"==e.AudioEncoderObj.state&&e.AudioEncoderObj.reset(),t()}))}}]),a}(),$e=function(){function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e(this,a),this.canvas=null,this.streamOpenMode=0,this.context=null,this.oVideoDecoder=null,this.frameBuffers=[],this.initTimer=!1,this.preTimeStamp=0,this.baseTimeStamp=0,this.resetTimer=!0,this.RenderFrame=this.RenderFrame.bind(this),this.renderCurStatus=2,this.renderLastStatus=2,this.playSpeed=1,this.nplaySpeed=1,this.displayBuf=14,this.needForward=!1,this.firstFrame=!0,this.LatcyTime=50,this.nFrameRate=0,this.needSaveFrameInfo=!1,this.displayFrameInfoCB=null,this.displayFrameInfo=[],this.curFrameInfo={},this.curFrameInfo.timeStamp=0,this.bResetdisplayFrameInfoCB=!0,this.sx=0,this.sy=0,this.sw=0,this.sh=0,this.displayRunning=!1,this.oRenderTimer=null,this.waitIFrameTimestamp=0,this.curFrame=null,this.player=null,null!=t&&(this.player=t),this.renderEngine="webgl",this.oVideoRender=null,this.FECCanvasID="",this.oVideoRender=new Ke(this),this.bSetStreamEnd=!1,this.printfFlag=0,this.oVideoEncoder=null,this.oAudioEncoder=null,this.startRecoderFlag=!1,this.stopRecoderFlag=!1,this.recoderFrameNum=0,this.vBaseTimeStamp=0,this.encodeVideoInfo={encodeVideoType:"avc",encodeWidth:1280,encodeHeight:720,bitrate:1e6,frameRate:25,bitrateMode:0,latencyMode:0},this.encodeAudioInfo={encodeAudioType:"aac",sampleRate:48e3,numberOfChannels:1,bitrate:128e3},this.recoderBaseTimestampMode=0,this.recoderGetOriginData=0,this.nstreamEndloopNum=0,this.runtimeCBFun=null,this.nTargetRelativePos=0,this.ProcessPositionflag=!1,this.nMPPlayMode=0,this.nMPPosType=0,this.VideoPrivateInfoMap=new Map,this.curPrivateInfo={},this.curPrivateInfo.linesInfo=[],this.curPrivateInfo.fontInfo=[],this.curPrivateInfo.imageInfo=[],this.StretchPlayTime=0,this.StretchPlayedTime=0,this.StretchPlaySpeed=1,this.StretchPlayFlag=!1,this.Prevideowidth=0,this.Prevideoheight=0,this.PrecodecType=0,this.PlayOrBackMode=1,this.pstRuntimeInfo={nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:0,nInputDataInterval:0,nFrameNumInterval:0,nAverageDecodeTime:0,nSystemFormat:0,nDetectRes:0,nMp4FileTime:0,nMp4TotalFrameNum:0,AbsTimeYear:0,AbsTimeMonth:0,AbsTimeDay:0,AbsTimeHour:0,AbsTimeMinute:0,AbsTimeSecond:0,AbsTimeMilliseconds:0},this.firstRenderBegin=!0,this.DecodeTypeFlagMap=new Map,this.RenderTypeFlagMap=new Map}var r,i;return t(a,[{key:"init",value:function(e,t,a,r,i){if(this.canvas=e,this.streamOpenMode=t,this.renderEngine=r,this.printfFlag=i,this.SetCurStatus(2),null==this.oVideoDecoder&&(this.oVideoDecoder=new _e(a,this,this.player,this.canvas),null!==this.oVideoDecoder&&this.oVideoDecoder.initDecoder(),null!=this.runtimeCBFun&&this.oVideoDecoder.SetRunTimeInfoCallBackFun(2,this.runtimeCBFun),this.DecodeTypeFlagMap.size>0)){var n,s=C(this.DecodeTypeFlagMap.keys());try{for(s.s();!(n=s.n()).done;){var x=n.value,o=this.DecodeTypeFlagMap.get(x);1==o&&this.oVideoDecoder.SetRunTimeInfoCallbackType(2,x,o)}}catch(e){s.e(e)}finally{s.f()}}""!=this.canvas&&null!=this.canvas&&(this.frameBuffers=this.oVideoDecoder.ready_frames,null!=this.oVideoRender&&this.oVideoRender.InitDisplay(this.canvas,this.renderEngine,256),null==this.oRenderTimer&&(this.oRenderTimer=new le))}},{key:"HardDecodeError",value:function(){return this.player._switchHardToSoft(),1}},{key:"inputData",value:function(e,t){if(this.curPrivateInfo.linesInfo.length>0||this.curPrivateInfo.fontInfo.length>0||this.curPrivateInfo.imageInfo.length>0){var a=this.deepClone(this.curPrivateInfo);this.VideoPrivateInfoMap.set(t.timeStamp,a),this.curPrivateInfo.linesInfo.splice(0,this.curPrivateInfo.linesInfo.length),this.curPrivateInfo.fontInfo.splice(0,this.curPrivateInfo.fontInfo.length),this.curPrivateInfo.imageInfo.splice(0,this.curPrivateInfo.imageInfo.length)}if(0!=this.PrecodecType&&this.PrecodecType!=t.codecType&&(this.firstFrame=!0,this.oVideoDecoder.resetDecoderObj()),this.needSaveFrameInfo){var r=new Object;r.port=t.port,r.codecType=t.codecType,r.frameType=t.frameType,r.frameSize=t.frameSize,r.width=t.width,r.height=t.height,r.timeStamp=t.timeStamp,r.frameRate=t.frameRate,r.frameNum=t.frameNum,r.interlace=t.interlace,r.streamEnd=t.streamEnd,r.cropLeft=t.cropLeft,r.cropRight=t.cropRight,r.cropTop=t.cropTop,r.cropBottom=t.cropBottom,r.year=t.year,r.month=t.month,r.week=t.week,r.day=t.day,r.hour=t.hour,r.minute=t.minute,r.second=t.second,r.milliseconds=t.milliseconds,r.isKeyFrame=t.isKeyFrame,this.nFrameRate=r.frameRate,this.Prevideowidth=t.width,this.Prevideoheight=t.height,this.PrecodecType=t.codecType,this.displayFrameInfo.push(r),r=null}else this.displayFrameInfo.splice(0,this.displayFrameInfo.length);null!=this.oVideoDecoder&&this.oVideoDecoder.inputData(e,t)}},{key:"_resetDecoder",value:function(){var e=this;return new Promise((function(t,a){e.oVideoDecoder.resetDecoder().then((function(){e.displayFrameInfo.splice(0,e.displayFrameInfo.length),e.curFrameInfo={},e.oVideoRender.DeInitPrivateParam(),e.VideoPrivateInfoMap.clear(),e.curPrivateInfo.linesInfo.splice(0,e.curPrivateInfo.linesInfo.length),e.curPrivateInfo.fontInfo.splice(0,e.curPrivateInfo.fontInfo.length),e.curPrivateInfo.imageInfo.splice(0,e.curPrivateInfo.imageInfo.length),e.renderCurStatus=2,e.renderLastStatus=2,e.player?e.player.JSPlayM4_ResetEnd():postMessage({function:"resetEnd"}),t()}),(function(){a()}))}))}},{key:"_resetRenderTimer",value:function(){this.initTimer=!1,this.preTimeStamp=0,this.baseTimeStamp=0,this.resetTimer=!0,null!=this.oRenderTimer&&this.oRenderTimer.timerReset(),this.RenderFrame=this.RenderFrame.bind(this),this.renderCurStatus=2,this.renderLastStatus=2,this.curTimeStamp=0,this.getImageJPEG=!1,this.getImageBMP=!1,this.getCropImageJPEG=!1,this.getCropImageBMP=!1,1==this.bResetdisplayFrameInfoCB&&(this.displayFrameInfoCB=null),this.displayFrameInfo.splice(0,this.displayFrameInfo.length),this.VideoPrivateInfoMap.clear(),this.curPrivateInfo.linesInfo.splice(0,this.curPrivateInfo.linesInfo.length),this.curPrivateInfo.fontInfo.splice(0,this.curPrivateInfo.fontInfo.length),this.curPrivateInfo.imageInfo.splice(0,this.curPrivateInfo.imageInfo.length),this.curFrameInfo={},this.DecodeTypeFlagMap.clear(),this.RenderTypeFlagMap.clear()}},{key:"_destroyPlayCtrl",value:function(){var e=this;this.oVideoDecoder.destroyDecoder().then((function(){e.oVideoDecoder=null,null!=e.oVideoRender&&(e.oVideoRender.ReleaseDisplay(),e.oVideoRender=null),e._resetRenderTimer(),e.oRenderTimer=null,e.displayRunning=!1,e.runtimeCBFun=null,e.printfFlag>=0&&console.log(">>>JS 02 destroy oVideoDecoder/oVideoRender"),null!=e.oVideoEncoder&&(e.oVideoEncoder.destroyEncoder(),e.oVideoEncoder=null),null!=e.oAudioEncoder&&(e.oAudioEncoder.destroyEncoder(),e.oAudioEncoder=null)}),(function(){e.printfFlag>=0&&console.log("stop failed ")}))}},{key:"Sleep",value:(i=l(ne().mark((function e(t){var a;return ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(a=t>6e4?6e4:t)<0?0:a,e.abrupt("return",new Promise((function(e){setTimeout(e,a)})));case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"RenderFrame",value:(r=l(ne().mark((function e(){var t,a=this;return ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.renderCurStatus,null!=this.oVideoDecoder&&null!=this.oVideoDecoder.decoderObj&&(this.player?this.player.JSPlayM4_GetDecodeBufferSize(this.oVideoDecoder.decoderObj.decodeQueueSize,this.oVideoDecoder.ready_frames.length):postMessage({function:"GetDecodeBufferSize",rawSize:this.oVideoDecoder.decoderObj.decodeQueueSize,frameSize:this.oVideoDecoder.ready_frames.length}),this.oVideoDecoder.decoderObj.decodeQueueSize<=3&&this.oVideoDecoder.ready_frames.length<=3&&(this.player?this.player.JSPlayM4_GetRawData():postMessage({function:"GetRawData"})),this.printfFlag>0&&console.log("VideoPlayCtrl.js output1 cb decodeQueueSize:"+this.oVideoDecoder.decoderObj.decodeQueueSize+",length:"+this.oVideoDecoder.ready_frames.length)),e.t0=t,e.next=0===e.t0?5:2===e.t0||6===e.t0?8:3===e.t0?10:5===e.t0?13:4===e.t0?15:17;break;case 5:return this._resetRenderTimer(),this._resetDecoder().then((function(){requestAnimationFrame(a.RenderFrame)}),(function(){})),e.abrupt("break",18);case 8:return this.displayRunning?(this.printfFlag>0&&console.log("displayBuf:"+this.displayBuf+",this.streamOpenMode:"+this.streamOpenMode+",LatcyTime:"+this.LatcyTime),this.chooseFrame().then((function(e){if(a.curFrame=e,1==a.ProcessPositionflag)if(null!=a.curFrame){var r=0;if(1==a.nMPPosType&&(r=a.findFramebyTime(a.curFrame.timestamp,0).frameNum),0==a.nMPPosType&&a.curFrame.timestamp<a.nTargetRelativePos||1==a.nMPPosType&&r<a.nTargetRelativePos)requestAnimationFrame(a.RenderFrame);else{if(a.ProcessPositionflag=!1,a.player.needPlaySound&&a.player.JSPlayM4_PlaySound(),a.paint(a.curFrame),a.curTimeStamp=a.curFrame.timestamp,null!=a.player){var i={nRes:1};i.nRelativePos=a.nTargetRelativePos,null!=a.player.SetPlayPosCBFun?a.player.SetPlayPosCBFun(i):postMessage({function:"SetPlayPosCB",value:a.nTargetRelativePos})}1==a.nMPPlayMode&&a.SetCurStatus(3),a.RenderFrame()}}else requestAnimationFrame(a.RenderFrame);else if(-1==a.displayBuf||0==a.streamOpenMode&&0==a.LatcyTime)null!=a.curFrame&&(a.curTimeStamp=a.curFrame.timestamp,a.paint(a.curFrame)),requestAnimationFrame(a.RenderFrame);else if(null!=a.curFrame){a.initTimer&&!a.resetTimer||(a.oRenderTimer.Init(),a.initTimer=!0,a.resetTimer=!1,a.preTimeStamp=a.curFrame.timestamp,a.baseTimeStamp=a.curFrame.timestamp,1==a.streamOpenMode&&(a.LatcyTime=0)),a.curTimeStamp=a.curFrame.timestamp;var n=0,s=0;6==t?(n=a.preTimeStamp-a.curTimeStamp,s=a.baseTimeStamp-a.curTimeStamp):(n=a.curTimeStamp-a.preTimeStamp,s=a.curTimeStamp-a.baseTimeStamp);var x=a.oRenderTimer.GetTimerWalk();(n>5e3||n<0||s<0||x<=0)&&(a.oRenderTimer.Init(),a.preTimeStamp=a.curFrame.timestamp,a.baseTimeStamp=a.curTimeStamp,s=6==t?a.baseTimeStamp-a.curTimeStamp:a.curTimeStamp-a.baseTimeStamp,x=a.oRenderTimer.GetTimerWalk());var o;o=a.StretchPlayFlag?a.StretchPlaySpeed:a.playSpeed;var l=(s+a.LatcyTime)/o-x;a.printfFlag>0&&console.log("baseTimerWalk:"+x+",lDeta:"+l+",Date :"+(new Date).getFullYear()+"/"+((new Date).getMonth()+1)+"/"+(new Date).getDate()+" "+(new Date).getHours()+"-"+(new Date).getMinutes()+"-"+(new Date).getSeconds()+"-"+(new Date).getMilliseconds()),l<15&&l>-15||l<0?(a.StretchPlayFlag&&a.VideoStretchProcess(a.curTimeStamp),a.paint(a.curFrame),a.preTimeStamp=a.curTimeStamp,a.RenderFrame()):a.Sleep(l-5).then((function(){2!=a.renderCurStatus&&6!=a.renderCurStatus||(a.StretchPlayFlag&&a.VideoStretchProcess(a.curTimeStamp),a.paint(a.curFrame),a.preTimeStamp=a.curTimeStamp),a.RenderFrame()}))}else requestAnimationFrame(a.RenderFrame)}))):requestAnimationFrame(this.RenderFrame),e.abrupt("break",18);case 10:return this._refresh(),requestAnimationFrame(this.RenderFrame),e.abrupt("break",18);case 13:return this.needForward?this.chooseFrame().then((function(e){a.curFrame=e,null!=a.curFrame&&(a.curTimeStamp=a.curFrame.timestamp,a.paint(a.curFrame),a.needForward=!1),requestAnimationFrame(a.RenderFrame)})):(this._refresh(),requestAnimationFrame(this.RenderFrame)),e.abrupt("break",18);case 15:return this._destroyPlayCtrl(),e.abrupt("return");case 17:return e.abrupt("return");case 18:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"paint",value:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r,i){if(4==t.renderCurStatus||null==e||null==t.oVideoRender||1==t.ProcessPositionflag||null==e.timestamp)r();else{t.waitIFrameTimestamp===e.timestamp&&(t.resetTimer=!0);var n,s={};n=null!=e.image&&null!=e.image?e.image:e,s.nCropLeft=0,s.nCropRight=0,s.nCropTop=0,s.nCropBottom=0,s.nCodeWidth=e.displayWidth,s.nCodeHeight=e.displayHeight;var x={x:0,y:0};if(x.width=e.displayWidth,x.height=e.displayHeight,t.RenderTypeFlagMap.size>0){var o,l=C(t.RenderTypeFlagMap.keys());try{for(l.s();!(o=l.n()).done;){var _=o.value;if(_==te&&1==t.RenderTypeFlagMap.get(_)&&null!=t.runtimeCBFun&&1==t.firstRenderBegin){if(t.pstRuntimeInfo.nRunTimeModule=3,t.pstRuntimeInfo.nStrVersion=1,t.pstRuntimeInfo.nFrameTimeStamp=e.timestamp,t.pstRuntimeInfo.nFrameNum=0,t.pstRuntimeInfo.nErrorCode=te,t.pstRuntimeInfo.nInputDataInterval=0,t.pstRuntimeInfo.nFrameNumInterval=0,t.pstRuntimeInfo.nAverageDecodeTime=0,1==a)t.pstRuntimeInfo.AbsTimeYear=t.curFrameInfo.year,t.pstRuntimeInfo.AbsTimeMonth=t.curFrameInfo.month,t.pstRuntimeInfo.AbsTimeDay=t.curFrameInfo.day,t.pstRuntimeInfo.AbsTimeHour=t.curFrameInfo.hour,t.pstRuntimeInfo.AbsTimeMinute=t.curFrameInfo.minute,t.pstRuntimeInfo.AbsTimeSecond=t.curFrameInfo.second,t.pstRuntimeInfo.AbsTimeMilliseconds=t.curFrameInfo.milliseconds;else{var h=new Object;h=t.findFramebyTime(e.timestamp,0),t.pstRuntimeInfo.AbsTimeYear=h.year,t.pstRuntimeInfo.AbsTimeMonth=h.month,t.pstRuntimeInfo.AbsTimeDay=h.day,t.pstRuntimeInfo.AbsTimeHour=h.hour,t.pstRuntimeInfo.AbsTimeMinute=h.minute,t.pstRuntimeInfo.AbsTimeSecond=h.second,t.pstRuntimeInfo.AbsTimeMilliseconds=h.milliseconds}t.runtimeCBFun(t.pstRuntimeInfo),t.firstRenderBegin=!1}}}catch(e){l.e(e)}finally{l.f()}}t.oVideoRender.DisplayFrame(n,e.displayWidth,e.displayHeight,e.timestamp,s,null,t.nFrameRate,a).then((function(e){var a=e.timestamp,i=e.DrawRet;if(t.RenderTypeFlagMap.size>0&&1!=i){var n,s=C(t.RenderTypeFlagMap.keys());try{for(s.s();!(n=s.n()).done;){var x=n.value;x==re&&1==t.RenderTypeFlagMap.get(x)&&null!=t.runtimeCBFun&&(t.pstRuntimeInfo.nRunTimeModule=3,t.pstRuntimeInfo.nStrVersion=1,t.pstRuntimeInfo.nFrameTimeStamp=a,t.pstRuntimeInfo.nFrameNum=0,t.pstRuntimeInfo.nErrorCode=re,t.runtimeCBFun(t.pstRuntimeInfo))}}catch(e){s.e(e)}finally{s.f()}}if(null!==t.displayFrameInfoCB&&t.respondFrameInfoCB(a),t.RenderTypeFlagMap.size>0){var o,l=C(t.RenderTypeFlagMap.keys());try{for(l.s();!(o=l.n()).done;){var _=o.value;_==ae&&1==t.RenderTypeFlagMap.get(_)&&null!=t.runtimeCBFun&&(t.pstRuntimeInfo.nRunTimeModule=3,t.pstRuntimeInfo.nStrVersion=1,t.pstRuntimeInfo.nFrameTimeStamp=a,t.pstRuntimeInfo.nFrameNum=0,t.pstRuntimeInfo.nErrorCode=ae,t.pstRuntimeInfo.nInputDataInterval=0,t.pstRuntimeInfo.nFrameNumInterval=0,t.pstRuntimeInfo.nAverageDecodeTime=0,t.pstRuntimeInfo.AbsTimeYear=t.curFrameInfo.year,t.pstRuntimeInfo.AbsTimeMonth=t.curFrameInfo.month,t.pstRuntimeInfo.AbsTimeDay=t.curFrameInfo.day,t.pstRuntimeInfo.AbsTimeHour=t.curFrameInfo.hour,t.pstRuntimeInfo.AbsTimeMinute=t.curFrameInfo.minute,t.pstRuntimeInfo.AbsTimeSecond=t.curFrameInfo.second,t.pstRuntimeInfo.AbsTimeMilliseconds=t.curFrameInfo.milliseconds,t.runtimeCBFun(t.pstRuntimeInfo))}}catch(e){l.e(e)}finally{l.f()}}if(t.firstFrame){t.firstFrame=!1;var h=t;t.oVideoRender.GetCanvasData((function(e,t,a){if(null!=e){var r=h.checkColorAnomaly(e,t,a);console.log("checkColorAnomaly resC:"+r),r&&h.HardDecodeError()}})),null!=t.player?null!=t.player.FFCallBackFun&&t.player.FFCallBackFun({decodeEngine:1}):postMessage({function:"firstFrameCB",value:!0})}t.startRecoderFlag&&0==t.stopRecoderFlag&&t.oVideoRender.GetCanvasData((function(e,i,n){if(null!=e){if(0==t.recoderBaseTimestampMode){0==t.vBaseTimeStamp&&(t.vBaseTimeStamp=60*(new Date).getHours()*60*1e3+60*(new Date).getMinutes()*1e3+1e3*(new Date).getSeconds()+(new Date).getMilliseconds());var s=60*(new Date).getHours()*60*1e3+60*(new Date).getMinutes()*1e3+1e3*(new Date).getSeconds()+(new Date).getMilliseconds();t.recoderFrameTimeStamp=s-t.vBaseTimeStamp}else 1==t.recoderBaseTimestampMode||(t.recoderBaseTimestampMode=1),t.recoderFrameTimeStamp=a;var x={timestamp:1e3*t.recoderFrameTimeStamp,codedWidth:t.encodeVideoInfo.encodeWidth,codedHeight:t.encodeVideoInfo.encodeHeight,format:"RGBA"},o=new VideoFrame(e,x),l={};l.year=t.curFrameInfo.year,l.month=t.curFrameInfo.month,l.day=t.curFrameInfo.day,l.hour=t.curFrameInfo.hour,l.minute=t.curFrameInfo.minute,l.second=t.curFrameInfo.second,l.milliseconds=t.curFrameInfo.milliseconds,t.oVideoEncoder.inputData(o,l),o.close(),e=null,t.recoderFrameNum++}r()}),t.encodeVideoInfo.encodeWidth,t.encodeVideoInfo.encodeHeight,t.recoderGetOriginData)}))}}))}},{key:"checkColorAnomaly",value:function(e,t,a){for(var r=0,i=t*a,n=0;n<e.length;n+=4){var s=e[n],x=e[n+1],o=e[n+2];x>1.5*s&&x>1.5*o&&r++}return r/i>.05}},{key:"respondFrameInfoCB",value:function(e){if(0!=this.displayFrameInfo.length&&(this.curFrameInfo.timeStamp!==e||0==e&&0==this.curFrameInfo.timeStamp)){var t=this.findFramebyTime(e,1);this.curFrameInfo.port=t.port,this.curFrameInfo.codecType=t.codecType,this.curFrameInfo.frameType=t.frameType,this.curFrameInfo.frameSize=t.frameSize,this.curFrameInfo.width=t.width-(t.cropLeft+t.cropRight),this.curFrameInfo.height=t.height-(t.cropTop+t.cropBottom),this.curFrameInfo.timeStamp=t.timeStamp,this.curFrameInfo.frameRate=t.frameRate,this.curFrameInfo.frameNum=t.frameNum,this.curFrameInfo.interlace=t.interlace,this.curFrameInfo.streamEnd=t.streamEnd,this.curFrameInfo.cropLeft=t.cropLeft,this.curFrameInfo.cropRight=t.cropRight,this.curFrameInfo.cropTop=t.cropTop,this.curFrameInfo.cropBottom=t.cropBottom,this.curFrameInfo.year=t.year,this.curFrameInfo.month=t.month,this.curFrameInfo.week=t.week,this.curFrameInfo.day=t.day,this.curFrameInfo.hour=t.hour,this.curFrameInfo.minute=t.minute,this.curFrameInfo.second=t.second,this.curFrameInfo.milliseconds=t.milliseconds,t=null,null!=this.displayFrameInfoCB&&this.displayFrameInfoCB(this.curFrameInfo)}}},{key:"findFramebyTime",value:function(e,t){var a=new Object;if(a=this.displayFrameInfo.find((function(t){return t.timeStamp==e})),1==t){var r=this.displayFrameInfo.findIndex((function(t){return t.timeStamp==e}));this.displayFrameInfo.splice(r,1)}return a}},{key:"chooseFrame",value:function(){var e=this;return new Promise((function(t,a){if(null==e.oVideoRender||null==e.oVideoDecoder)t(null);else if(e.oVideoDecoder.decoderObjNeedReset)e.oVideoDecoder.resetDecoder().then((function(){e.oVideoDecoder.decoderObjNeedReset=!1,t(null)}),(function(){a()}));else{var r=e.oVideoDecoder.GetFrameBufferLength();if(-1!=e.displayBuf)if(r<3){if(1==e.bSetStreamEnd&&(e.nstreamEndloopNum++,e.nstreamEndloopNum>=50&&null!=e.player&&null!=e.player.runtimeCBFun)){e.player.runtimeCBFun({nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:9}),e.bSetStreamEnd=!1,e.nstreamEndloopNum=0}t(null)}else 1==e.bSetStreamEnd&&(e.nstreamEndloopNum=0),e.oVideoDecoder.GetFrame().then((function(e){t(e)}),(function(){}));else if(0==r){if(1==e.bSetStreamEnd&&(e.nstreamEndloopNum++,e.nstreamEndloopNum>=50&&null!=e.player&&null!=e.player.runtimeCBFun)){e.player.runtimeCBFun({nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:9}),e.bSetStreamEnd=!1,e.nstreamEndloopNum=0}t(null)}else 1==e.bSetStreamEnd&&(e.nstreamEndloopNum=0),e.oVideoDecoder.GetFrame().then((function(e){t(e)}),(function(){}))}}))}},{key:"SetDisplayRegion",value:function(e,t,a,r){return null==this.oVideoRender?0:(this.sx=e,this.sy=t,this.sw=a,this.sh=r,this.oVideoRender.SetDisplayRect(e,t,a,r))}},{key:"SetCurStatus",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.bResetdisplayFrameInfoCB=t,this.renderCurStatus=e,1}},{key:"fast",value:function(){var e=this._GetFastSpeed(this.nplaySpeed);return this._SetPlaySpeed(e)}},{key:"slow",value:function(){var e=this._GetSlowSpeed(this.nplaySpeed);return this._SetPlaySpeed(e)}},{key:"Pause",value:function(e){if(e)2!=this.renderCurStatus&&6!=this.renderCurStatus||(this.renderLastStatus=this.renderCurStatus),this.SetCurStatus(3);else{if(3!==this.renderCurStatus)return 0;2===this.renderLastStatus?this.SetCurStatus(2):6===this.renderLastStatus&&this.SetCurStatus(6),this.resetTimer=!0}return 1}},{key:"NotifyBackPlay",value:function(e){if(e?this.SetCurStatus(6):this.SetCurStatus(2),null!=this.oVideoDecoder)if(2==this.PlayOrBackMode)this.oVideoDecoder.NotifyBackPlay(e,this.preTimeStamp,0);else{var t=1==e?2:1;this.oVideoDecoder.NotifyBackPlay(e,this.preTimeStamp,t)}return this.resetTimer=!0,1}},{key:"SetPlayOrBackSwitchMode",value:function(e){return this.PlayOrBackMode=e,1}},{key:"SetStretchPlay",value:function(e,t){return 2!=this.renderCurStatus||this.playSpeed>1.1||this.playSpeed<.9?0:(this.StretchPlayTime=e,this.StretchPlayedTime=0,this.StretchPlaySpeed=t,this.StretchPlayFlag=!0,this.resetTimer=!0,1)}},{key:"VideoStretchProcess",value:function(e){return this.StretchPlayFlag&&(this.printfFlag>0&&console.log("StretchPlayedTime:"+this.StretchPlayedTime+",StretchPlayTime:"+this.StretchPlayTime),this.StretchPlayedTime<this.StretchPlayTime?this.StretchPlayedTime+=e-this.preTimeStamp:(this.StretchPlayedTime=0,this.StretchPlayFlag=!1,this.resetTimer=!0)),1}},{key:"_refresh",value:function(){0!=this.frameBuffers.length&&this.paint(this.frameBuffers[0],!0)}},{key:"OneByOne",value:function(e){if(e)2!=this.renderCurStatus&&6!=this.renderCurStatus||(this.renderLastStatus=this.renderCurStatus),this.SetCurStatus(5),this.needForward=!0;else{if(5!==this.renderCurStatus)return-1;2===this.renderLastStatus?this.SetCurStatus(2):6===this.renderLastStatus&&this.SetCurStatus(6),this.resetTimer=!0,this.needForward=!1,this._SetPlaySpeed(1)}return 1}},{key:"SetCanvasSize",value:function(e,t,a){return null!=this.oVideoRender?this.oVideoRender.SetCanvasSize(e,t,a):0}},{key:"GetCanvasSize",value:function(){return null!=this.oVideoRender?this.oVideoRender.GetCanvasSize():0}},{key:"GetPlayedTime",value:function(){return this.curTimeStamp}},{key:"SetTargetRelativePos",value:function(e,t,a){this.nTargetRelativePos=e,this.nMPPlayMode=a,this.nMPPosType=t,this.ProcessPositionflag=!0}},{key:"_SetPlaySpeed",value:function(e){switch(e){case-16:case-8:case-4:case-2:case 1:case 2:case 4:case 8:case 16:case 32:case 64:break;default:return-1}return e===this.nplaySpeed||(this.nplaySpeed=e,this.playSpeed=e>0?e:-1/e,console.log("playSpeed:"+this.playSpeed),this.resetTimer=!0,this.needForward=!1,2!=this.renderCurStatus&&6!=this.renderCurStatus&&(2===this.renderLastStatus?this.SetCurStatus(2):6===this.renderLastStatus&&this.SetCurStatus(6))),1}},{key:"_GetFastSpeed",value:function(e){var t=0;switch(e){case-16:t=-8;break;case-8:t=-4;break;case-4:t=-2;break;case-2:t=1;break;case 1:t=2;break;case 2:t=4;break;case 4:t=8;break;case 8:t=16;break;case 16:t=32;break;case 32:t=64;break;default:t=0}return t}},{key:"_GetSlowSpeed",value:function(e){var t=0;switch(e){case-8:t=-16;break;case-4:t=-8;break;case-2:t=-4;break;case 1:t=-2;break;case 2:t=1;break;case 4:t=2;break;case 8:t=4;break;case 16:t=8;break;case 32:t=16;break;case 64:t=32;break;default:t=0}return t}},{key:"SetDisplayBuf",value:function(e){return this.displayBuf=e,this.LatcyTime=1==e?0:15==e?700:45==e?1900:e>6&&e<45?40*e+100:-1==e?0:50,1}},{key:"GetJPEG",value:function(){var e=this;null!=this.oVideoDecoder&&this.oVideoDecoder.GetImageYUV("jpeg",0,0,0,0).then((function(t){var a=t.yuvFrameBuffer,r=t.yuvLength,i=t.displayWidth,n=t.displayHeight,s=t.yuvType;-1!=a&&(e.player?e.player._GetImage2(a,r,i,n,"jpeg",s,0,0,0,0):postMessage({function:"imageYUV",value:a.buffer,size:r,width:i,height:n,type:"jpeg",yuvType:s,sx:0,sy:0,sw:0,sh:0},[a.buffer]))}),(function(){}))}},{key:"GetBMP",value:function(){var e=this;null!=this.oVideoDecoder&&this.oVideoDecoder.GetImageYUV("bmp",0,0,0,0).then((function(t){var a=t.yuvFrameBuffer,r=t.yuvLength,i=t.displayWidth,n=t.displayHeight,s=t.yuvType;-1!=a&&(e.player?e.player._GetImage2(a,r,i,n,"bmp",s,0,0,0,0):postMessage({function:"imageYUV",value:a.buffer,size:r,width:i,height:n,type:"bmp",yuvType:s,sx:0,sy:0,sw:0,sh:0},[a.buffer]))}),(function(){}))}},{key:"GetCropJPEG",value:function(){var e=this;null!=this.oVideoDecoder&&this.oVideoDecoder.GetImageYUV("jpeg",this.sx,this.sy,this.sw,this.sh).then((function(t){var a=t.yuvFrameBuffer,r=t.yuvLength,i=t.displayWidth,n=t.displayHeight,s=t.yuvType;-1!=a&&(e.player?e.player._GetImage2(a,r,i,n,"jpeg",s,e.sx,e.sy,e.sw,e.sh):postMessage({function:"imageYUV",value:a.buffer,size:r,width:i,height:n,type:"jpeg",yuvType:s,sx:e.sx,sy:e.sy,sw:e.sw,sh:e.sh},[a.buffer]))}),(function(){}))}},{key:"GetCropBMP",value:function(){var e=this;null!=this.oVideoDecoder&&this.oVideoDecoder.GetImageYUV("bmp",this.sx,this.sy,this.sw,this.sh).then((function(t){var a=t.yuvFrameBuffer,r=t.yuvLength,i=t.displayWidth,n=t.displayHeight,s=t.yuvType;-1!=a&&(e.player?e.player._GetImage2(a,r,i,n,"bmp",s,e.sx,e.sy,e.sw,e.sh):postMessage({function:"imageYUV",value:a.buffer,size:r,width:i,height:n,type:"bmp",yuvType:s,sx:e.sx,sy:e.sy,sw:e.sw,sh:e.sh},[a.buffer]))}),(function(){}))}},{key:"GetCanvasCapture",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support GetCanvasCapture","color:red"),0):(this.oVideoRender.GetCanvasData(e,t,a),1)}},{key:"SetDecodeFrameType",value:function(e){return this.waitIFrameTimestamp=e,1}},{key:"SetStreamEnd",value:function(e){return this.bSetStreamEnd=e,this.oVideoDecoder.SetStreamEnd(),1}},{key:"SetAntialias",value:function(e){return null!=this.oVideoRender?this.oVideoRender.SetAntialias(e):0}},{key:"SetFrameInfoCallBack",value:function(e,t){return t?(this.needSaveFrameInfo=!0,this.displayFrameInfoCB=e):(this.needSaveFrameInfo=!1,this.displayFrameInfoCB=null),1}},{key:"FEC_SetCanvasID",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetCanvasID(e):(this.FECCanvasID=e,0)}},{key:"FEC_ResetCorrectType",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_ResetCorrectType(e,t,a):0}},{key:"FEC_GetPort",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),-1):null!=this.oVideoRender?this.oVideoRender.FEC_GetPort(e,t):-1}},{key:"FEC_Enable",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_Enable(e):0}},{key:"FEC_SetParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetParam(e,t):0}},{key:"FEC_GetParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_GetParam(e,t):0}},{key:"FEC_SetViewParam",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetViewParam(e,t,a):0}},{key:"FEC_GetViewParam",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_GetViewParam(e,t,a):0}},{key:"FEC_SetWnd",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetWnd(e,t):0}},{key:"FEC_Disable",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_Disable(e,t,a):0}},{key:"FEC_DelPort",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_DelPort(e):0}},{key:"FEC_SetDisplayRegion",value:function(e,t,a,r,i,n,s){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetDisplayRegion(e,t,a,r,i,n,s):0}},{key:"FEC_SetBackCilling",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetBackCilling(e,t):0}},{key:"FEC_GetPTZPort",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),-1):null!=this.oVideoRender?this.oVideoRender.FEC_GetPTZPort(e,t,a):-1}},{key:"FEC_SetPTZDisplayMode",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC correct","color:red"),0):null!=this.oVideoRender?this.oVideoRender.FEC_SetPTZDisplayMode(e):0}},{key:"FEC_Capture",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support FEC_Capture","color:red"),0):this.oVideoRender.FEC_Capture(e,t)}},{key:"InputPrivateInfo",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support PrivateInfo","color:red"),0):((null!=e&&e.linesNum>0||null!=t&&t.nFontsNum>0)&&0==this.firstFrame&&(this.LatcyTime=100),this.curPrivateInfo.linesInfo.push(e),this.curPrivateInfo.fontInfo.push(t),this.curPrivateInfo.imageInfo.push(a),1)}},{key:"deepClone",value:function(e){if(null===e||"object"!==oe(e))return e;if(Array.isArray(e)){for(var t=[],a=0;a<e.length;a++)t[a]=this.deepClone(e[a]);return t}if(ArrayBuffer.isView(e)){var r=new Uint8Array(e.length);return r.set(e),r}var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=this.deepClone(e[n]));return i}},{key:"RenderPrivateData",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support PrivateInfo","color:red"),0):null!=this.oVideoRender?this.oVideoRender.RenderPrivateData(e,t):0}},{key:"RenderPrivateDataEx",value:function(e,t,a){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support PrivateInfo","color:red"),0):null!=this.oVideoRender?this.oVideoRender.RenderPrivateDataEx(e,t,a):0}},{key:"SetWaterMarkFont",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine||null==this.oVideoRender?(console.log("%c param error this.renderEngine:%d,this.oVideoRender:%d","color:red",this.renderEngine,this.oVideoRender),0):null!=this.oVideoRender?this.oVideoRender.SetWaterMarkFont(e):0}},{key:"SetWaterMarkImage",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetWaterMarkImage","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetWaterMarkImage(e):0}},{key:"SetMosaicType",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine||null==this.oVideoRender?(console.log("%c 2D render not support SetMosaicType","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetMosaicType(e):0}},{key:"SelectIntelInfoFeatureToDraw",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SelectIntelInfoFeatureToDraw","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SelectIntelInfoFeatureToDraw(e):0}},{key:"SetD3DPostProcess",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetD3DPostProcess","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetD3DPostProcess(e,t):0}},{key:"SetTextCanvas",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetD3DPostProcess","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetTextCanvas(e):0}},{key:"SetPrintLogFlag",value:function(e){return this.printfFlag=e,null!=this.oVideoDecoder&&this.oVideoDecoder.SetPrintLogFlag(e),null!=this.oVideoRender&&this.oVideoRender.SetPrintLogFlag(e),1}},{key:"SetRotateAngle",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetRotateAngle","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetRotateAngle(e):0}},{key:"InitEncoder",value:function(e,t){return e.encodeWidth>0||e.encodeHeight>0?(this.encodeVideoInfo.encodeWidth=e.encodeWidth,this.encodeVideoInfo.encodeHeight=e.encodeHeight):null!=this.curFrameInfo.width&&this.curFrameInfo.width>0&&this.curFrameInfo.width<=1400&&null!=this.curFrameInfo.height&&this.curFrameInfo.height>0&&this.curFrameInfo.height<=800?(this.encodeVideoInfo.encodeWidth=this.curFrameInfo.width,this.encodeVideoInfo.encodeHeight=this.curFrameInfo.height):(this.encodeVideoInfo.encodeWidth=1280,this.encodeVideoInfo.encodeHeight=720),e.bitrate>0?this.encodeVideoInfo.bitrate=e.bitrate:this.encodeVideoInfo.encodeWidth>1580?this.encodeVideoInfo.bitrate=4e6:this.encodeVideoInfo.encodeWidth>800?this.encodeVideoInfo.bitrate=2e6:this.encodeVideoInfo.bitrate=1e6,e.frameRate>0?this.encodeVideoInfo.frameRate=e.frameRate:"frameRate"in this.curFrameInfo&&(this.encodeVideoInfo.frameRate=this.curFrameInfo.frameRate),e.bitrateMode>0?this.encodeVideoInfo.bitrateMode=e.bitrateMode:this.encodeVideoInfo.bitrateMode=0,e.latencyMode>0?this.encodeVideoInfo.latencyMode=e.latencyMode:this.encodeVideoInfo.latencyMode=0,0==e.encodeType&&(this.encodeVideoInfo.encodeVideoType="avc"),this.recoderBaseTimestampMode=e.baseTimeStampMode,this.recoderGetOriginData=e.getOriginData,null==this.oVideoEncoder&&(this.oVideoEncoder=new qe(this,this.player)),t.sampleRate>0?this.encodeAudioInfo.sampleRate=t.sampleRate:this.encodeAudioInfo.sampleRate=48e3,t.numberOfChannels>0?this.encodeAudioInfo.numberOfChannels=t.numberOfChannels:this.encodeAudioInfo.numberOfChannels=1,t.bitrate>0?this.encodeAudioInfo.bitrate=t.bitrate:this.encodeAudioInfo.bitrate=128e3,0==t.encodeType&&(this.encodeAudioInfo.encodeAudioType="aac"),null==this.oAudioEncoder&&(this.oAudioEncoder=new Qe(this,this.player)),1}},{key:"StartVideoEncode",value:function(e){return null!=this.oVideoEncoder&&(this.oVideoEncoder.initEncoder("avc1.4d4032",this.encodeVideoInfo,e),this.startRecoderFlag=!0,this.stopRecoderFlag=!1),1}},{key:"StartAudioEncode",value:function(e){return null!=this.oAudioEncoder&&this.oAudioEncoder.initEncoder("mp4a.40.2",this.encodeAudioInfo,e),1}},{key:"InputPCMToEncode",value:function(e,t){if(null!=this.oAudioEncoder&&0==this.stopRecoderFlag){var a={format:"s16",sampleRate:this.encodeAudioInfo.sampleRate,numberOfFrames:e.length/2,numberOfChannels:1,timestamp:t,data:e},r=new AudioData(a);this.oAudioEncoder.inputData(r),r.close()}return 1}},{key:"StopEncode",value:function(){return this.startRecoderFlag=!1,this.stopRecoderFlag=!0,this.recoderFrameNum=0,null!=this.oAudioEncoder&&(this.oAudioEncoder.stopEncode(),this.oAudioEncoder=null),null!=this.oVideoEncoder&&(this.oVideoEncoder.stopEncode(),this.oVideoEncoder=null),this.recoderBaseTimestampMode=0,this.recoderGetOriginData=0,1}},{key:"SetRunTimeInfoCallBack",value:function(e,t){return this.runtimeCBFun=t,null!=this.oVideoDecoder&&this.oVideoDecoder.SetRunTimeInfoCallBackFun(e,t),1}},{key:"SetRunTimeInfoCallbackType",value:function(e,t,a){return 2==e?a?this.DecodeTypeFlagMap.set(t,1):this.DecodeTypeFlagMap.delete(t):3==e&&(a?this.RenderTypeFlagMap.set(t,1):this.RenderTypeFlagMap.delete(t)),null!=this.oVideoDecoder&&2==e&&this.oVideoDecoder.SetRunTimeInfoCallbackType(e,t,a),1}},{key:"IsVisible",value:function(e){return null!=this.oVideoDecoder&&this.oVideoDecoder.IsVisible(e),1}},{key:"SetPanoramaDisplayEffect",value:function(e){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetPanoramaDisplayEffect","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetPanoramaDisplayEffect(e):0}},{key:"SetPanoramaSphereViewParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support SetPanoramaSphereViewParam","color:red"),0):null!=this.oVideoRender?this.oVideoRender.SetPanoramaSphereViewParam(e,t):0}},{key:"GetPanoramaSphereViewParam",value:function(e,t){return"2d"===this.renderEngine||"2D"===this.renderEngine?(console.log("%c 2D render not support GetPanoramaSphereViewParam","color:red"),0):null!=this.oVideoRender?this.oVideoRender.GetPanoramaSphereViewParam(e,t):0}},{key:"ResetBuffer",value:function(){return this.resetTimer=!0,this.oVideoDecoder.clearDecoderObjBuffer(),1}}]),a}(),et=function(){function a(t){e(this,a),this.player=t,this.oVideoPlayCtrl=new $e(t)}return t(a,[{key:"init",value:function(e,t,a,r){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.init(e,t,a,r)}},{key:"inputData",value:function(e,t){null!=this.oVideoPlayCtrl&&this.oVideoPlayCtrl.inputData(e,t)}},{key:"SetDisplayRegion",value:function(e,t,a,r){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.SetDisplayRegion(e,t,a,r)}},{key:"stop",value:function(){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.SetCurStatus(4),this.oVideoPlayCtrl=null,window.g_printfFlag>=0&&console.log(">>>JS 03 destroy oVideoPlayCtrl")}},{key:"fast",value:function(){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.fast()?0:void 0}},{key:"slow",value:function(){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.slow()?0:void 0}},{key:"SetDisplayBuf",value:function(e){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.SetDisplayBuf(e)?0:void 0}},{key:"Pause",value:function(e){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.Pause(e)?0:void 0}},{key:"OneByOne",value:function(e){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.OneByOne(e)?0:void 0}},{key:"NotifyBackPlay",value:function(e){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.NotifyBackPlay(e)?0:void 0}},{key:"SetPlayOrBackSwitchMode",value:function(e){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.SetPlayOrBackSwitchMode(e)?0:void 0}},{key:"SetStretchPlay",value:function(e,t){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.SetStretchPlay(e,t)?0:void 0}},{key:"SetCanvasSize",value:function(e,t,a){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.SetCanvasSize(e,t,a)?0:void 0}},{key:"GetCanvasSize",value:function(){return null===this.oVideoPlayCtrl||1!==this.oVideoPlayCtrl.GetCanvasSize()?0:void 0}},{key:"GetPlayedTime",value:function(){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.GetPlayedTime()}},{key:"SetTargetRelativePos",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetTargetRelativePos(e,t,a)}},{key:"needReset",value:function(e){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.SetCurStatus(0,e)}},{key:"GetJPEG",value:function(){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.GetJPEG()}},{key:"GetBMP",value:function(){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.GetBMP()}},{key:"GetCropJPEG",value:function(){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.GetCropJPEG()}},{key:"GetCropBMP",value:function(){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.GetCropBMP()}},{key:"GetCanvasCapture",value:function(e,t,a){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.GetCanvasCapture(e,t,a)}},{key:"SetDecodeFrameType",value:function(e){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.SetDecodeFrameType(e)}},{key:"SetStreamEnd",value:function(e){if(null===this.oVideoPlayCtrl)return 0;this.oVideoPlayCtrl.SetStreamEnd(e)}},{key:"SetAntialias",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetAntialias(e)}},{key:"SetFrameInfoCallBack",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetFrameInfoCallBack(e,t)}},{key:"FEC_SetCanvasID",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetCanvasID(e)}},{key:"FEC_ResetCorrectType",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_ResetCorrectType(e,t,a)}},{key:"FEC_GetPort",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_GetPort(e,t)}},{key:"FEC_Enable",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_Enable(e)}},{key:"FEC_SetParam",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetParam(e,t)}},{key:"FEC_GetParam",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_GetParam(e,t)}},{key:"FEC_SetViewParam",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetViewParam(e,t,a)}},{key:"FEC_GetViewParam",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_GetViewParam(e,t,a)}},{key:"FEC_SetWnd",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetWnd(e,t)}},{key:"FEC_Disable",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_Disable(e,t,a)}},{key:"FEC_DelPort",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_DelPort(e)}},{key:"FEC_SetDisplayRegion",value:function(e,t,a,r,i,n,s){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetDisplayRegion(e,t,a,r,i,n,s)}},{key:"FEC_SetBackCilling",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetBackCilling(e,t)}},{key:"FEC_GetPTZPort",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_GetPTZPort(e,t,a)}},{key:"FEC_SetPTZDisplayMode",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_SetPTZDisplayMode(e)}},{key:"FEC_Capture",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.FEC_Capture(e,t)}},{key:"InputPrivateInfo",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.InputPrivateInfo(e,t,a)}},{key:"RenderPrivateData",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.RenderPrivateData(e,t)}},{key:"RenderPrivateDataEx",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.RenderPrivateDataEx(e,t,a)}},{key:"SetWaterMarkFont",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetWaterMarkFont(e)}},{key:"SetWaterMarkImage",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetWaterMarkImage(e)}},{key:"SetMosaicType",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetMosaicType(e)}},{key:"SelectIntelInfoFeatureToDraw",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SelectIntelInfoFeatureToDraw(e)}},{key:"SetD3DPostProcess",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetD3DPostProcess(e,t)}},{key:"SetTextCanvas",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetTextCanvas(e)}},{key:"SetPrintLogFlag",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetPrintLogFlag(e)}},{key:"SetRotateAngle",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetRotateAngle(e)}},{key:"InitEncoder",value:function(e,t){return null===this.oVideoPlayCtrl?0:(this.oVideoPlayCtrl.InitEncoder(e,t),1)}},{key:"StartVideoEncode",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.StartVideoEncode(e)}},{key:"StartAudioEncode",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.StartAudioEncode(e)}},{key:"InputPCMToEncode",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.InputPCMToEncode(e,t)}},{key:"StopEncode",value:function(){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.StopEncode()}},{key:"SetRunTimeInfoCallBack",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetRunTimeInfoCallBack(e,t)}},{key:"SetRunTimeInfoCallbackType",value:function(e,t,a){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetRunTimeInfoCallbackType(e,t,a)}},{key:"IsVisible",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.IsVisible(e)}},{key:"SetPanoramaDisplayEffect",value:function(e){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetPanoramaDisplayEffect(e)}},{key:"SetPanoramaSphereViewParam",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.SetPanoramaSphereViewParam(e,t)}},{key:"GetPanoramaSphereViewParam",value:function(e,t){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.GetPanoramaSphereViewParam(e,t)}},{key:"ResetBuffer",value:function(){return null===this.oVideoPlayCtrl?0:this.oVideoPlayCtrl.ResetBuffer()}}]),a}(),tt=[];!function(){for(var e=0;e<8;e++){tt[e]=[];for(var t=0;t<64;t++)tt[e][t]=null}}();var at=null,rt=!1,it=!1,nt=1,st=1,xt={bSupHardOrSoft:!0,bSupHardDecAVC:!0,bSupHardDecHEVC:!0,cmd:"unloaded",errorCode:0,status:0},ot=-1;window.JSPlayM4_RawDataCallBack=function(e,t,a,r){null!=tt[r][e]&&tt[r][e].__proto__.hasOwnProperty("JSPlayM4_InputRawData")&&tt[r][e].JSPlayM4_InputRawData(e,t,a)},window.JSPlayM4_PrivateInfoCallBack=function(e,t,a,r,i){null!=tt[i][e]&&tt[i][e].__proto__.hasOwnProperty("JSPlayM4_InputPrivateInfo")&&tt[i][e].JSPlayM4_InputPrivateInfo(t,a,r)};var lt=function(){function a(t,r,i){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,x=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"webgl",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(e(this,a),this.printfFlag=window.g_printfFlag,this.jsplayer=t,this.szBasePath=r,this.fn=i,this.nUser=s,this.renderEngine=x,this.hasWebWorker=o,this.setHasThread=l,this.oJSPlayerObj=this,this.port=-1,this.pcVideoManager=null,this.decodeWorker=null,this.offscreen=null,this.canvasID="",this.canvasCnv=null,this.rtpType=0,this.decodeEngine=1,this.FirstFrameCallBackflag=!1,this.inputDataBuffer=null,this.inputDataBufferSize=204800,this.canvasIDData=null,this._decoderLoaded=!1,this.streamOpenMode=0,this.width=0,this.height=0,this.rawDataFrameInfoBuffer=null,this.rawDataFrameInfo={},this.displayFrameInfo={},this.startTimeStamp=0,this.decodeFrameType=0,this.displayBuf=0,this.needSetDisplayBuf=!1,this.FirstFrame=!0,this.codecType=0,this.curStatus=0,this.lastStatus=0,this.playSpeed=1,this.needWaitIFrame=!1,this.sysType=0,this.SetDisRegionBottom=0,this.SetDisRegionLeft=0,this.SetDisRegionRight=0,this.SetDisRegionTop=0,this.cropBottom=0,this.cropLeft=0,this.cropRight=0,this.cropTop=0,this.canvasWidth=960,this.canvasHeight=480,this.enableCanvas=!0,this.needResetCanvasSize=!1,this.hasThread=0,this.aTotalBuffer=[],this.iFrameNum=0,this.bWriteData=!0,this.downloadFlag=!1,this.bWriteAudioPCMData=!0,this.audioPCMBuffer=[],this.iAudioPCMFrameNum=0,this.pBmpData=null,this.nBmpDataSize=0,this.pBmpSizeData=null,this.bmpDataCallback=null,this.bmpDownloadFlag=!1,this.pJpegData=null,this.nJpegDataSize=0,this.pJPEGSizeData=null,this.jpegDataCallback=null,this.jpegDownloadFlag=!1,this.CropjpegDataCallback=null,this.CropjpegDownloadFlag=!1,this.CropbmpDataCallback=null,this.CropbmpDownloadFlag=!1,this.imageCB=null,this.pFontParam=null,this.pWaterMarkFontData=null,this.nWaterMarkFontLen=0,this.textCanvas=null,this.setTextCanvasFlag=!1,this.rgbDataBuffer=null,this.recoderVideoDataCBFun=null,this.recoderAudioDataCBFun=null,this.recoderAudioAnyWhere=!1,this.pMosaicParam=null,this.stDisplayRect={top:0,left:0,right:0,bottom:0},this.iZoomNum=0,this.iRatio_x=1,this.iRatio_y=1,this.pFECTotalCanvasIDData=null,this.iFECCanvasIDLen=0,this.iFECZoomNum=0,this.iFECRatio_x=1,this.iFECRatio_y=1,this.stFECDisplayRect={top:0,left:0,right:0,bottom:0},this.FECcanvasIDArray=[],this.FECGetPortCB=null,this.FECGetPTZPortCB=null,this.FECParamCB=null,this.FECViewParamCB=null,this.GetPanoramaSphereViewParamCB=null,this.FECImageCB=null,this.FECRgbDataBuffer=null,this.FFCallBackFun=null,this.addtionCallBackFun=null,this.additionDataBuffer=null,this.additionDataBufferSize=0,this.displayCallBackFun=null,this.decCallBackFun=null,this.getPlayTimeCallBackFun=null,this.runtimeCBFun=null,this.callbackFlag=!1,this.runTimeModule=0,this.needSetRunTimeInfoCB=!1,this.decodeQueueSize=0,this.decodeFrameSize=0,this.streamInfoCBFun=null,this.streamInfoType=0,this.ResamplePCMCallBack=null,this.PostMpStreamOffsetCBFun=null,this.SetPlayPosCBFun=null,this.HardDecToJpegCBFun=null,this.HardDecToJpegQuality=1,this.HardDecToJpegInterval=2,this.HardToJpegZoomWidth=100,this.HardToJpegZoomHeight=100,this.HardToJpegZoomResolutionFlag=0,this.pstRuntimeInfo={nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:0,nInputDataInterval:0,nFrameNumInterval:0,nAverageDecodeTime:0,nSystemFormat:0,nDetectRes:0,nMp4FileTime:0,nMp4TotalFrameNum:0,AbsTimeYear:0,AbsTimeMonth:0,AbsTimeDay:0,AbsTimeHour:0,AbsTimeMinute:0,AbsTimeSecond:0,AbsTimeMilliseconds:0},this.needSetSecretKey=!1,this.SecretKeyData=null,this.keyType=1,this.pKeyDataLen=128,this.needPlaySound=!1,this.decInterval=-1,this.volumeValue=-1,this.renderPrivateInfo=new Map,this.renderIntelSubEx=new Map,this.renderIntelFlagEx=new Map,this.reversePlay=!1,this.decodeThreadNum=0,this.antialiasFlag=-1,this.decodeERCLevel=0,this.d3dPostProcessType=0,this.d3dPostProcessValue=0,this.needSetD3DPostProcess=!1,this.resetBufferType=-1,this.playOrBackSwitchMode=0,this.setStretchPlayTime=0,this.setStretchPlaySpeed=0,this.autoSmoothPlayModel=-1,this.keepPlaySpeed=-1,this.FECCanvasID="",this.FECPlaceType=0,this.FECCorrectType=0,this.anrParamFlag=!1,this.anrParamLevel=-1,this.resampleFlag=!1,this.resampleRate=48e3,this.globalBaseTime=null,this.needSetSkipErrorData=!1,this.skipErrorData=-1,this.needSetDemuxModel=!1,this.setDemuxModelType=-1,this.setDemuxModelFlag=!1,this.setAudioThreadModel=-1,this.syncToAudio=-1,this.twodRotateAngle=0,this.needSetRotateAngle=!1,this.additionDataType=0,this.additionFlag=0,this.addCBFun=null,this.needSetAdditionDataCB=!1,this.needPlaySoundShare=!1,this.needSetRunTimeInfoCBType=!1,this.HIK40Head=[],this.HIKHeadSize=40,this.HIKPoolSize=2097152,this.SDPInfoData=null,this.SDPInfoLen=0,this.SDPInfoPoolSize=4194304,this.SDPInfoProtocolType=1,this.SDPInfoSessionInfoType=1,this.wasmMemory=null,this.initialMemory=8192,this.maximumMemory=16368,this.OpenStreamMode=0,xt.cmd="unloaded",xt.errorCode=0,xt.status=0,this.supportWebCodecs=_getFSupportWebCodecs(),this.supportSab=!!window.SharedArrayBuffer,this.offscreen=!!window.OffscreenCanvas,this.supportOffscreen=!1,this.offscreen){var _=new OffscreenCanvas(1,1),h=_.getContext("webgl");h&&(this.supportOffscreen=!0,h.getExtension("WEBGL_lose_context").loseContext()),_=null,h=null}if(null!=at||rt)xt.cmd="loaded",new Promise((function(e,t){e()})).then((function(){if(null!==at&&it)n.fn(xt);else var e=setInterval((function(){null!==at&&it&&(clearInterval(e),e=null,n.fn(xt))}),10)}));else if(rt=!0,ot=_getFExplore(),this.supportWebCodecs?(xt.bSupHardOrSoft=!0,xt.bSupHardDecAVC=!0,xt.bSupHardDecHEVC=!0):(this.printfFlag>=0&&console.info("%c1>your browser does not support hard Decoder ","color: red"),st=0,nt=0,xt.bSupHardDecAVC=!1,xt.bSupHardDecHEVC=!1,this.supportSab&&this.supportOffscreen?xt.bSupHardOrSoft=!0:xt.bSupHardOrSoft=!1),this.getwasmMemory(),xt.bSupHardOrSoft){this.printfFlag>=0&&console.log("%cstart load Decoder.js time:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds(),"color: blue");var f=this.szBasePath,c=document.createElement("script");c.type="text/javascript",c.src=f,this.printfFlag>=0&&console.info("%c>>>>The Decoder.js path:%s","color: green",f),this.supportSab&&this.supportOffscreen?this.wasmMemory=new WebAssembly.Memory({initial:this.initialMemory,maximum:this.maximumMemory,shared:!0}):this.wasmMemory=new WebAssembly.Memory({initial:this.initialMemory,maximum:this.maximumMemory}),console.log("create wasmMemory this.initialMemory:"+this.initialMemory+",this.maximumMemory:"+this.maximumMemory),c.onload=function(){window.JSPlayerModule({wasmMemory:n.wasmMemory}).then((function(e){at=e,n._decoderLoaded=!0,xt.cmd="loaded";var t=at._JSPlayM4_GetSDKVersion(),a=at._JSPlayM4_GetBuildDate();n.printfFlag>=0&&console.log("%cEnd load Decoder.js time:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()+",version:"+t.toString(16)+",buildDate:"+a.toString(16),"color: blue"),at._JSPlayM4_SetPrintLogFlag(-1,n.printfFlag),n.supportWebCodecs?VideoDecoder.isConfigSupported({codec:"avc1.42001f",hardwareAcceleration:"prefer-hardware"}).then((function(e){"prefer-hardware"==e.config.hardwareAcceleration&&e.supported?(st=1,xt.bSupHardDecAVC=!0,n.printfFlag>=0&&console.info("%c1>your browser support 264 hard Decoder","color: green"),ot>97||-1===ot?VideoDecoder.isConfigSupported({codec:"hvc1.1.6.L123.00",hardwareAcceleration:"prefer-hardware"}).then((function(e){console.log("%c hevcConfigInfo.config.hardwareAcceleration:"+e.config.hardwareAcceleration,"color:red"),"prefer-hardware"==e.config.hardwareAcceleration&&e.supported?(nt=1,xt.bSupHardDecHEVC=!0,n.printfFlag>=0&&console.info("%c2>your browser support 265 hard Decoder","color: green")):(nt=0,xt.bSupHardDecHEVC=!1,n.printfFlag>=0&&console.info("%c2>your browser not support 265 hard Decoder","color: red")),n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0)})):(nt=0,xt.bSupHardDecHEVC=!1,n.printfFlag>=0&&console.info("%c2>your browser not support 265 hard Decoder chromeVersion:"+ot,"color: red"),n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0))):(st=0,xt.bSupHardDecAVC=!1,nt=0,xt.bSupHardDecHEVC=!1,n.printfFlag>=0&&console.info("%c1>your browser not support 264/265 hard Decoder","color: red"),n.supportSab&&n.supportOffscreen?xt.bSupHardOrSoft=!0:xt.bSupHardOrSoft=!1,n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0))})).catch((function(){n.supportSab&&n.supportOffscreen?xt.bSupHardOrSoft=!0:xt.bSupHardOrSoft=!1,st=0,xt.bSupHardDecAVC=!1,nt=0,xt.bSupHardDecHEVC=!1,n.printfFlag>=0&&console.log("%c2>hard decode supported error","color: red"),n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0)})):(n.supportSab&&n.supportOffscreen?xt.bSupHardOrSoft=!0:xt.bSupHardOrSoft=!1,n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0))}))},document.body.appendChild(c)}else this.printfFlag>=0&&console.log("%c not support hard or soft","color:red"),new Promise((function(e,t){e()})).then((function(){n.callbackFlag||(n.callbackFlag=!0,n.fn(xt),it=!0)}))}return t(a,[{key:"startWorker",value:function(e){function t(t,a){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){if(window.Worker){if(null==t.decodeWorker){if(t.decodeWorker=new _,null==t.decodeWorker)return 0;this.printfFlag>=0&&console.log("decodeWorker create success!")}t.canvasCnv=document.getElementById(e),t.offscreen=t.canvasCnv.transferControlToOffscreen(),t.decodeWorker.postMessage({command:"init",streamOpenMode:t.streamOpenMode,canvas:t.offscreen,sab:t.supportSab,renderEngine:t.renderEngine,printfLog:t.printfFlag},[t.offscreen]),0!=t.displayBuf&&t.decodeWorker.postMessage({command:"SetDisplayBuf",value:t.displayBuf}),""!=t.FECCanvasID&&t.decodeWorker.postMessage({command:"SetCanvasID",canvasID:t.FECCanvasID}),t.decodeWorker.onmessage=function(e){var a=e.data;switch(a.function){case"error":startWorker(t.canvasID,t);break;case"GetFrameData":var r=new Uint8Array(a.data);t.downloadRTPData(r);break;case"GetRawData":t.JSPlayM4_GetRawData();break;case"OrderError":console.log(">>>JS OrderError");break;case"GetPlayedTime":var i=a.value;t.getPlayTimeCallBackFun&&t.getPlayTimeCallBackFun(i-t.startTimeStamp);break;case"resetEnd":t.JSPlayM4_ResetEnd();break;case"bitmap":var n=a.value,s=a.type,x=a.sx,o=a.sy,l=a.sw,_=a.sh,h=a.framenum;t._GetImage(n,s,x,o,l,_,h);break;case"imageYUV":var f=new Uint8Array(a.value),c=a.size,u=new Uint8Array(f),d=a.type,p=a.width,m=a.height,S=a.yuvType,R=a.sx,P=a.sy,y=a.sw,b=a.sh;t._GetImage2(u,c,p,m,d,S,R,P,y,b),f=null,u=null,a.value=null;break;case"stop":t.decodeWorker=null,t.printfFlag>=0&&console.log("HardWorker is null");break;case"firstFrameCB":null!=t.FFCallBackFun&&t.FFCallBackFun({decodeEngine:1});break;case"SetPlayPosCB":var E={nRes:1};E.nRelativePos=a.value,null!=t.SetPlayPosCBFun&&t.SetPlayPosCBFun(E);break;case"SetFrameInfoCallBack":t.displayFrameInfo.port=a.curFrameInfo.port,t.displayFrameInfo.codecType=a.curFrameInfo.codecType,t.displayFrameInfo.frameType=a.curFrameInfo.frameType,t.displayFrameInfo.frameSize=a.curFrameInfo.frameSize,t.displayFrameInfo.width=a.curFrameInfo.width,t.displayFrameInfo.height=a.curFrameInfo.height,t.displayFrameInfo.timeStamp=a.curFrameInfo.timeStamp,t.displayFrameInfo.frameRate=a.curFrameInfo.frameRate,t.displayFrameInfo.frameNum=a.curFrameInfo.frameNum,t.displayFrameInfo.interlace=a.curFrameInfo.interlace,t.displayFrameInfo.streamEnd=a.curFrameInfo.streamEnd,t.displayFrameInfo.cropLeft=a.curFrameInfo.cropLeft,t.displayFrameInfo.cropRight=a.curFrameInfo.cropRight,t.displayFrameInfo.cropTop=a.curFrameInfo.cropTop,t.displayFrameInfo.cropBottom=a.curFrameInfo.cropBottom,t.displayFrameInfo.year=a.curFrameInfo.year,t.displayFrameInfo.month=a.curFrameInfo.month,t.displayFrameInfo.week=a.curFrameInfo.week,t.displayFrameInfo.day=a.curFrameInfo.day,t.displayFrameInfo.hour=a.curFrameInfo.hour,t.displayFrameInfo.minute=a.curFrameInfo.minute,t.displayFrameInfo.second=a.curFrameInfo.second,t.displayFrameInfo.milliseconds=a.curFrameInfo.milliseconds;break;case"FECGetViewParam":null!=t.FECViewParamCB&&t.FECViewParamCB(a.Param3D);break;case"GetPanoramaSphereViewParam":null!=t.GetPanoramaSphereViewParamCB&&t.GetPanoramaSphereViewParamCB(a.ParamVR);break;case"FECGetParam":null!=t.FECParamCB&&t.FECParamCB(a.param2d);break;case"FECGetPort":null!=t.FECGetPortCB&&t.FECGetPortCB(a.fishSubPort);break;case"FECGetPTZPort":null!=t.FECGetPTZPortCB&&t.FECGetPTZPortCB(a.fishSubPort);break;case"GetDecodeBufferSize":null!=a.rawSize&&null!=a.frameSize&&(t.decodeQueueSize=a.rawSize,t.decodeFrameSize=a.frameSize);break;case"GetCanvasCapture":if(0!=a.width&&0!=a.height){var g=new Uint8Array(a.frameData);t.imageCB(g,a.width,a.height)}break;case"FECCapture":if(0!=a.width&&0!=a.height){var F=new Uint8Array(a.frameData);t.FECImageCB(F,a.width,a.height,a.fishSubPort)}break;case"VideoRecoderInfo":var C=new Uint8Array(a.videoInfo.rawData),v=a.videoInfo;v.rawData=C,null!=t.recoderVideoDataCBFun&&t.recoderVideoDataCBFun(v),C=null;break;case"AudioRecoderInfo":var T=new Uint8Array(a.audioInfo.rawData),D=a.audioInfo;D.rawData=T,null!=t.recoderAudioDataCBFun&&t.recoderAudioDataCBFun(D),T=null;break;case"runtimeInfo":null!=t.runtimeCBFun&&t.runtimeCBFun(a.pstRuntimeInfo)}},t.decodeWorker.addEventListener("error",(function(e){console.error(e)}))}}))},{key:"JSPlayM4_GetDecodeBufferSize",value:function(e,t){return null!=e&&null!=t&&(this.decodeQueueSize=e,this.decodeFrameSize=t),1}},{key:"JSPlayM4_SetStreamEnd",value:function(e){if(1===this.decodeEngine)if(this.hasWebWorker){if(null==this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetStreamEnd",bTrue:e})}else null!=this.pcVideoManager&&this.pcVideoManager.SetStreamEnd(e)}},{key:"JSPlayM4_GetPort",value:function(){return this.printfFlag>0&&console.log(">>>>>yff>>> JSPlayM4_GetPort 1 "),null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetPort","color: red"),0):(this.port=at._JSPlayM4_GetPort(),tt[this.nUser][this.port]=this.oJSPlayerObj,this.printfFlag>0&&console.log(">>>>>yff>>> JSPlayM4_GetPort 2 this.port:"+this.port),1)}},{key:"JSPlayM4_SetStreamOpenMode",value:function(e){return this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_SetStreamOpenMode 1 mode:"+e),null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetStreamOpenMode","color: red"),0):(this.streamOpenMode=e,this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_SetStreamOpenMode 2 mode:"+e),null==this.pcVideoManager&&(this.pcVideoManager=new et(this)),at._JSPlayM4_SetStreamOpenMode(this.port,e))}},{key:"JSPlayM4_OpenStream",value:function(e,t,a){if(this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_OpenStream 1 :"+e+",this.port:"+this.port),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_OpenStream","color: red"),0;var r=at._malloc(t);if(null===r)return console.log("hikHeadBuffer malloc failed"),0;var i=new Uint8Array(e.buffer);if(5==e[10]&&0==e[11]){if(this.codecType=5,!xt.bSupHardDecHEVC&&!this.supportSab)return console.info("%c3>The codecType is VIDEO_AVC265,not support SharedArrayBuffer","color: red"),w}else 1==e[10]&&0==e[11]?this.codecType=1:0==e[10]&&1==e[11]?this.codecType=256:4==e[10]&&0==e[11]?this.codecType=4:this.codecType=0;at.writeArrayToMemory(i,r);var n=at._JSPlayM4_OpenStream(this.port,r,t,a);return null!==r&&(at._free(r),r=null),i=null,this.HIK40Head=new Uint8Array(e),this.HIKHeadSize=t,this.HIKPoolSize=a,this.OpenStreamMode=0,n}},{key:"JSPlayM4_OpenStreamAdvanced",value:function(e,t,a,r,i){if(this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_OpenStreamAdvanced 1 :"+r+",this.port:"+this.port),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_OpenStreamAdvanced","color: red"),0;var n=this._stringToBytes(r),s=at._malloc(a);if(null!==s){var x=at.HEAPU8.subarray(s,s+a),o=new Uint8Array(a);x.set(o,0),x.set(new Uint8Array(n)),x=null,o=null;var l=at._JSPlayM4_OpenStreamAdvanced(this.port,e,t,a,s,i);return null!==s&&(at._free(s),s=null),this.SDPInfoData=r,this.SDPInfoLen=a,this.SDPInfoPoolSize=i,this.SDPInfoProtocolType=e,this.SDPInfoSessionInfoType=t,this.OpenStreamMode=1,l}}},{key:"JSPlayM4_SetDecodeEngine",value:function(e){return this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_SetDecodeEngine 1:"+e),0!=e&&1!=e?(console.log("0 is softDecode, 1 is hardDecoder,decodeEngine:"+e),0):0!==e||this.supportSab&&this.supportOffscreen?(this.decodeEngine=e,1):(this.jsplayer._switchV3ToV1(this.streamOpenMode,this.HIK40Head,this.HIKHeadSize,this.HIKPoolSize,!0),0)}},{key:"_switchHardToSoft",value:function(){return this.JSPlayM4_Stop(!0),this.JSPlayM4_CloseStream(),this.JSPlayM4_FreePort(),this.supportSab&&this.supportOffscreen?(this.JSPlayM4_SetDecodeEngine(0)&&(console.log("V3 switchHardToSoft this.szBasePath:"+this.szBasePath),this.JSPlayM4_GetPort(),this.JSPlayM4_SetStreamOpenMode(this.streamOpenMode),0==this.OpenStreamMode?this.JSPlayM4_OpenStream(this.HIK40Head,this.HIKHeadSize,this.HIKPoolSize):this.JSPlayM4_OpenStreamAdvanced(this.SDPInfoProtocolType,this.SDPInfoSessionInfoType,this.SDPInfoLen,this.SDPInfoData,this.SDPInfoPoolSize),this.JSPlayM4_Play(null,!0),null!=this.runtimeCBFun&&(this.pstRuntimeInfo.nRunTimeModule=2,this.pstRuntimeInfo.nStrVersion=1,this.pstRuntimeInfo.nFrameTimeStamp=0,this.pstRuntimeInfo.nFrameNum=0,this.pstRuntimeInfo.nErrorCode=3,this.pstRuntimeInfo.nInputDataInterval=0,this.pstRuntimeInfo.nFrameNumInterval=0,this.pstRuntimeInfo.nAverageDecodeTime=0,this.pstRuntimeInfo.nSystemFormat=this.sysType,this.runtimeCBFun(this.pstRuntimeInfo))),1):(this.jsplayer._switchV3ToV1(this.streamOpenMode,this.HIK40Head,this.HIKHeadSize,this.HIKPoolSize,!0),0)}},{key:"_HardToSoftNeedResetParam",value:function(){if(null!=this.FFCallBackFun&&at._JSPlayM4_SetFirstFrameCallBack(this.port,this.FirstFrameCallBackflag,this.nUser),this.needSetSecretKey&&this.JSPlayM4_SetSecretKey(this.keyType,this.SecretKeyData,this.pKeyDataLen),null!=this.globalBaseTime&&this.globalBaseTime.month>0&&this.globalBaseTime.month<13&&this.JSPlayM4_SetGlobalBaseTime(this.globalBaseTime.year,this.globalBaseTime.month,this.globalBaseTime.day,this.globalBaseTime.hour,this.globalBaseTime.min,this.globalBaseTime.sec,this.globalBaseTime.ms),this.needSetSkipErrorData&&this.JSPlayM4_SkipErrorData(this.skipErrorData),this.needSetDemuxModel&&this.JSPlayM4_SetDemuxModel(this.setDemuxModelType,this.setDemuxModelFlag),this.needSetAdditionDataCB&&this.JSPlayM4_SetAdditionDataCallBack(this.additionDataType,this.additionFlag,this.addCBFun),this.JSPlayM4_SetDecodeFrameType(this.decodeFrameType),-1!=this.decInterval&&at._JSPlayM4_SetIFrameDecInterval(this.port,nInterval),0!=this.decodeThreadNum&&at._JSPlayM4_SetDecodeThreadNum(this.port,this.decodeThreadNum),0!=this.decodeERCLevel&&at._JSPlayM4_SetDecodeERC(this.port,this.decodeERCLevel),-1!=this.resetBufferType&&at._JSPlayM4_ResetBuffer(this.port,this.resetBufferType),this.needPlaySound&&this.JSPlayM4_PlaySound(),this.needPlaySoundShare&&this.JSPlayM4_PlaySoundShare(),-1!=this.setAudioThreadModel&&this.JSPlayM4_SetAudioThreadModel(this.setAudioThreadModel),-1!=this.syncToAudio&&this.JSPlayM4_SyncToAudio(this.syncToAudio),this.anrParamFlag&&-1!=this.anrParamLevel&&this.JSPlayM4_SetANRParam(this.anrParamFlag,this.anrParamLevel),this.resampleFlag&&this.JSPlayM4_SetResampleValue(this.resampleFlag,this.resampleRate),-1!=this.volumeValue&&this.JSPlayM4_SetVolume(this.volumeValue),this.needSetRunTimeInfoCB&&at._JSPlayM4_SetRunTimeInfoCallBackEx(this.port,this.runTimeModule,this.nUser),this.needSetRunTimeInfoCBType){if(this.jsplayer.SourceTypeFlagMap.size>0){var e,t=T(this.jsplayer.SourceTypeFlagMap.keys());try{for(t.s();!(e=t.n()).done;){var a=e.value,r=this.jsplayer.SourceTypeFlagMap.get(a);1==r&&at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,0,a,r)}}catch(e){t.e(e)}finally{t.f()}}if(this.jsplayer.SplitterTypeFlagMap.size>0){var i,n=T(this.jsplayer.SplitterTypeFlagMap.keys());try{for(n.s();!(i=n.n()).done;){var s=i.value,x=this.jsplayer.SplitterTypeFlagMap.get(s);1==x&&at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,1,s,x)}}catch(e){n.e(e)}finally{n.f()}}if(this.jsplayer.DecodeTypeFlagMap.size>0){var o,l=T(this.jsplayer.DecodeTypeFlagMap.keys());try{for(l.s();!(o=l.n()).done;){var _=o.value,h=this.jsplayer.DecodeTypeFlagMap.get(_);1==h&&at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,2,_,h)}}catch(e){l.e(e)}finally{l.f()}}if(this.jsplayer.RenderTypeFlagMap.size>0){var f,c=T(this.jsplayer.RenderTypeFlagMap.keys());try{for(c.s();!(f=c.n()).done;){var u=f.value,d=this.jsplayer.RenderTypeFlagMap.get(u);1==d&&at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,3,u,d)}}catch(e){c.e(e)}finally{c.f()}}if(this.jsplayer.ManagerTypeFlagMap.size>0){var p,m=T(this.jsplayer.ManagerTypeFlagMap.keys());try{for(m.s();!(p=m.n()).done;){var S=p.value,R=this.jsplayer.ManagerTypeFlagMap.get(S);1==R&&at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,4,S,R)}}catch(e){m.e(e)}finally{m.f()}}}null!=this.streamInfoCBFun&&at._JSPlayM4_SetStreamInfoCallBack(this.port,this.streamInfoType,this.nUser),null!=this.PostMpStreamOffsetCBFun&&at._JSPlayM4_SetPostMpStreamOffsetCallBack(this.port,this.nUser),0!=this.playOrBackSwitchMode&&at._JSPlayM4_SetPlayOrBackSwitchMode(this.port,this.playOrBackSwitchMode);var P,y=T(this.renderPrivateInfo.keys());try{for(y.s();!(P=y.n()).done;){var b=P.value,E=this.renderPrivateInfo.get(b);at._JSPlayM4_RenderPrivateData(this.port,b,E)}}catch(e){y.e(e)}finally{y.f()}var g,F=T(this.renderIntelSubEx.keys());try{for(F.s();!(g=F.n()).done;){var C=g.value,v=this.renderIntelSubEx.get(C),D=this.renderIntelFlagEx.get(C);at._JSPlayM4_RenderPrivateDataEx(this.port,C,v,D)}}catch(e){F.e(e)}finally{F.f()}return this.needSetDisplayBuf&&at._JSPlayM4_SetDisplayBuf(this.port,this.displayBuf),-1!=this.antialiasFlag&&at._JSPlayM4_SetAntialias(this.port,this.antialiasFlag),this.needSetD3DPostProcess&&at._JSPlayM4_SetD3DPostProcess(this.port,this.d3dPostProcessType,this.d3dPostProcessValue),null!=this.pFontParam&&this.JSPlayM4_SetWaterMarkFont(this.pFontParam),null!=this.pMosaicParam&&this.JSPlayM4_SetMosaicType(this.pMosaicParam),0!=this.setStretchPlaySpeed&&at._JSPlayM4_SetStretchPlay(this.port,this.setStretchPlayTime,this.setStretchPlaySpeed),-1!=this.autoSmoothPlayModel&&at._JSPlayM4_SetAutoSmoothPlay(this.port,this.autoSmoothPlayModel),-1!=this.keepPlaySpeed&&at._JSPlayM4_KeepPlaySpeed(this.port,this.keepPlaySpeed),this.printfFlag>0&&this.JSPlayM4_SetPrintLogFlag(this.printfFlag),this.needSetRotateAngle&&at._JSPlayM4_SetRotateAngle(this.port,this.twodRotateAngle),""!=this.FECCanvasID&&this.JSPlayM4_FEC_SetCanvasID(this.FECCanvasID,!0),0!=this.FECPlaceType&&at._JSPlayM4_FEC_ResetCorrectType(this.port,0,this.FECPlaceType,this.FECCorrectType),1}},{key:"JSPlayM4_DownloadRawData",value:function(){return this.downloadFlag=!0,1}},{key:"JSPlayM4_InputRawData",value:function(e,t,a){if(this.rawDataFrameInfoBuffer=a,this.rawDataFrameInfo.port=e,this.rawDataFrameInfo.codecType=at.HEAP32[this.rawDataFrameInfoBuffer+4>>2],this.rawDataFrameInfo.frameType=at.HEAP32[this.rawDataFrameInfoBuffer+12>>2],this.rawDataFrameInfo.frameSize=at.HEAP32[this.rawDataFrameInfoBuffer+16>>2],this.rawDataFrameInfo.width=at.HEAP32[this.rawDataFrameInfoBuffer+20>>2],this.rawDataFrameInfo.height=at.HEAP32[this.rawDataFrameInfoBuffer+24>>2],this.rawDataFrameInfo.timeStamp=at.HEAP32[this.rawDataFrameInfoBuffer+28>>2],this.rawDataFrameInfo.frameRate=at.HEAP32[this.rawDataFrameInfoBuffer+32>>2],this.rawDataFrameInfo.frameNum=at.HEAP32[this.rawDataFrameInfoBuffer+36>>2],this.rawDataFrameInfo.isKeyFrame=at.HEAP32[this.rawDataFrameInfoBuffer+40>>2],this.rawDataFrameInfo.interlace=at.HEAP32[this.rawDataFrameInfoBuffer+44>>2],this.rawDataFrameInfo.streamEnd=at.HEAP32[this.rawDataFrameInfoBuffer+48>>2],this.rawDataFrameInfo.cropLeft=at.HEAP32[this.rawDataFrameInfoBuffer+52>>2],this.rawDataFrameInfo.cropRight=at.HEAP32[this.rawDataFrameInfoBuffer+56>>2],this.rawDataFrameInfo.cropTop=at.HEAP32[this.rawDataFrameInfoBuffer+60>>2],this.rawDataFrameInfo.cropBottom=at.HEAP32[this.rawDataFrameInfoBuffer+64>>2],this.rawDataFrameInfo.year=at.HEAP16[this.rawDataFrameInfoBuffer+68>>1],this.rawDataFrameInfo.month=at.HEAP16[this.rawDataFrameInfoBuffer+70>>1],this.rawDataFrameInfo.week=at.HEAP16[this.rawDataFrameInfoBuffer+72>>1],this.rawDataFrameInfo.day=at.HEAP16[this.rawDataFrameInfoBuffer+74>>1],this.rawDataFrameInfo.hour=at.HEAP16[this.rawDataFrameInfoBuffer+76>>1],this.rawDataFrameInfo.minute=at.HEAP16[this.rawDataFrameInfoBuffer+78>>1],this.rawDataFrameInfo.second=at.HEAP16[this.rawDataFrameInfoBuffer+80>>1],this.rawDataFrameInfo.milliseconds=at.HEAP16[this.rawDataFrameInfoBuffer+82>>1],this.sysType=at.HEAP32[this.rawDataFrameInfoBuffer+84>>2],this.rawDataFrameInfo.VRViewLimitRate=at.HEAP32[this.rawDataFrameInfoBuffer+88>>2],this.rawDataFrameInfo.needSetPreSoft=!1,(this.rawDataFrameInfo.frameRate<1||1==this.rawDataFrameInfo.interlace)&&(this.rawDataFrameInfo.needSetPreSoft=!0),0!=this.width&&0!=this.height||(this.width=this.rawDataFrameInfo.width,this.height=this.rawDataFrameInfo.height,this.startTimeStamp=this.rawDataFrameInfo.timeStamp,this.FirstFrame=!1),0==this.rawDataFrameInfo.cropLeft&&0==this.rawDataFrameInfo.cropRight&&0==this.rawDataFrameInfo.cropTop&&0==this.rawDataFrameInfo.cropBottom||(this.cropBottom=this.rawDataFrameInfo.cropBottom,this.cropLeft=this.rawDataFrameInfo.cropLeft,this.cropRight=this.rawDataFrameInfo.cropRight,this.cropTop=this.rawDataFrameInfo.cropTop),1==this.decodeFrameType){if(1!==this.rawDataFrameInfo.isKeyFrame)return 1;this.needWaitIFrame&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"SetDecodeFrameType",timestamp:this.rawDataFrameInfo.timeStamp}):this.pcVideoManager.SetDecodeFrameType(this.rawDataFrameInfo.timeStamp),this.needWaitIFrame=!1)}if(0==this.decodeFrameType&&1==this.needWaitIFrame){if(1!==this.rawDataFrameInfo.isKeyFrame)return 1;this.needWaitIFrame=!1}var r=new Uint8Array(this.rawDataFrameInfo.frameSize);if(r.set(at.HEAPU8.subarray(at.HEAP32[this.rawDataFrameInfoBuffer>>2],at.HEAP32[this.rawDataFrameInfoBuffer>>2]+this.rawDataFrameInfo.frameSize)),this.downloadFlag&&this.downloadRTPData(r),this.hasWebWorker){if(null===this.decodeWorker)return r=null,0;this.decodeWorker.postMessage({command:"inputData",rawData:r.buffer,rawDataFrameInfo:this.rawDataFrameInfo},[r.buffer])}else null!==this.pcVideoManager&&this.pcVideoManager.inputData(r,this.rawDataFrameInfo);r=null}},{key:"JSPlayM4_GetRawData",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetRawData","color: red"),0;at._JSPlayM4_SetHardQueueSize(this.port,this.decodeQueueSize,this.decodeFrameSize),at._JSPlayM4_GetRawData(this.port)}},{key:"JSPlayM4_ResetEnd",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_ResetEnd","color: red"),0):at._JSPlayM4_ResetEnd(this.port)}},{key:"JSPlayM4_NeedReset",value:function(e,t,a){return this.hasWebWorker?null!=tt[a][e].decodeWorker&&tt[a][e].decodeWorker.postMessage({command:"needReset",bTrue:!0}):this.pcVideoManager.needReset(!0),1}},{key:"JSPlayM4_SetAudioDisplayBuf",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetAudioDisplayBuf","color: red"),0):at._JSPlayM4_SetAudioDisplayBuf(this.port,e)}},{key:"JSPlayM4_Play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_Play 1 this.canvasID:"+this.canvasID+",this.supportSab:"+this.supportSab),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_Play","color: red"),0;if(this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_Play 2:"+this.decodeEngine),6==this.curStatus){if(1==this.decodeEngine){if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"NotifyBackPlay",flag:0})}else null!=this.pcVideoManager&&this.pcVideoManager.NotifyBackPlay(0);at._JSPlayM4_ResetBuffer(this.port,1),this.needPlaySound&&at._JSPlayM4_PlaySound(this.port),this.needPlaySoundShare&&at._JSPlayM4_PlaySoundShare(this.port)}else at._JSPlayM4_Play(this.port,this.canvasIDData);return this.curStatus=2,1}if(null!=e&&(this.canvasID=e,this.canvasWidth=document.getElementById(this.canvasID).width,this.canvasHeight=document.getElementById(this.canvasID).height),0===nt&&5===this.codecType?(this.decodeEngine=0,console.info("%c2>there will decode 265 by softDecoder","color: green")):0!==st||256!==this.codecType&&1!==this.codecType?4==this.codecType&&(this.decodeEngine=0,console.info("%c2>there will decode MJPEG by softDecoder(only V3-soft support MJPEG)","color: green")):(this.decodeEngine=0,console.info("%c2>there will decode 264 by softDecoder","color: green")),0==st&&0==nt&&(this.decodeEngine=0),!(this.supportSab&&this.supportOffscreen||0!==this.decodeEngine))return console.info("%c3>SharedArrayBuffer or Offscreen Error , does not support Soft Decdoe!!!!!","color: red"),this.jsplayer._switchV3ToV1(this.streamOpenMode,this.HIK40Head,this.HIKHeadSize,this.HIKPoolSize,!0),1;if(-1!=this.setHasThread&&(this.hasThread=this.setHasThread),at._JSPlayM4_SetDecodeEngine(this.port,this.decodeEngine,this.hasThread),this.printfFlag>=0&&console.log("%cThe final decodeEngine is %d (0 is soft,1 is hard),codecType:%d","color: green",this.decodeEngine,this.codecType),0===this.decodeEngine&&t&&null!=this.canvasID){var a=document.getElementById(this.canvasID);a&&(this.clonedCanvas=a.cloneNode(!0),this.clonedCanvasParentNode=a.parentNode,this.clonedCanvasParentNode.replaceChild(this.clonedCanvas,a))}this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_Play 2 this.canvasID:"+this.canvasID+",this.supportSab:"+this.supportSab+",this.decodeEngine:"+this.decodeEngine);var r=1;if(1===this.decodeEngine){this.hasWebWorker?this.startWorker(this.canvasID,this):(this.canvasCnv=document.getElementById(this.canvasID),this.pcVideoManager.init(this.canvasCnv,this.streamOpenMode,this.supportSab,this.renderEngine),this.needSetDisplayBuf&&this.pcVideoManager.SetDisplayBuf(this.displayBuf)),at._JSPlayM4_SetVideoRawDataCallBack(this.port,this.nUser);var i=at.addFunction(this.JSPlayM4_NeedReset,"viii");at._JSPlayM4_SetResetCallBack(this.port,i,this.nUser),at._JSPlayM4_SetPrivateInfoCallBack(this.port,this.nUser),this.JSPlayM4_SetCanvasSize(this.canvasWidth,this.canvasHeight),1==(r=at._JSPlayM4_Play(this.port,null))&&(this.curStatus=2)}else if(0===this.decodeEngine){if(""!=this.canvasID&&null!=this.canvasID){var n=this._stringToBytes("#"+this.canvasID),s=2*(this.canvasID.length+1);if(this.canvasIDData=at._malloc(s),null===this.canvasIDData)return 0;var x=at.HEAPU8.subarray(this.canvasIDData,this.canvasIDData+s),o=new Uint8Array(s);x.set(o,0),x.set(new Uint8Array(n)),x=null,o=null}this._HardToSoftNeedResetParam(),1==(r=at._JSPlayM4_Play(this.port,this.canvasIDData))&&(this.curStatus=2)}if(this.JSPlayM4_SetFrameInfoCallBack(1),1===this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetPrintLogFlag",printfFlag:this.printfFlag})}else null!=this.pcVideoManager&&this.pcVideoManager.SetPrintLogFlag(this.printfFlag);return r}},{key:"JSPlayM4_InputData",value:function(e,t){if(this.inputDataBufferSize<t&&(null!==this.inputDataBuffer&&(at._free(this.inputDataBuffer),this.inputDataBuffer=null),this.inputDataBufferSize=t),null===this.inputDataBuffer&&(this.inputDataBuffer=at._malloc(this.inputDataBufferSize)),null===this.inputDataBuffer)return console.log("inputdata malloc failed!!!"),0;if(1==this.needResetCanvasSize&&(this.JSPlayM4_SetCanvasSize(this.canvasWidth,this.canvasHeight+1),this.needResetCanvasSize=!1),this.enableCanvas){var a=this.JSPlayM4_GetFrameInfo(),r=a.width,i=a.height;r&&i&&(this.JSPlayM4_SetCanvasSize(this.canvasWidth,this.canvasHeight-1),this.enableCanvas=!1,this.needResetCanvasSize=!0)}var n=new Uint8Array(e.buffer);at.writeArrayToMemory(n,this.inputDataBuffer);var s=at._JSPlayM4_InputData(this.port,this.inputDataBuffer,t,this.decodeQueueSize,this.decodeFrameSize);return this.printfFlag>0&&console.log(">>>>>yff>>>>> JSPlayM4_InputData 2 res:"+s+",inputSize:"+t),n=null,1!=s&&at._JSPlayM4_GetLastError(this.port)==w&&this._switchHardToSoft(),s}},{key:"JSPlayM4_Stop",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_Stop","color: red"),0;if(this.JSPlayM4_StopEncode(),this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"stop"}):null!=this.pcVideoManager&&this.pcVideoManager.stop(),this.bWriteData&&this.iFrameNum>0){console.log("download"+this.iFrameNum+"Psdata");var t=new Uint8Array(this.aTotalBuffer);this._downloadFile(t,"RTPRaw.data"),this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.bWriteData=!1,this.iFrameNum=0,t=null}var a=1;if((2==this.curStatus||5==this.curStatus||6==this.curStatus)&&(1==(a=at._JSPlayM4_Stop(this.port))&&(this.curStatus=4),1==a&&e)){var r=document.getElementById(this.canvasID);if(r&&(this.clonedCanvas=r.cloneNode(!0),this.clonedCanvasParentNode=r.parentNode,this.clonedCanvasParentNode.replaceChild(this.clonedCanvas,r)),0!=this.FECcanvasIDArray.length)for(var i=0;i<this.FECcanvasIDArray.length;i++){var n=document.getElementById(this.FECcanvasIDArray[i]);n&&(this.clonedCanvas=n.cloneNode(!0),this.clonedCanvasParentNode=n.parentNode,this.clonedCanvasParentNode.replaceChild(this.clonedCanvas,n))}}return a}},{key:"JSPlayM4_CloseStream",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_CloseStream","color: red"),0):null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_FreePort","color: red"),0):(null!==this.inputDataBuffer&&(at._free(this.inputDataBuffer),this.inputDataBuffer=null),null!==this.additionDataBuffer&&(at._free(this.additionDataBuffer),this.additionDataBuffer=null),null!==this.canvasIDData&&(at._free(this.canvasIDData),this.canvasIDData=null,this.FirstFrame=!0),null!=this.pFECTotalCanvasIDData&&(at._free(this.pFECTotalCanvasIDData),this.pFECTotalCanvasIDData=null),null!=this.pBmpData&&(at._free(this.pBmpData),this.pBmpData=null),null!=this.pBmpSizeData&&(at._free(this.pBmpSizeData),this.pBmpSizeData=null),null!=this.pJpegData&&(at._free(this.pJpegData),this.pJpegData=null),null!=this.pJPEGSizeData&&(at._free(this.pJPEGSizeData),this.pJPEGSizeData=null),null!==this.pWaterMarkFontData&&(at._free(this.pWaterMarkFontData),this.pWaterMarkFontData=null),null!=this.textCanvas&&(this.textCanvas.remove(),this.textCanvas=null),this.bmpDataCallback=null,this.jpegDataCallback=null,this.CropjpegDataCallback=null,this.CropbmpDataCallback=null,this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.audioPCMBuffer.splice(0,this.audioPCMBuffer.length),this.width=0,this.height=0,this.curStatus=1,this.iZoomNum=0,this.decodeQueueSize=0,this.decodeFrameSize=0,this.rawDataFrameInfoBuffer=null,this.displayFrameInfo={},this.rawDataFrameInfo={},this.pcVideoManager=null,this.setTextCanvasFlag=!1,at._JSPlayM4_CloseStream(this.port))}},{key:"JSPlayM4_FreePort",value:function(){return at._JSPlayM4_FreePort(this.port)}},{key:"JSPlayM4_SetDecodeFrameType",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDecodeFrameType","color: red"),0;var t=1;return 1===this.decodeEngine?(0==e&&1==this.decodeFrameType&&(this.needWaitIFrame=!0),1==e&&(this.needWaitIFrame=!0)):t=at._JSPlayM4_SetDecodeFrameType(this.port,e),this.decodeFrameType=e,t}},{key:"JSPlayM4_PlaySound",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_PlaySound","color: red"),0):(this.needPlaySound=!0,at._JSPlayM4_PlaySound(this.port))}},{key:"JSPlayM4_PlaySoundShare",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_PlaySoundShare","color: red"),0):(this.needPlaySoundShare=!0,at._JSPlayM4_PlaySoundShare(this.port))}},{key:"JSPlayM4_StopSoundShare",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_StopSoundShare","color: red"),0):(this.needPlaySoundShare=!1,at._JSPlayM4_StopSoundShare(this.port))}},{key:"resizedataURL",value:function(e,t,a){return new Promise((r=l(ne().mark((function r(i,n){var s;return ne().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:(s=document.createElement("img")).onload=function(){var e=document.createElement("canvas"),r=e.getContext("2d");e.width=t,e.height=a,r.drawImage(this,0,0,t,a);var n=e.toDataURL();i(n)},s.src=e;case 3:case"end":return r.stop()}}),r)}))),function(e,t){return r.apply(this,arguments)}));var r}},{key:"_GetImage",value:function(e,t,a,r,i,n,s){var x=this;if(1===this.decodeEngine&&e.width&&e.height){var o="image/"+t,l=document.createElement("canvas"),_=l.getContext("2d"),h=1,f=1;null!=this.HardDecToJpegCBFun&&1==this.HardToJpegZoomResolutionFlag?(h=this.HardToJpegZoomWidth>i?i:this.HardToJpegZoomWidth,f=this.HardToJpegZoomHeight>n?n:this.HardToJpegZoomHeight):(h=i,f=n),l.width=h,l.height=f,_.drawImage(e,a,r,i,n,0,0,h,f),0==this.jpegDownloadFlag&&0==this.bmpDownloadFlag&&null==this.jpegDataCallback&&null==this.bmpDataCallback&&null==this.HardDecToJpegCBFun||l.toBlob((function(a){if(x.jpegDataCallback||x.bmpDataCallback||x.HardDecToJpegCBFun){var r=new FileReader;r.onload=function(){if(null!=this.jpegDataCallback&&(this.jpegDataCallback(new Uint8Array(r.result),r.result.byteLength),this.jpegDataCallback=null),null!=this.bmpDataCallback&&(this.bmpDataCallback(new Uint8Array(r.result),r.result.byteLength),this.bmpDataCallback=null),null!=this.HardDecToJpegCBFun){var e={};e.jpegData=new Uint8Array(r.result),e.jpegDataSize=r.result.byteLength,e.frameNum=s,this.HardDecToJpegCBFun(e)}}.bind(x),r.readAsArrayBuffer(a)}if(x.jpegDownloadFlag||x.bmpDownloadFlag){var i=window.URL.createObjectURL(a),n=document.createElement("a");n.download=(new Date).getTime()+"."+t,n.href=i,n.dataset.downloadurl=[o,n.download,n.href].join(":"),document.body.appendChild(n),n.click(),document.body.removeChild(n),e.close(),_=null,x.jpegDownloadFlag&&(x.jpegDownloadFlag=!1),x.bmpDownloadFlag&&(x.bmpDownloadFlag=!1)}}),o,this.HardDecToJpegQuality)}}},{key:"_GetImage2",value:function(e,t,a,r,i,n,s,x,o,l){var _=this;setTimeout((function(){if(0!=a&&0!=r){var h=at._malloc(t);if(null===h)return;at.writeArrayToMemory(new Uint8Array(e,0,t),h);var f;f=704!=a||288!=r&&240!=r?a*r*4+60:a*r*8+60;var c=at._malloc(f),u=at._malloc(4);if(null===c||null===u)return at._free(h),h=null,null!=c&&(at._free(c),c=null),void(null!=u&&(at._free(u),u=null));at.setValue(u,f,"i32");var d=2;"nv12"===n?d=2:"I420"===n&&(d=3),"jpeg"==i?at._JSPlayM4_VideoDataToJpeg(_.port,h,t,c,u,a,r,d,s,x,o,l):"bmp"==i&&at._JSPlayM4_VideoDataToBMP(_.port,h,t,c,u,a,r,d,s,x,o,l);var p=at.getValue(u,"i32"),m=new Uint8Array(p);m.set(at.HEAPU8.subarray(c,c+p)),0==s&&0==x&&0==o&&0==l?"jpeg"==i?(null!=_.jpegDataCallback&&_.jpegDataCallback(m,p),_.jpegDownloadFlag&&_._downloadFile(m,"GetImage."+i),_.jpegDataCallback=null,_.jpegDownloadFlag=!1):"bmp"==i&&(null!=_.bmpDataCallback&&_.bmpDataCallback(m,p),_.bmpDownloadFlag&&_._downloadFile(m,"GetImage."+i),_.bmpDataCallback=null,_.bmpDownloadFlag=!1):"jpeg"==i?(null!=_.CropjpegDataCallback&&_.CropjpegDataCallback(m,p),_.CropjpegDownloadFlag&&_._downloadFile(m,"GetCropImage."+i),_.CropjpegDataCallback=null,_.CropjpegDownloadFlag=!1):"bmp"==i&&(null!=_.CropbmpDataCallback&&_.CropbmpDataCallback(m,p),_.CropbmpDownloadFlag&&_._downloadFile(m,"GetCropImage."+i),_.CropbmpDataCallback=null,_.CropbmpDownloadFlag=!1),m=null,null!=c&&(at._free(c),c=null),null!=u&&(at._free(u),u=null)}}),0)}},{key:"JSPlayM4_GetJPEG",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.jpegDataCallback=e,this.jpegDownloadFlag=t,1===this.decodeEngine)return this.hasWebWorker?this.decodeWorker.postMessage({command:"GetJPEG"}):null!=this.pcVideoManager&&this.pcVideoManager.GetJPEG(),1;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetJPEG","color: red"),0;var a=at._JSPlayM4_GetFrameInfo(this.port);if(this.width=at.HEAP32[a+12>>2],this.height=at.HEAP32[a+16>>2],0!=this.width&&0!=this.height){var r=this.width*this.height*4+60;if((null==this.pJpegData||this.nJPEGDataSize<r)&&(null!=this.pJpegData&&(at._free(this.pJpegData),this.pJpegData=null),this.nJPEGDataSize=r,this.pJpegData=at._malloc(this.nJPEGDataSize),null===this.pJpegData))return;null==this.pJPEGSizeData&&(this.pJPEGSizeData=at._malloc(4));var i=at._JSPlayM4_GetJPEG(this.port,this.pJpegData,this.nJPEGDataSize,this.pJPEGSizeData);if(1!=i){var n=at._JSPlayM4_GetLastError(this.port);console.log("errorcode:"+n)}if(1==i){var s=at.getValue(this.pJPEGSizeData,"i32"),x=new Uint8Array(s);x.set(at.HEAPU8.subarray(this.pJpegData,this.pJpegData+s)),null!=e&&e(x,s),t&&this._downloadFile(x,"GetJPEG.jpeg"),x=null,this.jpegDataCallback=null,this.jpegDownloadFlag=!1}return i}return 0}},{key:"JSPlayM4_GetBMP",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.bmpDataCallback=e,this.bmpDownloadFlag=t,1===this.decodeEngine)return this.hasWebWorker?this.decodeWorker.postMessage({command:"GetBMP"}):null!=this.pcVideoManager&&this.pcVideoManager.GetBMP(),1;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetBMP","color: red"),0;var a=at._JSPlayM4_GetFrameInfo(this.port);if(this.width=at.HEAP32[a+12>>2],this.height=at.HEAP32[a+16>>2],0==this.width||0==this.height)return 0;var r;if(r=704!=this.width||288!=this.height&&240!=this.height?this.width*this.height*4+60:this.width*this.height*8+60,!(null==this.pBmpData||this.nBmpDataSize<r)||(null!=this.pBmpData&&(at._free(this.pBmpData),this.pBmpData=null),this.nBmpDataSize=r,this.pBmpData=at._malloc(this.nBmpDataSize),null!==this.pBmpData)){null==this.pBmpSizeData&&(this.pBmpSizeData=at._malloc(4));var i=at._JSPlayM4_GetBMP(this.port,this.pBmpData,this.nBmpDataSize,this.pBmpSizeData);if(1!=i){var n=at._JSPlayM4_GetLastError(this.port);console.log("errorcode:"+n)}if(1==i){var s=at.getValue(this.pBmpSizeData,"i32"),x=new Uint8Array(s);x.set(at.HEAPU8.subarray(this.pBmpData,this.pBmpData+s)),null!=e&&e(x,s),t&&this._downloadFile(x,"GetBmp.bmp"),x=null,this.bmpDataCallback=null,this.bmpDownloadFlag=!1}return 1}}},{key:"JSPlayM4_GetCropJPEG",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.CropjpegDataCallback=e,this.CropjpegDownloadFlag=t,1===this.decodeEngine)return this.hasWebWorker?this.decodeWorker.postMessage({command:"GetCropJPEG"}):null!=this.pcVideoManager&&this.pcVideoManager.GetCropJPEG(),1;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetCropJPEG","color: red"),0;var a=at._JSPlayM4_GetFrameInfo(this.port);if(this.width=at.HEAP32[a+12>>2],this.height=at.HEAP32[a+16>>2],0!=this.width&&0!=this.height){var r=this.width*this.height*4+60,i=at._malloc(r),n=at._malloc(4),s=this.SetDisRegionBottom,x=this.SetDisRegionLeft,o=this.SetDisRegionRight,l=this.SetDisRegionTop;if(null===i)return;var _=at._JSPlayM4_GetCropJPEG(this.port,i,r,n,0,0,x,l,o,s);if(1!=_){var h=at._JSPlayM4_GetLastError(this.port);console.log("errorcode:"+h)}if(1==_){var f=at.getValue(n,"i32"),c=new Uint8Array(f);c.set(at.HEAPU8.subarray(i,i+f)),null!=e&&e(c,f),t&&this._downloadFile(c,"GetCropJPEG.jpeg"),c=null,this.CropjpegDataCallback=null,this.CropjpegDownloadFlag=!1}return null!=i&&(at._free(i),i=null),null!=n&&(at._free(n),n=null),_}return 0}},{key:"JSPlayM4_GetCropBMP",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.CropbmpDataCallback=e,this.CropbmpDownloadFlag=t,1===this.decodeEngine)return this.hasWebWorker?this.decodeWorker.postMessage({command:"GetCropBMP"}):null!=this.pcVideoManager&&this.pcVideoManager.GetCropBMP(),1;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetCropBMP","color: red"),0;var a=at._JSPlayM4_GetFrameInfo(this.port);if(this.width=at.HEAP32[a+12>>2],this.height=at.HEAP32[a+16>>2],0==this.width||0==this.height)return 0;var r=this.width*this.height*4+60,i=at._malloc(r),n=at._malloc(4),s=this.SetDisRegionBottom,x=this.SetDisRegionLeft,o=this.SetDisRegionRight,l=this.SetDisRegionTop;if(null!==i){var _=at._JSPlayM4_GetCropBMP(this.port,i,r,n,0,0,x,l,o,s);if(1!=_){var h=at._JSPlayM4_GetLastError(this.port);console.log("errorcode:"+h)}if(1==_){var f=at.getValue(n,"i32"),c=new Uint8Array(f);c.set(at.HEAPU8.subarray(i,i+f)),null!=e&&e(c,f),t&&this._downloadFile(c,"GetCropBmp.bmp"),c=null,this.CropbmpDataCallback=null,this.CropbmpDownloadFlag=!1}return null!=i&&(at._free(i),i=null),null!=n&&(at._free(n),n=null),1}}},{key:"JSPlayM4_GetCanvasCapture",value:function(e,t,a){if(this.imageCB=e,1===this.decodeEngine)return this.hasWebWorker?this.decodeWorker.postMessage({command:"GetCanvasCapture",capWidth:t,capHeight:a}):null!=this.pcVideoManager&&this.pcVideoManager.GetCanvasCapture(e,t,a),1;var r;return r=0==t||0==a?0:1,at._JSPlayM4_GetD3DCapture(this.port,r,t,a),1}},{key:"JSPlayM4_StopSound",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_StopSound","color: red"),0):(this.needPlaySound=!1,at._JSPlayM4_StopSound())}},{key:"JSPlayM4_GetSDKVersion",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetSDKVersion","color: red"),0):at._JSPlayM4_GetSDKVersion()}},{key:"JSPlayM4_GetBuildDate",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetBuildDate","color: red"),0):at._JSPlayM4_GetBuildDate()}},{key:"JSPlayM4_GetLastError",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetLastError","color: red"),0):at._JSPlayM4_GetLastError(this.port)}},{key:"JSPlayM4_Fast",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_Fast","color: red"),0;if(0===this.streamOpenMode)return 1;if(1===this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"fast"})}else null!=this.pcVideoManager&&this.pcVideoManager.fast();var e=at._JSPlayM4_Fast(this.port);return 1==e&&(this.playSpeed=2*this.playSpeed),e}},{key:"JSPlayM4_Slow",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_Slow","color: red"),0;if(0===this.streamOpenMode)return 1;if(1===this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"slow"})}else null!=this.pcVideoManager&&this.pcVideoManager.slow();var e=at._JSPlayM4_Slow(this.port);return 1==e&&(this.playSpeed=this.playSpeed/2),console.log("this.playSpeed:"+this.playSpeed),e}},{key:"JSPlayM4_SetIFrameDecInterval",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetIFrameDecInterval","color: red"),0):1===this.decodeEngine?1:(this.decInterval=e,at._JSPlayM4_SetIFrameDecInterval(this.port,e))}},{key:"JSPlayM4_Pause",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_Pause","color: red"),0):0===this.streamOpenMode?1:(1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"Pause",value:e}):null!=this.pcVideoManager&&this.pcVideoManager.Pause(e)),at._JSPlayM4_Pause(this.port,e))}},{key:"JSPlayM4_OneByOne",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_OneByOne","color: red"),0;if(0===this.streamOpenMode)return 0;xt.cmd="onebyone";var e=at._JSPlayM4_GetSourceBufferRemain(this.port),t=at._JSPlayM4_GetLastError(this.port);return e<1e3||31==t?(xt.errorCode=31,xt.status=!0,this.fn(xt)):(e>this.HIKPoolSize-1e3||11==t)&&(xt.errorCode=0,xt.status=!1,this.fn(xt)),2!=this.curStatus&&6!=this.curStatus||(this.lastStatus=this.curStatus),this.curStatus=5,1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"OneByOne",value:1}):null!=this.pcVideoManager&&this.pcVideoManager.OneByOne(1)),at._JSPlayM4_OneByOne(this.port,this.decodeQueueSize,this.decodeFrameSize)}},{key:"JSPlayM4_OneByOneResume",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_OneByOneResume","color: red"),0):(xt.cmd="play",0===this.streamOpenMode?1:(2===this.lastStatus?this.curStatus=2:6===this.lastStatus&&(this.curStatus=6),1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"OneByOne",value:0}):null!=this.pcVideoManager&&this.pcVideoManager.OneByOne(0)),at._JSPlayM4_Play(this.port,this.canvasIDData)))}},{key:"JSPlayM4_SetVolume",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetVolume","color: red"),0):(this.volumeValue=e,at._JSPlayM4_SetVolume(this.port,e))}},{key:"JSPlayM4_GetVolume",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetVolume","color: red"),0):at._JSPlayM4_GetVolume(this.port)}},{key:"JSPlayM4_SetDisplayRegion",value:function(e,t,a,r,i){var n=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDisplayRegion","color: red"),0;var x=1,o=t,l=r,_=a,h=i;if(n?(o=0,_=this.canvasWidth,l=0,h=this.canvasHeight,this.iZoomNum=0,this.iRatio_x=1,this.iRatio_y=1):s&&0!==this.iZoomNum&&(o=Math.round(o/this.iRatio_x)+this.stDisplayRect.left,l=Math.round(l/this.iRatio_y)+this.stDisplayRect.top,_=Math.round(_/this.iRatio_x)+this.stDisplayRect.left,h=Math.round(h/this.iRatio_y)+this.stDisplayRect.top),this.stDisplayRect={top:l,left:o,right:_,bottom:h},1===this.decodeEngine)if(this.SetDisRegionBottom=h/this.canvasHeight*this.height,this.SetDisRegionLeft=o/this.canvasWidth*this.width,this.SetDisRegionRight=_/this.canvasWidth*this.width,this.SetDisRegionTop=l/this.canvasHeight*this.height,this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetDisplayRegion",sx:this.SetDisRegionLeft,sy:this.SetDisRegionTop,sw:this.SetDisRegionRight-this.SetDisRegionLeft,sh:this.SetDisRegionBottom-this.SetDisRegionTop})}else null!=this.pcVideoManager&&this.pcVideoManager.SetDisplayRegion(this.SetDisRegionLeft,this.SetDisRegionTop,this.SetDisRegionRight-this.SetDisRegionLeft,this.SetDisRegionBottom-this.SetDisRegionTop);else{var f=at._JSPlayM4_GetFrameInfo(this.port);this.width=at.HEAP32[f+12>>2],this.height=at.HEAP32[f+16>>2],this.SetDisRegionBottom=h/this.canvasHeight*this.height,this.SetDisRegionLeft=o/this.canvasWidth*this.width,this.SetDisRegionRight=_/this.canvasWidth*this.width,this.SetDisRegionTop=l/this.canvasHeight*this.height,x=at._JSPlayM4_SetDisplayRegion(this.port,this.canvasID,this.SetDisRegionLeft,this.SetDisRegionRight,this.SetDisRegionTop,this.SetDisRegionBottom)}return s&&(this.iRatio_x=this.canvasWidth/(_-o),this.iRatio_y=this.canvasHeight/(h-l),this.iZoomNum++),x}},{key:"JSPlayM4_SetPrintLogFlag",value:function(e){if(this.printfFlag=Number(e),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetPrintLogFlag","color: red"),0;if(1===this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetPrintLogFlag",printfFlag:this.printfFlag})}else null!=this.pcVideoManager&&this.pcVideoManager.SetPrintLogFlag(this.printfFlag);return at._JSPlayM4_SetPrintLogFlag(this.port,e)}},{key:"JSPlayM4_RenderPrivateData",value:function(e,t){var a=1;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_RenderPrivateData","color: red"),0;if(this.renderPrivateInfo.set(e,t),1===this.decodeEngine){if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"RenderPrivateData",intelType:e,bTrue:t})}else null!=this.pcVideoManager&&(a=this.pcVideoManager.RenderPrivateData(e,t));t&&(a=at._JSPlayM4_RenderPrivateData(this.port,e,t))}else a=at._JSPlayM4_RenderPrivateData(this.port,e,t);return a}},{key:"JSPlayM4_RenderPrivateDataEx",value:function(e,t,a){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_RenderPrivateDataEx","color: red"),0;if(this.renderIntelSubEx.set(e,t),this.renderIntelFlagEx.set(e,a),1===this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"RenderPrivateDataEx",intelType:e,subType:t,bTrue:a})}else null!=this.pcVideoManager&&this.pcVideoManager.RenderPrivateDataEx(e,t,a);return at._JSPlayM4_RenderPrivateDataEx(this.port,e,t,a)}},{key:"JSPlayM4_SetCanvasSize",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetCanvasSize","color: red"),0;if(e<16||t<16||null===this.canvasID)return 0;if(this.canvasWidth=e,this.canvasHeight=t,1===this.decodeEngine)if(this.hasWebWorker){if(null==this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetCanvasSize",width:e,height:t,FECSubPort:a})}else null!=this.pcVideoManager&&this.pcVideoManager.SetCanvasSize(e,t,a);return at._JSPlayM4_SetCanvasSize(this.port,e,t,a)}},{key:"JSPlayM4_SetDisplayBuf",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDisplayBuf","color: red"),0):(this.displayBuf=e,this.needSetDisplayBuf=!0,1===this.decodeEngine&&(this.hasWebWorker?null===this.decodeWorker||this.decodeWorker.postMessage({command:"SetDisplayBuf",value:e}):null!=this.pcVideoManager&&this.pcVideoManager.SetDisplayBuf(e)),at._JSPlayM4_SetDisplayBuf(this.port,e))}},{key:"JSPlayM4_GetSourceBufferRemain",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetSourceBufferRemain","color: red"),0):at._JSPlayM4_GetSourceBufferRemain(this.port)}},{key:"JSPlayM4_GetBufferValue",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetBufferValue","color: red"),0):at._JSPlayM4_GetBufferValue(this.port,e)}},{key:"JSPlayM4_ReversePlay",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_ReversePlay","color: red"),0;if(0===this.streamOpenMode)return 1;if(this.reversePlay=!0,1===this.decodeEngine){if(6==this.curStatus)return 1;if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"NotifyBackPlay",flag:1})}else null!=this.pcVideoManager&&this.pcVideoManager.NotifyBackPlay(1);return at._JSPlayM4_ResetBuffer(this.port,1),this.needPlaySound&&at._JSPlayM4_StopSound(),this.needPlaySoundShare&&at._JSPlayM4_StopSoundShare(this.port),this.curStatus=6,1}var e=at._JSPlayM4_ReversePlay(this.port);return 1==e&&(this.curStatus=6),e}},{key:"JSPlayM4_SetDecodeThreadNum",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDecodeThreadNum","color: red"),0):(this.decodeThreadNum=e,at._JSPlayM4_SetDecodeThreadNum(this.port,e))}},{key:"JSPlayM4_GetCanvasSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetCanvasSize","color: red"),0):1===this.decodeEngine?(this.hasWebWorker?this.decodeWorker.postMessage({command:"GetCanvasSize"}):null!=this.pcVideoManager&&this.pcVideoManager.GetCanvasSize(),1):at._JSPlayM4_GetCanvasSize(this.port,e)}},{key:"JSPlayM4_DisplayLostFrames",value:function(e,t,a){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_DisplayLostFrames","color: red"),0):at._JSPlayM4_DisplayLostFrames(this.port,e,t,a)}},{key:"JSPlayM4_SetIVSContraBandDrawMode",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetIVSContraBandDrawMode","color: red"),0):at._JSPlayM4_SetIVSContraBandDrawMode(this.port,e)}},{key:"JSPlayM4_SetANRParam",value:function(e,t){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetANRParam","color: red"),0):(this.anrParamFlag=e,this.anrParamLevel=t,at._JSPlayM4_SetANRParam(this.port,e,t))}},{key:"JSPlayM4_SetResampleValue",value:function(e,t){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetResampleValue","color: red"),0):(this.resampleFlag=e,this.resampleRate=t,at._JSPlayM4_SetResampleValue(this.port,e,t))}},{key:"JSPlayM4_SetAntialias",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetAntialias","color: red"),0;var t=1;return this.antialiasFlag=e,1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"SetAntialias",value:e}):null!=this.pcVideoManager&&(t=this.pcVideoManager.SetAntialias(e)):t=at._JSPlayM4_SetAntialias(this.port,e),t}},{key:"JSPlayM4_SyncToAudio",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SyncToAudio","color: red"),0):(this.syncToAudio=SyncToAudio,at._JSPlayM4_SyncToAudio(this.port,e))}},{key:"JSPlayM4_SetAudioThreadModel",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetAudioThreadModel","color: red"),0):(this.setAudioThreadModel=e,at._JSPlayM4_SetAudioThreadModel(this.port,e))}},{key:"JSPlayM4_SetDecodeERC",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDecodeERC","color: red"),0):(this.decodeERCLevel=e,at._JSPlayM4_SetDecodeERC(this.port,e))}},{key:"JSPlayM4_SkipErrorData",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SkipErrorData","color: red"),0):(this.needSetSkipErrorData=!0,this.skipErrorData=e,at._JSPlayM4_SkipErrorData(this.port,e))}},{key:"JSPlayM4_SetDemuxModel",value:function(e,t){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDemuxModel","color: red"),0):(this.needSetDemuxModel=!0,this.setDemuxModelType=e,this.setDemuxModelFlag=t,at._JSPlayM4_SetDemuxModel(this.port,e,t))}},{key:"JSPlayM4_SetD3DPostProcess",value:function(e,t){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetD3DPostProcess","color: red"),0;var a=1;return this.d3dPostProcessType=e,this.d3dPostProcessValue=t,this.needSetD3DPostProcess=!0,1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"SetD3DPostProcess",ProcessType:e,ProcessValue:t}):null!=this.pcVideoManager&&(a=this.pcVideoManager.SetD3DPostProcess(e,t)):a=at._JSPlayM4_SetD3DPostProcess(this.port,e,t),a}},{key:"JSPlayM4_SetFirstFrameCallBack",value:function(e,t){if(!(t&&"function"==typeof t||null===t))return 0;if(this.FFCallBackFun=t,this.FirstFrameCallBackflag=e,null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetFirstFrameCallBack","color: red"),0;var a=1;return 0===this.decodeEngine&&(a=at._JSPlayM4_SetFirstFrameCallBack(this.port,e,this.nUser)),a}},{key:"JSPlayM4_SetDecCallBack",value:function(e,t){return t&&"function"==typeof t||null===t?(this.decCallBackFun=t,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDecCallBack","color: red"),0):at._JSPlayM4_SetDecCallBack(this.port,e,this.nUser)):0}},{key:"JSPlayM4_SetHardDecToJepgCallBack",value:function(e,t){return t&&"function"==typeof t||null===t?(this.HardDecToJpegQuality=e.nHardToJpegQuality,this.HardDecToJpegInterval=e.nHardToJpegInterval,this.HardToJpegZoomWidth=e.nHardToJpegZoomWidth,this.HardToJpegZoomHeight=e.nHardToJpegZoomHeight,this.HardToJpegZoomResolutionFlag=e.nZoomResolutionFlag,this.HardDecToJpegCBFun=t,1):0}},{key:"JSPlayM4_SetDisplayCallBack",value:function(e,t){return t&&"function"==typeof t||null===t?(this.displayCallBackFun=t,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDisplayCallBack","color: red"),0):(this.JSPlayM4_SetDecCBStream(1),at._JSPlayM4_SetDisplayCallBack(this.port,e,this.nUser))):0}},{key:"JSPlayM4_SetFrameInfoCallBack",value:function(e){var t=this,a=1;if(1===this.decodeEngine)this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"SetFrameInfoCallBack",value:e}):null!=this.pcVideoManager&&(a=this.pcVideoManager.SetFrameInfoCallBack((function(e){t.displayFrameInfo.port=e.port,t.displayFrameInfo.codecType=e.codecType,t.displayFrameInfo.frameType=e.frameType,t.displayFrameInfo.frameSize=e.frameSize,t.displayFrameInfo.width=e.width,t.displayFrameInfo.height=e.height,t.displayFrameInfo.timeStamp=e.timeStamp,t.displayFrameInfo.frameRate=e.frameRate,t.displayFrameInfo.frameNum=e.frameNum,t.displayFrameInfo.interlace=e.interlace,t.displayFrameInfo.streamEnd=e.streamEnd,t.displayFrameInfo.cropLeft=e.cropLeft,t.displayFrameInfo.cropRight=e.cropRight,t.displayFrameInfo.cropTop=e.cropTop,t.displayFrameInfo.cropBottom=e.cropBottom,t.displayFrameInfo.year=e.year,t.displayFrameInfo.month=e.month,t.displayFrameInfo.week=e.week,t.displayFrameInfo.day=e.day,t.displayFrameInfo.hour=e.hour,t.displayFrameInfo.minute=e.minute,t.displayFrameInfo.second=e.second,t.displayFrameInfo.milliseconds=e.milliseconds}),e));else{if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetFrameInfoCallBack","color: red"),0;a=at._JSPlayM4_SetFrameInfoCallBack(this.port,e)}return a}},{key:"JSPlayM4_SetDecCBStream",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetDecCBStream","color: red"),0):at._JSPlayM4_SetDecCBStream(this.port,e)}},{key:"JSPlayM4_GetFrameInfo",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetFrameInfo","color: red"),0;var e={};if(0==this.decodeEngine){var t=at._JSPlayM4_GetFrameInfo(this.port);e.port=at.HEAP32[t>>2],e.frameType=at.HEAP32[t+4>>2],e.frameSize=at.HEAP32[t+8>>2],e.width=at.HEAP32[t+12>>2],e.height=at.HEAP32[t+16>>2],e.timeStamp=at.HEAP32[t+20>>2],e.frameRate=at.HEAP32[t+24>>2],e.bitPerSample=at.HEAP32[t+28>>2],e.samplesPerSec=at.HEAP32[t+32>>2],e.channel=at.HEAP32[t+36>>2],e.frameNum=at.HEAP32[t+40>>2],e.cropLeft=at.HEAP32[t+44>>2],e.cropRight=at.HEAP32[t+48>>2],e.cropTop=at.HEAP32[t+52>>2],e.cropBottom=at.HEAP32[t+56>>2],e.year=at.HEAP16[t+60>>1],e.month=at.HEAP16[t+62>>1],e.week=at.HEAP16[t+64>>1],e.day=at.HEAP16[t+66>>1],e.hour=at.HEAP16[t+68>>1],e.minute=at.HEAP16[t+70>>1],e.second=at.HEAP16[t+72>>1],e.milliseconds=at.HEAP16[t+74>>1],this.width=e.width,this.height=e.height}else e=this.displayFrameInfo;return e}},{key:"JSPlayM4_GetAdditionData",value:function(){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetAdditionData","color: red"),0;var e=null,t=at._JSPlayM4_GetAdditionData(this.port);return e.dataType=at.HEAP32[t>>2],e.dataStrVersion=at.HEAP32[t+4>>2],e.dataTimeStamp=at.HEAP32[t+8>>2],e.dataLength=at.HEAP32[t+12>>2],e.pData=at.HEAP32[t+16>>2],e.additionDataBuffer=new Uint8Array(dataLength),additionDataBuffer.set(at.HEAPU8.subarray(pData,pData+dataLength)),e}},{key:"JSPlayM4_SetAdditionDataCallBack",value:function(e,t,a){return this.additionDataType=e,this.additionFlag=t,this.addCBFun=a,this.needSetAdditionDataCB=!0,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetAdditionDataCallBack","color: red"),0):a&&"function"==typeof a||null===a?(this.addtionCallBackFun=a,at._JSPlayM4_SetAdditionDataCallBack(this.port,e,t,this.nUser)):0}},{key:"JSPlayM4_GetPlayedTimeEx",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetPlayedTimeEx","color: red"),0;if(!(e&&"function"==typeof e||null===e))return 0;if(this.getPlayTimeCallBackFun=e,1===this.decodeEngine){if(this.hasWebWorker)this.decodeWorker.postMessage({command:"GetPlayedTime"});else if(null!=this.pcVideoManager){var t=this.pcVideoManager.GetPlayedTime();this.getPlayTimeCallBackFun&&this.getPlayTimeCallBackFun(t-this.startTimeStamp)}}else{var a=at._JSPlayM4_GetPlayedTimeEx(this.port);this.getPlayTimeCallBackFun(a)}}},{key:"JSPlayM4_GetFileTime",value:function(){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetFileTime","color: red"),0):at._JSPlayM4_GetFileTime(this.port)}},{key:"JSPlayM4_GetMpOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_GetMpOffset","color: red"),0;if(!(r&&"function"==typeof r||null===r))return 0;if((this.SetPlayPosCBFun=r,0==t)&&e>1e3*this.JSPlayM4_GetFileTime())return-1;1===this.decodeEngine&&(this.hasWebWorker?(this.decodeWorker.postMessage({command:"needReset",bTrue:!1}),this.decodeWorker.postMessage({command:"SetTargetRelativePos",nRelativePos:e,nPosType:t,nPlayMode:a})):null!=this.pcVideoManager&&(this.pcVideoManager.needReset(!1),this.pcVideoManager.SetTargetRelativePos(e,t,a)));var i=0;return null!=r&&(i=1),at._JSPlayM4_GetMpOffset(this.port,e,t,a,i,this.nUser)}},{key:"JSPlayM4_ResetBuffer",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_ResetBuffer","color: red"),0):(this.resetBufferType=e,1!==this.decodeEngine||1!=e&&3!=e&&7!=e&&8!=e||(this.hasWebWorker?this.decodeWorker.postMessage({command:"ResetBuffer"}):null!=this.pcVideoManager&&this.pcVideoManager.ResetBuffer()),at._JSPlayM4_ResetBuffer(this.port,e))}},{key:"JSPlayM4_SetGlobalBaseTime",value:function(e,t,a,r,i,n,s){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetGlobalBaseTime","color: red"),0):(this.globalBaseTime={year:e,month:t,day:a,hour:r,min:i,sec:n,ms:s},at._JSPlayM4_SetGlobalBaseTime(this.port,e,t,a,r,i,n,s))}},{key:"JSPlayM4_SetSecretKey",value:function(e,t,a){if(this.needSetSecretKey=!0,this.SecretKeyData=t,this.keyType=e,this.pKeyDataLen=a,null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetSecretKey","color: red"),0;this.printfFlag>0&&console.log(">>>>>yff>>> JSPlayM4_SetSecretKey keyType:"+e+",keyData:"+t+",this.port:"+this.port);var r=1;if(null==t||void 0===t||""===t)return 0;if(null!=t){var i=this._stringToBytes(t),n=at._malloc(a);if(null===n)return;var s=at.HEAPU8.subarray(n,n+a),x=new Uint8Array(a);s.set(x,0),s.set(new Uint8Array(i)),s=null,x=null,r=at._JSPlayM4_SetSecretKey(this.port,e,n,a),null!==n&&(at._free(n),n=null)}return r}},{key:"JSPlayM4_SetRunTimeInfoCallBackEx",value:function(e,t){return t&&"function"==typeof t||null===t?(this.runtimeCBFun=t,this.runTimeModule=e,this.needSetRunTimeInfoCB=!0,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetRunTimeInfoCallBackEx","color: red"),0):(1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"SetRunTimeInfoCallBack",module:e}):null!=this.pcVideoManager&&this.pcVideoManager.SetRunTimeInfoCallBack(e,t)),at._JSPlayM4_SetRunTimeInfoCallBackEx(this.port,e,this.nUser))):0}},{key:"JSPlayM4_SetRunTimeInfoCallbackType",value:function(e,t,a){return this.needSetRunTimeInfoCBType=!0,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetRunTimeInfoCallbackType","color: red"),0):(1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"SetRunTimeInfoCallbackType",module:e,type:t,flag:a}):null!=this.pcVideoManager&&this.pcVideoManager.SetRunTimeInfoCallbackType(e,t,a)),at._JSPlayM4_SetRunTimeInfoCallbackType(this.port,e,t,a))}},{key:"JSPlayM4_SetStreamInfoCallBack",value:function(e,t){return t&&"function"==typeof t||null===t?(this.streamInfoCBFun=t,this.streamInfoType=e,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetStreamInfoCallBack","color: red"),0):at._JSPlayM4_SetStreamInfoCallBack(this.port,e,this.nUser)):0}},{key:"JSPlayM4_SetPostMpStreamOffsetCallBack",value:function(e){return this.PostMpStreamOffsetCBFun=e,null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetPostMpStreamOffsetCallBack","color: red"),0):at._JSPlayM4_SetPostMpStreamOffsetCallBack(this.port,this.nUser)}},{key:"JSPlayM4_SetPlayOrBackSwitchMode",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetPlayOrBackSwitchMode","color: red"),0;if(this.playOrBackSwitchMode=e,0==this.decodeEngine)return at._JSPlayM4_SetPlayOrBackSwitchMode(this.port,e);if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetPlayOrBackSwitchMode",PlayOrBackMode:e})}else{if(null==this.pcVideoManager)return 0;this.pcVideoManager.SetPlayOrBackSwitchMode(e)}return 1}},{key:"JSPlayM4_SetStretchPlay",value:function(e,t){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetStretchPlay","color: red"),0;if(t<1||t>16)return 0;if(this.setStretchPlayTime=e,this.setStretchPlaySpeed=t,1==this.decodeEngine)if(this.hasWebWorker){if(null===this.decodeWorker)return 0;this.decodeWorker.postMessage({command:"SetStretchPlay",Stretchtime:e,Stretchspeed:t})}else null!=this.pcVideoManager&&this.pcVideoManager.SetStretchPlay(e,t);return at._JSPlayM4_SetStretchPlay(this.port,e,t)}},{key:"JSPlayM4_SetAutoSmoothPlay",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetAutoSmoothPlay","color: red"),0):(this.autoSmoothPlayModel=e,0==this.decodeEngine?at._JSPlayM4_SetAutoSmoothPlay(this.port,e):0)}},{key:"JSPlayM4_KeepPlaySpeed",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_KeepPlaySpeed","color: red"),0):(this.keepPlaySpeed=e,0==this.decodeEngine?at._JSPlayM4_KeepPlaySpeed(this.port,e):0)}},{key:"JSPlayM4_IgnoreHeaderAudioDefine",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_IgnoreHeaderAudioDefine","color: red"),0):at._JSPlayM4_IgnoreHeaderAudioDefine(this.port,e)}},{key:"JSPlayM4_SetSycGroup",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetSycGroup","color: red"),0):at._JSPlayM4_SetSycGroup(this.port,e)}},{key:"JSPlayM4_SetRotateAngle",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetRotateAngle","color: red"),0;var t=1;return this.twodRotateAngle=e,this.needSetRotateAngle=!0,1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"SetRotateAngle",rotateValue:e}):null!=this.pcVideoManager&&(t=this.pcVideoManager.SetRotateAngle(e)):t=at._JSPlayM4_SetRotateAngle(this.port,e),t}},{key:"JSPlayM4_SetPanoramaDisplayEffect",value:function(e){var t=1;return 1!==this.decodeEngine?(console.info("%c softDecode not support JSPlayM4_SetPanoramaDisplayEffect","color: red"),0):(this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"SetPanoramaDisplayEffect",DisplayEffect:e}):t=0:t=null!=this.pcVideoManager?this.pcVideoManager.SetPanoramaDisplayEffect(e):0,t)}},{key:"JSPlayM4_SetPanoramaSphereViewParam",value:function(e,t){var a=1;return 1!==this.decodeEngine?(console.info("%c softDecode not support JSPlayM4_SetPanoramaSphereViewParam","color: red"),0):(this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"SetPanoramaSphereViewParam",ViewParamType:e,fValue:t}):a=0:a=null!=this.pcVideoManager?this.pcVideoManager.SetPanoramaSphereViewParam(e,t):0,a)}},{key:"JSPlayM4_GetPanoramaSphereViewParam",value:function(e,t){var a=1;this.GetPanoramaSphereViewParamCB=t;var r={fValue:-1};return 1!==this.decodeEngine?(console.info("%c softDecode not support JSPlayM4_GetPanoramaSphereViewParam","color: red"),0):(this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"GetPanoramaSphereViewParam",ViewParamType:e}):a=0:null!=this.pcVideoManager?(a=this.pcVideoManager.GetPanoramaSphereViewParam(e,r),null!=this.GetPanoramaSphereViewParamCB&&this.GetPanoramaSphereViewParamCB(r)):a=0,a)}},{key:"JSPlayM4_FEC_SetCanvasID",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(console.log(" JSPlayM4_FEC_SetCanvasID canvasID :"+e),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetCanvasID","color: red"),0;this.FECCanvasID=e;var a=1;if(null!=e&&""!=e)if(this.FECcanvasIDArray=e.split(","),1===this.decodeEngine)this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"SetCanvasID",canvasID:e}):null!=this.pcVideoManager?a=this.pcVideoManager.FEC_SetCanvasID(e):console.info("%c JSPlayM4_FEC_SetCanvasID this.pcVideoManager is null","color: red");else{for(var r="",i=0;i<this.FECcanvasIDArray.length;i++)i==this.FECcanvasIDArray.length-1?r+="#"+this.FECcanvasIDArray[i]:r+="#"+this.FECcanvasIDArray[i]+",";if(0!=this.FECcanvasIDArray.length&&t)for(var n=0;n<this.FECcanvasIDArray.length;n++){var s=document.getElementById(this.FECcanvasIDArray[n]);if(s){var x=s.cloneNode(!0);s.parentNode.replaceChild(x,s)}}var o=this._stringToBytes(r),l=2*r.length;if(this.pFECTotalCanvasIDData=at._malloc(l),null===this.pFECTotalCanvasIDData)return 0;var _=at.HEAPU8.subarray(this.pFECTotalCanvasIDData,this.pFECTotalCanvasIDData+l),h=new Uint8Array(l);_.set(h,0),_.set(new Uint8Array(o)),_=null,h=null,a=at._JSPlayM4_FEC_SetCanvasID(this.port,this.pFECTotalCanvasIDData)}else console.log(" JSPlayM4_FEC_SetCanvasID canvasID is null :"+e),a=0;return a}},{key:"JSPlayM4_FEC_ResetCorrectType",value:function(e,t,a){if(this.printfFlag>0&&console.log("JSPlayM4_FEC_ResetCorrectType 1 decodeEngine:"+this.decodeEngine+",hasWebWorker:"+this.hasWebWorker+",fishSubPort:"+e+",placeType:"+t+",correctType:"+a),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_ResetCorrectType","color: red"),0;this.FECPlaceType=t,this.FECCorrectType=a;var r=1;return 1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECResetCorrectType",fishSubPort:e,placeType:t,correctType:a}):r=0:r=null!=this.pcVideoManager?this.pcVideoManager.FEC_ResetCorrectType(e,t,a):0:r=at._JSPlayM4_FEC_ResetCorrectType(this.port,e,t,a),r}},{key:"JSPlayM4_FEC_GetPort",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_GetPort this.decodeEngine:"+this.decodeEngine+",placeType:"+e+",correctType:"+t),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_GetPort","color: red"),0;var r=-1;return this.FECGetPortCB=a,1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECGetPort",placeType:e,correctType:t}):r=-1:(null!=this.pcVideoManager?((r=this.pcVideoManager.FEC_GetPort(e,t))<1||r>16||null==r)&&(r=-1):r=-1,null!=this.FECGetPortCB&&this.FECGetPortCB(r)):(((r=at._JSPlayM4_FEC_GetPort(this.port,e,t))<1||r>16||null==r)&&(r=-1),""!=self.FECCanvasID&&r>3&&ot>70&&(console.info("%cJSPlayM4_FEC_GetPort fishport max is 4","color: red"),r=-1),null!=this.FECGetPortCB&&this.FECGetPortCB(r)),r}},{key:"JSPlayM4_FEC_Enable",value:function(e){if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_Enable this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_Enable","color: red"),0;var t=1;return 0==e?console.log("fishPort is 0 ,main canvas doesn't need call FEC_Enable"):1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECEnable",fishSubPort:e}):t=0:t=null!=this.pcVideoManager?this.pcVideoManager.FEC_Enable(e):0:t=at._JSPlayM4_FEC_Enable(this.port,e),t}},{key:"JSPlayM4_FEC_SetParam",value:function(e,t){if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_SetParam 1 this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e+",upDateType:"+t.upDateType+",param2d.fPTZParam.fPTZPositionX:"+t.fPTZParam.fPTZPositionX+",param2d.fPTZParam.fPTZPositionY:"+t.fPTZParam.fPTZPositionY),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetParam","color: red"),0;var a=1;if(1===this.decodeEngine)this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECSetParam",fishSubPort:e,param2d:t}):a=0:a=null!=this.pcVideoManager?this.pcVideoManager.FEC_SetParam(e,t):0;else{var r=at._JSPlayM4_GetFishEye2DParam();null!=t.upDateType&&(at.HEAP32[r>>2]=t.upDateType),null!=t.fPTZParam&&null!=t.fPTZParam.fPTZPositionX&&null!=t.fPTZParam.fPTZPositionY&&(at.HEAPF32[r+8>>2]=t.fPTZParam.fPTZPositionX,at.HEAPF32[r+12>>2]=t.fPTZParam.fPTZPositionY),null!=t.fPTZParam&&(at.HEAPF32[r+32>>2]=t.fPTZZoom),null!=t.fValue&&(at.HEAPF32[r+36>>2]=t.fValue),null!=t.stPTZColor&&(null!=t.stPTZColor.nR&&(at.HEAP8[r+40>>1]=t.stPTZColor.nR),null!=t.stPTZColor.nG&&(at.HEAP8[r+41>>1]=t.stPTZColor.nG),null!=t.stPTZColor.nB&&(at.HEAP8[r+42>>1]=t.stPTZColor.nB),null!=t.stPTZColor.nAlpha&&(at.HEAP8[r+43>>1]=t.stPTZColor.nAlpha)),a=at._JSPlayM4_FEC_SetParam(this.port,e)}return a}},{key:"JSPlayM4_FEC_GetParam",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_GetParam","color: red"),0;var a={fRXLeft:0,fRXRight:0,fRYTop:0,fRYBottom:0,bBlack:0,bCut:0,nFishParamType:0,fAngle:0,fZoom:0,fPTZX:0,fPTZY:0,emCorrectType:0};if(this.FECParamCB=t,1===this.decodeEngine)this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"FECGetParam",fishSubPort:e}):null!=this.pcVideoManager&&(this.pcVideoManager.FEC_GetParam(e,a),null!=this.FECParamCB&&this.FECParamCB(a));else{var r=at._JSPlayM4_FEC_GetParam(this.port,e);a.bBlack=0,a.fPTZX=at.HEAPF32[r+8>>2],a.fPTZY=at.HEAPF32[r+12>>2],a.fRXLeft=at.HEAPF32[r+16>>2],a.fRXRight=at.HEAPF32[r+20>>2],a.fRYTop=at.HEAPF32[r+24>>2],a.fRYBottom=at.HEAPF32[r+28>>2],a.fZoom=at.HEAPF32[r+32>>2],a.fAngle=at.HEAPF32[r+36>>2],a.bCut=at.HEAPF32[r+63>>2],a.nFishParamType=at.HEAPF32[r+67>>2],null!=this.FECParamCB&&this.FECParamCB(a)}return 1}},{key:"JSPlayM4_FEC_SetViewParam",value:function(e,t,a){if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_SetViewParam this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e+",upDateType:"+t+",fValue:"+a),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetViewParam","color: red"),0;var r=1;return 1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECSetViewParam",fishSubPort:e,upDateType:t,fValue:a}):r=0:r=null!=this.pcVideoManager?this.pcVideoManager.FEC_SetViewParam(e,t,a):0:r=at._JSPlayM4_FEC_SetViewParam(this.port,e,t,a),r}},{key:"JSPlayM4_FEC_GetViewParam",value:function(e,t,a){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_GetViewParam","color: red"),0;var r=1;this.FECViewParamCB=a;var i={fValue:-1};if(1===this.decodeEngine)this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECGetViewParam",fishSubPort:e,upDateType:t}):r=0:null!=this.pcVideoManager?(r=this.pcVideoManager.FEC_GetViewParam(e,t,i),null!=this.FECViewParamCB&&this.FECViewParamCB(i)):r=0;else{var n=at._JSPlayM4_GetViewParam(this.port,e,t);i.fValue=n,null!=this.FECViewParamCB&&this.FECViewParamCB(i)}return r}},{key:"JSPlayM4_FEC_SetWnd",value:function(e,t){if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_SetWnd this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e+",hWnd:"+t),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetWnd","color: red"),0;var a=1;if(0==e)console.log("fishPort is 0 ,main canvas doesn't need call FEC_SetWnd");else if(null!=t)if(1===this.decodeEngine){var r=document.getElementById(t);if(this.hasWebWorker){var i=r.transferControlToOffscreen();null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECSetWnd",fishSubPort:e,offscrrenCnv:i},[i]):a=0}else a=null!=this.pcVideoManager?this.pcVideoManager.FEC_SetWnd(e,r):0}else{var n=null;if(null!=t){var s=this._stringToBytes("#"+t),x=2*(t.length+1);n=at._malloc(x);var o=at.HEAPU8.subarray(n,n+x),l=new Uint8Array(x);o.set(l,0),o.set(new Uint8Array(s)),o=null,l=null}a=at._JSPlayM4_FEC_SetWnd(this.port,e,n),null!=n&&(at._free(n),n=null)}else console.log(">>>JS JSPlayM4_FEC_SetWnd hwnd error this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e+",hWnd:"+t),a=0;return a}},{key:"JSPlayM4_FEC_Disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=1;return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_Disable","color: red"),0):(0==e?console.log("fishPort is 0 ,main canvas doesn't need call FEC_Disable"):1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECDisable",fishSubPort:e,clearFECCanvas:t,clearContext:a}):r=0:r=null!=this.pcVideoManager?this.pcVideoManager.FEC_Disable(e,t,a):0:r=at._JSPlayM4_FEC_Disable(this.port,e,t,a),r)}},{key:"JSPlayM4_FEC_DelPort",value:function(e){if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_DelPort this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_DelPort","color: red"),0;var t=1;return 1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECDelPort",fishSubPort:e}):t=0:t=null!=this.pcVideoManager?this.pcVideoManager.FEC_DelPort(e):0:t=at._JSPlayM4_FEC_DelPort(this.port,e),t}},{key:"JSPlayM4_FEC_SetDisplayRegion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;if(this.printfFlag>0&&console.log(">>>JS JSPlayM4_FEC_SetDisplayRegion this.decodeEngine:"+this.decodeEngine+",fishSubPort:"+e+",left:"+r.left+",right:"+r.right+",top:"+r.top+",bottom:"+r.bottom),null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetDisplayRegion","color: red"),0;var x=1,o=r.left,l=r.right,_=r.top,h=r.bottom;if("number"!=typeof o||"number"!=typeof l||"number"!=typeof h||"number"!=typeof _)return console.log("param is not number"),0;if(n){if(o<0||l<0||_<0||h<0)return 0;if(l-o<16||h-_<16||l-o>this.canvasWidth||h-_>this.canvasHeight)return 0;s&&0!==this.iFECZoomNum&&(o=Math.round(o/this.iFECRatio_x)+this.stFECDisplayRect.left,_=Math.round(_/this.iFECRatio_y)+this.stFECDisplayRect.top,l=Math.round(l/this.iFECRatio_x)+this.stFECDisplayRect.left,h=Math.round(h/this.iFECRatio_y)+this.stFECDisplayRect.top)}else o=0,l=this.canvasWidth,_=0,h=this.canvasHeight,this.iFECZoomNum=0,this.iFECRatio_x=1,this.iFECRatio_y=1;if(this.stFECDisplayRect={top:_,left:o,right:l,bottom:h},1===this.decodeEngine){var f=o/this.canvasWidth*this.width,c=l/this.canvasWidth*this.width,u=_/this.canvasHeight*this.height,d=h/this.canvasHeight*this.height;this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECSetDisplayRegion",fishSubPort:e,type:t,regionNum:a,sx:f,sy:u,sw:c-f,sh:d-u}):x=0:x=null!=this.pcVideoManager?this.pcVideoManager.FEC_SetDisplayRegion(e,t,a,f,u,c-f,d-u):0}else if(null!==at){var p=o/this.canvasWidth*1e3,m=l/this.canvasWidth*1e3,S=_/this.canvasHeight*1e3,R=h/this.canvasHeight*1e3;x=n?at._JSPlayM4_FEC_SetDisplayRegion(this.port,e,t,a,p,m,S,R,i,n):at._JSPlayM4_FEC_SetDisplayRegion(this.port,e,0,0,0,0,0,0,null,n)}else x=0;return s&&(this.iFECRatio_x=this.canvasWidth/(l-o),this.iFECRatio_y=this.canvasHeight/(h-_),this.iFECZoomNum++),x}},{key:"JSPlayM4_FEC_SetBackCilling",value:function(e,t){var a=1;return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetBackCilling","color: red"),0):(1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECSetBackCilling",fishSubPort:e,bValue:t}):a=0:a=null!=this.pcVideoManager?this.pcVideoManager.FEC_SetBackCilling(e,t):0:a=at._JSPlayM4_FEC_SetBackCilling(this.port,e,t),a)}},{key:"JSPlayM4_FEC_GetPTZPort",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_GetPTZPort","color: red"),0;var r=-1;return this.FECGetPTZPortCB=a,1===this.decodeEngine?this.hasWebWorker?null!=this.decodeWorker?this.decodeWorker.postMessage({command:"FECGetPTZPort",subport:0,fPositionX:e,fPositionY:t}):r=0:null!=this.pcVideoManager?(((r=this.pcVideoManager.FEC_GetPTZPort(0,e,t))<0||r>31||null==r)&&(r=-1),null!=this.FECGetPTZPortCB&&this.FECGetPTZPortCB(r)):r=-1:console.info("%c softDecoder not support JSPlayM4_FEC_GetPTZPort","color: red"),r}},{key:"JSPlayM4_FEC_SetPTZDisplayMode",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_FEC_SetPTZDisplayMode","color: red"),0):(1===this.decodeEngine&&(this.hasWebWorker?null!=this.decodeWorker&&this.decodeWorker.postMessage({command:"FECSetPTZDisplayMode",ptzMode:e}):null!=this.pcVideoManager&&this.pcVideoManager.FEC_SetPTZDisplayMode(e)),1)}},{key:"JSPlayM4_FEC_Capture",value:function(e,t){return this.FECImageCB=t,1===this.decodeEngine?(this.hasWebWorker?this.decodeWorker.postMessage({command:"FECCapture",subport:e}):null!=this.pcVideoManager&&this.pcVideoManager.FEC_Capture(e,t),1):(at._JSPlayM4_FEC_Capture(this.port,e),1)}},{key:"JSPlayM4_FEC_PTZ2Window",value:function(e,t,a,r){return 1}},{key:"JSPlayM4_FEC_PTZ2Window2",value:function(e,t,a){return 1}},{key:"_SetTextCanvas",value:function(){if(1===this.decodeEngine){if(null!=this.textCanvas&&(this.textCanvas.remove(),this.textCanvas=null),null==this.textCanvas&&(this.textCanvas=document.createElement("canvas")),this.hasWebWorker){var e=this.textCanvas.transferControlToOffscreen();this.decodeWorker.postMessage({command:"SetTextCanvas",textoffscreenCanvas:e},[e])}else null!=this.pcVideoManager&&this.pcVideoManager.SetTextCanvas(this.textCanvas);this.setTextCanvasFlag=!0}return 1}},{key:"JSPlayM4_InputPrivateInfo",value:function(e,t,a){this.setTextCanvasFlag||this._SetTextCanvas();var r={};r.linesNum=at.HEAP32[e>>2],r.absTimeStamp=at.HEAP32[e+4>>2],r.stDrawLinesArray=[];for(var i=0;i<r.linesNum;i++){r.stDrawLinesArray[i]={},r.stDrawLinesArray[i].vertex_num=at.HEAP32[e+8+136*i>>2],r.stDrawLinesArray[i].lineWidth=at.HEAP32[e+12+136*i>>2],r.stDrawLinesArray[i].bFill=at.HEAP32[e+16+136*i>>2],r.stDrawLinesArray[i].bLoop=at.HEAP32[e+20+136*i>>2],r.stDrawLinesArray[i].dwMatchType=at.HEAP32[e+24+136*i>>2],r.stDrawLinesArray[i].dwIntelFlag=at.HEAP32[e+28+136*i>>2],r.stDrawLinesArray[i].dwSubIntelFlag=at.HEAP32[e+32+136*i>>2],r.stDrawLinesArray[i].color={},r.stDrawLinesArray[i].color.R=at.HEAPF32[e+36+136*i>>2],r.stDrawLinesArray[i].color.G=at.HEAPF32[e+40+136*i>>2],r.stDrawLinesArray[i].color.B=at.HEAPF32[e+44+136*i>>2],r.stDrawLinesArray[i].color.A=at.HEAPF32[e+48+136*i>>2],r.stDrawLinesArray[i].stPoint=[];for(var n=0;n<r.stDrawLinesArray[i].vertex_num;n++)r.stDrawLinesArray[i].stPoint[n]={},r.stDrawLinesArray[i].stPoint[n].x=at.HEAPF32[e+52+136*i+8*n>>2],r.stDrawLinesArray[i].stPoint[n].y=at.HEAPF32[e+56+136*i+8*n>>2];r.stDrawLinesArray[i].dwFillPicID=at.HEAP32[e+132+136*i>>2],r.stDrawLinesArray[i].dwEventID=at.HEAP32[e+136+136*i>>2],r.stDrawLinesArray[i].dwMosaictype=at.HEAP32[e+140+136*i>>2]}var s={};s.nFontsNum=at.HEAP32[t>>2],s.absTimeStamp=at.HEAP32[t+4>>2],s.stDrawFontsArray=[];for(var x=0;x<s.nFontsNum;x++){s.stDrawFontsArray[x]={},s.stDrawFontsArray[x].nFontSizeW=at.HEAP32[t+8+80*x>>2],s.stDrawFontsArray[x].nFontSizeH=at.HEAP32[t+12+80*x>>2],s.stDrawFontsArray[x].dwMatchType=at.HEAP32[t+16+80*x>>2],s.stDrawFontsArray[x].dwIntelFlag=at.HEAP32[t+20+80*x>>2],s.stDrawFontsArray[x].dwSubIntelFlag=at.HEAP32[t+24+80*x>>2],s.stDrawFontsArray[x].color={},s.stDrawFontsArray[x].color.R=at.HEAPF32[t+28+80*x>>2],s.stDrawFontsArray[x].color.G=at.HEAPF32[t+32+80*x>>2],s.stDrawFontsArray[x].color.B=at.HEAPF32[t+36+80*x>>2],s.stDrawFontsArray[x].color.A=at.HEAPF32[t+40+80*x>>2],s.stDrawFontsArray[x].stPoint={},s.stDrawFontsArray[x].stPoint.x=at.HEAPF32[t+44+80*x>>2],s.stDrawFontsArray[x].stPoint.y=at.HEAPF32[t+48+80*x>>2],s.stDrawFontsArray[x].NeedClearNormalPos=at.HEAP32[t+60+80*x>>2],s.stDrawFontsArray[x].bBackGround=at.HEAP32[t+64+80*x>>2],s.stDrawFontsArray[x].BGcolor={},s.stDrawFontsArray[x].BGcolor.R=at.HEAPF32[t+68+80*x>>2],s.stDrawFontsArray[x].BGcolor.G=at.HEAPF32[t+72+80*x>>2],s.stDrawFontsArray[x].BGcolor.B=at.HEAPF32[t+76+80*x>>2],s.stDrawFontsArray[x].BGcolor.A=at.HEAPF32[t+80+80*x>>2],s.stDrawFontsArray[x].dwEventID=at.HEAP32[t+84+80*x>>2];var o=at.HEAP32[t+52+80*x>>2],l=at.HEAP32[t+56+80*x>>2],_=new Uint8Array(4*l);_.set(at.HEAP8.subarray(o,o+4*l));for(var h=new Uint32Array(l),f=0;f<l;f++)h[f]=_[4*f]|_[4*f+1]<<8|_[4*f+2]<<16|_[4*f+3]<<24;for(var c="",u=0;u<h.length;u++)0!==h[u]&&(c+=String.fromCharCode(h[u]));s.stDrawFontsArray[x].fontString=c}var d={};d.absTimeStamp=at.HEAP32[a>>2],d.nWidth=at.HEAP32[a+4>>2],d.nHeight=at.HEAP32[a+8>>2],d.pstRect={},d.pstRect.fTop=at.HEAPF32[a+12>>2],d.pstRect.fBottom=at.HEAPF32[a+16>>2],d.pstRect.fLeft=at.HEAPF32[a+20>>2],d.pstRect.fRight=at.HEAPF32[a+24>>2],d.nPixelFormat=at.HEAP32[a+28>>2],d.fAlpha=at.HEAPF32[a+32>>2],d.nPixelFormat;var p=at.HEAP32[a+36>>2],m=at.HEAP32[a+40>>2],S=new Uint8Array(m);return S.set(at.HEAPU8.subarray(p,p+m)),d.picImageData=S,d.PicID=at.HEAP32[a+44>>2],1===this.decodeEngine&&(this.hasWebWorker?this.decodeWorker.postMessage({command:"InputPrivateInfo",linesInfo:r,fontInfo:s,ImageInfo:d}):null!=this.pcVideoManager&&this.pcVideoManager.InputPrivateInfo(r,s,d)),1}},{key:"JSPlayM4_SelectIntelInfoFeatureToDraw",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SelectIntelInfoFeatureToDraw","color: red"),0;if(null==e)return 0;var t=1;if(2==e.nMode){if(1!==this.decodeEngine)return 0;this.hasWebWorker?this.decodeWorker.postMessage({command:"SelectIntelInfoFeatureToDraw",IntelInfoParam:e}):null!=this.pcVideoManager&&this.pcVideoManager.SelectIntelInfoFeatureToDraw(e)}else{var a=at._JSPlayM4_GetNeedDrawIntelInfoStruct();at.HEAP32[a+3840>>2]=e.NodeNumber;for(var r=0;r<e.NodeNumber;r++)at.HEAPU32[a+24*r>>2]=e.pIntelInfoNode[r].nID,at.HEAPU8[a+4+24*r]=e.pIntelInfoNode[r].nType;t=at._JSPlayM4_SelectIntelInfoFeatureToDraw(this.port,e.bTrue,e.nMode)}return t}},{key:"JSPlayM4_SetMosaicType",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetMosaicType","color: red"),0;var t=1;if(this.pMosaicParam=e,1===this.decodeEngine)this.hasWebWorker?this.decodeWorker.postMessage({command:"SetMosaicType",MosaicParam:e}):null!=this.pcVideoManager&&this.pcVideoManager.SetMosaicType(e);else{var a=at._JSPlayM4_GetMosaicTypeConfigStruct();at.HEAPU8[a]=e.nMosaicType,at.HEAPU8[a+1]=e.pstMosaicColor.fMosaicColorR,at.HEAPU8[a+2]=e.pstMosaicColor.fMosaicColorG,at.HEAPU8[a+3]=e.pstMosaicColor.fMosaicColorB,at.HEAPU8[a+4]=e.pstMosaicColor.fMosaicColorA,at.HEAPU8[a+5]=e.nMosaicSize,t=at._JSPlayM4_SetMosaicType(this.port)}return t}},{key:"JSPlayM4_SetWaterMarkFont",value:function(e){if(null===at)return console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetWaterMarkFont","color: red"),0;if(this.printfFlag>0){console.log("%cJSPlayerInterfaceV3.js JSPlayM4_SetWaterMarkFont: port:"+this.port+",string:"+e.pFontString+",fontcolr,fR:"+e.pstFontColor.fR+",fG:"+e.pstFontColor.fG+",fB:"+e.pstFontColor.fB+",fA:"+e.pstFontColor.fA+",fontSizeWidth:"+e.pstFontSize.nFontWidth+",fontSizeHeight:"+e.pstFontSize.nFontHeight+",rotateAngle:"+e.pstFontRotate.fRotateAngle+",fontFamily:"+e.pFontFamily,"color:red");var t=document.getElementById(this.canvasID).width,a=document.getElementById(this.canvasID).height;console.log("canvasWidht:"+t+",canvasHeight:"+a),console.log("fullScreen:"+e.pstFontRotate.fFillFullScreen+",rowNum:"+e.pstFontNumber.nRowNumber+",colNum:"+e.pstFontNumber.nColNumber+",space:"+e.pSpace+",fontAlign:"+e.nFontAlign+",colorAdapt:"+e.nColorAdapt),console.log("adaptMode:"+e.pstCanvasAdapt.nCanvasAdaptMode+",baseWidth:"+e.pstCanvasAdapt.nBaseCanvasWidth+",baseHeight:"+e.pstCanvasAdapt.nBaseCanvasHeight+",rowSpace:"+e.pstCanvasAdapt.nRowSpace+",colSpace:"+e.pstCanvasAdapt.nColSpace+",ntotalColSpace:"+e.pstCanvasAdapt.ntotalColSpace+",ntotalRowSpace:"+e.pstCanvasAdapt.ntotalRowSpace)}var r=1;if(this.pFontParam=e,1===this.decodeEngine)this.setTextCanvasFlag||this._SetTextCanvas(),this.hasWebWorker?this.decodeWorker.postMessage({command:"SetWaterMarkFont",fontParam:e}):null!=this.pcVideoManager&&this.pcVideoManager.SetWaterMarkFont(e);else if(null==e){var i=at._JSPlayM4_GetWaterMarkFontStruct();at.HEAP32[i+1800-4+44>>2]=0,at.HEAP32[i+1800-4+48>>2]=0,at._JSPlayM4_SetWaterMarkFontString(0,null),r=at._JSPlayM4_SetWaterMarkFont(this.port)}else{for(var n=0;n<e.pFontString.length;n++){var s=this._stringToBytes(e.pFontString[n]),x=2*e.pFontString[n].length;if(0==x&&(x=1),(null==this.pWaterMarkFontData||x>this.nWaterMarkFontLen)&&(null!==this.pWaterMarkFontData&&(at._free(this.pWaterMarkFontData),this.pWaterMarkFontData=null),this.pWaterMarkFontData=at._malloc(x),this.nWaterMarkFontLen=x),null===this.pWaterMarkFontData)return;var o=at.HEAPU8.subarray(this.pWaterMarkFontData,this.pWaterMarkFontData+x),l=new Uint8Array(x);o.set(l,0),o.set(new Uint8Array(s)),o=null,l=null,at._JSPlayM4_SetWaterMarkFontString(n,this.pWaterMarkFontData)}var _=at._JSPlayM4_GetWaterMarkFontStruct();at.HEAPF32[_+1800-4+4>>2]=e.pSpace,at.HEAPU32[_+1800-4+8>>2]=e.pFontString.length,at.HEAPU32[_+1800-4+12>>2]=e.nFontAlign,at.HEAPU32[_+1800-4+16>>2]=e.nColorAdapt,at.HEAPF32[_+1800-4+20>>2]=e.pstStartPos.fX,at.HEAPF32[_+1800-4+24>>2]=e.pstStartPos.fY,at.HEAPF32[_+1800-4+28>>2]=e.pstFontColor.fR,at.HEAPF32[_+1800-4+32>>2]=e.pstFontColor.fG,at.HEAPF32[_+1800-4+36>>2]=e.pstFontColor.fB,at.HEAPF32[_+1800-4+40>>2]=e.pstFontColor.fA,at.HEAP32[_+1800-4+44>>2]=e.pstFontSize.nFontWidth,at.HEAP32[_+1800-4+48>>2]=e.pstFontSize.nFontHeight,at.HEAPF32[_+1800-4+52>>2]=e.pstFontRotate.fRotateAngle,at.HEAP32[_+1800-4+56>>2]=e.pstFontRotate.fFillFullScreen,at.HEAP32[_+1800-4+60>>2]=e.pstFontNumber.nRowNumber,at.HEAP32[_+1800-4+64>>2]=e.pstFontNumber.nColNumber,at.HEAP32[_+1800-4+68>>2]=e.pstCanvasAdapt.nCanvasAdaptMode,at.HEAP32[_+1800-4+72>>2]=e.pstCanvasAdapt.nRowSpace,at.HEAP32[_+1800-4+76>>2]=e.pstCanvasAdapt.nColSpace,at.HEAP32[_+1800-4+80>>2]=e.pstCanvasAdapt.nBaseCanvasWidth,at.HEAP32[_+1800-4+84>>2]=e.pstCanvasAdapt.nBaseCanvasHeight,r=at._JSPlayM4_SetWaterMarkFont(this.port)}return r}},{key:"JSPlayM4_SetWaterMarkImage",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_SetWaterMarkImage","color: red"),0):(1===this.decodeEngine?this.hasWebWorker?this.decodeWorker.postMessage({command:"SetWaterMarkImage",pImageData:e.pImageData,pImageType:e.pImageType,pstRectPos:e.pstRectPos,fAlpha:e.fAlpha},[e.pImageData]):null!=this.pcVideoManager&&this.pcVideoManager.SetWaterMarkImage(e):console.log("%c1>soft decode not support SetWaterMarkImage,","color: red"),1)}},{key:"JSPlayM4_InitEncoder",value:function(e,t){if(1!==this.decodeEngine)return console.log("%conly hard decoder support recoder,soft decoder not support (20240801)","color: red"),0;if(t.recoderAudioAnyWhere?(this.recoderAudioAnyWhere=!0,at._JSPlayM4_SetRecoderAudio(this.port,1)):at._JSPlayM4_SetRecoderAudio(this.port,0),this.needPlaySound||this.recoderAudioAnyWhere){var a=48e3;44100==t.sampleRate&&(a=t.sampleRate),this.JSPlayM4_SetResampleValue(!0,a)}return this.hasWebWorker?this.decodeWorker.postMessage({command:"InitEncoder",videoInfo:e,audioInfo:t}):null!=this.pcVideoManager&&this.pcVideoManager.InitEncoder(e,t),1}},{key:"JSPlayM4_StartEncode",value:function(e,t){var a=this;return 1!==this.decodeEngine?(console.log("%conly hard decoder support recoder,soft decoder not support (20240801)","color: red"),0):(this.recoderVideoDataCBFun=e,this.recoderAudioDataCBFun=t,"undefined"==typeof VideoEncoder?(console.log("%cbrowser or Graphics car not support videoEncode ","color: red"),0):(this.hasWebWorker?this.decodeWorker.postMessage({command:"StartVideoEncode"}):null!=this.pcVideoManager&&this.pcVideoManager.StartVideoEncode(e),(this.needPlaySound||this.recoderAudioAnyWhere)&&("undefined"==typeof AudioEncoder?console.log("%cbrowser or Graphics car not support audioEncode ","color: red"):(this.JSPlayM4_SetDecCBStream(2),at._JSPlayM4_SetDecOrDisplayCallbackType(this.port,2,1),at._JSPlayM4_SetDisplayCallBack(this.port,1,this.nUser),this.hasWebWorker?this.decodeWorker.postMessage({command:"StartAudioEncode"}):null!=this.pcVideoManager&&this.pcVideoManager.StartAudioEncode(t),this.ResamplePCMCallBack=function(e){101==e.type&&(a.hasWebWorker?a.decodeWorker.postMessage({command:"InputPCMToEncode",PCMData:e.yuvData,timeStamp:e.timeStamp},[e.yuvData.buffer]):null!=a.pcVideoManager&&a.pcVideoManager.InputPCMToEncode(e.yuvData,e.timeStamp))})),1))}},{key:"JSPlayM4_StopEncode",value:function(){return 1!==this.decodeEngine?(console.log("%conly hard decoder support recoder,soft decoder not support (20240801)","color: red"),0):(this.recoderVideoDataCBFun=null,this.recoderAudioDataCBFun=null,this.ResamplePCMCallBack=null,this.recoderAudioAnyWhere=!1,at._JSPlayM4_SetRecoderAudio(this.port,0),at._JSPlayM4_SetDisplayCallBack(this.port,0,this.nUser),this.hasWebWorker?this.decodeWorker.postMessage({command:"StopEncode"}):null!=this.pcVideoManager&&this.pcVideoManager.StopEncode(),1)}},{key:"JSPlayM4_IsVisible",value:function(e){return null===at?(console.info("%coJSPlayerWasm is null,can't JSPlayM4_IsVisible","color: red"),0):(1===this.decodeEngine?this.hasWebWorker?this.decodeWorker.postMessage({command:"IsVisible",visibility:e}):null!=this.pcVideoManager&&this.pcVideoManager.IsVisible(e):at._JSPlayM4_IsVisible(this.port,e),1)}},{key:"_stringToBytes",value:function(e){if("string"!=typeof e||null==e)return console.log("%c_stringToBytes str:"+e,"color: red"),0;for(var t,a,r=[],i=0;i<e.length;i++){t=e.charCodeAt(i),a=[];do{a.push(255&t),t>>=8}while(t);r=r.concat(a.reverse())}return r}},{key:"_downloadFile",value:function(e,t){var a=e;i(e,Blob)||i(e,File)||(a=new Blob([e]));var r=window.URL.createObjectURL(a),n=window.document.createElement("a");n.href=r,n.download=t;var s=document.createEvent("MouseEvents");s.initEvent("click",!0,!0),n.dispatchEvent(s)}},{key:"downloadRTPData",value:function(e){if(this.bWriteData){var t=e,a=this.aTotalBuffer.length;console.log("totalLength:"+a);for(var r=0,i=t.length;r<i;r++)this.aTotalBuffer[a+r]=t[r];this.iFrameNum++,t=null,console.log("downloadRTPdata iFrameNum:"+this.iFrameNum)}if(this.bWriteData&&this.iFrameNum>=600){console.log("download600RawData");var n=new Uint8Array(this.aTotalBuffer);this._downloadFile(n,"Raw600.data"),this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.bWriteData=!1,this.iFrameNum=0,n=null}}},{key:"downloadAudioPCMData",value:function(e){if(this.bWriteAudioPCMData){for(var t=e,a=this.audioPCMBuffer.length,r=0,i=t.length;r<i;r++)this.audioPCMBuffer[a+r]=t[r];this.iAudioPCMFrameNum++,t=null,console.log("download ANR Decode AudioData FrameNum:"+this.iAudioPCMFrameNum)}if(this.bWriteAudioPCMData&&this.iAudioPCMFrameNum>=WRITE_PCM_NUM){console.log("download"+WRITE_PCM_NUM+"this.audioPCMBuffer");var n=new Uint8Array(this.audioPCMBuffer);this._downloadFile(n,"AudioANR.data"),this.audioPCMBuffer.splice(0,this.audioPCMBuffer.length),this.bWriteAudioPCMData=!1,this.iAudioPCMFrameNum=0,n=null}}},{key:"IsChromeVersion64Bit",value:function(){var e=navigator.userAgent;if(e.indexOf("Chrome")>-1){var t=e.match(/Chrome\/(\d+)/);if(t&&t[1]){var a=t[1];return e.indexOf("Mac")>-1?e.indexOf("Intel")>-1||a>61:e.indexOf("Windows")>-1?e.indexOf("Win64")>-1||e.indexOf("x64")>-1||(e.indexOf("x86"),!1):e.indexOf("Linux")>-1&&(e.indexOf("x86_64")>-1||e.indexOf("x64")>-1||(e.indexOf("i686")>-1||e.indexOf("x86"),!1))}return!1}return!1}},{key:"getwasmMemory",value:function(){var e,t={},a=navigator.userAgent.toLowerCase();if((e=a.match(/rv:([\d.]+)\) like gecko/))||(e=a.match(/msie ([\d\.]+)/))?t.ie=e[1]:(e=a.match(/edge\/([\d\.]+)/))?t.edge=e[1]:(e=a.match(/firefox\/([\d\.]+)/))?t.firefox=e[1]:(e=a.match(/(?:opera|opr).([\d\.]+)/))?t.opera=e[1]:(e=a.match(/chrome\/([\d\.]+)/))?t.chrome=e[1]:(e=a.match(/version\/([\d\.]+).*safari/))&&(t.safari=e[1]),this.initialMemory=8192,t.chrome){var r=this.IsChromeVersion64Bit();this.maximumMemory=1==r?32768:16368}else if(t.safari){var i=t.safari,n=i.indexOf(".");Number(i.substring(0,n)),this.maximumMemory=16368,console.info("%c1>your safaribrowserbit maximumMemory:%d","color: green",64*this.maximumMemory/1024)}else this.maximumMemory=16368,console.info("%c1>your browserbit is 32 and maximumMemory:%d","color: green",64*this.maximumMemory/1024);return this.isMobileDevice()&&(this.initialMemory=2048,this.maximumMemory=4096,console.info("%c1>your browser is mobileDevice maximumMemory:%d","color: green",64*this.maximumMemory/1024)),-1}},{key:"isMobileDevice",value:function(){var e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),a=window.innerWidth<=768,r="ontouchstart"in window||navigator.maxTouchPoints>0;return t||a&&r}}]),a}();window.JSPlayM4_AdditionDataCBFun=function(e,t,a){if(null!=tt[a][e]){var r={};r.dataType=at.HEAP32[t>>2],r.dataStrVersion=at.HEAP32[t+4>>2],r.dataTimeStamp=at.HEAP32[t+8>>2],r.dataLength=at.HEAP32[t+12>>2],r.pData=at.HEAP32[t+16>>2],tt[a][e].additionDataBufferSize<r.dataLength&&(null!==tt[a][e].additionDataBuffer&&(at._free(tt[a][e].additionDataBuffer),tt[a][e].additionDataBuffer=null),tt[a][e].additionDataBufferSize=r.dataLength),null===tt[a][e].additionDataBuffer&&(tt[a][e].additionDataBuffer=at._malloc(tt[a][e].additionDataBufferSize));var i=new Uint8Array(r.dataLength);i.set(at.HEAPU8.subarray(r.pData,r.pData+r.dataLength)),at.writeArrayToMemory(i,tt[a][e].additionDataBuffer),r.additionDataBuffer=new Uint8Array(at.HEAPU8.buffer,tt[a][e].additionDataBuffer,tt[a][e].additionDataBufferSize),tt[a][e].hasOwnProperty("addtionCallBackFun")&&null!=tt[a][e].addtionCallBackFun&&null!=tt[a][e].addtionCallBackFun&&(tt[a][e].addtionCallBackFun(r),i=null,r.additionDataBuffer=null)}},window.JSPlayM4_DisplayCallBack=function(e,t,a,r,i,n,s,x,o){if(null!=tt[o][e]){var l={};l.yuvData=new Uint8Array(a),l.yuvData.set(at.HEAPU8.subarray(t,t+a)),l.isize=a,l.timeStamp=s,l.width=r,l.height=i,l.frameRate=n,l.type=x,tt[o][e].hasOwnProperty("displayCallBackFun")&&(null!=tt[o][e].displayCallBackFun&&(tt[o][e].displayCallBackFun(l),l.yuvData=null),null!=tt[o][e].ResamplePCMCallBack&&(44100==l.frameRate||48e3==l.frameRate?tt[o][e].ResamplePCMCallBack(l):console.log("%cAudio encode only support 44.1k and 48k.ResamplePCMCallBack sampleRate:"+l.frameRate,"color: red")))}},window.JSPlayM4_DecCallBack=function(e,t,a,r,i,n,s,x,o){if(null!=tt[o][e]){var l={};l.port=e,l.Data=new Uint8Array(a),l.Data.set(at.HEAPU8.subarray(t,t+a)),l.isize=a,l.iDataType=r,l.SampleRate=i,l.width=n,l.height=s,l.stampTime=x,tt[o][e].hasOwnProperty("decCallBackFun")&&null!=tt[o][e].decCallBackFun&&(tt[o][e].decCallBackFun(l),l.Data=null)}},window.JSPlayM4_RunTimeInfoCallBack=function(e,t,a,r){if(null!=tt[r][e]){var i={nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:0,nInputDataInterval:0,nFrameNumInterval:0};if(i.nRunTimeModule=at.HEAP32[t>>2],i.nStrVersion=at.HEAP32[t+4>>2],i.nFrameTimeStamp=at.HEAP32[t+8>>2],i.nFrameNum=at.HEAP32[t+12>>2],i.nErrorCode=a,a==$){var n=at.HEAP32[t+20>>2];i.nInputDataInterval=n}if(1024==a){var s=at.HEAP32[t+20>>2];i.nFrameNumInterval=s}if(a==ee){var x=at.HEAPF64[t+20>>3];i.nAverageDecodeTime=x}if(687865857==a){var o=at.HEAPU8[t+20],l=at.HEAPU8[t+21];i.nSystemFormat=l,i.nDetectRes=o,i.nMp4FileTime=i.nFrameTimeStamp,i.nMp4TotalFrameNum=i.nFrameNum}if(a==te||a==ae){var _=at.HEAPU8[t+21],h=at.HEAPU8[t+22]<<8|_,f=at.HEAPU8[t+23],c=at.HEAPU8[t+24],u=at.HEAPU8[t+25],d=at.HEAPU8[t+26],p=at.HEAPU8[t+27],m=at.HEAPU8[t+28],S=at.HEAPU8[t+29]<<8|m;i.AbsTimeYear=h,i.AbsTimeMonth=f,i.AbsTimeDay=c,i.AbsTimeHour=u,i.AbsTimeMinute=d,i.AbsTimeSecond=p,i.AbsTimeMilliseconds=S}if(9==a&&1==tt[r][e].decodeEngine)return void tt[r][e].JSPlayM4_SetStreamEnd(!0);tt[r][e].hasOwnProperty("runtimeCBFun")&&null!=tt[r][e].runtimeCBFun&&tt[r][e].runtimeCBFun(i)}},window.JSPlayM4_StreamInfoCallBack=function(e,t,a){if(null!=tt[a][e]){var r={};r.nSystemformat=at.HEAP16[t>>1],r.nVideoformat=at.HEAP16[t+2>>1],r.nAudioformat=at.HEAP16[t+4>>1],r.nAudiochannels=at.HEAP16[t+6>>1],r.nAudiobitspersample=at.HEAP32[t+8>>2],r.nAudiosamplesrate=at.HEAP32[t+12>>2],r.nAudiobitrate=at.HEAP32[t+16>>2],r.nWidth=at.HEAP32[t+20>>2],r.nHeight=at.HEAP32[t+24>>2],r.fFrameRate=at.HEAPF32[t+28>>2],r.nIntervalOfIFrame=at.HEAP32[t+32>>2],tt[a][e].hasOwnProperty("streamInfoCBFun")&&null!=tt[a][e].streamInfoCBFun&&tt[a][e].streamInfoCBFun(r)}},window.JSPlayM4_PostMpStreamOffsetCBFun=function(e,t,a){if(null!=tt[a][e]){var r={};r.nStreamOffset=t,tt[a][e].hasOwnProperty("streamInfoCBFun")&&null!=tt[a][e].PostMpStreamOffsetCBFun&&tt[a][e].PostMpStreamOffsetCBFun(r)}},window.JSPlayM4_FirstFrameCallBack=function(e,t){null!=tt[t][e]&&tt[t][e].hasOwnProperty("FFCallBackFun")&&null!=tt[t][e].FFCallBackFun&&null!=tt[t][e].FFCallBackFun&&tt[t][e].FFCallBackFun({decodeEngine:0})},window.JSPlayM4_AudioPCMCallBack=function(e,t,a,r){null!=tt[r][e]&&tt[r][e].__proto__.hasOwnProperty("downloadAudioPCMData")&&tt[r][e].downloadAudioPCMData(t)},window.JSPlayM4_RTPRawDataCallBack=function(e,t,a){null!=tt[a][port]&&tt[a][port].__proto__.hasOwnProperty("downloadRTPData")&&tt[a][port].downloadRTPData(e)},window.JSPlayM4_CaptrueRGBDataCallBack=function(e,t,a,r,i,n){null!=tt[n][e]&&tt[n][e].hasOwnProperty("imageCB")&&null!=tt[n][e].imageCB&&(null==tt[n][e].rgbDataBuffer&&(tt[n][e].rgbDataBuffer=new Uint8Array(i)),tt[n][e].rgbDataBuffer.set(at.HEAPU8.subarray(t,t+i)),tt[n][e].imageCB(tt[n][e].rgbDataBuffer,a,r),tt[n][e].rgbDataBuffer=null)},window.JSPlayM4_SetPlayPosSucCallBack=function(e,t,a){if(null!=tt[a][e]){var r={nRes:1};r.nRelativePos=t,tt[a][e].hasOwnProperty("SetPlayPosCBFun")&&null!=tt[a][e].SetPlayPosCBFun&&tt[a][e].SetPlayPosCBFun(r)}},window.JSPlayM4_FishCaptrueRGBDataCallBack=function(e,t,a,r,i,n,s){null!=tt[s][e]&&tt[s][e].hasOwnProperty("FECImageCB")&&null!=tt[s][e].FECImageCB&&(null==tt[s][e].FECRgbDataBuffer&&(tt[s][e].FECRgbDataBuffer=new Uint8Array(n)),tt[s][e].FECRgbDataBuffer.set(at.HEAPU8.subarray(a,a+n)),tt[s][e].FECImageCB(tt[s][e].FECRgbDataBuffer,r,i,t),tt[s][e].FECRgbDataBuffer=null)};var _t,ht=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),ft=(_t=void 0,function(e){return e&&(_t=e),_t}),ct=function(){function e(){if(function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,e),ft())return ft();if(void 0!==e.unique)return e.unique;e.unique=this,this.oAudioContext=null,this.currentVolume=80,this.bSetVolume=!1,this.gainNode=null,this.iWndNum=-1,this.mVolumes=new Map;var t=window.AudioContext||window.webkitAudioContext;this.oAudioContext=new t,this.writeString=function(e,t,a){for(var r=0;r<a.length;r++)e.setUint8(t+r,a.charCodeAt(r))},this.setBufferToDataview=function(e,t,a){for(var r=0;r<a.length;r++,t++)e.setUint8(t,a[r])},ft(this)}return ht(e,[{key:"Play",value:function(e,t,a){var r=new ArrayBuffer(44+t),i=new DataView(r),n=a.samplesPerSec,s=a.channels,x=a.bitsPerSample;this.writeString(i,0,"RIFF"),i.setUint32(4,32+2*t,!0),this.writeString(i,8,"WAVE"),this.writeString(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,s,!0),i.setUint32(24,n,!0),i.setUint32(28,2*n,!0),i.setUint16(32,s*x/8,!0),i.setUint16(34,x,!0),this.writeString(i,36,"data"),i.setUint32(40,t,!0),this.setBufferToDataview(i,44,e);var o=this;return this.oAudioContext.decodeAudioData(i.buffer,(function(e){var t=o.oAudioContext.createBufferSource();if(null==t)return-1;t.buffer=e,t.start(0),(null==o.gainNode||o.bSetVolume)&&(o.gainNode=o.oAudioContext.createGain(),o.bSetVolume=!1),o.gainNode.gain.value=o.currentVolume/100,o.gainNode.connect(o.oAudioContext.destination),t.connect(o.gainNode)}),(function(e){return console.log("decode error"),-1})),0}},{key:"Stop",value:function(){return null!=this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),!0}},{key:"SetVolume",value:function(e){return this.bSetVolume=!0,this.currentVolume=e,this.mVolumes.set(this.iWndNum,this.currentVolume),!0}},{key:"SetWndNum",value:function(e){this.iWndNum=e;var t=this.mVolumes.get(e);return null==t&&(t=80),this.currentVolume=t,!0}},{key:"GetVolume",value:function(){var e=this.mVolumes.get(this.iWndNum);return null==e&&(e=80),e}}]),e}(),ut=16,dt=31,pt=25,mt=20480,St={width:0,height:0,frameNum:0,yuvData:null},Rt={width:0,height:0,frameNum:0,yuvData:null},Pt={sampleRate:0,channel:0,bitsPerSample:0,length:0,pcmData:null},yt={id:null,cmd:null,data:null,errorCode:0,status:null},bt=function(){function a(t,r,i,n){if(e(this,a),this.jsplayer=t,null==r||void 0===r||"string"!=typeof r)return 0;if(this.szBasePath=r,!i||"function"!=typeof i)return 0;this.fnCallBack=i,this.decodeWorker=null,this.streamOpenMode=null,this.bOpenStream=!1,this.SystemFormat=-1,this.bFileHeadAudioFormat=!0,this.bHIKHeadValue=!0,this.audioRenderer=null,this.aAudioBuffer=[],this.iAudioBufferSize=0,this.Volume=0,this.oSuperRender=null,this.aVideoFrameBuffer=[],this.YUVBufferSize=1,this.szOSDTime=null,this.bJSPrintLog=window.g_printfFlag,this.bWriteYUVData=!1,this.iYUV10size=0,this.aVideoYUVBuffer=[],this.bWritePCMData=!1,this.iAudioBuffer500Size=0,this.aAudioPCMBuffer=[],this.bWriteRawData=!1,this.iRawDataSize=0,this.aRawDataBuffer=[],this.bWriteRTPData=!0,this.iRTPDataSize=0,this.aRTPDataBuffer=[],this.downloadRTP=!1,this.rtpNum=0,this.jpegDownloadFlag=!1,this.bmpDownloadFlag=!1,this.bPlaySound=!1,this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bPlayRateChange=!1,this.audioNum=0,this.videoNum=0,this.nCurStatus=2,this.FrameForwardLen=1,this.bOnlyPlaySound=!1,this.bVideoCropInfo=!1,this.dataCallBackFun=null,this.YUVBufSizeCBFun=null,this.DecCallBackFun=null,this.DisplayCallBackFun=null,this.PCMCallBackFun=null,this.DecInfoYUV=St,this.DisplayInfoYUV=Rt,this.DecInfoPCM=Pt,this.displayFrameInfo={},this.frameInfoFlag=!0,this.startTimeStamp=0,this.GetFileTimeCBFun=null,this.GetMpOffsetCBFun=null,this.nWidth=0,this.nHeight=0,this.nSPSCropLeft=0,this.nSPSCropRight=0,this.nSPSCropTop=0,this.nSPSCropBottom=0,this.decCBStream=0,this.sCanvasId=null,this.aDisplayBuf=null,this.bVisibility=!0,this.nDecFrameType=0,this.runtimeInfoCBFun=null,this.pstRuntimeInfo={nRunTimeModule:0,nStrVersion:0,nFrameTimeStamp:0,nFrameNum:0,nErrorCode:0,nInputDataInterval:0,nFrameNumInterval:0,nAverageDecodeTime:0,nSystemFormat:0,nDetectRes:0,nMp4FileTime:0,nMp4TotalFrameNum:0,AbsTimeYear:0,AbsTimeMonth:0,AbsTimeDay:0,AbsTimeHour:0,AbsTimeMinute:0,AbsTimeSecond:0,AbsTimeMilliseconds:0},this.firstRenderBegin=!0,this.firstFrameCB=null,this.needFirstFrameCB=!1,this.bstreamEnd=!1,this.nstreamEndloopNum=0,this.streamInfoCBFun=null,this.PostMpStreamOffsetCBFun=null,this.addtionCallBackFun=null,this.textCanvas=null,this.setTextCanvasFlag=!1,this.FECGetPortCB=null,this.FECViewParamCB=null,this.oInputTimer=null,this.nLastSourceTimeStamp=-1,this.nLastClockTimeStamp=-1,this.nGetTotalFrameNum=0,this.nAverageDecodeTime=0,this.oDecodeTimer=null,this.iCanvasWidth=0,this.iCanvasHeight=0,this.iZoomNum=0,this.iRatio_x=1,this.iRatio_y=1,this.stDisplayRect={top:0,left:0,right:0,bottom:0},this.bDisRect=!1,this.stYUVRect={top:0,left:0,right:0,bottom:0},this.nLostFrameFlag=1,this.nIgnoreHeaderAudioDefine=0,this.aInputDataLens=[],this.aInputDataBuffer=[],this.bIsGetYUV=!1,this.bIsFirstFrame=!0,this.iInputMaxBufSize=5242880,this.bIsInput=!1,this.bIsInputBufOver=!1,this.bIsInputBufWillOver=!1,this.iInputDataLen=mt;var s=this;this.errorCode=1,this.loopNum=0,this.bJSPrintLog>=0&&console.info("%c1>there will play by V1","color: green"),this.needWaitMpOffset=!1,this.setCallBack=function(e,t,a,r,i){var s=yt;s.id=n,s.cmd=t,s.data=a,s.errorCode=r,s.status=i,e.errorCode=r,e.fnCallBack(s)},this.convertErrorCode=function(e){switch(e){case 1:return 1;case 98:return 0;default:return e}},this.arrayBufferCopy=function(e){var t=e.byteLength,a=new Uint8Array(t),r=new Uint8Array(e),i=0;for(i=0;i<t;i++)a[i]=r[i];return a},this.inputDataFun=function(){if(1==s.needWaitMpOffset)return 1;var e,t=0;if(s.bIsGetYUV=!1,s.bIsInputBufOver||s.bIsInputBufWillOver){e=new Uint8Array(1);var a={command:"InputData",data:new Uint8Array(e).buffer,dataSize:0};s.decodeWorker.postMessage(a,[a.data])}else if(s.bPlay&&(!s.bPause||s.bOnebyOne||6==s.nCurStatus)||this.bOnlyPlaySound){for(;s.aInputDataLens.length>0&&!((t+=s.aInputDataLens.shift())>s.iInputDataLen););e=s.aInputDataBuffer.splice(0,t);var r={command:"InputData",data:new Uint8Array(e).buffer,dataSize:t};s.decodeWorker.postMessage(r,[r.data])}e=null},this.getPic=function(e,t){if(null==this.decodeWorker||null==this.oSuperRender)return 2;if(!this.bPlay)return 2;if(!e||"function"!=typeof e)return 0;if(this.dataCallBackFun=e,0===this.iZoomNum)this.stYUVRect.left=0,this.stYUVRect.top=0,this.stYUVRect.right=0,this.stYUVRect.bottom=0;else{if(0===this.iCanvasWidth||0===this.iCanvasHeight)this.stYUVRect.left=0,this.stYUVRect.top=0,this.stYUVRect.right=0,this.stYUVRect.bottom=0;else{var a=this.nWidth/this.iCanvasWidth,r=this.nHeight/this.iCanvasHeight;this.stYUVRect.left=Math.round(this.stDisplayRect.left*a),this.stYUVRect.top=Math.round(this.stDisplayRect.top*r),this.stYUVRect.right=Math.round(this.stDisplayRect.right*a),this.stYUVRect.bottom=Math.round(this.stDisplayRect.bottom*r)}if(this.stYUVRect.right-this.stYUVRect.left<32||this.stYUVRect.bottom-this.stYUVRect.top<32)return 0}if(null==this.aDisplayBuf)return 2;var i={command:t,data:this.arrayBufferCopy(this.aDisplayBuf).buffer,width:this.nWidth,height:this.nHeight,rect:this.stYUVRect};return this.decodeWorker.postMessage(i,[i.data]),1},this.createWorker=function(e){if(window.Worker){if(null==e.decodeWorker){var t=new Blob([(r=e.szBasePath,"\n(function (event) {\n const AUDIO_TYPE = 0;\t// 音频\n const VIDEO_TYPE = 1; // 视频\n const PRIVT_TYPE = 2; // 私有帧\n\n const PLAYM4_AUDIO_FRAME = 100; // 音频帧\n const PLAYM4_VIDEO_FRAME = 101; // 视频帧\n\n const PLAYM4_OK = 1;\n const PLAYM4_ORDER_ERROR = 2;\n const PLAYM4_DECODE_ERROR = 44 \t// 解码失败\n const PLAYM4_NOT_KEYFRAME = 48; \t// 非关键帧\n const PLAYM4_NEED_MORE_DATA = 31; // 需要更多数据才能解析\n const PLAYM4_NEED_NEET_LOOP = 35; //丢帧需要下个循环\n const PLAYM4_SYS_NOT_SUPPORT = 16; \t// 不支持\n\n importScripts('".concat(r,'\');\n Module.addOnPostRun(function () {\n postMessage({ \'function\': "loaded" });\n });\n\n var iStreamMode = 0; // 流模式\n\n var bOpenMode = false;\n var bOpenStream = false;\n\n var funGetFrameData = null;\n var funGetAudFrameData = null;\n\n var bWorkerPrintLog = 0;//worker层log开关\n\n var g_nPort = -1;\n var pInputData = null;\n var inputBufferSize = 40960;\n\n const MP_RTINFO_SOURCE_DATA_INTERVAL = 0x40000; ///<实时流送帧时间间隔\n const MP_RTINFO_IDMX_RTP_HEADER_SEQ_ERROR = 0x400;///<RTP视频包序不连续 或PS帧号不连续\n\n self.JSPlayM4_RunTimeInfoCallBack = function (nPort, pstRunTimeInfo, pUser) {\n let port = nPort;\n let user = pUser;\n let runtimeInfo = {\n nRunTimeModule: 0,\n nStrVersion: 0,\n nFrameTimeStamp: 0,\n nFrameNum: 0,\n nErrorCode: 0,\n nInputDataInterval: 0,\n nFrameNumInterval: 0\n };\n runtimeInfo.nRunTimeModule = Module.HEAP32[pstRunTimeInfo >> 2];\n runtimeInfo.nStrVersion = Module.HEAP32[pstRunTimeInfo + 4 >> 2];\n runtimeInfo.nFrameTimeStamp = Module.HEAP32[pstRunTimeInfo + 8 >> 2];\n runtimeInfo.nFrameNum = Module.HEAP32[pstRunTimeInfo + 12 >> 2];\n runtimeInfo.nErrorCode = Module.HEAP32[pstRunTimeInfo + 16 >> 2];\n if (runtimeInfo.nErrorCode == MP_RTINFO_SOURCE_DATA_INTERVAL) {\n let nTimeInterval = Module.HEAP32[pstRunTimeInfo + 20 >> 2]; //reserved[12]保留数组的前4字节 表示帧之间的送流延迟\n runtimeInfo.nInputDataInterval = nTimeInterval; //送流间隔实时信息回调\n }\n if (runtimeInfo.nErrorCode == MP_RTINFO_IDMX_RTP_HEADER_SEQ_ERROR) {\n let nFrameNumInterval = Module.HEAP32[pstRunTimeInfo + 20 >> 2]; //reserved[12]保留数组的前4字节 表示帧之间的送流延迟\n runtimeInfo.nFrameNumInterval = nFrameNumInterval; //PS帧号不连续差值;RTP丢包为1\n }\n // console.log("nRunTimeModule:"+nRunTimeModule+",nFrameNum:"+nFrameNum+",nErrorCode:"+nErrorCode);\n postMessage({ \'function\': "RunTimeInfoCallBack", \'runtimeInfo\': runtimeInfo});\n }\n\tself.JSPlayM4_StreamInfoCallBack = function (nPort, pstStreamInfo, pUser)\n\t{\n\t\tlet port = nPort;\n let user = pUser;\n let nSystemformat = Module.HEAP16[pstStreamInfo >> 1]; //封装类型\n let nVideoformat = Module.HEAP16[pstStreamInfo + 2 >> 1];//视频编码类型\n let nAudioformat = Module.HEAP16[pstStreamInfo + 4 >> 1];//音频编码类型\n let nAudiochannels = Module.HEAP16[pstStreamInfo + 6 >> 1]; //音频通道数\n let nAudiobitspersample = Module.HEAP32[pstStreamInfo + 8 >> 2];//音频样位率\n let nAudiosamplesrate = Module.HEAP32[pstStreamInfo + 12 >> 2];//音频采样率\n let nAudiobitrate = Module.HEAP32[pstStreamInfo + 16 >> 2];//音频比特率,单位:bit\n\t\tlet nWidth = Module.HEAP32[pstStreamInfo + 20 >> 2];//视频宽\n let nHeight = Module.HEAP32[pstStreamInfo + 24 >> 2];//视频高\n let fFrameRate = Module.HEAPF32[pstStreamInfo + 28 >> 2];//视频帧率\n let nIntervalOfIFrame = Module.HEAP32[pstStreamInfo + 32 >> 2];//视频GOP大小(统计最近5个GOP的平均大小)\n\t\t//console.log("nSystemformat:" + nSystemformat + ",nVideoformat:" + nVideoformat + ",nAudioformat:" + nAudioformat + ",nAudiochannels:" + nAudiochannels + ",nAudiobitspersample:" + nAudiobitspersample + ",nAudiosamplesrate:" + nAudiosamplesrate + ",nAudiobitrate:" + nAudiobitrate);\n postMessage({ \'function\': "StreamInfoCallBack", \'nSystemformat\': nSystemformat, \'nVideoformat\': nVideoformat, \'nAudioformat\': nAudioformat, \'nAudiochannels\': nAudiochannels, \'nAudiobitspersample\': nAudiobitspersample, \'nAudiosamplesrate\': nAudiosamplesrate, \'nAudiobitrate\': nAudiobitrate\n , \'nWidth\': nWidth, \'nHeight\': nHeight, \'fFrameRate\': fFrameRate, \'nIntervalOfIFrame\': nIntervalOfIFrame});\n }\n self.JSPlayM4_AdditionDataCBFun = function (port, addDataInfo, nUser) {\n let dataType = Module.HEAP32[addDataInfo >> 2];\n let dataStrVersion = Module.HEAP32[addDataInfo + 4 >> 2];\n let dataTimeStamp = Module.HEAP32[addDataInfo + 8 >> 2];\n let dataLength = Module.HEAP32[addDataInfo + 12 >> 2];\n let pData = Module.HEAP32[addDataInfo + 16 >> 2];\n let additionDataBuffer = new Uint8Array(dataLength);\n additionDataBuffer.set(Module.HEAPU8.subarray(pData, pData + dataLength));\n postMessage({ \'function\': "AdditionDataCallBack", \'dataType\': dataType, \'dataStrVersion\': dataStrVersion, \'dataTimeStamp\': dataTimeStamp, \'dataLength\': dataLength, \'pData\':pData,\'additionDataBuffer\': additionDataBuffer},[additionDataBuffer.buffer]);\n }\n self.JSPlayM4_PostMpStreamOffsetCallBack = function (nPort, pstPostMpStreamOffsetInfo, pUser)\n\t{\n\t\tlet port = nPort;\n let user = pUser;\n let nStreamOffset = Module.HEAP32[pstPostMpStreamOffsetInfo >> 2];\n\t\tpostMessage({ \'function\': "PostMpStreamOffsetCallBack", \'nStreamOffset\': nStreamOffset});\n }\n\n onmessage = function (event) {\n var eventData = event.data;\n var res = 0;\n switch (eventData.command) {\n case "printLog":\n let downloadFlag = eventData.data;\n bWorkerPrintLog = downloadFlag;\n res = Module._SetPrintLogFlag(g_nPort, downloadFlag);\n if (res !== PLAYM4_OK) {\n if(bWorkerPrintLog >= 0 ){\n console.log("DecodeWorker.js: PlayerSDK print log failed,res" + res);\n }\n postMessage({ \'function\': "printLog", \'errorCode\': res });\n }\n break;\n case "SetPlayPosition":\n let nFrameNumOrTime = eventData.data;\n let enPosType = eventData.type;\n // res = Module._SetPlayPosition(nFrameNumOrTime,enPosType);\n // if (res !== PLAYM4_OK)\n // {\n // postMessage({\'function\': "SetPlayPosition", \'errorCode\': res});\n // return;\n // }\n // //有没有buffer需要清除\n\n break;\n case "SetStreamOpenMode":\n //获取版本信息\n let version = Module._GetSDKVersion();\n let buildDate = Module._GetBuildDate();\n console.log("%cV1Decoder.js version:" + version.toString(16) + ",buildDate:" + buildDate.toString(16), \'color: blue\');\n //获取端口号\n g_nPort = Module._GetPort();\n //设置流打开模式\n iStreamMode = eventData.data;\n res = Module._SetStreamOpenMode(g_nPort, iStreamMode);\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "SetStreamOpenMode", \'errorCode\': res });\n return;\n }\n bOpenMode = true;\n break;\n\n case "OpenStream":\n // 接收到的数据\n var iHeadLen = eventData.dataSize;\n var pHead = Module._malloc(iHeadLen + 4);\n if (pHead === null) {\n return;\n }\n var aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);\n aHead.set(new Uint8Array(eventData.data));\n res = Module._OpenStream(g_nPort, pHead, iHeadLen, eventData.bufPoolSize);\n postMessage({ \'function\': "OpenStream", \'errorCode\': res });\n if (res !== PLAYM4_OK) {\n //释放内存\n Module._free(pHead);\n pHead = null;\n return;\n }\n bOpenStream = true;\n break;\n case "Play":\n let resP = Module._Play(g_nPort);\n if (resP !== PLAYM4_OK) {\n return;\n }\n break;\n case "InputData":\n // 接收到的数据\n var iLen = eventData.dataSize;\n if (iLen > 0) {\n if (pInputData == null || iLen > inputBufferSize) {\n if (pInputData != null) {\n Module._free(pInputData);\n pInputData = null;\n }\n if (iLen > inputBufferSize) {\n inputBufferSize = iLen;\n }\n\n pInputData = Module._malloc(inputBufferSize);\n if (pInputData === null) {\n return;\n }\n }\n\n var inputData = new Uint8Array(eventData.data);\n // var aInputData = Module.HEAPU8.subarray(pInputData, pInputData + iLen);\n // aInputData.set(inputData);\n Module.writeArrayToMemory(inputData, pInputData);\n inputData = null;\n res = Module._InputData(g_nPort, pInputData, iLen);\n if (res !== PLAYM4_OK) {\n let errorCode = Module._GetLastError(g_nPort);\n let sourceRemain = Module._GetSourceBufferRemain(g_nPort);\n postMessage({ \'function\': "InputData", \'errorCode\': errorCode, "sourceRemain": sourceRemain });\n }\n //Module._free(pInputData);\n //pInputData = null;\n } else {\n let sourceRemain = Module._GetSourceBufferRemain(g_nPort);\n if (sourceRemain == 0) {\n postMessage({ \'function\': "InputData", \'errorCode\': PLAYM4_NEED_MORE_DATA });\n return;\n }\n }\n\n /////////////////////\n // if (funGetFrameData === null) {\n // funGetFrameData = Module.cwrap(\'GetFrameData\', \'number\');\n // }\n\n while (bOpenMode && bOpenStream) {\n\n var ret = getFrameData();\n // 直到获取视频帧或数据不足为止\n if (PLAYM4_VIDEO_FRAME === ret || PLAYM4_NEED_MORE_DATA === ret || PLAYM4_ORDER_ERROR === ret)//PLAYM4_VIDEO_FRAME === ret || || PLAYM4_NEED_NEET_LOOP === ret\n {\n break;\n }\n }\n break;\n\n case "SetSecretKey":\n var keyLen = eventData.nKeyLen;\n var pKeyData = Module._malloc(keyLen);\n if (pKeyData === null) {\n return;\n }\n var nKeySize = eventData.data.length\n var bufData = stringToBytes(eventData.data);\n var aKeyData = Module.HEAPU8.subarray(pKeyData, pKeyData + keyLen);\n let u8array = new Uint8Array(keyLen);\n aKeyData.set(u8array, 0);\n aKeyData.set(new Uint8Array(bufData));\n aKeyData = null;\n u8array = null;\n\n res = Module._SetSecretKey(g_nPort, eventData.nKeyType, pKeyData, keyLen);//, nKeySize\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "SetSecretKey", \'errorCode\': res });\n Module._free(pKeyData);\n pKeyData = null;\n return;\n }\n\n Module._free(pKeyData);\n pKeyData = null;\n break;\n\n case "GetBMP":\n var nBMPWidth = eventData.width;\n var nBMPHeight = eventData.height;\n var pYUVData = eventData.data;\n var nYUVSize = nBMPWidth * nBMPHeight * 3 / 2;\n var oBMPCropRect = eventData.rect;\n\n var pDataYUV = Module._malloc(nYUVSize);\n if (pDataYUV === null) {\n return;\n }\n\n Module.writeArrayToMemory(new Uint8Array(pYUVData, 0, nYUVSize), pDataYUV);\n\n // 分配BMP空间\n var nBmpSize = nBMPWidth * nBMPHeight * 4 + 60;\n var pBmpData = Module._malloc(nBmpSize);\n var pBmpSize = Module._malloc(4);\n if (pBmpData === null || pBmpSize === null) {\n Module._free(pDataYUV);\n pDataYUV = null;\n\n if (pBmpData != null) {\n Module._free(pBmpData);\n pBmpData = null;\n }\n\n if (pBmpSize != null) {\n Module._free(pBmpSize);\n pBmpSize = null;\n }\n return;\n }\n\n //Module._memset(pBmpSize, nBmpSize, 4); // 防止bmp截图出现输入数据过大的错误码\n Module.setValue(pBmpSize, nBmpSize, "i32");\n res = Module._GetBMP(g_nPort, pDataYUV, nYUVSize, pBmpData, pBmpSize,\n oBMPCropRect.left, oBMPCropRect.top, oBMPCropRect.right, oBMPCropRect.bottom);\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "GetBMP", \'errorCode\': res });\n Module._free(pDataYUV);\n pDataYUV = null;\n Module._free(pBmpData);\n pBmpData = null;\n Module._free(pBmpSize);\n pBmpSize = null;\n return;\n }\n\n // 获取BMP图片大小\n var nBmpDataSize = Module.getValue(pBmpSize, "i32");\n\n // 获取BMP图片数据\n var aBmpData = new Uint8Array(nBmpDataSize);\n aBmpData.set(Module.HEAPU8.subarray(pBmpData, pBmpData + nBmpDataSize));\n\n postMessage({ \'function\': "GetBMP", \'data\': aBmpData, \'errorCode\': res }, [aBmpData.buffer]);\n aBmpData = null;\n if (pDataYUV != null) {\n Module._free(pDataYUV);\n pDataYUV = null;\n }\n if (pBmpData != null) {\n Module._free(pBmpData);\n pBmpData = null;\n }\n if (pBmpSize != null) {\n Module._free(pBmpSize);\n pBmpSize = null;\n }\n break;\n\n case "GetJPEG":\n var nJpegWidth = eventData.width;\n var nJpegHeight = eventData.height;\n var pYUVData1 = eventData.data;\n var nYUVSize1 = nJpegWidth * nJpegHeight * 3 / 2;\n var oJpegCropRect = eventData.rect;\n\n var pDataYUV1 = Module._malloc(nYUVSize1);\n if (pDataYUV1 === null) {\n return;\n }\n\n Module.writeArrayToMemory(new Uint8Array(pYUVData1, 0, nYUVSize1), pDataYUV1);\n\n // 分配JPEG空间\n var pJpegData = Module._malloc(nYUVSize1);\n var pJpegSize = Module._malloc(4);\n if (pJpegData === null || pJpegSize === null) {\n if (pJpegData != null) {\n Module._free(pJpegData);\n pJpegData = null;\n }\n\n if (pJpegSize != null) {\n Module._free(pJpegSize);\n pJpegSize = null;\n }\n\n if (pDataYUV1 != null) {\n Module._free(pDataYUV1);\n pDataYUV1 = null;\n }\n return;\n }\n\n Module.setValue(pJpegSize, nJpegWidth * nJpegHeight * 2, "i32"); // JPEG抓图,输入缓冲长度不小于当前帧YUV大小\n\n res = Module._GetJPEG(g_nPort, pDataYUV1, nYUVSize1, pJpegData, pJpegSize,\n oJpegCropRect.left, oJpegCropRect.top, oJpegCropRect.right, oJpegCropRect.bottom);\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "GetJPEG", \'errorCode\': res });\n if (pJpegData != null) {\n Module._free(pJpegData);\n pJpegData = null;\n }\n\n if (pJpegSize != null) {\n Module._free(pJpegSize);\n pJpegSize = null;\n }\n\n if (pDataYUV1 != null) {\n Module._free(pDataYUV1);\n pDataYUV1 = null;\n }\n return;\n }\n\n // 获取JPEG图片大小\n var nJpegSize = Module.getValue(pJpegSize, "i32");\n\n // 获取JPEG图片数据\n var aJpegData = new Uint8Array(nJpegSize);\n aJpegData.set(Module.HEAPU8.subarray(pJpegData, pJpegData + nJpegSize));\n\n postMessage({ \'function\': "GetJPEG", \'data\': aJpegData, \'errorCode\': res }, [aJpegData.buffer]);\n\n nJpegSize = null;\n aJpegData = null;\n\n if (pDataYUV1 != null) {\n Module._free(pDataYUV1);\n pDataYUV1 = null;\n }\n if (pJpegData != null) {\n Module._free(pJpegData);\n pJpegData = null;\n }\n if (pJpegSize != null) {\n Module._free(pJpegSize);\n pJpegSize = null;\n }\n break;\n\n case "SetDecodeFrameType":\n var nFrameType = eventData.data;\n res = Module._SetDecodeFrameType(g_nPort, nFrameType);\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "SetDecodeFrameType", \'errorCode\': res });\n return;\n }\n break;\n case "CloseStream":\n //stop\n let resS = Module._Stop(g_nPort);\n if (resS !== PLAYM4_OK) {\n postMessage({ \'function\': "Stop", \'errorCode\': res });\n return;\n }\n //closeStream\n res = Module._CloseStream(g_nPort);\n if (res !== PLAYM4_OK) {\n postMessage({ \'function\': "CloseStream", \'errorCode\': res });\n return;\n }\n //freePort\n let resF = Module._FreePort(g_nPort);\n if (resF !== PLAYM4_OK) {\n postMessage({ \'function\': "FreePort", \'errorCode\': res });\n return;\n }\n if (pInputData != null) {\n Module._free(pInputData);\n pInputData = null;\n }\n break;\n case "PlaySound":\n let resPS = Module._PlaySound(g_nPort);\n if (resPS !== PLAYM4_OK) {\n console.log("PlaySound failed");\n return;\n }\n break;\n case "StopSound":\n let resSS = Module._StopSound();\n if (resSS !== PLAYM4_OK) {\n console.log("StopSound failed");\n return;\n }\n break;\n case "SetVolume":\n let resSV = Module._SetVolume(g_nPort, eventData.volume);\n if (resSV !== PLAYM4_OK) {\n console.log("Audio SetVolume failed");\n return;\n }\n break;\n case "GetVolume":\n let volume = Module._GetVolume();\n if (volume > 0) {\n postMessage({ \'function\': "GetVolume", \'volume\': volume });\n }\n else {\n console.log("Audio GetVolume failed");\n return;\n }\n break;\n case "OnlyPlaySound":\n let resOPS = Module._OnlyPlaySound(g_nPort);\n if (resOPS !== PLAYM4_OK) {\n console.log("OnlyPlaySound failed");\n return;\n }\n break;\n case "Pause":\n let resPa = Module._Pause(g_nPort, eventData.bPlay);\n if (resPa !== PLAYM4_OK) {\n console.log("Pause failed");\n return;\n }\n case "PlayRate":\n Module._SetPlayRate(g_nPort, eventData.playRate);\n break;\n case "SetIFrameDecInterval":\n Module._SetIFrameDecInterval(g_nPort, eventData.data);\n break;\n case "SetLostFrameMode":\n Module._SetLostFrameMode(g_nPort, eventData.data, 0);\n break;\n case "SetDemuxModel":\n let resSDM = Module._SetDemuxModel(g_nPort, eventData.nIdemuxType, eventData.bTrue);\n break;\n case "SkipErrorData":\n Module._SkipErrorData(g_nPort, eventData.bSkip);\n break;\n case "SetDecodeERC":\n Module._SetDecodeERC(g_nPort, eventData.nLevel);\n break;\n case "SetANRParam":\n Module._SetANRParam(g_nPort, eventData.nEnable, eventData.nANRLevel);\n break;\n case "SetResampleValue":\n Module._SetResampleValue(g_nPort, eventData.nEnable, eventData.resampleValue);\n break;\n case "GetLastError":\n let errorCode = Module._GetLastError(g_nPort);\n postMessage({ \'function\': "GetLastError", \'errorCode\': errorCode });\n break;\n case "SetGlobalBaseTime":\n Module._SetGlobalBaseTime(g_nPort, eventData.year, eventData.month, eventData.day, eventData.hour, eventData.min, eventData.sec, eventData.ms);\n break;\n case "SetRunTimeInfoCB":\n Module._SetRunTimeInfoCallBackEx(g_nPort, eventData.nModuleType, 0);\n break;\n\t\t\tcase "SetStreamInfoCB":\n Module._SetStreamInfoCallBack(g_nPort, eventData.nType, 0);\n break;\n\t\t\tcase "GetFileTime":\n let FileTime = Module._JSPlayM4_GetFileTime(g_nPort);\n\t\t\t\tpostMessage({ \'function\': "GetFileTime", \'FileTime\': FileTime });\n break;\n\t\t\tcase "GetMpOffset":\n let Offset = Module._JSPlayM4_GetMpOffset(g_nPort,eventData.FrameTime);\n\t\t\t\tpostMessage({ \'function\': "GetMpOffset", \'Offset\': Offset });\n break;\n\t\t\tcase "ResetBuffer":\n Module._JSPlayM4_ResetBuffer(g_nPort, eventData.type);\n break;\n case "SetAdditionDataCallBack":\n Module._SetAdditionDataCallBack(g_nPort,eventData.additionDataType,eventData.nFlag,0);\n break;\n case "SetRunTimeInfoCallbackType":\n Module._SetRunTimeInfoCallbackType(g_nPort,eventData.module,eventData.Type,eventData.Flag);\n break;\n case "SetPostMpStreamOffsetCB":\n Module._SetPostMpStreamOffsetCallBack(g_nPort, 0);\n break;\n default:\n break;\n }\n };\n\n function getOSDTime(oFrameInfo) {\n var iYear = oFrameInfo.year;\n var iMonth = oFrameInfo.month;\n var iDay = oFrameInfo.day;\n var iHour = oFrameInfo.hour;\n var iMinute = oFrameInfo.minute;\n var iSecond = oFrameInfo.second;\n var iMiSecond = oFrameInfo.misecond\n\n if (iMonth < 10) {\n iMonth = "0" + iMonth;\n }\n if (iDay < 10) {\n iDay = "0" + iDay;\n }\n if (iHour < 10) {\n iHour = "0" + iHour;\n }\n if (iMinute < 10) {\n iMinute = "0" + iMinute;\n }\n if (iSecond < 10) {\n iSecond = "0" + iSecond;\n }\n let osdTime = {};\n\n osdTime.year = iYear;\n osdTime.month = iMonth;\n osdTime.week = 0;\n osdTime.day = iDay;\n osdTime.hour = iHour;\n osdTime.minute = iMinute;\n osdTime.second = iSecond;\n osdTime.milliseconds = iMiSecond;\n return osdTime;\n //return iYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMinute + ":" + iSecond;\n }\n // 获取帧数据\n function getFrameData() {\n // function getFrameData() {\n // 获取帧数据\n var res = Module._GetFrameData();\n //var res = fun();\n if (res === PLAYM4_OK) {\n var iFrameInfo = Module._GetFrameInfo();\n let oFrameInfo = {};\n oFrameInfo.frameType = Module.HEAP32[iFrameInfo >> 2];\n oFrameInfo.frameSize = Module.HEAP32[iFrameInfo + 4 >> 2];\n oFrameInfo.width = Module.HEAP32[iFrameInfo + 8 >> 2];\n oFrameInfo.height = Module.HEAP32[iFrameInfo + 12 >> 2];\n oFrameInfo.timeStamp = Module.HEAP32[iFrameInfo + 16 >> 2];\n oFrameInfo.frameRate = Module.HEAP32[iFrameInfo + 20 >> 2];\n oFrameInfo.bitsPerSample = Module.HEAP32[iFrameInfo + 24 >> 2];\n oFrameInfo.samplesPerSec = Module.HEAP32[iFrameInfo + 28 >> 2];\n oFrameInfo.channels = Module.HEAP32[iFrameInfo + 32 >> 2];\n oFrameInfo.frameNum = Module.HEAP32[iFrameInfo + 36 >> 2];\n\n oFrameInfo.cropLeft = Module.HEAP32[iFrameInfo + 40 >> 2];\n oFrameInfo.cropRight = Module.HEAP32[iFrameInfo + 44 >> 2];\n oFrameInfo.cropTop = Module.HEAP32[iFrameInfo + 48 >> 2];\n oFrameInfo.cropBottom = Module.HEAP32[iFrameInfo + 52 >> 2];\n\t\t\toFrameInfo.relframeNum = Module.HEAP32[iFrameInfo + 56 >> 2];\n\t\t\toFrameInfo.relframeTime = Module.HEAP32[iFrameInfo + 60 >> 2];\n\n oFrameInfo.year = Module.HEAP16[iFrameInfo + 64 >> 1];\n oFrameInfo.month = Module.HEAP16[iFrameInfo + 66 >> 1];\n oFrameInfo.day = Module.HEAP16[iFrameInfo + 68 >> 1];\n oFrameInfo.hour = Module.HEAP16[iFrameInfo + 70 >> 1];\n oFrameInfo.minute = Module.HEAP16[iFrameInfo + 72 >> 1];\n oFrameInfo.second = Module.HEAP16[iFrameInfo + 74 >> 1];\n oFrameInfo.misecond = Module.HEAP16[iFrameInfo + 76 >> 1];\n switch (oFrameInfo.frameType) {\n case AUDIO_TYPE:\n var iSize = oFrameInfo.frameSize;\n if (0 === iSize) {\n return -1;\n }\n var pPCM = Module._GetFrameBuffer();\n // var audioBuf = new ArrayBuffer(iSize);\n var aPCMData = new Uint8Array(iSize);\n aPCMData.set(Module.HEAPU8.subarray(pPCM, pPCM + iSize));\n if (bWorkerPrintLog > 0 ) {\n console.log("<<<Worker: audio media Info: nSise:" + oFrameInfo.frameSize + ",nSampleRate:" + oFrameInfo.samplesPerSec + \',channel:\' + oFrameInfo.channels + \',bitsPerSample:\' + oFrameInfo.bitsPerSample);\n }\n postMessage({\n \'function\': "GetFrameData", \'type\': "audioType", \'data\': aPCMData.buffer,\n \'frameInfo\': oFrameInfo, \'errorCode\': res\n }, [aPCMData.buffer]);\n\n oFrameInfo = null;\n pPCM = null;\n aPCMData = null;\n return PLAYM4_AUDIO_FRAME;\n\n case VIDEO_TYPE:\n var szOSDTime = getOSDTime(oFrameInfo);\n\n var iWidth = oFrameInfo.width;\n var iHeight = oFrameInfo.height;\n\n var iYUVSize = iWidth * iHeight * 3 / 2;\n if (0 === iYUVSize) {\n return -1;\n }\n\n var pYUV = Module._GetFrameBuffer();\n\n // 图像数据渲染后压回,若从主码流切到子码流,存在数组大小与图像大小不匹配现象\n var aYUVData = new Uint8Array(iYUVSize);\n aYUVData.set(Module.HEAPU8.subarray(pYUV, pYUV + iYUVSize));\n if (bWorkerPrintLog > 0) {\n console.log("<<<Worker: video media Info: Width:" + oFrameInfo.width + ",Height:" + oFrameInfo.height + ",timeStamp:" + oFrameInfo.timeStamp);\n }\n\n postMessage({\n \'function\': "GetFrameData", \'type\': "videoType", \'data\': aYUVData.buffer,\n \'dataLen\': aYUVData.length, \'osd\': szOSDTime, \'frameInfo\': oFrameInfo, \'errorCode\': res\n }, [aYUVData.buffer]);\n\n oFrameInfo = null;\n pYUV = null;\n aYUVData = null;\n return PLAYM4_VIDEO_FRAME;\n\n case PRIVT_TYPE:\n postMessage({\n \'function\': "GetFrameData", \'type\': "", \'data\': null,\n \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': PLAYM4_SYS_NOT_SUPPORT\n });\n return PLAYM4_SYS_NOT_SUPPORT;\n\n default:\n postMessage({\n \'function\': "GetFrameData", \'type\': "", \'data\': null,\n \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': PLAYM4_SYS_NOT_SUPPORT\n });\n return PLAYM4_SYS_NOT_SUPPORT;\n }\n }\n else {\n let errorCode = Module._GetLastError(g_nPort);\n //解码失败返回裸数据\n if (PLAYM4_DECODE_ERROR === errorCode) {\n var rawInfo = Module._GetRawDataInfo();\n var pRawData = Module._GetRawDataBuffer();\n var aRawData = new Uint8Array(rawInfo.isize);\n aRawData.set(Module.HEAPU8.subarray(pRawData, pRawData + rawInfo.isize));\n postMessage({\n \'function\': "GetRawData", \'type\': "", \'data\': aRawData.buffer,\n \'rawDataLen\': rawInfo.isize, \'osd\': 0, \'frameInfo\': null, \'errorCode\': errorCode\n });\n rawInfo = null;\n pRawData = null;\n aRawData = null;\n }\n //需要更多数据\n if (PLAYM4_NEED_MORE_DATA === errorCode || PLAYM4_SYS_NOT_SUPPORT === errorCode || PLAYM4_NEED_NEET_LOOP === errorCode) {\n postMessage({\n \'function\': "GetFrameData", \'type\': "", \'data\': null,\n \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': errorCode\n });\n }\n return errorCode;\n }\n }\n\n // 开始计算时间\n function startTime() {\n return new Date().getTime();\n }\n\n // 结束计算时间\n function endTime() {\n return new Date().getTime();\n }\n\n // 字母字符串转byte数组\n function stringToBytes(str) {\n var ch, st, re = [];\n for (var i = 0; i < str.length; i++) {\n ch = str.charCodeAt(i); // get char\n st = []; // set up "stack"\n do {\n st.push(ch & 0xFF); // push byte to stack\n ch = ch >> 8; // shift value down by 1 byte\n }\n while (ch);\n // add stack contents to result\n // done because chars have "wrong" endianness\n re = re.concat(st.reverse());\n }\n // return an array of bytes\n return re;\n }\n})();\n'))]),a=URL.createObjectURL(t);if(this.decodeWorker=new Worker(a),e.bJSPrintLog>0&&console.log(">>>JSPlayV1.1 createWorker success!"),null==e.decodeWorker)return 60}e.decodeWorker.onmessage=function(t){var a=null,r=t.data;switch(e.errorCode=r.errorCode,r.function){case"printLog":e.bJSPrintLog>=0&&console.log("print JSPlayerSDK log failed");break;case"loaded":a="loaded",e.decodeWorker.postMessage({command:"printLog",data:e.bJSPrintLog}),e.bJSPrintLog>=0&&console.log("V1 Decoder.js loaded path:"+e.szBasePath),e.setCallBack(e,"loaded",0,0,!0);break;case"SetStreamOpenMode":a="SetStreamOpenMode";break;case"OpenStream":if(a="OpenStream",1===r.errorCode)return s.bOpenStream=!0,void(s.nCurStatus=1);break;case"InputData":a="InputData",11===r.errorCode&&(s.bIsInputBufOver=!0,e.bJSPrintLog>=0&&console.log("yff inputBuffer over set key frame \n"),1!=s.nDecFrameType&&s.PlayM4_SetDecodeFrameType(1)),36===r.errorCode&&(s.bIsInputBufWillOver=!0),r.errorCode===dt&&(s.bIsInputBufOver=!1,s.bIsInputBufWillOver=!1,s.aInputDataLens.length>0&&s.bIsInput?(s.inputDataFun(),s.bIsInput=!1):s.bIsGetYUV=!0);break;case"GetFrameData":if(a="GetFrameData",!s.bOnlyPlaySound){if(null!=r.data&&null!=r.frameInfo&&(r.frameInfo.width,r.frameInfo.height),!s.bPlay)return;if(s.errorCode=r.errorCode,!(s.bIsFirstFrame||r.errorCode!==dt&&35!==r.errorCode)){r.errorCode===dt&&(s.bIsInputBufOver=!1,s.bIsInputBufWillOver=!1),s.loopNum>5?(s.bIsGetYUV=!0,s.loopNum=0):(s.inputDataFun(),s.loopNum++);break}s.bIsInputBufOver||s.bIsInputBufWillOver?s.inputDataFun():"videoType"===r.type&&(s.aInputDataLens.length>0&&s.bIsInput?(s.inputDataFun(),s.bIsInput=!1):s.bIsGetYUV=!0,s.bIsFirstFrame=!1)}if(s.bVisibility&&1===r.errorCode)switch(r.type){case"videoType":if(null==r.data||null==r.frameInfo)return 0;null!=s.DecCallBackFun&&(s.DecInfoYUV.port=0,s.DecInfoYUV.iDataType=3,s.DecInfoYUV.height=r.frameInfo.height,s.DecInfoYUV.width=r.frameInfo.width,s.DecInfoYUV.isize=r.frameInfo.width*r.frameInfo.height*3/2,s.DecInfoYUV.Data=new Uint8Array(r.data),s.DecCallBackFun(s.DecInfoYUV)),s.bIsFirstFrame=!1,e.nWidth=r.frameInfo.width,e.nHeight=r.frameInfo.height,e.nSPSCropLeft=r.frameInfo.cropLeft,e.nSPSCropRight=r.frameInfo.cropRight,e.nSPSCropTop=r.frameInfo.cropTop,e.nSPSCropBottom=r.frameInfo.cropBottom,e.timeStamp=r.frameInfo.timeStamp;var i=new Object;if(i.data=r.data,i.osdTime=r.frameInfo,i.nWidth=r.frameInfo.width,i.nHeight=r.frameInfo.height,i.frameNum=r.frameInfo.frameNum,i.timeStamp=r.frameInfo.timeStamp,i.relframeNum=r.frameInfo.relframeNum,i.relframeTime=r.frameInfo.relframeTime,e.jsplayer.DecodeTypeFlagMap.size>0){var n,x=A(e.jsplayer.DecodeTypeFlagMap.keys());try{for(x.s();!(n=x.n()).done;){var o=n.value;if(o&ee&&1==e.jsplayer.DecodeTypeFlagMap.get(o)&&null!=e.runtimeInfoCBFun&&null!=e.oDecodeTimer){var l=e.oDecodeTimer.GetTimerWalk();l<=0||l>1e7||e.nGetTotalFrameNum>1e5?(e.nGetTotalFrameNum=0,e.oDecodeTimer.Init()):(e.nGetTotalFrameNum++,e.nAverageDecodeTime=l/e.nGetTotalFrameNum,null!=e.runtimeInfoCBFun&&(e.pstRuntimeInfo.nRunTimeModule=2,e.pstRuntimeInfo.nStrVersion=1,e.pstRuntimeInfo.nFrameTimeStamp=i.timeStamp,e.pstRuntimeInfo.nFrameNum=i.frameNum,e.pstRuntimeInfo.nErrorCode=ee,e.pstRuntimeInfo.nInputDataInterval=0,e.pstRuntimeInfo.nFrameNumInterval=0,e.pstRuntimeInfo.nAverageDecodeTime=e.nAverageDecodeTime,e.runtimeInfoCBFun(e.pstRuntimeInfo)))}}}catch(e){x.e(e)}finally{x.f()}}if(e.bWriteYUVData){for(var _=new Uint8Array(r.data),h=e.aVideoYUVBuffer.length,f=0,c=_.length;f<c;f++)e.aVideoYUVBuffer[h+f]=_[f];e.iYUV10size++,_=null}if(e.bWriteYUVData&&e.iYUV10size>=20){var u=new Uint8Array(e.aVideoYUVBuffer);e.downloadFile(u,"videoYUV.data"),e.aVideoYUVBuffer.splice(0,e.aVideoYUVBuffer.length),e.bWriteYUVData=!1,e.iYUV10size=0,u=null}if(e.aVideoFrameBuffer.push(i),i=null,e.aVideoFrameBuffer.length>5&&(e.bOnebyOne||6==e.nCurStatus||e.aVideoFrameBuffer.splice(0,2)),(e.bOnebyOne||6==e.nCurStatus)&&(e.aVideoFrameBuffer.length>=15||e.aInputDataBuffer.length>=.8*e.iInputMaxBufSize)){e.setCallBack(e,"OnebyOne",0,0,!1),e.bIsFirstFrame=!0;break}break;case"audioType":if(0==e.bHIKHeadValue&&(e.bFileHeadAudioFormat=!0),e.bPlaySound&&!e.bPlayRateChange||s.bOnlyPlaySound){null!=s.PCMCallBackFun&&(s.DecInfoPCM.port=0,s.DecInfoPCM.SampleRate=r.frameInfo.samplesPerSec,s.DecInfoPCM.channel=r.frameInfo.channels,s.DecInfoPCM.bitsPerSample=r.frameInfo.bitsPerSample,s.DecInfoPCM.iDataType=101,s.DecInfoPCM.Data=new Uint8Array(r.data),s.DecInfoPCM.isize=s.DecInfoPCM.Data.length,s.PCMCallBackFun(s.DecInfoPCM));for(var d=new Uint8Array(r.data),p=e.aAudioBuffer.length,m=0,S=d.length;m<S;m++)e.aAudioBuffer[p+m]=d[m];if(e.iAudioBufferSize++,d=null,e.bWritePCMData){for(var R=new Uint8Array(r.data),P=e.aAudioPCMBuffer.length,y=0,b=R.length;y<b;y++)e.aAudioPCMBuffer[P+y]=R[y];e.bJSPrintLog>=0&&console.log("audio_type num:"+e.iAudioBuffer500Size+", len:"+R.length),e.iAudioBuffer500Size++,R=null}if(e.bWritePCMData&&e.iAudioBuffer500Size>=100){var E=new Uint8Array(e.aAudioPCMBuffer);e.downloadFile(E,"audioPCM.data"),e.aAudioPCMBuffer.splice(0,e.aAudioPCMBuffer.length),e.bWritePCMData=!1,e.iAudioBuffer500Size=0,E=null}e.iAudioBufferSize>=pt&&(e.audioRenderer.Play(e.aAudioBuffer,e.aAudioBuffer.length,r.frameInfo),e.aAudioBuffer.splice(0,e.aAudioBuffer.length),e.aAudioBuffer.length=0,e.iAudioBufferSize=0)}}break;case"GetRawData":if(a="GetRawData",e.bWriteRawData){for(var g=new Uint8Array(r.data),F=e.aRawDataBuffer.length,C=0,v=g.length;C<v;C++)e.aRawDataBuffer[F+C]=g[C];e.iRawDataSize++,g=null}if(e.bWriteRawData&&e.iRawDataSize>=100){var T=new Uint8Array(e.aRawDataBuffer);e.downloadFile(T,"rawBuffer.data"),e.aRawDataBuffer.splice(0,e.aRawDataBuffer.length),e.bWriteRawData=!1,e.iRawDataSize=0,T=null}break;case"PlaySound":a="PlaySound";break;case"GetJPEG":if(a="GetJPEG",1!==r.errorCode)return void(e.bJSPrintLog>=0&&console.log("GetJPEG ErrorParam"));var D=r.data;e.jpegDownloadFlag&&(e.downloadFile(D,"GetJPEG.jpeg"),e.jpegDownloadFlag=!1),e.dataCallBackFun(D,D.length);break;case"GetBMP":if(a="GetBMP",1!==r.errorCode)return void(e.bJSPrintLog>=0&&console.log("GetBMP ErrorParam"));var I=r.data;e.bmpDownloadFlag&&(e.downloadFile(I,"GetBmp.bmp"),e.bmpDownloadFlag=!1),e.dataCallBackFun(I,I.length);break;case"RunTimeInfoCallBack":a="RunTimeInfoCallBack",null!=e.runtimeInfoCBFun&&(e.pstRuntimeInfo.nRunTimeModule=r.runtimeInfo.nRunTimeModule,e.pstRuntimeInfo.nStrVersion=r.runtimeInfo.nStrVersion,e.pstRuntimeInfo.nFrameTimeStamp=r.runtimeInfo.nFrameTimeStamp,e.pstRuntimeInfo.nFrameNum=r.runtimeInfo.nFrameNum,e.pstRuntimeInfo.nErrorCode=r.runtimeInfo.nErrorCode,e.pstRuntimeInfo.nInputDataInterval=r.runtimeInfo.nInputDataInterval,e.pstRuntimeInfo.nFrameNumInterval=r.runtimeInfo.nFrameNumInterval,e.runtimeInfoCBFun(e.pstRuntimeInfo));break;case"StreamInfoCallBack":a="StreamInfoCallBack";var M={};M.nSystemformat=r.nSystemformat,M.nVideoformat=r.nVideoformat,M.nAudioformat=r.nAudioformat,M.nAudiochannels=r.nAudiochannels,M.nAudiobitspersample=r.nAudiobitspersample,M.nAudiosamplesrate=r.nAudiosamplesrate,M.nAudiobitrate=r.nAudiobitrate,M.nWidth=r.nWidth,M.nHeight=r.nHeight,M.fFrameRate=r.fFrameRate,M.nIntervalOfIFrame=r.nIntervalOfIFrame,null!=e.streamInfoCBFun&&e.streamInfoCBFun(M);break;case"PostMpStreamOffsetCallBack":a="PostMpStreamOffsetCallBack";var L={};L.nStreamOffset=r.nStreamOffset,null!=e.PostMpStreamOffsetCBFun&&e.PostMpStreamOffsetCBFun(L);break;case"GetFileTime":a="GetFileTime";var w=r.FileTime;null!=e.GetFileTimeCBFun&&e.GetFileTimeCBFun(w);break;case"GetMpOffset":a="GetMpOffset";var O=r.Offset;null!=e.GetMpOffsetCBFun&&(e.GetMpOffsetCBFun(O),s.needWaitMpOffset=!1);break;case"AdditionDataCallBack":var B={};B.dataType=r.dataType,B.dataStrVersion=r.dataStrVersion,B.dataTimeStamp=r.dataTimeStamp,B.dataLength=r.dataLength,B.pData=r.pData,B.additionDataBuffer=new Uint8Array(r.additionDataBuffer),null!=e.addtionCallBackFun&&e.addtionCallBackFun(B)}"GetFrameData"!==a&&"loaded"!==a?e.setCallBack(e,a,0,e.convertErrorCode(r.errorCode),!0):ut!==r.errorCode&&101!==r.errorCode&&100!==r.errorCode&&48!==r.errorCode||e.setCallBack(e,a,0,e.convertErrorCode(r.errorCode),!0)}}var r},this.createWorker(s),this.draw=function(){if(s.bPlay){if(!s.bPause||s.bOnebyOne){requestAnimationFrame(s.draw);var e=s.aVideoFrameBuffer.length;if(null!=s.YUVBufSizeCBFun&&s.YUVBufSizeCBFun(e),s.bOnebyOne){if(e<=8&&s.setCallBack(s,"OnebyOne",0,dt,!0),e<=s.FrameForwardLen+1)return void s.setCallBack(s,"OnebyOne",0,dt,!0);for(var t=s.FrameForwardLen;t>1;)s.aVideoFrameBuffer.shift(),t--;s.bOnebyOne=!1}if(1==s.bstreamEnd&&(e<=0?(s.nstreamEndloopNum++,s.nstreamEndloopNum>=5&&(s.nstreamEndloopNum=0,s.bstreamEnd=!1,null!=s.runtimeInfoCBFun&&(s.pstRuntimeInfo.nRunTimeModule=0,s.pstRuntimeInfo.nStrVersion=0,s.pstRuntimeInfo.nFrameTimeStamp=0,s.pstRuntimeInfo.nFrameNum=0,s.pstRuntimeInfo.nErrorCode=9,s.pstRuntimeInfo.nInputDataInterval=0,s.pstRuntimeInfo.nFrameNumInterval=0,s.runtimeInfoCBFun(s.pstRuntimeInfo)))):s.nstreamEndloopNum=0),e>0){var a=s.aVideoFrameBuffer.shift(),r={};r.nCropLeft=s.nSPSCropLeft,r.nCropRight=s.nSPSCropRight,r.nCropTop=s.nSPSCropTop,r.nCropBottom=s.nSPSCropBottom,r.nCodeWidth=a.nWidth,r.nCodeHeight=a.nHeight,s.aDisplayBuf=a.data;var i=new Uint8Array(s.aDisplayBuf);if(s.jsplayer.RenderTypeFlagMap.size>0){var n,x=A(s.jsplayer.RenderTypeFlagMap.keys());try{for(x.s();!(n=x.n()).done;){var o=n.value;o==te&&1==s.jsplayer.RenderTypeFlagMap.get(o)&&null!=s.runtimeInfoCBFun&&1==s.firstRenderBegin&&(s.pstRuntimeInfo.nRunTimeModule=3,s.pstRuntimeInfo.nStrVersion=1,s.pstRuntimeInfo.nFrameTimeStamp=a.timeStamp,s.pstRuntimeInfo.nFrameNum=0,s.pstRuntimeInfo.nErrorCode=te,s.pstRuntimeInfo.nInputDataInterval=0,s.pstRuntimeInfo.nFrameNumInterval=0,s.pstRuntimeInfo.nAverageDecodeTime=0,s.pstRuntimeInfo.AbsTimeYear=a.osdTime.year,s.pstRuntimeInfo.AbsTimeMonth=a.osdTime.month,s.pstRuntimeInfo.AbsTimeDay=a.osdTime.day,s.pstRuntimeInfo.AbsTimeHour=a.osdTime.hour,s.pstRuntimeInfo.AbsTimeMinute=a.osdTime.minute,s.pstRuntimeInfo.AbsTimeSecond=a.osdTime.second,s.pstRuntimeInfo.AbsTimeMilliseconds=a.osdTime.misecond,s.runtimeInfoCBFun(s.pstRuntimeInfo),s.firstRenderBegin=!1)}}catch(e){x.e(e)}finally{x.f()}}if(s.bVideoCropInfo?s.oSuperRender.DisplayFrame(i,a.nWidth-s.nSPSCropLeft-s.nSPSCropRight,a.nHeight-s.nSPSCropTop-s.nSPSCropBottom,a.timeStamp,r,null).then((function(e){e.timestamp;var t=e.DrawRet;if(s.jsplayer.RenderTypeFlagMap.size>0&&1!=t){var r,i=A(s.jsplayer.RenderTypeFlagMap.keys());try{for(i.s();!(r=i.n()).done;){var n=r.value;n==re&&1==s.jsplayer.RenderTypeFlagMap.get(n)&&null!=s.runtimeInfoCBFun&&(s.pstRuntimeInfo.nRunTimeModule=3,s.pstRuntimeInfo.nStrVersion=1,s.pstRuntimeInfo.nFrameTimeStamp=a.timeStamp,s.pstRuntimeInfo.nFrameNum=0,s.pstRuntimeInfo.nErrorCode=re,s.runtimeInfoCBFun(s.pstRuntimeInfo))}}catch(e){i.e(e)}finally{i.f()}}})):s.oSuperRender.DisplayFrame(i,a.nWidth,a.nHeight,a.timeStamp,r,null).then((function(e){e.timestamp;var t=e.DrawRet;if(s.jsplayer.RenderTypeFlagMap.size>0&&1!=t){var r,i=A(s.jsplayer.RenderTypeFlagMap.keys());try{for(i.s();!(r=i.n()).done;){var n=r.value;n==re&&1==s.jsplayer.RenderTypeFlagMap.get(n)&&null!=s.runtimeInfoCBFun&&(s.pstRuntimeInfo.nRunTimeModule=3,s.pstRuntimeInfo.nStrVersion=1,s.pstRuntimeInfo.nFrameTimeStamp=a.timeStamp,s.pstRuntimeInfo.nFrameNum=0,s.pstRuntimeInfo.nErrorCode=re,s.runtimeInfoCBFun(s.pstRuntimeInfo))}}catch(e){i.e(e)}finally{i.f()}}})),s.jsplayer.RenderTypeFlagMap.size>0){var l,_=A(s.jsplayer.RenderTypeFlagMap.keys());try{for(_.s();!(l=_.n()).done;){var h=l.value;h==ae&&1==s.jsplayer.RenderTypeFlagMap.get(h)&&null!=s.runtimeInfoCBFun&&(s.pstRuntimeInfo.nRunTimeModule=3,s.pstRuntimeInfo.nStrVersion=1,s.pstRuntimeInfo.nFrameTimeStamp=a.timeStamp,s.pstRuntimeInfo.nFrameNum=0,s.pstRuntimeInfo.nErrorCode=ae,s.pstRuntimeInfo.nInputDataInterval=0,s.pstRuntimeInfo.nFrameNumInterval=0,s.pstRuntimeInfo.nAverageDecodeTime=0,s.pstRuntimeInfo.AbsTimeYear=a.osdTime.year,s.pstRuntimeInfo.AbsTimeMonth=a.osdTime.month,s.pstRuntimeInfo.AbsTimeDay=a.osdTime.day,s.pstRuntimeInfo.AbsTimeHour=a.osdTime.hour,s.pstRuntimeInfo.AbsTimeMinute=a.osdTime.minute,s.pstRuntimeInfo.AbsTimeSecond=a.osdTime.second,s.pstRuntimeInfo.AbsTimeMilliseconds=a.osdTime.misecond,s.runtimeInfoCBFun(s.pstRuntimeInfo))}}catch(e){_.e(e)}finally{_.f()}}null!=s.DisplayCallBackFun&&(s.DisplayInfoYUV.height=a.nHeight,s.DisplayInfoYUV.width=a.nWidth,s.DisplayInfoYUV.iSize=s.DisplayInfoYUV.height*s.DisplayInfoYUV.width*3/2,s.DisplayInfoYUV.frameNum=a.frameNum,s.DisplayInfoYUV.timeStamp=a.timeStamp,s.DisplayInfoYUV.yuvData=new Uint8Array(i),s.DisplayCallBackFun(s.DisplayInfoYUV)),s.frameInfoFlag&&(s.displayFrameInfo.codecType=0,s.displayFrameInfo.frameType=0,s.displayFrameInfo.frameSize=0,s.displayFrameInfo.width=a.nWidth-s.nSPSCropLeft-s.nSPSCropRight,s.displayFrameInfo.height=a.nHeight-s.nSPSCropTop-s.nSPSCropBottom,s.displayFrameInfo.timeStamp=a.timeStamp,s.displayFrameInfo.frameRate=0,s.displayFrameInfo.frameNum=a.frameNum,s.displayFrameInfo.interlace=0,s.displayFrameInfo.streamEnd=0,s.displayFrameInfo.cropLeft=s.nSPSCropLeft,s.displayFrameInfo.cropRight=s.nSPSCropRight,s.displayFrameInfo.cropTop=s.nSPSCropTop,s.displayFrameInfo.cropBottom=s.nSPSCropBottom,s.displayFrameInfo.year=a.osdTime.year,s.displayFrameInfo.month=a.osdTime.month,s.displayFrameInfo.week=0,s.displayFrameInfo.day=a.osdTime.day,s.displayFrameInfo.hour=a.osdTime.hour,s.displayFrameInfo.minute=a.osdTime.minute,s.displayFrameInfo.second=a.osdTime.second,s.displayFrameInfo.milliseconds=a.osdTime.misecond),0==s.startTimeStamp&&(s.startTimeStamp=a.timeStamp),i=null;var f=a.osdTime.year,c=a.osdTime.month,u=a.osdTime.day,d=a.osdTime.hour,p=a.osdTime.minute,m=a.osdTime.second;s.szOSDTime=f+"-"+c+"-"+u+" "+d+":"+p+":"+m,a=null,s.needFirstFrameCB&&null!=s.firstFrameCB&&(s.firstFrameCB({decodeEngine:2}),s.needFirstFrameCB=!1)}else s.setCallBack(s,"Play",0,dt,!0)}}else s.bPlay||(s.aVideoFrameBuffer.splice(0,s.aVideoFrameBuffer.length),s.aAudioBuffer.splice(0,s.aAudioBuffer.length))}}return t(a,[{key:"PlayM4_SetCurrentFrameNum",value:function(e,t){return ut}},{key:"PlayM4_OpenPlayerSDKPrintLog",value:function(e){return this.bJSPrintLog=e,this.decodeWorker.postMessage({command:"printLog",data:e}),1}},{key:"PlayM4_DownloadYUVdata",value:function(){return this.bWriteYUVData=!0,1}},{key:"PlayM4_DownloadPCMdata",value:function(){return this.bWritePCMData=!0,1}},{key:"PlayM4_SetDecCallBack",value:function(e,t){return e?(1==this.decCBStream&&(this.DecCallBackFun=t),2==this.decCBStream&&(this.PCMCallBackFun=t),3==this.decCBStream&&(this.PCMCallBackFun=t,this.DecCallBackFun=t)):(1==this.decCBStream&&(this.DecCallBackFun=null),2==this.decCBStream&&(this.PCMCallBackFun=null),3==this.decCBStream&&(this.PCMCallBackFun=null,this.DecCallBackFun=null)),1}},{key:"PlayM4_SetDisplayCallBack",value:function(e){return e&&"function"==typeof e?(this.DisplayCallBackFun=e,1):0}},{key:"PlayM4_SetPCMCallBack",value:function(e){return e&&"function"==typeof e?(this.PCMCallBackFun=e,1):0}},{key:"PlayM4_SetStreamOpenMode",value:function(e){return null==e||void 0===e||0!==e&&1!==e?0:(this.streamOpenMode=e,1)}},{key:"PlayM4_DownloadRTPData",value:function(e){this.downloadRTP=e}},{key:"PlayM4_SetVideoCropInfo",value:function(e){return null==e||void 0===e||"boolean"!=typeof e?0:(this.bVideoCropInfo=e,1)}},{key:"PlayM4_OpenStream",value:function(e,t,a){return this.bJSPrintLog>0&&console.log(">>>JS PlayM4_OpenStream nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),null==this.decodeWorker?2:null==e||t<=0||a<=0?0:(73==e[0]&&77==e[1]&&75==e[2]&&72==e[3]?this.bHIKHeadValue=!0:this.bHIKHeadValue=!1,0==e[12]&&0==e[13]?this.bFileHeadAudioFormat=!1:this.bFileHeadAudioFormat=!0,this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bIsFirstFrame=!0,this.bIsGetYUV=!1,this.bIsInput=!1,4===e[8]&&0===e[9]?this.streamOpenMode=0:this.streamOpenMode=1,this.SystemFormat=e[8]+(e[9]<<8),this.decodeWorker.postMessage({command:"SetStreamOpenMode",data:this.streamOpenMode}),this.decodeWorker.postMessage({command:"OpenStream",data:e,dataSize:t,bufPoolSize:a}),this.bOpenStream=!0,1)}},{key:"PlayM4_CloseStream",value:function(){return null===this.decodeWorker?1:null===this.decodeWorker||!1===this.bOpenStream?2:(this.bOnlyPlaySound=!1,this.decodeWorker.postMessage({command:"CloseStream"}),null!==this.oSuperRender&&(this.oSuperRender.ReleaseDisplay(),this.oSuperRender=null),null!==this.audioRenderer&&(this.audioRenderer.Stop(),this.audioRenderer=null),this.aAudioBuffer.splice(0,this.aAudioBuffer.length),this.aVideoFrameBuffer.splice(0,this.aVideoFrameBuffer.length),this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length),this.aInputDataLens.splice(0,this.aInputDataLens.length),this.aVideoYUVBuffer.splice(0,this.aVideoYUVBuffer.length),this.aAudioPCMBuffer.splice(0,this.aAudioPCMBuffer.length),this.aRawDataBuffer.splice(0,this.aRawDataBuffer.length),this.bOpenStream=!1,this.iAudioBufferSize=0,this.szOSDTime=null,this.startTimeStamp,this.nCurStatus=2,null!=this.textCanvas&&(this.textCanvas.remove(),this.textCanvas=null),this.setTextCanvasFlag=!1,null!=this.oInputTimer&&(this.oInputTimer.timerReset(),this.oInputTimer=null),null!=this.oDecodeTimer&&(this.oDecodeTimer.timerReset(),this.oDecodeTimer=null),1)}},{key:"PlayM4_Destroy",value:function(){return null===this.decodeWorker||(this.PlayM4_CloseStream(),this.decodeWorker.terminate(),this.decodeWorker=null),1}},{key:"PlayM4_FreePort",value:function(){return this.decodeWorker.terminate(),this.decodeWorker=null,1}},{key:"PlayM4_InputData",value:function(e,t){var a=this.aInputDataBuffer.length;if(-1===t)return this.bIsFirstFrame||this.bIsGetYUV?this.inputDataFun():this.bIsInput=!0,this.bstreamEnd=!0,1;if(a+t>this.iInputMaxBufSize)return this.bJSPrintLog>=0&&console.log("input over"),this.bIsGetYUV?this.inputDataFun():this.bIsInput=!0,11;var r=null,i=t;switch(this.streamOpenMode){case 1:if(r=new Uint8Array(e.buffer),this.jsplayer.ManagerTypeFlagMap.size>0){var n,s=A(this.jsplayer.ManagerTypeFlagMap.keys());try{for(s.s();!(n=s.n()).done;){var x=n.value;if(x&$&&1==this.jsplayer.ManagerTypeFlagMap.get(x)&&null!=this.runtimeInfoCBFun&&(2==this.SystemFormat||3==this.SystemFormat||32769==this.SystemFormat)){var o=this.SearchPtsInPes(r,t);if(o>=0&&t-o>=14&&0==r[o+0]&&0==r[o+1]&&1==r[o+2]&&(224==r[o+3]||192==r[o+3]||189==r[o+3]||191==r[o+3])&&128==(192&r[o+6])&&128&r[o+7]&&(32==(240&r[o+9])||48==(240&r[o+9]))&&!(1&~r[o+9])&&!(1&~r[o+11])&&!(1&~r[o+13])){var l=(((14&r[o+9])<<28)+(r[o+10]<<21)+((254&r[o+11])<<13)+(r[o+12]<<6)+((252&r[o+13])>>2))/45;this.SourceDataInterval(l)}}}}catch(e){s.e(e)}finally{s.f()}}this.aInputDataLens.push(t);break;case 0:i=t+4;var _=new Uint32Array([t]),h=new Uint8Array(_.buffer);if((r=new Uint8Array(i)).set(h,0),r.set(e,4),this.jsplayer.ManagerTypeFlagMap.size>0){var f,c=A(this.jsplayer.ManagerTypeFlagMap.keys());try{for(c.s();!(f=c.n()).done;){var u=f.value;u&$&&1==this.jsplayer.ManagerTypeFlagMap.get(u)&&null!=this.runtimeInfoCBFun&&(4==this.SystemFormat||13==this.SystemFormat||260==this.SystemFormat)&&t>12&&(224==(255&r[5])||154==(255&r[5])||160==(255&r[5]))&&(l=((r[8]<<24)+(r[9]<<16)+(r[10]<<8)+r[11])/90,this.SourceDataInterval(l))}}catch(e){c.e(e)}finally{c.f()}}_=null,h=null,this.aInputDataLens.push(t+4);break;default:return ut}for(var d=0;d<i;d++)this.aInputDataBuffer[a+d]=r[d];return!this.bPlay&&!this.bOnlyPlaySound||null===this.decodeWorker||!1===this.bOpenStream||(r=null,this.bOnlyPlaySound||this.bIsFirstFrame||this.bIsGetYUV?this.inputDataFun():this.bIsInput=!0),1}},{key:"PlayM4_Play",value:function(e){if(null===this.decodeWorker)return 2;if(this.bJSPrintLog>0&&console.log(">>>JS PlayM4_Play canvasID: "+e),this.nCurStatus=3,this.decodeWorker.postMessage({command:"SetLostFrameMode",data:this.nLostFrameFlag}),null===e)this.bOnlyPlaySound=!0,this.decodeWorker.postMessage({command:"OnlyPlaySound"}),this.sCanvasId=null;else{if("string"!=typeof e)return 0;if(this.bOnebyOne&&(this.bPlayRateChange=!1,this.bOnebyOne=!1,this.bPause=!1,this.draw()),this.bPlay)return 1;if(null==this.oSuperRender&&(this.canvasCnv=document.getElementById(e),this.oSuperRender=new Ke(this),this.oSuperRender.InitDisplay(this.canvasCnv,"webgl",1),null==this.oSuperRender))return 61;this.sCanvasId=e,this.bPlay=!0,this.bPause=!1,this.bOnebyOne=!1,this.bPlayRateChange=!1,this.bOnlyPlaySound=!1,this.draw()}return null==this.audioRenderer&&(this.audioRenderer=new ct,null==this.audioRenderer)?61:(this.decodeWorker.postMessage({command:"Play"}),1)}},{key:"PlayM4_Stop",value:function(e){if(this.bJSPrintLog>0&&console.log(">>>>yff1020>>>>> V1 PlayM4_Stop"),null==this.decodeWorker||null==this.oSuperRender)return 2;if(!this.bPlay)return 2;this.bPlaySound&&(this.PlayM4_StopSound(),this.bPlaySound=!0),this.nCurStatus=5,this.bPlay=!1,this.bOnebyOne=!1,this.bPause=!1,this.oSuperRender.SetDisplayRect(0,0,this.nWidth,this.nHeight),this.iZoomNum=0,this.bDisRect=!1;var t={};t.nCropLeft=this.nSPSCropLeft,t.nCropRight=this.nSPSCropRight,t.nCropTop=this.nSPSCropTop,t.nCropBottom=this.nSPSCropBottom,t.nCodeWidth=this.nWidth,t.nCodeHeight=this.nHeight,this.bVideoCropInfo?this.oSuperRender.DisplayFrame(null,this.nWidth-this.nSPSCropLeft-this.nSPSCropRight,this.nHeight-this.nSPSCropTop-this.nSPSCropBottom,this.timeStamp,t,null):this.oSuperRender.DisplayFrame(null,this.nWidth,this.nHeight,this.timeStamp,t,null);var a=document.getElementById(this.sCanvasId);return a&&(this.clonedCanvas=a.cloneNode(!0),this.clonedCanvasParentNode=a.parentNode,this.clonedCanvasParentNode.replaceChild(this.clonedCanvas,a)),1}},{key:"PlayM4_PlayRate",value:function(e){return null==this.decodeWorker?2:(this.bPlayRateChange=1!==e,e<1&&(e=1),this.iInputDataLen=e*mt,this.decodeWorker.postMessage({command:"PlayRate",playRate:e}),1)}},{key:"PlayM4_Pause",value:function(e){return null==this.decodeWorker||null==this.oSuperRender?2:this.bPlay?this.bOnebyOne||this.bPause==e?2:(this.bPause=e,this.bIsFirstFrame=!0,e?(this.bPlaySound&&(this.PlayM4_StopSound(),this.bPlaySound=!0),this.nCurStatus=4):(this.bPlaySound&&this.PlayM4_PlaySound(),this.nCurStatus=3,this.decodeWorker.postMessage({command:"SetLostFrameMode",data:this.nLostFrameFlag}),this.draw()),1):2}},{key:"PlayM4_OneByOne",value:function(e){return null==this.decodeWorker||null==this.oSuperRender?2:this.bPlay?e>10||e<=0?0:(e||(e=1),this.iInputDataLen=mt,this.FrameForwardLen=e,this.bPause=!0,this.bOnebyOne=!0,this.bIsFirstFrame=!0,this.nCurStatus=6,this.draw(),this.decodeWorker.postMessage({command:"SetLostFrameMode",data:0}),1):2}},{key:"PlayM4_PlaySound",value:function(e){return null===this.decodeWorker||!1===this.bOpenStream?2:e<0||e>16?0:null==this.audioRenderer&&(this.audioRenderer=new ct,null==this.audioRenderer)?61:(this.decodeWorker.postMessage({command:"PlaySound"}),this.audioRenderer.SetWndNum(e),0!==this.Volume&&this.audioRenderer.SetVolume(this.Volume),this.audioRenderer.oAudioContext.resume(),0==this.nIgnoreHeaderAudioDefine&&0==this.bFileHeadAudioFormat?ut:(this.bPlaySound=!0,1))}},{key:"PlayM4_StopSound",value:function(){return null==this.decodeWorker||null==this.audioRenderer?2:this.bPlaySound?(this.decodeWorker.postMessage({command:"StopSound"}),this.bPlaySound=!1,1):2}},{key:"PlayM4_SetDisplayBuf",value:function(e){return null==this.decodeWorker?2:e<=0?0:(this.YUVBufferSize=e,1)}},{key:"PlayM4_SetSecretKey",value:function(e,t,a){if(null==this.decodeWorker||!1===this.bOpenStream)return 2;if(null==t)return 0;if(1===e){if(128!==a)return 0;if(null==t||void 0===t)return 0}else if(2===e){if(256!==a)return 0;if(null==t||void 0===t)return 0}else if(0!==e)return 0;return this.decodeWorker.postMessage({command:"SetSecretKey",data:t,nKeyType:e,nKeyLen:a}),1}},{key:"PlayM4_SetDecodeFrameType",value:function(e){return this.bJSPrintLog>0&&console.log("PlayM4_SetDecodeFrameType nFrameType:"+e),null==this.decodeWorker||null==this.oSuperRender?2:0!==e&&1!==e?0:(this.bJSPrintLog>0&&console.log(">>>JS PlayM4_SetDecodeFrameType :"+e),this.nDecFrameType=e,this.decodeWorker.postMessage({command:"SetDecodeFrameType",data:e}),1)}},{key:"PlayM4_SetIFrameDecInterval",value:function(e){return 1!==this.nDecFrameType?2:e<0?0:(this.decodeWorker.postMessage({command:"SetIFrameDecInterval",data:e}),1)}},{key:"PlayM4_SetLostFrameMode",value:function(e){return e<0||e>1?0:(this.nLostFrameFlag=e,this.decodeWorker.postMessage({command:"SetLostFrameMode",data:e}),1)}},{key:"PlayM4_SetDisplayRegion",value:function(e,t,a){if(this.bJSPrintLog>0&&console.log(">>>>yff1020>>>>> PlayM4_SetDisplayRegion left:"+e.left+",top:"+e.top+",right:"+e.right+",bottom:"+e.bottom),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender)return 2;if(null===this.canvasId)return 2;if(!0===t){if(null==e)return 0;if("number"!=typeof e.left||"number"!=typeof e.top||"number"!=typeof e.right||"number"!=typeof e.bottom)return 0;var r=e.left,i=e.right,n=e.top,s=e.bottom,x=document.getElementById(this.sCanvasId).getBoundingClientRect();this.iCanvasWidth=x.width,this.iCanvasHeight=x.height,0!==this.iZoomNum&&(r=Math.round(r/this.iRatio_x)+this.stDisplayRect.left,n=Math.round(n/this.iRatio_y)+this.stDisplayRect.top,i=Math.round(i/this.iRatio_x)+this.stDisplayRect.left,s=Math.round(s/this.iRatio_y)+this.stDisplayRect.top),this.stDisplayRect={top:n,left:r,right:i,bottom:s};var o=s/this.iCanvasHeight*this.nHeight,l=r/this.iCanvasWidth*this.nWidth,_=i/this.iCanvasWidth*this.nWidth,h=n/this.iCanvasHeight*this.nHeight;this.oSuperRender.SetDisplayRect(l,h,_-l,o-h),this.bDisRect=!0;var f=i-r,c=s-n;this.iRatio_x=this.iCanvasWidth/f,this.iRatio_y=this.iCanvasHeight/c,a&&this.iZoomNum++}else this.oSuperRender.SetDisplayRect(0,0,this.nWidth,this.nHeight),this.iZoomNum=0,this.bDisRect=!1;if(this.bPause||this.bOnebyOne||this.bPlayRateChange){var u={};u.nCropLeft=this.nSPSCropLeft,u.nCropRight=this.nSPSCropRight,u.nCropTop=this.nSPSCropTop,u.nCropBottom=this.nSPSCropBottom,u.nCodeWidth=this.nWidth,u.nCodeHeight=this.nHeight,this.bVideoCropInfo?this.oSuperRender.DisplayFrame(new Uint8Array(this.aDisplayBuf),this.nWidth-this.nSPSCropLeft-this.nSPSCropRight,this.nHeight-this.nSPSCropTop-this.nSPSCropBottom,this.timeStamp,u,null):this.oSuperRender.DisplayFrame(new Uint8Array(this.aDisplayBuf),this.nWidth,this.nHeight,this.timeStamp,u,null)}return 1}},{key:"PlayM4_FEC_GetPort",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.printfFlag&&console.log(">>>JS PlayM4_FEC_GetPort placeType:"+e+",correctType:"+t+",fecGetPortCB:"+a),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender)return 2;if(null===this.canvasId)return 2;if(1280!=t&&0!=t)return ut;var r;return this.FECGetPortCB=a,r=null!=this.oSuperRender?this.oSuperRender.FEC_GetPort(e,t):-1,null!=this.FECGetPortCB&&this.FECGetPortCB(r),r}},{key:"PlayM4_FEC_Enable",value:function(e){if(this.printfFlag&&console.log(">>>JS PlayM4_FEC_Enable fishSubPort:"+e),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender)return 2;var t=1;return 0==e?console.log("fishPort is 0 ,main canvas doesn't need call FEC_Enable"):t=null!=this.oSuperRender?this.oSuperRender.FEC_Enable(e):0,t}},{key:"PlayM4_FEC_SetWnd",value:function(e,t){if(this.printfFlag&&console.log(">>>JS PlayM4_FEC_SetWnd fishSubPort:"+e+",hWnd:"+t),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender)return 2;var a=1;if(0==e)console.log("fishPort is 0 ,main canvas doesn't need call FEC_SetWnd");else if(null!=t){var r=document.getElementById(t);if(null!=this.oSuperRender)return this.oSuperRender.FEC_SetWnd(e,r);a=0}else console.log(">>>JS PlayM4_FEC_SetWnd hwnd error fishSubPort:"+e+",hWnd:"+t),a=0;return a}},{key:"PlayM4_FEC_SetParam",value:function(e,t){return this.printfFlag&&console.log(">>>JS PlayM4_FEC_SetParam 1 this.fishSubPort:"+e+",upDateType:"+t.upDateType+",param2d.fPTZParam.fPTZPositionX:"+t.fPTZParam.fPTZPositionX+",param2d.fPTZParam.fPTZPositionY:"+t.fPTZParam.fPTZPositionY),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender?2:null!=this.oSuperRender?this.oSuperRender.FEC_SetParam(e,t):0}},{key:"PlayM4_FEC_SetViewParam",value:function(e,t,a){return this.printfFlag&&console.log(">>>JS PlayM4_FEC_SetViewParam fishSubPort:"+e+",upDateType:"+t+",fValue:"+a),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender?2:null!=this.oSuperRender?this.oSuperRender.FEC_SetViewParam(e,t,a):0}},{key:"PlayM4_FEC_GetViewParam",value:function(e,t,a){if(this.printfFlag&&console.log(">>>JS PlayM4_FEC_GetViewParam fishSubPort:"+e+",upDateType:"+t+",viewParamCB:"+a),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender)return 2;var r=1;this.FECViewParamCB=a;var i={fValue:-1};return null!=this.oSuperRender?(r=this.oSuperRender.FEC_GetViewParam(e,t,i),null!=this.FECViewParamCB&&this.FECViewParamCB(i)):r=0,r}},{key:"PlayM4_FEC_ResetCorrectType",value:function(e,t,a){return this.printfFlag&&console.log("PlayM4_FEC_ResetCorrectType 1 fishSubPort:"+e+",placeType:"+t+",correctType:"+a),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender?2:1280!=a&&0!=a?ut:null!=this.oSuperRender?this.oSuperRender.FEC_ResetCorrectType(e,t,a):0}},{key:"PlayM4_FEC_Capture",value:function(e,t){return this.printfFlag&&console.log("PlayM4_FEC_Capture 1 fishSubPort:"+e+",FECImageCB:"+t),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender?2:null!=this.oSuperRender?this.oSuperRender.FEC_Capture(e,t):0}},{key:"PlayM4_FEC_SetBackCilling",value:function(e,t){return this.printfFlag&&console.log("PlayM4_FEC_SetBackCilling 1 fishSubPort:"+e+",bValue:"+t),null===this.decodeWorker||!1===this.bPlay||null===this.oSuperRender?2:null!=this.oSuperRender?this.oSuperRender.FEC_SetBackCilling(e,t):0}},{key:"PlayM4_GetBMP",value:function(e,t){return this.bmpDownloadFlag=t,this.getPic(e,"GetBMP")}},{key:"PlayM4_GetJPEG",value:function(e,t){return this.jpegDownloadFlag=t,this.getPic(e,"GetJPEG")}},{key:"PlayM4_SetVolume",value:function(e){return null==this.decodeWorker||null==this.audioRenderer?2:e<0||e>100||""===e?0:(this.Volume=e,this.audioRenderer.SetVolume(e),1)}},{key:"PlayM4_GetVolume",value:function(e){if(null==this.decodeWorker)return 2;if(null==this.audioRenderer)return 2;if(e&&"function"==typeof e){var t=this.audioRenderer.GetVolume();return null===t?63:(e(t),1)}return 0}},{key:"PlayM4_GetOSDTime",value:function(e){return null==this.decodeWorker?2:this.bPlay?e&&"function"==typeof e?(e(this.szOSDTime),1):0:2}},{key:"PlayM4_SetFrameInfoCallBack",value:function(e){return this.frameInfoFlag=!!e,1}},{key:"PlayM4_GetFrameInfo",value:function(){return this.displayFrameInfo}},{key:"PlayM4_IsVisible",value:function(e){return this.bVisibility=e,1}},{key:"PlayM4_GetSdkVersion",value:function(){return"07040007"}},{key:"PlayM4_GetBuildDate",value:function(){return"20231219"}},{key:"PlayM4_GetInputBufSize",value:function(){return this.aInputDataBuffer.length}},{key:"PlayM4_SetInputBufSize",value:function(e){return e>0?(this.iInputMaxBufSize=e,this.bJSPrintLog>0&&console.log(">>JSBufferSize SetInputBufSize:"+this.iInputMaxBufSize),1):0}},{key:"PlayM4_GetYUVBufSize",value:function(){return this.aVideoFrameBuffer.length}},{key:"PlayM4_GetFrameResolution",value:function(e){return null==this.decodeWorker?2:e&&"function"==typeof e?(e(this.nWidth,this.nHeight),1):0}},{key:"PlayM4_RegisterYUVBufSizeCB",value:function(e){return e&&"function"==typeof e?(this.YUVBufSizeCBFun=e,1):0}},{key:"PlayM4_GetFileTime",value:function(e){return e&&"function"==typeof e?(this.GetFileTimeCBFun=e,this.decodeWorker.postMessage({command:"GetFileTime"}),1):0}},{key:"PlayM4_GetMpOffset",value:function(e,t){return this.needWaitMpOffset=!0,e&&"function"==typeof e?(this.GetMpOffsetCBFun=e,this.decodeWorker.postMessage({command:"GetMpOffset",FrameTime:t}),1):0}},{key:"PlayM4_UnRegisterYUVBufSizeCB",value:function(){return null!=this.YUVBufSizeCBFun&&(this.YUVBufSizeCBFun=null),1}},{key:"PlayM4_ClearCanvas",value:function(){if(null==this.oSuperRender)return 2;var e={};return e.nCropLeft=this.nSPSCropLeft,e.nCropRight=this.nSPSCropRight,e.nCropTop=this.nSPSCropTop,e.nCropBottom=this.nSPSCropBottom,e.nCodeWidth=this.nWidth,e.nCodeHeight=this.nHeight,this.bVideoCropInfo?this.oSuperRender.DisplayFrame(null,this.nWidth-this.nSPSCropLeft-this.nSPSCropRight,this.nHeight-this.nSPSCropTop-this.nSPSCropBottom,this.timeStamp,e,null):this.oSuperRender.DisplayFrame(null,this.nWidth,this.nHeight,this.timeStamp,e,null),1}},{key:"PlayM4_ReleaseInputBuffer",value:function(){return null===this.aInputDataBuffer?2:(this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length),this.aInputDataLens.splice(0,this.aInputDataLens.length),this.bIsGetYUV=!1,this.bIsFirstFrame=!0,this.bIsInput=!1,1)}},{key:"PlayM4_ResetBuffer",value:function(e){return null===this.aInputDataBuffer?2:(this.decodeWorker.postMessage({command:"ResetBuffer",type:e}),1)}},{key:"PlayM4_GetDecodeFrameType",value:function(){return this.nDecFrameType}},{key:"PlayM4_SetRunTimeInfoCallBackEx",value:function(e,t){return this.runtimeInfoCBFun=t,null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetRunTimeInfoCB",nModuleType:e}),1)}},{key:"PlayM4_SetRunTimeInfoCallbackType",value:function(e,t,a){return t==ee&&(this.nGetTotalFrameNum=0,a?null==this.oDecodeTimer&&(this.oDecodeTimer=new le,this.oDecodeTimer.Init()):null!==this.oDecodeTimer&&(this.oDecodeTimer.timerReset(),this.oDecodeTimer=null)),null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetRunTimeInfoCallbackType",module:e,Type:t,Flag:a}),1)}},{key:"PlayM4_SetStreamInfoCallBack",value:function(e,t){return this.streamInfoCBFun=t,this.decodeWorker.postMessage({command:"SetStreamInfoCB",nType:e}),1}},{key:"PlayM4_SetPostMpStreamOffsetCallBack",value:function(e){return this.PostMpStreamOffsetCBFun=e,this.decodeWorker.postMessage({command:"SetPostMpStreamOffsetCB"}),1}},{key:"PlayM4_SetDemuxModel",value:function(e,t){return null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetDemuxModel",nIdemuxType:e,bTrue:t}),1)}},{key:"PlayM4_SkipErrorData",value:function(e){return null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SkipErrorData",bSkip:e}),1)}},{key:"PlayM4_SetDecodeERC",value:function(e){return null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetDecodeERC",nLevel:e}),1)}},{key:"PlayM4_SetANRParam",value:function(e,t){return null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetANRParam",nEnable:e,nANRLevel:t}),1)}},{key:"PlayM4_SetResampleValue",value:function(e,t){return null==this.decodeWorker?2:(this.decodeWorker.postMessage({command:"SetResampleValue",nEnable:e,resampleValue:t}),1)}},{key:"PlayM4_SetGlobalBaseTime",value:function(e,t,a,r,i,n,s){return null==this.decodeWorker?2:e<2e3||e>3e3||t<1||t>12||e<0||t<0||a<0||r<0||i<0||n<0||s<0?ut:(this.decodeWorker.postMessage({command:"SetGlobalBaseTime",year:e,month:t,day:a,hour:r,min:i,sec:n,ms:s}),1)}},{key:"PlayM4_SetAudioDisplayBuf",value:function(e){return pt=e,1}},{key:"PlayM4_GetCanvasCapture",value:function(e,t,a){return null!=this.oSuperRender?this.oSuperRender.GetCanvasData(e,t,a):1}},{key:"PlayM4_SetFirstFrameCallBack",value:function(e,t){return null!=t&&"function"!=typeof t?0:(e&&(this.firstFrameCB=t),this.needFirstFrameCB=!0,1)}},{key:"PlayM4_SetDecCBStream",value:function(e){return this.decCBStream=e,1}},{key:"PlayM4_SetCanvasSize",value:function(e,t){return e<16||t<16?0:null!=this.oSuperRender&&this.oSuperRender.SetCanvasSize(e,t,0)}},{key:"PlayM4_GetCanvasSize",value:function(){return null!=this.oSuperRender&&this.oSuperRender.GetCanvasSize()}},{key:"PlayM4_GetBufferValue",value:function(){return this.iInputMaxBufSize}},{key:"PlayM4_GetLastError",value:function(){return this.errorCode}},{key:"PlayM4_GetPlayedTimeEx",value:function(e){e(this.timeStamp-this.startTimeStamp)}},{key:"PlayM4_SetAntialias",value:function(e){return null!=this.oSuperRender?this.oSuperRender.SetAntialias(e):0}},{key:"_SetTextCanvas",value:function(){return null!=this.textCanvas&&(this.textCanvas.remove(),this.textCanvas=null),null==this.textCanvas&&(this.textCanvas=document.createElement("canvas")),null!=this.oSuperRender&&this.oSuperRender.SetTextCanvas(this.textCanvas),this.setTextCanvasFlag=!0,1}},{key:"PlayM4_SetWaterMarkFont",value:function(e){return null!=this.oSuperRender?(this.setTextCanvasFlag||this._SetTextCanvas(),this.oSuperRender.SetWaterMarkFont(e)):0}},{key:"PlayM4_SetWaterMarkImage",value:function(e){return null!=this.oSuperRender?this.oSuperRender.SetWaterMarkImage(e):0}},{key:"PlayM4_SetD3DPostProcess",value:function(e,t){return null!=this.oSuperRender?this.oSuperRender.SetD3DPostProcess(e,t):0}},{key:"PlayM4_SetRotateAngle",value:function(e){return null!=this.oSuperRender?this.oSuperRender.SetRotateAngle(e):0}},{key:"PlayM4_IgnoreHeaderAudioDefine",value:function(e){return this.nIgnoreHeaderAudioDefine=e,1}},{key:"getScriptDirectory",value:function(){var e=self.location.href;return e.substr(0,e.lastIndexOf("/")+1)}},{key:"PlayM4_SetAdditionDataCallBack",value:function(e,t,a){return a&&"function"==typeof a||null===a?(this.addtionCallBackFun=a,this.decodeWorker.postMessage({command:"SetAdditionDataCallBack",additionDataType:e,nFlag:t}),1):0}},{key:"downloadFile",value:function(e,t){var a=e;i(e,Blob)||i(e,File)||(a=new Blob([e]));var r=window.URL.createObjectURL(a),n=window.document.createElement("a");n.href=r,n.download=t;var s=document.createEvent("MouseEvents");s.initEvent("click",!0,!0),n.dispatchEvent(s)}},{key:"SourceDataInterval",value:function(e){var t,a=0;return null==this.oInputTimer&&(this.oInputTimer=new le,this.oInputTimer.Init()),-1==this.nLastSourceTimeStamp&&(this.nLastSourceTimeStamp=e),t=this.oInputTimer.GetTimerWalk(),-1==this.nLastClockTimeStamp?(this.nLastClockTimeStamp=t,1):t>=this.nLastClockTimeStamp?(a=t-this.nLastClockTimeStamp,e!=this.nLastSourceTimeStamp&&this.nLastSourceTimeStamp,null!=this.runtimeInfoCBFun&&(this.pstRuntimeInfo.nRunTimeModule=4,this.pstRuntimeInfo.nStrVersion=1,this.pstRuntimeInfo.nFrameTimeStamp=e,this.pstRuntimeInfo.nFrameNum=0,this.pstRuntimeInfo.nErrorCode=$,this.pstRuntimeInfo.nInputDataInterval=a,this.pstRuntimeInfo.nFrameNumInterval=0,this.runtimeInfoCBFun(this.pstRuntimeInfo)),this.nLastSourceTimeStamp=e,this.nLastClockTimeStamp=t,1):(null!=this.oInputTimer&&this.oInputTimer.Init(),this.nLastClockTimeStamp=-1,1)}},{key:"SearchPtsInPes",value:function(e,t){if(t<8)return-1;var a=new Uint8Array(e),r=0;for(r=0;r<t-7;r++){if(r+2>t)return-1;if(0==a[r]&&0==a[r+1]&&1==a[r+2]){if(r+3>t)return-1;switch(a[r+3]){case 189:case 191:if(r+5>t)return-1;var i=6+(a[r+4]<<8)+a[r+5];if(!(r+i<t))return-1;r+=i;break;case 224:if(r+7>t)return-1;if(128&a[r+7])return r}}}return-1}}]),a}(),Et=r((function(){return s(this,(function(e){return[2,WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))]}))})),gt={bSupHardOrSoft:!0,bSupHardDecAVC:!0,bSupHardDecHEVC:!0,cmd:null,errorCode:0,status:null};window.g_printfFlag=0,window.g_recorderFlag=0;var Ft=function(){function a(t,r,i){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,x=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"webgl",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(e(this,a),this.printfFlag=window.g_printfFlag,this.printfFlag>=0&&console.log("%c>>>JSPlayerInterface wasmPathV3:%s, wasmPathV1:%s, chromeVersion:%d,renderEngine:%s,webworker:%d,setHasThread:%d","color: red",t,r,_getFExplore(),x,o,l),this.szBasePathV3=t,this.szBasePathV1=r,this.fnCallBack=i,this.nUser=s,this.renderEngine=x,this.hasWebWorker=o,this.setHasThread=l,this.decodeEngine=1,this.streamOpenMode=0,this.canvasID="",this.FECcanvasIDArray=[],this.aTotalBuffer=[],this.iFrameNum=0,this.bWriteData=!0,this.downloadInputDataFlag=!1,this.rtpDataNeedAdd4Size=!1,this.aInputDataBuffer=[],this.iInputMaxBufSize=2097152,this.switchingV3toV1=!1,this.audioDisplayBufSize=0,this.decodeFrameType=0,this.decInterval=-1,this.volume=0,this.displayBuf=0,this.anrParamLevel=0,this.anrParamFlag=0,this.resampleRate=0,this.resampleFlag=0,this.decodeERCLevel=0,this.skipErrorData=0,this.demuxModelType=0,this.demuxModeFlag=0,this.needResetBuffer=0,this.globalBaseTime={},this.globalBaseTime.year=0,this.inputBufSize=0,this.needSetRotateAngle=!1,this.twodRotateAngle=0,this.frameInfoCBFlag=!1,this.waterFontParam=null,this.waterImageParam=null,this.waterCanvas=null,this.waterCanvasCtx=null,this.textCanvas=null,this.needSetFFCB=!1,this.FFCBFlag=0,this.firstFrameCB=null,this.needSetSecretKey=!1,this.keyData=null,this.keyType=1,this.runtimeModule=0,this.runtimeCBFun=null,this.streamInfoType=0,this.streamInfoCBFun=null,this.additionDataType=0,this.additionFlag=0,this.addCBFun=null,this.needSetRunTimeInfoCB=!1,this.needSetstreamInfoCB=!1,this.needPlaySound=!1,this.needSetAdditionDataCB=!1,this.needSetRunTimeInfoCBType=!1,this.PostMpStreamOffsetCBFun=null,this.needPostMpStreamOffsetCB=!1,this.CanvasSubPortMap=new Map,this.SourceTypeFlagMap=new Map,this.SplitterTypeFlagMap=new Map,this.DecodeTypeFlagMap=new Map,this.RenderTypeFlagMap=new Map,this.ManagerTypeFlagMap=new Map,this.oJSPlayerObj=null,this.supportWebCodecs=window._getFSupportWebCodecs(),this.supportSab=!!window.SharedArrayBuffer,this.offscreen=!!window.OffscreenCanvas,this.supportOffscreen=!1,this.offscreen){var _=new OffscreenCanvas(1,1),h=_.getContext("webgl");h&&(this.supportOffscreen=!0,h.getExtension("WEBGL_lose_context").loseContext()),_=null,h=null}var f=this.JSPlayM4_GetSDKVersion(),c=this.JSPlayM4_GetBuildDate();this.printfFlag>=0&&console.log("%c wasmplayer.min.js version:%s,buildDate:%s","color: blue",f,c),this.supportSIMD=!1,this.callBackParameter=gt,this.jsplayerVersion=3,this.supportWebCodecs?this.jsplayerVersion=3:this.supportSab&&this.supportOffscreen?this.jsplayerVersion=2:this.jsplayerVersion=1,this.jsplayerVersion<3&&(this.callBackParameter.bSupHardDecAVC=!1,this.callBackParameter.bSupHardDecHEVC=!1,this.callBackParameter.bSupHardOrSoft=!1),null===this.szBasePathV3&&null!=this.szBasePathV1?this.jsplayerVersion=1:null!=this.szBasePathV3&&null===this.szBasePathV1?(this.printfFlag>=0&&console.info("%c>>>> szBasePathV1 is null ","color: red"),this.jsplayerVersion=3):null===this.szBasePathV3&&null===this.szBasePathV1&&(this.printfFlag>=0&&console.info("%c>>>> szBasePathV3 and szBasePathV1 are null ","color: red"),this.fnCallBack(this.callBackParameter)),Et().then(function(e){e?(this.supportSIMD=!0,this.printfFlag>=0&&console.log("%c>>>>your browser protocol is %s, hostname:%s, WebCodecs:%s,Sab:%s,Offscreen:%s,SIMD:%s,jsplayerVersion:%d","color: red",window.location.protocol,location.hostname,this.supportWebCodecs,this.supportSab,this.supportOffscreen,this.supportSIMD,this.jsplayerVersion)):(this.supportSIMD=!1,this.printfFlag>=0&&console.log("%c>>>>your browser protocol is %s, hostname:%s, WebCodecs:%s,Sab:%s,Offscreen:%s,SIMD:%s,jsplayerVersion:%d","color: red",window.location.protocol,location.hostname,this.supportWebCodecs,this.supportSab,this.supportOffscreen,this.supportSIMD,this.jsplayerVersion))}.bind(this)),this.wasmloaded=!1,this.jsplayerVersion>1?this.oJSPlayerObj=new lt(this,this.szBasePathV3,(function(e){var t=e.bSupHardOrSoft,a=e.bSupHardDecAVC,r=e.bSupHardDecHEVC,i=e.cmd,s=e.errorCode,x=e.status;t?(n.callBackParameter.bSupHardDecAVC=a,n.callBackParameter.bSupHardDecHEVC=r,n.callBackParameter.bSupHardOrSoft=t,n.callBackParameter.cmd=i,n.callBackParameter.errorCode=s,n.callBackParameter.status=x,n.wasmloaded=!0,n.fnCallBack(n.callBackParameter)):(n.printfFlag>=0&&console.log("%c5>not support V3hard and V3Soft ,switch V3 to V1 ","color: red"),n.jsplayerVersion=1,n.oJSPlayerObj=new bt(n,n.szBasePathV1,(function(e){e.instance;var t=e.cmd,a=e.errorCode,r=e.status;n.callBackParameter.bSupHardDecAVC=!1,n.callBackParameter.bSupHardDecHEVC=!1,n.callBackParameter.bSupHardOrSoft=!1,n.callBackParameter.cmd=t,n.callBackParameter.errorCode=a,n.callBackParameter.status=r,n.wasmloaded=!0,n.fnCallBack(n.callBackParameter)}),0))}),this.nUser,this.renderEngine,this.hasWebWorker,this.setHasThread,this.jsplayerVersion):this.oJSPlayerObj=new bt(this,this.szBasePathV1,(function(e){e.instance;var t=e.cmd,a=e.errorCode,r=e.status;n.callBackParameter.bSupHardDecAVC=!1,n.callBackParameter.bSupHardDecHEVC=!1,n.callBackParameter.bSupHardOrSoft=!1,n.callBackParameter.cmd=t,n.callBackParameter.errorCode=a,n.callBackParameter.status=r,n.wasmloaded=!0,n.fnCallBack(n.callBackParameter)}),0)}return t(a,[{key:"JSPlayM4_SetStreamEnd",value:function(){return 0}},{key:"JSPlayM4_GetPort",value:function(){return this.printfFlag>0&&console.log(">>>>>yff>>> JSPlayM4_GetPort 1"),this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetPort this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1&&this.oJSPlayerObj.JSPlayM4_GetPort(),1)}},{key:"JSPlayM4_SetStreamOpenMode",value:function(e){return this.printfFlag>0&&console.log(">>>>>yff20230817>>>>> JSPlayM4_SetStreamOpenMode 1 mode:"+e),this.streamOpenMode=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetStreamOpenMode this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetStreamOpenMode(e):this.oJSPlayerObj.PlayM4_SetStreamOpenMode(e),1)}},{key:"JSPlayM4_OpenStream",value:function(e,t,a){if(this.printfFlag>0&&console.log(">>>>>yff20230817>>>>> JSPlayM4_OpenStream 1 :"+e),40!==t&&console.info("%cJSPlayM4_OpenStream nSize is not 40","color: red"),4===e[8]&&0===e[9]&&(this.rtpDataNeedAdd4Size=!0),this.downloadInputDataFlag){var r=new Uint8Array(e.buffer);this.downloadRTPData(r),console.log("write 40 hik head")}if(this.HIK40Head=e,this.HIKHeadSize=t,this.HIKPoolSize=a,this.switchingV3toV1)return 1;var i=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_OpenStream this.oJSPlayerObj is null"),0):((i=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_OpenStream(e,t,a):this.oJSPlayerObj.PlayM4_OpenStream(e,t,a))===w&&this._switchV3ToV1(this.streamOpenMode,e,t,a,this.needPlay),this.switchingV3toV1?1:i)}},{key:"JSPlayM4_OpenStreamAdvanced",value:function(e,t,a,r,i){if(this.printfFlag>0&&console.log(">>>>>yff20230817>>>>> JSPlayM4_OpenStreamAdvanced 1 :"+r),1!=e||1!=t||a<0||r.length<0||i<1048576)return console.log("%c JSPlayM4_OpenStreamAdvanced input param error nProtocolType:"+e+",nSessionInfoType:"+t+",nSessionInfoLen:"+a+",pSessionInfoData:"+r+",nBufPoolSize:"+i,"color: red"),0;if(this.downloadInputDataFlag){var n=new Uint8Array(r.buffer);this.downloadRTPData(n),console.log("write sdpinfo")}var s=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_OpenStreamAdvanced this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?s=this.oJSPlayerObj.JSPlayM4_OpenStreamAdvanced(e,t,a,r,i):console.log("20240223 V1 not support sdp openstream "),s)}},{key:"_switchV3ToV1",value:function(e,t,a,r,i){var n=this;console.log("%c5>switch V3 to V1","color: red"),this.switchingV3toV1=!0,this.jsplayerVersion=1,this.oJSPlayerObj.JSPlayM4_Stop(),this.oJSPlayerObj.JSPlayM4_CloseStream(),this.oJSPlayerObj.JSPlayM4_FreePort(),this.oJSPlayerObj=null;var s=new bt(this,this.szBasePathV1,(function(x){x.instance;var o=x.cmd,l=x.errorCode,_=x.status;"loaded"===o&&(n.oJSPlayerObj=s,n.switchingV3toV1=!1,n.callBackParameter.cmd=o,n.callBackParameter.errorCode=l,n.callBackParameter.status=_,n.JSPlayM4_SetStreamOpenMode(e),n.JSPlayM4_OpenStream(t,a,r),(i||n.needPlay)&&n.JSPlayM4_Play(n.canvasID),n._switchV3ToV1ResetParam())}),0)}},{key:"_switchV3ToV1ResetParam",value:function(){if(this.needSetSecretKey&&this.JSPlayM4_SetSecretKey(this.keyData,this.keyType),this.needSetFFCB&&this.JSPlayM4_SetFirstFrameCallBack(this.FFCBFlag,this.firstFrameCB),this.needSetRunTimeInfoCB&&this.JSPlayM4_SetRunTimeInfoCallBackEx(this.runtimeModule,this.runtimeCBFun),this.needSetRunTimeInfoCBType){if(this.SourceTypeFlagMap.size>0){var e,t=M(this.SourceTypeFlagMap.keys());try{for(t.s();!(e=t.n()).done;){var a=e.value,r=this.SourceTypeFlagMap.get(a);1==r&&this.JSPlayM4_SetRunTimeInfoCallbackType(0,a,r)}}catch(e){t.e(e)}finally{t.f()}}if(this.SplitterTypeFlagMap.size>0){var i,n=M(this.SplitterTypeFlagMap.keys());try{for(n.s();!(i=n.n()).done;){var s=i.value,x=this.SplitterTypeFlagMap.get(s);1==x&&this.JSPlayM4_SetRunTimeInfoCallbackType(1,s,x)}}catch(e){n.e(e)}finally{n.f()}}if(this.DecodeTypeFlagMap.size>0){var o,l=M(this.DecodeTypeFlagMap.keys());try{for(l.s();!(o=l.n()).done;){var _=o.value,h=this.DecodeTypeFlagMap.get(_);1==h&&this.JSPlayM4_SetRunTimeInfoCallbackType(2,_,h)}}catch(e){l.e(e)}finally{l.f()}}if(this.RenderTypeFlagMap.size>0){var f,c=M(this.RenderTypeFlagMap.keys());try{for(c.s();!(f=c.n()).done;){var u=f.value,d=this.RenderTypeFlagMap.get(u);1==d&&this.JSPlayM4_SetRunTimeInfoCallbackType(3,u,d)}}catch(e){c.e(e)}finally{c.f()}}if(this.ManagerTypeFlagMap.size>0){var p,m=M(this.ManagerTypeFlagMap.keys());try{for(m.s();!(p=m.n()).done;){var S=p.value,R=this.ManagerTypeFlagMap.get(S);1==R&&this.JSPlayM4_SetRunTimeInfoCallbackType(4,S,R)}}catch(e){m.e(e)}finally{m.f()}}}return this.needSetAdditionDataCB&&this.JSPlayM4_SetAdditionDataCallBack(this.additionDataType,this.additionFlag,this.addCBFun),this.needSetstreamInfoCB&&this.JSPlayM4_SetStreamInfoCallBack(this.streamInfoType,this.streamInfoCBFun),this.needPostMpStreamOffsetCB&&this.JSPlayM4_SetPostMpStreamOffsetCallBack(this.PostMpStreamOffsetCBFun),this.needPlaySound&&this.JSPlayM4_PlaySound(),0!=this.skipErrorData&&this.oJSPlayerObj.PlayM4_SkipErrorData(this.skipErrorData),0!=this.demuxModeFlag&&this.oJSPlayerObj.PlayM4_SetDemuxModel(this.demuxModelType,this.demuxModeFlag),0!=this.globalBaseTime.year&&this.oJSPlayerObj.PlayM4_SetGlobalBaseTime(this.globalBaseTime.year,this.globalBaseTime.month,this.globalBaseTime.day,this.globalBaseTime.hour,this.globalBaseTime.min,this.globalBaseTime.sec,this.globalBaseTime.ms),-1!=this.decInterval&&this.oJSPlayerObj.PlayM4_SetIFrameDecInterval(this.decInterval),0!=this.decodeERCLevel&&this.oJSPlayerObj.PlayM4_SetDecodeERC(this.decodeERCLevel),0!=this.volume&&this.JSPlayM4_SetVolume(this.volume),0!=this.anrParamFlag&&this.oJSPlayerObj.PlayM4_SetANRParam(this.anrParamFlag,this.anrParamLevel),0!=this.resampleFlag&&this.oJSPlayerObj.PlayM4_SetResampleValue(this.resampleFlag,this.resampleRate),0!=this.displayBuf&&this.oJSPlayerObj.PlayM4_SetDisplayBuf(this.displayBuf),null!=this.waterFontParam&&this.oJSPlayerObj.PlayM4_SetWaterMarkFont(this.waterFontParam),null!=this.waterImageParam&&this.oJSPlayerObj.PlayM4_SetWaterMarkImage(this.waterImageParam),this.needSetRotateAngle&&oJSPlayerWasm._JSPlayM4_SetRotateAngle(this.port,this.twodRotateAngle),0!=this.audioDisplayBufSize&&this.oJSPlayerObj.PlayM4_SetAudioDisplayBuf(this.audioDisplayBufSize),0!=this.decodeFrameType&&this.JSPlayM4_SetDecodeFrameType(this.decodeFrameType),0!=this.needResetBuffer&&this.oJSPlayerObj.PlayM4_ReleaseInputBuffer(),0!=this.inputBufSize&&this.oJSPlayerObj.PlayM4_SetInputBufSize(this.inputBufSize),this.oJSPlayerObj.PlayM4_SetFrameInfoCallBack(this.frameInfoCBFlag),1}},{key:"JSPlayM4_SetDecodeEngine",value:function(e){if(this.printfFlag>0&&console.log(">>>>>yff20230817>>>>> JSPlayM4_SetDecodeEngine 1:"+e),0!=e&&1!=e)return console.log("0 is V3softDecode, 1 is V3hardDecoder,decodeEngine:"+e),0;this.decodeEngine=e;var t=1;if(this.jsplayerVersion>1){if(!this.supportSab&&0==e)return console.info("%c3>JSPlayM4_SetDecodeEngine(0 is soft,1 is hard):%d,SharedArrayBuffer Error , does not support Soft Decdoe!!!!!","color: red",e),0;t=this.oJSPlayerObj.JSPlayM4_SetDecodeEngine(this.decodeEngine)}return this.switchingV3toV1?1:t}},{key:"JSPlayM4_DownloadData",value:function(){return this.downloadInputDataFlag=!0,1}},{key:"JSPlayM4_SetAudioDisplayBuf",value:function(e){return this.audioDisplayBufSize=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetAudioDisplayBuf this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetAudioDisplayBuf(e):this.oJSPlayerObj.PlayM4_SetAudioDisplayBuf(e)}},{key:"JSPlayM4_Play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.canvasID=e;var t=1;return this.printfFlag>0&&console.log(">>>>>yff20230817>>>>> JSPlayM4_Play 1 this.supportSab:"+this.supportSab),this.needPlay=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_Play this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?(t=this.oJSPlayerObj.JSPlayM4_Play(e),0!=this.aInputDataBuffer.length&&(this.oJSPlayerObj.JSPlayM4_InputData(new Uint8Array(this.aInputDataBuffer),this.aInputDataBuffer.length),this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length))):(t=this.oJSPlayerObj.PlayM4_Play(e),0!=this.aInputDataBuffer.length&&(this.oJSPlayerObj.PlayM4_InputData(new Uint8Array(this.aInputDataBuffer),this.aInputDataBuffer.length),this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length))),this.switchingV3toV1?1:t)}},{key:"JSPlayM4_InputData",value:function(e,t){var a;if(null===this.oJSPlayerObj||!this.wasmloaded||1==this.jsplayerVersion&&null==this.oJSPlayerObj.streamOpenMode){var r=this.aInputDataBuffer.length;if(r+t>this.iInputMaxBufSize)return console.log("WasmPlayer input over"),0;for(var i=0;i<t;i++)this.aInputDataBuffer[r+i]=e[i];return 1}if(a=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_InputData(e,t):this.oJSPlayerObj.PlayM4_InputData(e,t),this.downloadInputDataFlag&&t>0)if(this.rtpDataNeedAdd4Size){var n=null,s=t+4,x=new Uint32Array([t]),o=new Uint8Array(x.buffer);(n=new Uint8Array(s)).set(o,0),n.set(e,4),this.downloadRTPData(n),x=null,o=null,n=null}else this.downloadRTPData(e);return a}},{key:"JSPlayM4_Stop",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null===this.oJSPlayerObj)return console.log(">>>>>yff>>> JSPlayM4_Stop this.oJSPlayerObj is null"),0;if(this.bWriteData&&this.iFrameNum>0){console.log("download"+this.iFrameNum+"Psdata");var t=new Uint8Array(this.aTotalBuffer);this._downloadFile(t,"RTPRaw.data"),this.aTotalBuffer.splice(0,this.aTotalBuffer.length),this.bWriteData=!1,this.iFrameNum=0,t=null}return this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_Stop(e):this.oJSPlayerObj.PlayM4_Stop(e)}},{key:"JSPlayM4_CloseStream",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_CloseStream this.oJSPlayerObj is null"),0):(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_CloseStream():this.oJSPlayerObj.PlayM4_CloseStream(),null!=this.waterCanvas&&(this.waterCanvas.remove(),this.waterCanvas=null),this.waterCanvasCtx=null,this.SourceTypeFlagMap.clear(),this.SplitterTypeFlagMap.clear(),this.DecodeTypeFlagMap.clear(),this.RenderTypeFlagMap.clear(),this.ManagerTypeFlagMap.clear(),e)}},{key:"JSPlayM4_FreePort",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FreePort this.oJSPlayerObj is null"),0):(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FreePort():this.oJSPlayerObj.PlayM4_FreePort(),this.oJSPlayerObj=null,e)}},{key:"JSPlayM4_SetDecodeFrameType",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetDecodeFrameType this.oJSPlayerObj is null"),0):(this.decodeFrameType=e,this.switchingV3toV1?1:(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetDecodeFrameType(e):7==e?t=this.oJSPlayerObj.PlayM4_SetLostFrameMode(1):(t=this.oJSPlayerObj.PlayM4_SetLostFrameMode(0),t=this.oJSPlayerObj.PlayM4_SetDecodeFrameType(e)),t))}},{key:"JSPlayM4_PlaySound",value:function(){var e=1;return this.needPlaySound=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_PlaySound this.oJSPlayerObj is null"),0):(this.SetDefaultSampleRate(),1!=(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_PlaySound():this.oJSPlayerObj.PlayM4_PlaySound(0))&&(e=0),e)}},{key:"JSPlayM4_PlaySoundShare",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_PlaySoundShare this.oJSPlayerObj is null"),0):(this.SetDefaultSampleRate(),1!=(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_PlaySoundShare():this.oJSPlayerObj.PlayM4_PlaySound(0))&&(e=0),e)}},{key:"SetDefaultSampleRate",value:function(){var e=1,t=new(window.AudioContext||window.webkitAudioContext),a=t.sampleRate;return t.close(),48e3!=a&&(console.log("浏览器默认采样率:",a+"Hz"),e=this.JSPlayM4_SetResampleValue(!0,a),console.log("JSPlayM4_SetResampleValue resSDSR:"+e)),e}},{key:"JSPlayM4_StopSoundShare",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_StopSoundShare this.oJSPlayerObj is null"),0):(1!=(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_StopSoundShare():this.oJSPlayerObj.PlayM4_StopSound())&&(e=0),e)}},{key:"JSPlayM4_GetJPEG",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetJPEG this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetJPEG(e,t):this.oJSPlayerObj.PlayM4_GetJPEG(e,t)}},{key:"JSPlayM4_GetBMP",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetBMP this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetBMP(e,t):this.oJSPlayerObj.PlayM4_GetBMP(e,t)}},{key:"JSPlayM4_GetCropJPEG",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetCropJPEG this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_GetCropJPEG(e,t):console.log("%c1>JSPlayerV1.X does not support GetCropJPEG","color: red"),a)}},{key:"JSPlayM4_GetCropBMP",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetCropBMP this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_GetCropBMP(e,t):console.log("%c1>JSPlayerV1.X does not support GetCropBMP","color: red"),a)}},{key:"JSPlayM4_GetCanvasCapture",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetCanvasCapture this.oJSPlayerObj is null"),0):t<0||a<0?0:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetCanvasCapture(e,t,a):this.oJSPlayerObj.PlayM4_GetCanvasCapture(e,t,a)}},{key:"JSPlayM4_StopSound",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_StopSound this.oJSPlayerObj is null"),0):(1!=(e=this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_StopSound():this.oJSPlayerObj.PlayM4_StopSound())&&(e=0),e)}},{key:"JSPlayM4_GetSDKVersion",value:function(){return"0801000B"}},{key:"JSPlayM4_GetBuildDate",value:function(){return"20251111-cropbottom"}},{key:"JSPlayM4_GetLastError",value:function(){return null===this.oJSPlayerObj?0:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetLastError():this.oJSPlayerObj.PlayM4_GetLastError()}},{key:"JSPlayM4_Fast",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_Fast this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1&&(e=this.oJSPlayerObj.JSPlayM4_Fast()),e)}},{key:"JSPlayM4_Slow",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_Slow this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1&&(e=this.oJSPlayerObj.JSPlayM4_Slow()),e)}},{key:"JSPlayM4_SetIFrameDecInterval",value:function(e){return this.decInterval=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetIFrameDecInterval this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetIFrameDecInterval(e):this.oJSPlayerObj.PlayM4_SetIFrameDecInterval(e)}},{key:"JSPlayM4_Pause",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_Pause this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_Pause(e):this.oJSPlayerObj.PlayM4_Pause(e)}},{key:"JSPlayM4_OneByOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_OneByOne this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_OneByOne():this.oJSPlayerObj.PlayM4_OneByOne(e)}},{key:"JSPlayM4_OneByOneResume",value:function(){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_OneByOneResume this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_OneByOneResume():this.oJSPlayerObj.PlayM4_Pause(!1)}},{key:"JSPlayM4_SetVolume",value:function(e){var t=1;if(this.volume=e,this.switchingV3toV1)return 1;if(null===this.oJSPlayerObj)return console.log(">>>>>yff>>> JSPlayM4_SetVolume this.oJSPlayerObj is null"),0;if(this.jsplayerVersion>1)t=this.oJSPlayerObj.JSPlayM4_SetVolume(e);else{var a=e/65535*100;t=this.oJSPlayerObj.PlayM4_SetVolume(a)}return t}},{key:"JSPlayM4_GetVolume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetVolume this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?(t=this.oJSPlayerObj.JSPlayM4_GetVolume(),null!=e&&e(t)):t=this.oJSPlayerObj.PlayM4_GetVolume((function(t){null!=e&&e(t/100*65535)})),t)}},{key:"JSPlayM4_SetDisplayRegion",value:function(e,t,a,r,i){var n=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],x=1;if(null===this.oJSPlayerObj)return console.log(">>>>>yff>>> JSPlayM4_SetDisplayRegion this.oJSPlayerObj is null"),0;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof a||"number"!=typeof i)return console.log("param is not number"),0;if(0!=n&&1!=n&&0!=n&&1!=n)return 0;if(0!=s&&1!=s&&0!=s&&1!=s)return 0;if(!n){var o=document.getElementById(this.canvasID).width,l=document.getElementById(this.canvasID).height;if(t<0||a<0||r<0||i<0||t>o||a>o||r>l||i>l)return 0;if(a-t<16||i-r<16||a-t>o||i-r>l)return console.log(">>>JS left:"+t+",right:"+a+",top:"+r+",bottom:"+i+",bClose:"+n+",bZoomEnable:"+s+",canvasWidth:"+o+",canvasHeight:"+l),0}if(this.jsplayerVersion>1)x=this.oJSPlayerObj.JSPlayM4_SetDisplayRegion(e,t,a,r,i,n,s);else{var _={};_.left=t,_.right=a,_.top=r,_.bottom=i,x=this.oJSPlayerObj.PlayM4_SetDisplayRegion(_,!n,s)}return x}},{key:"JSPlayM4_SetPrintLogFlag",value:function(e){return this.printfFlag=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetPrintLogFlag this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetPrintLogFlag(e):this.oJSPlayerObj.PlayM4_OpenPlayerSDKPrintLog(e)}},{key:"JSPlayM4_RenderPrivateData",value:function(e,t){var a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateData this.oJSPlayerObj is null"),0):1!=e&&2!=e&&4!=e&&8!=e&&16!=e&&32!=e&&64!=e&&128!=e?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx intelType value error"),0):1!=t&&0!=t&&1!=t&&0!=t?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx bTrue value error"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_RenderPrivateData(e,t):console.log("%c1>JSPlayerV1.X does not support RenderPrivateData","color: red"),a)}},{key:"JSPlayM4_RenderPrivateDataEx",value:function(e,t,a){var r=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx this.oJSPlayerObj is null"),0):1!=e&&2!=e&&4!=e&&8!=e&&16!=e&&32!=e&&64!=e&&128!=e?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx intelType value error"),0):16==e&&(t<1||t>15)||32==e&&(t<1||t>7)||64==e&&(t<1||t>3)||128==e&&(t<1||t>7)?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx subType value error"),0):1!=a&&0!=a&&1!=a&&0!=a?(console.log(">>>>>yff>>> JSPlayM4_RenderPrivateDataEx bTrue value error"),0):(this.jsplayerVersion>1?r=this.oJSPlayerObj.JSPlayM4_RenderPrivateDataEx(e,t,a):console.log("%c1>JSPlayerV1.X does not support RenderPrivateDataEx","color: red"),r)}},{key:"JSPlayM4_SetCanvasSize",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetCanvasSize this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetCanvasSize(e,t,a):this.oJSPlayerObj.PlayM4_SetCanvasSize(e,t)}},{key:"JSPlayM4_SetDisplayBuf",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetDisplayBuf this.oJSPlayerObj is null"),0):(this.displayBuf=e,this.switchingV3toV1?1:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDisplayBuf(e):this.oJSPlayerObj.PlayM4_SetDisplayBuf(e))}},{key:"JSPlayM4_GetSourceBufferRemain",value:function(){return null===this.oJSPlayerObj?0:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetSourceBufferRemain():this.oJSPlayerObj.PlayM4_GetInputBufSize()}},{key:"JSPlayM4_GetBufferValue",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetBufferValue this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetBufferValue(e):this.oJSPlayerObj.PlayM4_GetBufferValue(e)}},{key:"JSPlayM4_ReversePlay",value:function(){var e=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_ReversePlay this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?e=this.oJSPlayerObj.JSPlayM4_ReversePlay():console.log("%c1>JSPlayerV1.X does not support ReversePlay","color: red"),e)}},{key:"JSPlayM4_SetDecodeThreadNum",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetDecodeThreadNum this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetDecodeThreadNum(e):console.log("%c1>JSPlayerV1.X does not support SetDecodeThreadNum, V1.X decocde only 1 thread","color: red"),t)}},{key:"JSPlayM4_GetCanvasSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetCanvasSize this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetCanvasSize(e):this.oJSPlayerObj.PlayM4_GetCanvasSize()}},{key:"JSPlayM4_DisplayLostFrames",value:function(e,t,a){var r=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_DisplayLostFrames this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?r=this.oJSPlayerObj.JSPlayM4_DisplayLostFrames(e,t,a):console.log("%c1>JSPlayerV1.X does not support DisplayLostFrames","color: red"),r)}},{key:"JSPlayM4_SetIVSContraBandDrawMode",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_DisplayLostFrames this.oJSPlayerObj is null"),0):0!=e&&1!=e?0:(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetIVSContraBandDrawMode(e):console.log("%c1>JSPlayerV1.X does not support SetIVSContraBandDrawMode","color: red"),t)}},{key:"JSPlayM4_SetANRParam",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetANRParam this.oJSPlayerObj is null"),0):(this.anrParamLevel=t,this.anrParamFlag=e,this.switchingV3toV1?1:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetANRParam(e,t):this.oJSPlayerObj.PlayM4_SetANRParam(e,t))}},{key:"JSPlayM4_SetResampleValue",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetResampleValue this.oJSPlayerObj is null"),0):(this.resampleRate=t,this.resampleFlag=e,this.switchingV3toV1?1:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetResampleValue(e,t):this.oJSPlayerObj.PlayM4_SetResampleValue(e,t))}},{key:"JSPlayM4_SetAntialias",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetAntialias this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?(t=this.oJSPlayerObj.JSPlayM4_SetAntialias(e),console.log("V3 JSPlayM4_SetAntialias resSA: ".concat(t))):(t=this.oJSPlayerObj.PlayM4_SetAntialias(e),console.log("V1 JSPlayM4_SetAntialias resSA: ".concat(t))),t)}},{key:"JSPlayM4_SyncToAudio",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SyncToAudio this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SyncToAudio(e):console.log("%c1>JSPlayerV1.X does not support SyncToAudio","color: red"),t)}},{key:"JSPlayM4_SetAudioThreadModel",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetAudioThreadModel this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetAudioThreadModel(e):console.log("%c1>JSPlayerV1.X does not support SetAudioThreadModel","color: red"),t)}},{key:"JSPlayM4_SetDecodeERC",value:function(e){return this.decodeERCLevel=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetDecodeERC this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDecodeERC(e):this.oJSPlayerObj.PlayM4_SetDecodeERC(e)}},{key:"JSPlayM4_SkipErrorData",value:function(e){return this.skipErrorData=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SkipErrorData this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SkipErrorData(e):this.oJSPlayerObj.PlayM4_SkipErrorData(e)}},{key:"JSPlayM4_SetDemuxModel",value:function(e,t){return this.demuxModelType=e,this.demuxModeFlag=t,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetDemuxModel this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDemuxModel(e,t):this.oJSPlayerObj.PlayM4_SetDemuxModel(e,t)}},{key:"JSPlayM4_SetD3DPostProcess",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetD3DPostProcess this.oJSPlayerObj is null"),0):"number"!=typeof e||"number"!=typeof t?(console.log(">>>>>yff>>> JSPlayM4_SetD3DPostProcess nPostType or fValue is not number"),0):1!==e&&2!==e&&3!==e&&4!==e&&5!==e?(console.log(">>>>>yff>>> JSPlayM4_SetD3DPostProcess nPostType is 1~5"),0):1===e&&(t<-1||t>1)||2===e&&(t<0||t>1)||3===e&&(t<-1||t>1)||4===e&&(t<-1||t>1)||5===e&&(t<0||t>1)?(console.log(">>>>>yff>>> JSPlayM4_SetD3DPostProcess pFontParam f* is 0~1 or -1~1"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetD3DPostProcess(e,t):this.oJSPlayerObj.PlayM4_SetD3DPostProcess(e,t)}},{key:"JSPlayM4_SetFirstFrameCallBack",value:function(e,t){return this.needSetFFCB=!0,this.FFCBFlag=e,this.firstFrameCB=t,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetFirstFrameCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetFirstFrameCallBack(e,t):this.oJSPlayerObj.PlayM4_SetFirstFrameCallBack(e,t)}},{key:"JSPlayM4_SetDecCallBack",value:function(e,t){return null===this.oJSPlayerObj||"function"!=typeof t?(console.log(">>>>>yff>>> JSPlayM4_SetDecCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDecCallBack(e,t):this.oJSPlayerObj.PlayM4_SetDecCallBack(e,t)}},{key:"JSPlayM4_SetHardDecToJepgCallBack",value:function(e,t){return null==e||null==e.nHardToJpegQuality||null==e.nHardToJpegInterval||null==e.nHardToJpegZoomWidth||null==e.nHardToJpegZoomHeight||null==e.nZoomResolutionFlag||e.nHardToJpegQuality<=0||e.nHardToJpegQuality>1||e.nHardToJpegInterval<1||e.nHardToJpegZoomWidth<1||e.nHardToJpegZoomHeight<1||0!=e.nZoomResolutionFlag&&1!=e.nZoomResolutionFlag?0:null===this.oJSPlayerObj||"function"!=typeof t?(console.log(">>>>>yff>>> JSPlayM4_SetHardDecToJepgCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetHardDecToJepgCallBack(e,t):(console.log("%c1>JSPlayerV1.X does not support SetHardDecToJepgCallBack","color: red"),0)}},{key:"JSPlayM4_SetDisplayCallBack",value:function(e,t){return null===this.oJSPlayerObj||"function"!=typeof t?(console.log(">>>>>yff>>> JSPlayM4_SetDisplayCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDisplayCallBack(e,t):this.oJSPlayerObj.PlayM4_SetDisplayCallBack(t)}},{key:"JSPlayM4_SetFrameInfoCallBack",value:function(e){return this.frameInfoCBFlag=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetFrameInfoCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetFrameInfoCallBack(e):this.oJSPlayerObj.PlayM4_SetFrameInfoCallBack(e)}},{key:"JSPlayM4_SetDecCBStream",value:function(e){return null===this.oJSPlayerObj||e<1||e>3?(console.log(">>>>>yff>>> JSPlayM4_SetDecCBStream this.oJSPlayerObj is null stream:"+e),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetDecCBStream(e):this.oJSPlayerObj.PlayM4_SetDecCBStream(e)}},{key:"JSPlayM4_GetFrameInfo",value:function(){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetFrameInfo this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetFrameInfo():this.oJSPlayerObj.PlayM4_GetFrameInfo()}},{key:"JSPlayM4_GetAdditionData",value:function(){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetAdditionData this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetAdditionData():(console.log("%c1>JSPlayerV1.X does not support GetAdditionData","color: red"),0)}},{key:"JSPlayM4_SetAdditionDataCallBack",value:function(e,t,a){return this.additionDataType=e,this.additionFlag=t,this.addCBFun=a,this.needSetAdditionDataCB=!0,null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetAdditionDataCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetAdditionDataCallBack(e,t,a):this.oJSPlayerObj.PlayM4_SetAdditionDataCallBack(e,t,a)}},{key:"JSPlayM4_GetPlayedTimeEx",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetPlayedTimeEx this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_GetPlayedTimeEx(e):this.oJSPlayerObj.PlayM4_GetPlayedTimeEx(e)}},{key:"JSPlayM4_GetFileTime",value:function(e){var t=0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetFileTime this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?(t=this.oJSPlayerObj.JSPlayM4_GetFileTime(),null!=e&&e(t)):t=this.oJSPlayerObj.PlayM4_GetFileTime(e),1e3*t)}},{key:"JSPlayM4_GetMpOffset",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=-1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetMpOffset this.oJSPlayerObj is null"),-1):(this.jsplayerVersion>1?(n=this.oJSPlayerObj.JSPlayM4_GetMpOffset(t,a,r,i),null!=e&&e(n)):n=this.oJSPlayerObj.PlayM4_GetMpOffset(e,t),n)}},{key:"JSPlayM4_ResetBuffer",value:function(e){var t=1;return this.needResetBuffer=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_ResetBuffer this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_ResetBuffer(e):(t=this.oJSPlayerObj.PlayM4_ReleaseInputBuffer(),t=this.oJSPlayerObj.PlayM4_ResetBuffer(e)),t)}},{key:"JSPlayM4_SetGlobalBaseTime",value:function(e,t,a,r,i,n,s){return e<0||t<0||t>12||a<0||a>31||r<0||r>=24||i<0||i>=60||n<0||n>=60||s<0||s>=1e3?0:(this.globalBaseTime={year:e,month:t,day:a,hour:r,min:i,sec:n,ms:s},this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetGlobalBaseTime this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetGlobalBaseTime(e,t,a,r,i,n,s):this.oJSPlayerObj.PlayM4_SetGlobalBaseTime(e,t,a,r,i,n,s))}},{key:"JSPlayM4_SetSecretKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.needSetSecretKey=!0,this.keyData=e,this.keyType=t,this.switchingV3toV1)return 1;if(null===this.oJSPlayerObj)return console.log(">>>>>yff>>> JSPlayM4_SetSecretKey this.oJSPlayerObj is null"),0;if(1!=t&&2!=t)return 0;var a=0;return 1==t?a=128:2==t&&(a=256),this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetSecretKey(t,e,a):this.oJSPlayerObj.PlayM4_SetSecretKey(t,e,a)}},{key:"JSPlayM4_SetRunTimeInfoCallBackEx",value:function(e,t){return this.runtimeModule=e,this.runtimeCBFun=t,this.needSetRunTimeInfoCB=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetRunTimeInfoCallBackEx this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetRunTimeInfoCallBackEx(e,t):this.oJSPlayerObj.PlayM4_SetRunTimeInfoCallBackEx(e,t)}},{key:"JSPlayM4_SetRunTimeInfoCallbackType",value:function(e,t,a){switch((e>4||e<0||t<0||0!=a&&1!=a)&&console.log(">>>>>yff>>> JSPlayM4_SetRunTimeInfoCallbackType param error nModule:"+e+",nType:"+t+",nFlag:"+a),e){case 0:a?this.SourceTypeFlagMap.set(t,1):this.SourceTypeFlagMap.delete(t);break;case 1:a?this.SplitterTypeFlagMap.set(t,1):this.SplitterTypeFlagMap.delete(t);break;case 2:a?this.DecodeTypeFlagMap.set(t,1):this.DecodeTypeFlagMap.delete(t);break;case 3:a?this.RenderTypeFlagMap.set(t,1):this.RenderTypeFlagMap.delete(t);break;case 4:a?this.ManagerTypeFlagMap.set(t,1):this.ManagerTypeFlagMap.delete(t);break;default:return 0}return this.needSetRunTimeInfoCBType=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetRunTimeInfoCallbackType this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetRunTimeInfoCallbackType(e,t,a):this.oJSPlayerObj.PlayM4_SetRunTimeInfoCallbackType(e,t,a)}},{key:"JSPlayM4_SetStreamInfoCallBack",value:function(e,t){return this.streamInfoCBFun=t,this.streamInfoType=e,this.needSetstreamInfoCB=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetStreamInfoCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetStreamInfoCallBack(e,t):this.oJSPlayerObj.PlayM4_SetStreamInfoCallBack(e,t)}},{key:"JSPlayM4_SetPostMpStreamOffsetCallBack",value:function(e){return e&&"function"==typeof e||null===e?(this.PostMpStreamOffsetCBFun=e,this.needPostMpStreamOffsetCB=!0,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetPostMpStreamOffsetCallBack this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetPostMpStreamOffsetCallBack(e):this.oJSPlayerObj.PlayM4_SetPostMpStreamOffsetCallBack(e)):0}},{key:"JSPlayM4_SetPlayOrBackSwitchMode",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetPlayOrBackSwitchMode this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetPlayOrBackSwitchMode(e):console.log("%c1>JSPlayerV1.X does not support SetPlayOrBackSwitchMode","color: red"),t)}},{key:"JSPlayM4_SetStretchPlay",value:function(e,t){var a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetStretchPlay this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_SetStretchPlay(e,t):console.log("%c1>JSPlayerV1.X does not support SetStretchPlay","color: red"),a)}},{key:"JSPlayM4_SetAutoSmoothPlay",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetAutoSmoothPlay this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetAutoSmoothPlay(e):console.log("%c1>JSPlayerV1.X does not support SetAutoSmoothPlay","color: red"),t)}},{key:"JSPlayM4_KeepPlaySpeed",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_KeepPlaySpeed this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_KeepPlaySpeed(e):console.log("%c1>JSPlayerV1.X does not support KeepPlaySpeed","color: red"),t)}},{key:"JSPlayM4_IgnoreHeaderAudioDefine",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_IgnoreHeaderAudioDefine this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_IgnoreHeaderAudioDefine(e):this.oJSPlayerObj.PlayM4_IgnoreHeaderAudioDefine(e)}},{key:"JSPlayM4_SetSycGroup",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetSycGroup this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetSycGroup(e):console.log("%c1>JSPlayerV1.X does not support SetSycGroup","color: red"),t)}},{key:"JSPlayM4_SetRotateAngle",value:function(e){return"number"!=typeof e?(console.log(">>>>>yff>>> JSPlayM4_SetRotateAngle nValue is not number"),0):0!=e&&90!=e&&180!=e&&270!=e?(console.log(">>>>>yff>>> JSPlayM4_SetRotateAngle only support 0/90/180/270"),0):(this.needSetRotateAngle=!0,this.twodRotateAngle=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetRotateAngle this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetRotateAngle(e):this.oJSPlayerObj.PlayM4_SetRotateAngle(e))}},{key:"JSPlayM4_SetPanoramaDisplayEffect",value:function(e){return"number"!=typeof e?(console.log(">>>>>yff>>> JSPlayM4_SetPanoramaDisplayEffect eDisplayEffect is not number"),0):0!=e&&1!=e&&2!=e&&3!=e?(console.log(">>>>>yff>>> JSPlayM4_SetPanoramaDisplayEffect only support 0/1/2/3"),0):this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetPanoramaDisplayEffect this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetPanoramaDisplayEffect(e):(console.log("%c1>JSPlayerV1.X does not support SetPanoramaDisplayEffect 20250910","color: red"),0)}},{key:"JSPlayM4_SetPanoramaSphereViewParam",value:function(e,t){var a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetPanoramaSphereViewParam this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_SetPanoramaSphereViewParam(e,t):console.log("%c1>JSPlayerV1.X does not support JSPlayM4_SetPanoramaSphereViewParam 20250910","color: red"),a)}},{key:"JSPlayM4_GetPanoramaSphereViewParam",value:function(e,t){var a=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetPanoramaSphereViewParam this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?a=this.oJSPlayerObj.JSPlayM4_GetPanoramaSphereViewParam(e,t):console.log("%c1>JSPlayerV1.X does not support JSPlayM4_GetPanoramaSphereViewParam 20250910","color: red"),a)}},{key:"JSPlayM4_FEC_SetCanvasID",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=1;return this.FECcanvasIDArray=e.split(","),null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetCanvasID this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_FEC_SetCanvasID(e):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),t)}},{key:"JSPlayM4_FEC_ResetCorrectType",value:function(e,t,a){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_ResetCorrectType this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_ResetCorrectType(e,t,a):this.oJSPlayerObj.PlayM4_FEC_ResetCorrectType(e,t,a)}},{key:"JSPlayM4_FEC_GetPort",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_GetPort this.oJSPlayerObj is null"),-1):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_GetPort(e,t,a):this.oJSPlayerObj.PlayM4_FEC_GetPort(e,t,a)}},{key:"JSPlayM4_FEC_Enable",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_Enable this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_Enable(e):this.oJSPlayerObj.PlayM4_FEC_Enable(e)}},{key:"JSPlayM4_FEC_SetParam",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetParam this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_SetParam(e,t):this.oJSPlayerObj.PlayM4_FEC_SetParam(e,t)}},{key:"JSPlayM4_FEC_GetParam",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_GetParam this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_GetParam(e,t):(console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),1)}},{key:"JSPlayM4_FEC_SetViewParam",value:function(e,t,a){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetViewParam this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_SetViewParam(e,t,a):this.oJSPlayerObj.PlayM4_FEC_SetViewParam(e,t,a)}},{key:"JSPlayM4_FEC_GetViewParam",value:function(e,t,a){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_GetViewParam this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_GetViewParam(e,t,a):this.oJSPlayerObj.PlayM4_FEC_GetViewParam(e,t,a)}},{key:"JSPlayM4_FEC_SetWnd",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetWnd this.oJSPlayerObj is null"),0):(this.CanvasSubPortMap.set(e,t),this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_SetWnd(e,t):this.oJSPlayerObj.PlayM4_FEC_SetWnd(e,t))}},{key:"JSPlayM4_FEC_Disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_Disable this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?r=this.oJSPlayerObj.JSPlayM4_FEC_Disable(e,t,a):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),r)}},{key:"JSPlayM4_FEC_DelPort",value:function(e){var t=1;if(null===this.oJSPlayerObj)return console.log(">>>>>yff>>> JSPlayM4_FEC_DelPort this.oJSPlayerObj is null"),0;var a=this.CanvasSubPortMap.get(e);this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_FEC_DelPort(e):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red");var r=document.getElementById(a);if(r){var i=r.cloneNode(!0);r.parentNode.replaceChild(i,r)}return this.CanvasSubPortMap.delete(e),t}},{key:"JSPlayM4_FEC_SetDisplayRegion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,n=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,x=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetDisplayRegion this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?x=this.oJSPlayerObj.JSPlayM4_FEC_SetDisplayRegion(e,t,a,r,i,n,s):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),x)}},{key:"JSPlayM4_FEC_SetBackCilling",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetBackCilling this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_SetBackCilling(e,t):this.oJSPlayerObj.PlayM4_FEC_SetBackCilling(e,t)}},{key:"JSPlayM4_FEC_GetPTZPort",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=-1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_GetPTZPort this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?i=this.oJSPlayerObj.JSPlayM4_FEC_GetPTZPort(e,t,a,r):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),i)}},{key:"JSPlayM4_FEC_SetPTZDisplayMode",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_SetPTZDisplayMode this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_FEC_SetPTZDisplayMode(e):console.log("%c1>JSPlayerV1.X does not support FEC 20230922","color: red"),t)}},{key:"JSPlayM4_FEC_Capture",value:function(e,t){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_FEC_Capture this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_FEC_Capture(e,t):this.oJSPlayerObj.PlayM4_FEC_Capture(e,t)}},{key:"JSPlayM4_SetVideoCropInfo",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetVideoCropInfo this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support SetVideoCropInfo,","color: red"):t=this.oJSPlayerObj.PlayM4_SetVideoCropInfo(e),t)}},{key:"JSPlayM4_IsVisible",value:function(e){return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_IsVisible this.oJSPlayerObj is null"),0):1!=e&&0!=e?0:this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_IsVisible(e):this.oJSPlayerObj.PlayM4_IsVisible(e)}},{key:"JSPlayM4_SetInputBufSize",value:function(e){var t=1;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetInputBufSize this.oJSPlayerObj is null"),0):(this.inputBufSize=e,this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support SetInputBufSize,","color: red"):t=this.oJSPlayerObj.PlayM4_SetInputBufSize(e),t)}},{key:"JSPlayM4_GetYUVBufSize",value:function(){var e=0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetYUVBufSize this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support GetYUVBufSize,","color: red"):e=this.oJSPlayerObj.PlayM4_GetYUVBufSize(),e)}},{key:"JSPlayM4_ClearCanvas",value:function(){var e=0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_ClearCanvas this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support ClearCanvas,","color: red"):e=this.oJSPlayerObj.PlayM4_ClearCanvas(),e)}},{key:"JSPlayM4_ReleaseInputBuffer",value:function(){var e=0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_ReleaseInputBuffer this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support ReleaseInputBuffer,","color: red"):e=this.oJSPlayerObj.PlayM4_ReleaseInputBuffer(),e)}},{key:"JSPlayM4_GetDecodeFrameType",value:function(){var e=0;return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_GetDecodeFrameType this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?console.log("%c1>JSPlayerV3.X does not support GetDecodeFrameType,","color: red"):e=this.oJSPlayerObj.PlayM4_GetDecodeFrameType(),e)}},{key:"JSPlayM4_SetMosaicType",value:function(e){var t=0;return null==e||null==e||null==e.pstMosaicColor||null==e.pstMosaicColor.fMosaicColorR||null==e.pstMosaicColor.fMosaicColorG||null==e.pstMosaicColor.fMosaicColorB||null==e.pstMosaicColor.fMosaicColorA||null==e.nMosaicSize||null==e.nMosaicType||e.pstMosaicColor.fMosaicColorR<0||e.pstMosaicColor.fMosaicColorR>255||e.pstMosaicColor.fMosaicColorG<0||e.pstMosaicColor.fMosaicColorG>255||e.pstMosaicColor.fMosaicColorB<0||e.pstMosaicColor.fMosaicColorB>255||e.pstMosaicColor.fMosaicColorA<0||e.pstMosaicColor.fMosaicColorA>100||e.nMosaicSize<1||e.nMosaicSize>100||1!=e.nMosaicType&&3!=e.nMosaicType&&5!=e.nMosaicType?0:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetMosaicType this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SetMosaicType(e):console.log("%c1>JSPlayerV1.X does not support SetMosaicType,","color: red"),t)}},{key:"JSPlayM4_SelectIntelInfoFeatureToDraw",value:function(e){var t=0;if(null==e||null==e)return 0;if(0!=e.bTrue&&1!=e.bTrue)return 0;if(0!=e.nMode&&1!=e.nMode&&2!=e.nMode)return 0;if(e.NodeNumber<0||e.NodeNumber>160)return 0;if(e.NodeNumber!=e.pIntelInfoNode.length)return 0;for(var a=0;a<e.NodeNumber;a++){if(e.pIntelInfoNode[a].nID<0)return 0;if(1!=e.pIntelInfoNode[a].nType&&2!=e.pIntelInfoNode[a].nType&&4!=e.pIntelInfoNode[a].nType&&8!=e.pIntelInfoNode[a].nType)return 0}return null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SelectIntelInfoFeatureToDraw this.oJSPlayerObj is null"),0):(this.jsplayerVersion>1?t=this.oJSPlayerObj.JSPlayM4_SelectIntelInfoFeatureToDraw(e):console.log("%cJSPlayM4_SelectIntelInfoFeatureToDraw V1 not support","color: red"),t)}},{key:"JSPlayM4_SetWaterMarkFont",value:function(e){if(null!=e){if(null!=e.nFontAlign&&null!=e.nFontAlign||(e.nFontAlign=0),null!=e.nColorAdapt&&null!=e.nColorAdapt||(e.nColorAdapt=0),null==e.pstCanvasAdapt&&(e.pstCanvasAdapt={},e.pstCanvasAdapt.nCanvasAdaptMode=0,e.pstCanvasAdapt.ntotalRowSpace=0,e.pstCanvasAdapt.ntotalColSpace=0,e.pstCanvasAdapt.nBaseCanvasWidth=0,e.pstCanvasAdapt.nBaseCanvasHeight=0),this.printfFlag>0){console.log("%cJSPlayerInterface.js JSPlayM4_SetWaterMarkFont:string:"+e.pFontString+",fontcolr,fR:"+e.pstFontColor.fR+",fG:"+e.pstFontColor.fG+",fB:"+e.pstFontColor.fB+",fA:"+e.pstFontColor.fA+",fontSizeWidth:"+e.pstFontSize.nFontWidth+",fontSizeHeight:"+e.pstFontSize.nFontHeight+",rotateAngle:"+e.pstFontRotate.fRotateAngle+",fontFamily:"+e.pFontFamily,"color:red");var t=document.getElementById(this.canvasID).width,a=document.getElementById(this.canvasID).height;console.log("canvasWidht:"+t+",canvasHeight:"+a),console.log("fullScreen:"+e.pstFontRotate.fFillFullScreen+",rowNum:"+e.pstFontNumber.nRowNumber+",colNum:"+e.pstFontNumber.nColNumber+",space:"+e.pSpace+",fontAlign:"+e.nFontAlign+",colorAdapt:"+e.nColorAdapt),console.log("adaptMode:"+e.pstCanvasAdapt.nCanvasAdaptMode+",baseWidth:"+e.pstCanvasAdapt.nBaseCanvasWidth+",baseHeight:"+e.pstCanvasAdapt.nBaseCanvasHeight+",rowSpace:"+e.pstCanvasAdapt.nRowSpace+",colSpace:"+e.pstCanvasAdapt.nColSpace)}if(void 0===e.pFontString||null==e.pstStartPos||null==e.pstFontColor||null==e.pstFontSize||null==e.pstFontRotate||null==e.pFontFamily||null==e.pstStartPos.fX||null==e.pstStartPos.fY||null==e.pstFontColor.fR||null==e.pstFontColor.fG||null==e.pstFontColor.fB||null==e.pstFontColor.fA||null==e.pstFontSize.nFontWidth||null==e.pstFontSize.nFontHeight||null==e.pstFontRotate.fRotateAngle||null==e.pstFontRotate.fFillFullScreen||null==e.pSpace)return console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkFont pFontParam undefined"),0;if(e.pstStartPos.fX>1||e.pstStartPos.fX<0||e.pstStartPos.fY>1||e.pstStartPos.fY<0||e.pstFontColor.fR>1||e.pstFontColor.fR<0||e.pstFontColor.fG>1||e.pstFontColor.fG<0||e.pstFontColor.fB>1||e.pstFontColor.fB<0||e.pstFontColor.fA>1||e.pstFontColor.fA<0)return console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkFont pFontParam f* is 0~1"),0;if(1!=e.pstFontRotate.fFillFullScreen&&0!=e.pstFontRotate.fFillFullScreen&&1!=e.pstFontRotate.fFillFullScreen&&0!=e.pstFontRotate.fFillFullScreen)return console.log(">>>>>yff>>> pFontParam.pstFontRotate.fFillFullScreen is true or false"),0;if(0==e.pstCanvasAdapt.nCanvasAdaptMode&&e.pstFontRotate.fFillFullScreen&&(e.pstFontNumber.nRowNumber<1||e.pstFontNumber.nColNumber<1||null==e.pstFontNumber.nRowNumber||null==e.pstFontNumber.nColNumber||e.pstFontNumber.nRowNumber>16||e.pstFontNumber.nColNumber>16))return console.log(">>>>>yff>>> pFontParam.pstFontNumber row/col num should be greater than 1 and les than 16"),0;if("string"!=typeof e.pFontFamily)return console.log(">>>>>yff>>> pFontParam.pFontFamily is not string"),0;if(!Array.isArray(e.pFontString)||e.pFontString.length>9)return console.log(">>>>>yff>>> pFontParam.pFontString is not array, pFontParam.pFontString.length:"+e.pFontString.length),0;if(0!=e.pstCanvasAdapt.nCanvasAdaptMode&&1!=e.pstCanvasAdapt.nCanvasAdaptMode&&2!=e.pstCanvasAdapt.nCanvasAdaptMode)return console.log(">>>>>yff>>> pFontParam.pstCanvasAdapt.nCanvasAdaptMode:(0,1,2)"+e.pstCanvasAdapt.nCanvasAdaptMode),0;if(1==e.pstCanvasAdapt.nCanvasAdaptMode&&(null==e.pstCanvasAdapt.nRowSpace||null==e.pstCanvasAdapt.nColSpace||e.pstCanvasAdapt.nRowSpace<0||e.pstCanvasAdapt.nColSpace<0))return console.log(">>>>>yff>>> nCanvasAdaptMode is 1, nRowSpace:"+e.pstCanvasAdapt.nRowSpace+",pFontParam.pstCanvasAdapt.nColSpace:"+e.pstCanvasAdapt.nColSpace),0;if(2==e.pstCanvasAdapt.nCanvasAdaptMode&&(null==e.pstCanvasAdapt.nBaseCanvasWidth||null==e.pstCanvasAdapt.nBaseCanvasHeight||e.pstCanvasAdapt.nBaseCanvasWidth<0||e.pstCanvasAdapt.nBaseCanvasHeight<0))return console.log(">>>>>yff>>> nCanvasAdaptMode is 2, nBaseCanvasWidth:"+e.pstCanvasAdapt.nBaseCanvasWidth+",pFontParam.pstCanvasAdapt.nBaseCanvasHeight:"+e.pstCanvasAdapt.nBaseCanvasHeight),0;if(0==e.pstCanvasAdapt.nCanvasAdaptMode&&(e.pstCanvasAdapt.ntotalColSpace=0,e.pstCanvasAdapt.ntotalRowSpace=0),1==e.pstCanvasAdapt.nCanvasAdaptMode){var r=e.pstFontRotate.fRotateAngle%360/360*2*Math.PI;if(null==this.waterCanvas&&(this.waterCanvas=document.createElement("canvas"),null!=this.waterCanvas&&(this.waterCanvasCtx=this.waterCanvas.getContext("2d"))),null!=this.waterCanvasCtx){var i=Math.min(e.pstFontSize.nFontHeight,e.pstFontSize.nFontWidth);this.waterCanvasCtx.font=i.toString()+"px "+e.pFontFamily;for(var n=0,s=0;s<e.pFontString.length;s++){var x=this.waterCanvasCtx.measureText(e.pFontString[s]).width;n=n>x?n:x}var o=e.pSpace*parseInt(this.waterCanvasCtx.font)*e.pFontString.length;e.pstCanvasAdapt.ntotalColSpace=e.pstCanvasAdapt.nColSpace+Math.abs(n*Math.cos(r))+Math.abs(o*Math.sin(r)),e.pstCanvasAdapt.ntotalRowSpace=e.pstCanvasAdapt.nRowSpace+Math.abs(o*Math.cos(r))+Math.abs(n*Math.sin(r)),(e.pstCanvasAdapt.ntotalColSpace<0||e.pstCanvasAdapt.ntotalRowSpace<0)&&(e.pstCanvasAdapt.nCanvasAdaptMode=0)}}2==e.pstCanvasAdapt.nCanvasAdaptMode&&(e.pstCanvasAdapt.ntotalRowSpace=0,e.pstCanvasAdapt.ntotalColSpace=0),(e.pstFontSize.nFontHeight<=0||e.pstFontSize.nFontWidth<=0)&&(e=null)}return this.waterFontParam=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkFont this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetWaterMarkFont(e):this.oJSPlayerObj.PlayM4_SetWaterMarkFont(e)}},{key:"JSPlayM4_SetWaterMarkImage",value:function(e){if(!("ImageDecoder"in window))return console.log(">>>>>yff>>> window not support ImageDecoder"),w;if(null!=e){if(void 0===e.pImageData)return console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkImage pImageParam.pImageData undefined"),0;if(void 0===e.pImageType||"jpg"!=e.pImageType&&"jpeg"!=e.pImageType&&"png"!=e.pImageType&&"gif"!=e.pImageType&&"bmp"!=e.pImageType&&"webp"!=e.pImageType&&"avif"!=e.pImageType)return console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkImage pImageParam.pImageType:"+e.pImageType+" error"),0;(void 0===e.pstRectPos||e.pstRectPos.fLeft<0||e.pstRectPos.fLeft>1||e.pstRectPos.fRight<0||e.pstRectPos.fRight>1||e.pstRectPos.fTop<0||e.pstRectPos.fTop>1||e.pstRectPos.fBottom<0||e.pstRectPos.fBottom>1)&&(e.pstRectPos={fLeft:0,fRight:.1,fTop:0,fBottom:.1}),(void 0===e.fAlpha||e.fAlpha<0||e.fAlpha>1)&&(e.fAlpha=1)}return this.waterImageParam=e,this.switchingV3toV1?1:null===this.oJSPlayerObj?(console.log(">>>>>yff>>> JSPlayM4_SetWaterMarkImage this.oJSPlayerObj is null"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_SetWaterMarkImage(e):this.oJSPlayerObj.PlayM4_SetWaterMarkImage(e)}},{key:"JSPlayM4_InitEncoder",value:function(e,t){return null==e||null==e?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo:"+e+",encodeAudioInfo:"+t,"color:red"),0):0!==e.encodeType?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.encodeType(only support 0(H264)):"+e.encodeType,"color:red"),0):0!=e.baseTimeStampMode&&1!=e.baseTimeStampMode?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.baseTimeStampMode(only support 0(start from 0),1(old)):"+e.baseTimeStampMode,"color:red"),0):0!=e.encodeWidth&&(e.encodeWidth>1920||e.encodeWidth<32)?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.encodeWidth(32x32 to 1920x1088 pixels):"+e.encodeWidth,"color:red"),0):0!=e.encodeHeight&&(e.encodeHeight>1088||e.encodeHeight<32)?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.encodeWidth(32x32 to 1920x1088 pixels encodeVideoInfo.encodeHeight:"+e.encodeHeight,"color:red"),0):0!=e.bitrate&&e.bitrate<0?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder ncodeVideoInfo.bitrate( need largger than 0):"+e.bitrate,"color:red"),0):0!=e.framerate&&e.framerate<0?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.framerate( need largger than 0):"+e.framerate,"color:red"),0):0!=e.bitrateMode&&1!=e.bitrateMode?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.bitrateMode only support 0(variable) and 1(constant)","color:red"),0):0!=e.latencyMode&&1!=e.latencyMode?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.latencyMode only support 0(realtime) and 1(quality)","color:red"),0):(null==e.getOriginData&&(e.getOriginData=0),0!=e.getOriginData&&1!=e.getOriginData?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeVideoInfo.getOriginData only support 0(crop) and 1(origin)","color:red"),0):null==t||null==t?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo:"+t,"color:red"),0):0!=t.encodeType?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo.encodeType(only support 0(aac)):"+t.encodeType,"color:red"),0):0!=t.sampleRate&&48e3!=t.sampleRate&&44100!=t.sampleRate?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo.sampleRate(only support 48k and 44.1k):"+t.sampleRate,"color:red"),0):0!=t.numberOfChannels&&1!=t.numberOfChannels?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo.numberOfChannels (only support single channel):"+t.numberOfChannels,"color:red"),0):0!=t.bitrate&&128e3!=t.bitrate?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo.bitrate(only support 128000):"+t.bitrate,"color:red"),0):(null==t.recoderAudioAnyWhere&&(t.recoderAudioAnyWhere=0),0!=t.recoderAudioAnyWhere&&1!=t.recoderAudioAnyWhere?(console.log("%cJSPlayerInterface.js JSPlayM4_InitEncoder encodeAudioInfo.recoderAudioAnyWhere(only support 0 and 1):"+t.recoderAudioAnyWhere,"color:red"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_InitEncoder(e,t):(console.log("%conly hard decoder support recoder,V1 not support (20240801)","color: red"),0)))}},{key:"JSPlayM4_StartEncode",value:function(e,t){return 1===window.g_recorderFlag?(console.log("%conly support one recorder at the same time!","color: red"),0):(window.g_recorderFlag=1,"function"!=typeof e||"function"!=typeof t?(console.log("%cJSPlayM4_StartEncode param need CBfunction videoRawDataFunCB:"+e+",audioRawDataFunCB:"+t,"color: red"),0):this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_StartEncode(e,t):(console.log("%cJSPlayM4_StartEncode only hard decoder support recoder,V1 not support (20240801)","color: red"),0))}},{key:"JSPlayM4_StopEncode",value:function(){return window.g_recorderFlag=0,this.jsplayerVersion>1?this.oJSPlayerObj.JSPlayM4_StopEncode():(console.log("%c JSPlayM4_StopEncode only hard decoder support recoder,V1 not support (20240801)","color: red"),0)}},{key:"_downloadFile",value:function(e,t){var a=e;i(e,Blob)||i(e,File)||(a=new Blob([e]));var r=window.URL.createObjectURL(a),n=window.document.createElement("a");n.href=r,n.download=t;var s=document.createEvent("MouseEvents");s.initEvent("click",!0,!0),n.dispatchEvent(s)}},{key:"downloadRTPData",value:function(e){if(this.bWriteData){var t=e,a=this.aTotalBuffer.length;console.log("totalLength:"+a);for(var r=0,i=t.length;r<i;r++)this.aTotalBuffer[a+r]=t[r];this.iFrameNum++,t=null,console.log("download200RTPdata iFrameNum:"+this.iFrameNum)}}}]),a}();window._getFExplore=function(){var e,t={},a=navigator.userAgent.toLowerCase();if((e=a.match(/rv:([\d.]+)\) like gecko/))||(e=a.match(/msie ([\d\.]+)/))?t.ie=e[1]:(e=a.match(/edge\/([\d\.]+)/))?t.edge=e[1]:(e=a.match(/firefox\/([\d\.]+)/))?t.firefox=e[1]:(e=a.match(/(?:opera|opr).([\d\.]+)/))?t.opera=e[1]:(e=a.match(/chrome\/([\d\.]+)/))?t.chrome=e[1]:(e=a.match(/version\/([\d\.]+).*safari/))&&(t.safari=e[1]),t.chrome){var r=t.chrome,i=r.indexOf(".");return Number(r.substring(0,i))}return t.ie?console.log("%c1>your browser is IE ,it does not support play without plugin","color: red"):t.safari?console.log("%c1>your browser is safari ","color: red"):t.firefox?console.log("%c1>your browser is Firefox ","color: red"):console.log("%c1>your browser does not support play without plugin","color: red"),-1},window._getFSupportWebCodecs=function(){return"undefined"!=typeof VideoDecoder},window._getFSupportSIMD=function(){return new Promise((function(e,t){Et().then((function(a){a?e():t()}))}))},window.gSetWasmPlayerPrintf=function(e){return window.g_printfFlag=e,!0}}(),x}()}))}(st,st.exports);var xt=st.exports.JSPlayCtrl;function ot(e,t,a){return ot=_t()?Reflect.construct:function(e,t,a){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return a&&lt(i,a.prototype),i},ot.apply(null,arguments)}function lt(e,t){return lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lt(e,t)}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_t=function(){return!!e})()}function ht(e){var t,a,r,i,x;e.initializing=!0,e.emit(A.initializing);var o=n(null!=(x=null==(t=e._options.staticPath)?void 0:t.replace(/\/$/,""))?x:"")+"/PlayCtrlWasm",l=o+"/playCtrl3/hasWorker/HasSIMD/Decoder.js",_=o+"/playCtrl1/HasSIMD/Decoder.js";"iOS"===(null==$e||null==(a=$e.os)?void 0:a.name)&&"16.4"===(null==$e||null==(r=$e.os)?void 0:r.version)&&(_=o+"/playCtrl1/NoSIMD/Decoder.js"),window.SharedArrayBuffer||(l=o+"/playCtrl3/noWorker/Decoder.js");var h=function(){var e,t;return!(!($e&&$e.browser&&["Chrome","Electron"].includes($e.browser.name))||["120","118"].includes(null==(e=$e.browser)?void 0:e.major)&&"macOS"===(null==(t=$e.os)?void 0:t.name))}(),f=function(t,a,r,i){return void 0===t&&(t=0),void 0===a&&(a="webgl"),void 0===r&&(r=0),void 0===i&&(i=0),new Promise((function(n){var x=e._options.decoderType,o=[!s()&&h&&["auto","v3"].includes(x)?l:null,_];e.wasmplayer=ot(xt,[].concat(o,[function(t){if("loaded"===t.cmd)e.logger.log("init wasm cmd:",t.cmd),window.JSPlayerModuleLoaded=!0,e.initializing=!1,e.emit(A.initializing,F(t));e._decoderStatus=t,n(t)},t,a,r,i])),window["wasmplayer-"+e._options.id]=e.wasmplayer}))};return null==(i=window)?void 0:i._getFSupportSIMD().then((function(){return f()}),(function(){return l=o+"/playCtrl3/hasWorker/NoSIMD/Decoder.js",_=o+"/playCtrl1/NoSIMD/Decoder.js",f()}))}function ft(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}function ct(e,t){return ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ct(e,t)}var ut=null,dt=Symbol("CANVAS"),pt=Symbol("CONTEXT"),mt=Symbol("SHAPES"),St=Symbol("DRAWSTATUS"),Rt=Symbol("SHAPETYPE"),Pt=Symbol("MAXSHAPENUMSUPPORT"),yt=Symbol("SHAPESTYLE"),bt=Symbol("POLYGONDRAWING"),Et=Symbol("CURRENTSHAPEINFO"),gt=Symbol("DRAWSHAPEMULTIONETIME"),Ft=Symbol("EVENTCALLBACK");function Ct(){ut[pt].clearRect(0,0,ut.m_iCanvasWidth,ut.m_iCanvasHeight);for(var e=0,t=ut[mt].length;e<t;e++)ut[mt][e].draw()}function vt(e){ut[mt].length<ut[Pt]&&ut[mt].push(e)}function Tt(){var e,t,a,r,i,n,s,x=!1,o={},l=0,_=0,h=0,f=0,c=0,u=0,d="draw",p=null;function m(){for(var e=-1,t=0,a=ut[mt].length;t<a;t++)if(ut[mt][t].m_bChoosed){e=t;break}return e}ut[dt].oncontextmenu=function(){return!1},ut[dt].onselectstart=function(){return!1},Dt(),ut.ON_MOUSEDOWN=function(e){if(2===e.button)ut[bt]&&p&&p.m_aPoint.length>=p.m_iMinClosed&&(p.m_bClosed=!0,ut[bt]=!1,p.setPointInfo(p.m_aPoint),vt(p),Ct(),x=!1,ut[gt]||(ut[St]=!1),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,p.m_szType,"onDrawEnd",p.m_szId));else if(0===e.button){if(x){if(Math.abs(e.offsetX-l)>2&&Math.abs(e.offsetY-_)>2&&(vt(p),ut[gt]||(ut[St]=!1)),ut[Ft]){var t,a={startPos:[],endPos:[]};a.startPos=[l,_],a.endPos=[e.offsetX,e.offsetY],null==(t=ut[Ft])||t.call(ut,a),ut.clearAllShape()}return p=null,void(x=!1)}if(l=e.offsetX,_=e.offsetY,d="draw",!ut[bt]){var r=m();if(-1!==r&&ut[mt][r].inArc(e.offsetX,e.offsetY,5)&&(d="stretch"),"stretch"!==d)for(var i=0,n=ut[mt].length;i<n;i++)ut[mt][i].inShape(e.offsetX,e.offsetY)&&2!==ut[mt][i].m_iEditType?(ut[mt][i].m_bChoosed=!0,ut[mt][i].getMouseDownPoints(e.offsetX,e.offsetY),d="drag",null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,ut[mt][i].m_szType,"onChoose",ut[mt][i].m_szId)):ut[mt][i].m_bChoosed=!1;ut[dt].style.cursor="drag"===d?"move":"default","draw"===d&&1===ut[mt].length&&1===ut[mt][0].m_iRedrawMode&&(ut.deleteRepeatPolyonById(ut[mt][0].m_szId),ut[St]=!0),ut[St]&&!ut[gt]&&(d="draw")}if("draw"===d&&ut[St]){if(ut[Pt]<=ut[mt].length&&"Grid"!==ut[Rt]&&"Point"!==ut[Rt])return;"Rect"===ut[Rt]?(p=new It).m_szTips=ut[Et].szTips||"":"Grid"===ut[Rt]?0===ut[mt].length&&vt(p=new Lt):"Polygon"===ut[Rt]?(ut[bt]||(ut[bt]=!0,(p=new Ot).m_szId=ut[Et].szId||"",p.m_szTips=ut[Et].szTips||"",p.m_iMinClosed=ut[Et].iMinClosed||3,p.m_iMaxPointNum=ut[Et].iMaxPointNum||11,p.m_iPolygonType=ut[Et].iPolygonType,p.m_szDrawColor=ut[Et].szDrawColor,p.m_szFillColor=ut[Et].szFillColor,p.m_iTranslucent=ut[Et].iTranslucent,p.m_iRedrawMode=ut[Et].iRedrawMode),1===p.m_iPolygonType&&(p.addPoint(l,_),p.m_aPoint.length===p.m_iMaxPointNum&&(p.m_bClosed=!0,ut[bt]=!1,vt(p),Ct(),x=!1,ut[gt]||(ut[St]=!1),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,p.m_szType,"onDrawEnd",p.m_szId)))):"Point"===ut[Rt]&&(ut.clearShapeByType("Point"),(p=new Bt).m_szId=ut[Et].szId||"",p.m_szDrawColor=ut[Et].szDrawColor,p.setPointInfo([[l,_]]),vt(p),Ct())}x=!0}},null==(e=ut[dt])||e.addEventListener("mousedown",ut.ON_MOUSEDOWN),ut.ON_MOUSEENTER=function(e){o={isIn:!0,offsetX:e.offsetX,offsetY:e.offsetY},ut[St]&&x&&("Rect"===ut[Rt]?p.move([[l,_],[e.offsetX,e.offsetY]]):"Grid"===ut[Rt]&&ut[mt][0].move(l,_,e.offsetX,e.offsetY))},null==(t=ut[dt])||t.addEventListener("mouseenter",ut.ON_MOUSEENTER),ut.ON_MOUSELEAVE=function(e){o={isIn:!1,offsetX:e.offsetX,offsetY:e.offsetY}},null==(a=ut[dt])||a.addEventListener("mouseleave",ut.ON_MOUSELEAVE),ut.ON_MOUSEMOVE=function(e){if(ut[bt])ut[St]&&x&&("Polygon"===ut[Rt]&&0===p.m_iPolygonType&&(p.m_bClosed=!0),Ct(),p.move(e.offsetX,e.offsetY,l,_));else{var t=m();t>-1?x&&("drag"===d?(ut[mt][t].drag(e.offsetX,e.offsetY),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,ut[mt][t].m_szType,"onDrag",ut[mt][t].m_szId)):"stretch"===d&&(ut[mt][t].stretch(e.offsetX,e.offsetY),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,ut[mt][t].m_szType,"onStretch",ut[mt][t].m_szId))):ut[St]&&x&&o.isIn&&("Rect"===ut[Rt]?p.move([[l,_],[e.offsetX,e.offsetY]]):"Grid"===ut[Rt]&&ut[mt][0].move(l,_,e.offsetX,e.offsetY))}},null==(r=ut[dt])||r.addEventListener("mousemove",ut.ON_MOUSEMOVE),ut.ON_MOUSEUP=function(e){if(ut[dt].style.cursor="default",null!=p&&"draw"===d)if("Rect"===ut[Rt]){if(Math.abs(e.offsetX-l)>2&&Math.abs(e.offsetY-_)>2&&(vt(p),ut[gt]||(ut[St]=!1)),ut[Ft]){var t,a={startPos:[],endPos:[]};a.startPos=[l,_],a.endPos=[e.offsetX,e.offsetY],null==(t=ut[Ft])||t.call(ut,a),ut.clearAllShape()}p=null}else"Polygon"===ut[Rt]&&0===p.m_iPolygonType&&ut[bt]&&Math.abs(e.offsetX-l)>2&&Math.abs(e.offsetY-_)>2&&(vt(p),ut[bt]=!1,ut[gt]||(ut[St]=!1),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,p.m_szType,"onDrawEnd",p.m_szId));x=!!ut[bt],ut[bt]||Ct()},null==(i=ut[dt])||i.addEventListener("mouseup",ut.ON_MOUSEUP),ut.ON_DBLCLICK=function(){ut[St]&&"Grid"===ut[Rt]&&(ut[mt][0].m_szGridMap="fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc",Ct())},ut[dt].addEventListener("dblclick",ut.ON_DBLCLICK),ut.ON_TOUCHSTART=function(e){var t,a=e.target.getBoundingClientRect();if(null==(t=e.touches)?void 0:t[0]){if(h=parseInt(e.touches[0].clientX-a.x)>0?parseInt(e.touches[0].clientX-a.x):0,f=parseInt(e.touches[0].clientY-a.y)>0?parseInt(e.touches[0].clientY-a.y):0,d="draw",ut[St]){if(ut[Pt]<=ut[mt].length&&"Grid"!==ut[Rt]&&"Point"!==ut[Rt])return;"Rect"===ut[Rt]?(p=new It).m_szTips=ut[Et].szTips||"":"Grid"===ut[Rt]?0===ut[mt].length&&vt(p=new Lt):"Polygon"===ut[Rt]?(ut[bt]||(ut[bt]=!0,(p=new Ot).m_szId=ut[Et].szId||"",p.m_szTips=ut[Et].szTips||"",p.m_iMinClosed=ut[Et].iMinClosed||3,p.m_iMaxPointNum=ut[Et].iMaxPointNum||11,p.m_iPolygonType=ut[Et].iPolygonType,p.m_szDrawColor=ut[Et].szDrawColor,p.m_szFillColor=ut[Et].szFillColor,p.m_iTranslucent=ut[Et].iTranslucent,p.m_iRedrawMode=ut[Et].iRedrawMode),1===p.m_iPolygonType&&(p.addPoint(h,f),p.m_aPoint.length===p.m_iMaxPointNum&&(p.m_bClosed=!0,ut[bt]=!1,vt(p),Ct(),x=!1,ut[gt]||(ut[St]=!1),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,p.m_szType,"onDrawEnd",p.m_szId)))):"Point"===ut[Rt]&&(ut.clearShapeByType("Point"),(p=new Bt).m_szId=ut[Et].szId||"",p.m_szDrawColor=ut[Et].szDrawColor,p.setPointInfo([[h,f]]),vt(p),Ct())}x=!0}},null==(n=ut[dt])||n.addEventListener("touchstart",ut.ON_TOUCHSTART),ut.ON_TOUCHMOVE=function(e){var t,a=e.target.getBoundingClientRect();if(null==(t=e.touches)?void 0:t[0])if(c=parseInt(e.touches[0].clientX-a.x)>0?parseInt(e.touches[0].clientX-a.x):0,u=parseInt(e.touches[0].clientY-a.y)>0?parseInt(e.touches[0].clientY-a.y):0,ut[bt])ut[St]&&x&&("Polygon"===ut[Rt]&&0===p.m_iPolygonType&&(p.m_bClosed=!0),Ct(),p.move(e.touches[0].offsetX,e.touches[0].offsetY,h,f));else{var r=m();r>-1?x&&("drag"===d?(ut[mt][r].drag(c,u),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,ut[mt][r].m_szType,"onDrag",ut[mt][r].m_szId)):"stretch"===d&&(ut[mt][r].stretch(c,u),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,ut[mt][r].m_szType,"onStretch",ut[mt][r].m_szId))):ut[St]&&x&&("Rect"===ut[Rt]?p.move([[2*h,2*f],[2*c,2*u]]):"Grid"===ut[Rt]&&ut[mt][0].move(h,f,c,u))}},null==(s=ut[dt])||s.addEventListener("touchmove",ut.ON_TOUCHMOVE),ut.ON_TOUCHEND=function(e){if(h!=c||f!=u){if(ut[dt].style.cursor="default",null!=p&&"draw"===d)if("Rect"===ut[Rt]){if(Math.abs(c-h)>2&&Math.abs(u-f)>2&&(vt(p),ut[gt]||(ut[St]=!1)),ut[Ft]&&Math.abs(c-h)>15&&Math.abs(u-f)>15){var t,a={startPos:[],endPos:[]};a.startPos=[h,f],a.endPos=[c,u],null==(t=ut[Ft])||t.call(ut,a)}ut.clearAllShape(),p=null}else"Polygon"===ut[Rt]&&0===p.m_iPolygonType&&ut[bt]&&Math.abs(c-h)>2&&Math.abs(u-f)>2&&(vt(p),ut[bt]=!1,ut[gt]||(ut[St]=!1),null==window.onDrawShapeEvent||window.onDrawShapeEvent.call(window,p.m_szType,"onDrawEnd",p.m_szId));x=!!ut[bt],ut[bt]||Ct()}},ut[dt].addEventListener("touchend",ut.ON_TOUCHEND)}function Dt(){var e,t,a,r,i,n,s,x,o;ut.ON_MOUSEDOWN&&(null==(e=ut[dt])||e.removeEventListener("mousedown",ut.ON_MOUSEDOWN),ut.ON_MOUSEDOWN=null);ut.ON_MOUSEENTER&&(null==(t=ut[dt])||t.removeEventListener("mouseenter",ut.ON_MOUSEENTER),ut.ON_MOUSEENTER=null);ut.ON_MOUSELEAVE&&(null==(a=ut[dt])||a.removeEventListener("mouseleave",ut.ON_MOUSELEAVE),ut.ON_MOUSELEAVE=null);ut.ON_MOUSEMOVE&&(null==(r=ut[dt])||r.removeEventListener("mousemove",ut.ON_MOUSEMOVE),ut.ON_MOUSEMOVE=null);ut.ON_MOUSEUP&&(null==(i=ut[dt])||i.removeEventListener("mouseup",ut.ON_MOUSEUP),ut.ON_MOUSEUP=null);ut.ON_DBLCLICK&&(null==(n=ut[dt])||n.removeEventListener("dblclick",ut.ON_DBLCLICK),ut.ON_DBLCLICK=null);ut.ON_TOUCHSTART&&(null==(s=ut[dt])||s.removeEventListener("touchstart",ut.ON_TOUCHSTART),ut.ON_TOUCHSTART=null);ut.ON_TOUCHMOVE&&(null==(x=ut[dt])||x.removeEventListener("touchmove",ut.ON_TOUCHMOVE),ut.ON_TOUCHMOVE=null);ut.ON_TOUCHEND&&(null==(o=ut[dt])||o.removeEventListener("touchend",ut.ON_TOUCHEND),ut.ON_TOUCHEND=null)}var At=function(){function e(){this.m_szId="",this.m_aPoint=[],this.m_bChoosed=!1,this.m_szDrawColor=ut[yt].szDrawColor,this.m_szFillColor=ut[yt].szFillColor,this.m_iTranslucent=ut[yt].iTranslucent,this.m_iIndexChoosePoint=-1,this.m_iDriftStartX=0,this.m_iDriftStartY=0,this.m_oEdgePoints={top:{x:0,y:0},left:{x:0,y:0},right:{x:0,y:0},bottom:{x:0,y:0}},this.m_szTips="",this.m_iEditType=0,this.m_iMinClosed=3,this.m_iMaxPointNum=11,this.m_bClosed=!1,this.m_iRedrawMode=0}var t=e.prototype;return t.draw=function(){},t.drag=function(e,t){if(2!==this.m_iEditType){var a=this.m_aPoint.length,r=0;for(r=0;r<a;r++)if(this.m_aPoint[r][0]+e-this.m_iDriftStartX>ut.m_iCanvasWidth||this.m_aPoint[r][1]+t-this.m_iDriftStartY>ut.m_iCanvasHeight||this.m_aPoint[r][0]+e-this.m_iDriftStartX<0||this.m_aPoint[r][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(r=0;r<a;r++)this.m_aPoint[r][0]=this.m_aPoint[r][0]+e-this.m_iDriftStartX,this.m_aPoint[r][1]=this.m_aPoint[r][1]+t-this.m_iDriftStartY;this.m_iDriftStartX=e,this.m_iDriftStartY=t,this.setPointInfo(this.m_aPoint),Ct()}},t.stretch=function(e,t){0===this.m_iEditType&&(-1!==this.m_iIndexChoosePoint&&(this.m_aPoint[this.m_iIndexChoosePoint][0]=e,this.m_aPoint[this.m_iIndexChoosePoint][1]=t),this.setPointInfo(this.m_aPoint),Ct())},t.inShape=function(e,t){for(var a=!1,r=this.m_aPoint.length,i=0,n=r-1;i<r;n=i++)this.m_aPoint[i][1]>t!=this.m_aPoint[n][1]>t&&e<(this.m_aPoint[n][0]-this.m_aPoint[i][0])*(t-this.m_aPoint[i][1])/(this.m_aPoint[n][1]-this.m_aPoint[i][1])+this.m_aPoint[i][0]&&(a=!a);return a},t.inArc=function(e,t,a){for(var r=!1,i=0,n=this.m_aPoint.length;i<n;i++){if(Math.sqrt((e-this.m_aPoint[i][0])*(e-this.m_aPoint[i][0])+(t-this.m_aPoint[i][1])*(t-this.m_aPoint[i][1]))<a){r=!0,this.m_iIndexChoosePoint=i;break}}return r},t.getMouseDownPoints=function(e,t){this.m_iDriftStartX=e,this.m_iDriftStartY=t},t.getPointInfo=function(){return this.m_aPoint},t.setPointInfo=function(e){null!=e&&e.length>0&&(this.m_aPoint=e,this.setEdgePoints(e))},t.addPoint=function(e,t){this.m_aPoint.length<this.m_iMaxPointNum&&this.m_aPoint.push([e,t]),this.m_aPoint.length===this.m_iMaxPointNum&&this.setPointInfo(this.m_aPoint)},t.setEdgePoints=function(e){for(var t=0,a=e.length;t<a;t++)0===t?(this.m_oEdgePoints.top.x=e[t][0],this.m_oEdgePoints.top.y=e[t][1],this.m_oEdgePoints.left.x=e[t][0],this.m_oEdgePoints.left.y=e[t][1],this.m_oEdgePoints.right.x=e[t][0],this.m_oEdgePoints.right.y=e[t][1],this.m_oEdgePoints.bottom.x=e[t][0],this.m_oEdgePoints.bottom.y=e[t][1]):(e[t][1]<this.m_oEdgePoints.top.y&&(this.m_oEdgePoints.top.x=e[t][0],this.m_oEdgePoints.top.y=e[t][1]),e[t][0]>this.m_oEdgePoints.right.x&&(this.m_oEdgePoints.right.x=e[t][0],this.m_oEdgePoints.right.y=e[t][1]),e[t][1]>this.m_oEdgePoints.bottom.y&&(this.m_oEdgePoints.bottom.x=e[t][0],this.m_oEdgePoints.bottom.y=e[t][1]),e[t][0]<this.m_oEdgePoints.left.x&&(this.m_oEdgePoints.left.x=e[t][0],this.m_oEdgePoints.left.y=e[t][1]))},e}(),It=function(e){function t(){var t;return(t=e.call(this)||this).m_szType="Rect",t}ft(t,e);var a=t.prototype;return a.setPointInfo=function(e){if(null!=e){for(var t=e[0][0],a=e[0][1],r=e[0][0],i=e[0][1],n=0,s=e.length;n<s;n++)t>e[n][0]&&(t=e[n][0]),a>e[n][1]&&(a=e[n][1]),r<e[n][0]&&(r=e[n][0]),i<e[n][1]&&(i=e[n][1]);this.m_aPoint=[[t,a],[r,a],[r,i],[t,i]]}},a.draw=function(){ut[pt].fillStyle=this.m_szFillColor,ut[pt].strokeStyle=this.m_szDrawColor;var e=this.m_aPoint[0][0],t=this.m_aPoint[0][1],a=this.m_aPoint[2][0]-e,r=this.m_aPoint[2][1]-t;if(ut[pt].globalAlpha=this.m_iTranslucent,ut[pt].fillRect(e,t,a,r),ut[pt].globalAlpha=1,ut[pt].fillText(this.m_szTips,(e+this.m_aPoint[2][0])/2,(t+this.m_aPoint[2][1])/2),this.m_bChoosed){var i=Math.round(a/2),n=Math.round(r/2);if(0===this.m_iEditType)for(var s=[e,e+i,e+a,e,e+a,e,e+i,e+a],x=[t,t,t,t+n,t+n,t+r,t+r,t+r],o=0;o<8;o++)ut[pt].beginPath(),ut[pt].arc(s[o],x[o],3,0,360,!1),ut[pt].fillStyle=this.m_szDrawColor,ut[pt].closePath(),ut[pt].fill()}ut[pt].strokeRect(e,t,a,r)},a.stretch=function(e,t){0===this.m_iEditType&&(0===this.m_iIndexChoosePoint?e<this.m_aPoint[2][0]&&t<this.m_aPoint[2][1]&&(this.m_aPoint[0][0]=e,this.m_aPoint[0][1]=t,this.m_aPoint[3][0]=e,this.m_aPoint[1][1]=t):1===this.m_iIndexChoosePoint?t<this.m_aPoint[2][1]&&(this.m_aPoint[0][1]=t,this.m_aPoint[1][1]=t):2===this.m_iIndexChoosePoint?e>this.m_aPoint[3][0]&&t<this.m_aPoint[3][1]&&(this.m_aPoint[1][0]=e,this.m_aPoint[1][1]=t,this.m_aPoint[2][0]=e,this.m_aPoint[0][1]=t):3===this.m_iIndexChoosePoint?e<this.m_aPoint[2][0]&&(this.m_aPoint[0][0]=e,this.m_aPoint[3][0]=e):4===this.m_iIndexChoosePoint?e>this.m_aPoint[0][0]&&(this.m_aPoint[1][0]=e,this.m_aPoint[2][0]=e):5===this.m_iIndexChoosePoint?e<this.m_aPoint[1][0]&&t>this.m_aPoint[1][1]&&(this.m_aPoint[3][0]=e,this.m_aPoint[3][1]=t,this.m_aPoint[0][0]=e,this.m_aPoint[2][1]=t):6===this.m_iIndexChoosePoint?t>this.m_aPoint[1][1]&&(this.m_aPoint[2][1]=t,this.m_aPoint[3][1]=t):7===this.m_iIndexChoosePoint&&e>this.m_aPoint[0][0]&&t>this.m_aPoint[0][1]&&(this.m_aPoint[2][0]=e,this.m_aPoint[2][1]=t,this.m_aPoint[1][0]=e,this.m_aPoint[3][1]=t),Ct())},a.move=function(e){Ct(),this.m_bChoosed=!0;var t=e[0][0],a=e[0][1],r=e[1][0],i=e[1][1];this.setPointInfo([[t,a],[r,a],[r,i],[t,i]]),this.draw()},a.inArc=function(e,t,a){for(var r=this.m_aPoint[0][0],i=this.m_aPoint[0][1],n=this.m_aPoint[2][0]-r,s=this.m_aPoint[2][1]-i,x=Math.round(n/2),o=Math.round(s/2),l=[r,r+x,r+n,r,r+n,r,r+x,r+n],_=[i,i,i,i+o,i+o,i+s,i+s,i+s],h=0;h<8;h++){if(Math.sqrt((e-l[h])*(e-l[h])+(t-_[h])*(t-_[h]))<a)return this.m_iIndexChoosePoint=h,!0}return!1},t}(At),Mt=function(e){function t(t,a){var r;return(r=e.call(this)||this).m_szType="RectOSD",r.m_szOSDType="overlay-date",r.m_szText=t||"",r.m_szEnabled=a||"",r.m_szDateStyle="",r.m_szClockType="",r.m_szDisplayWeek="",r.m_szId="",r.m_szAlignment="0",r}ft(t,e);var a=t.prototype;return a.draw=function(){if("true"===this.m_szEnabled){var e=this.m_aPoint[0][0],t=this.m_aPoint[0][1],a=this.m_aPoint[2][0]-e,r=this.m_aPoint[2][1]-t;ut[pt].beginPath(),ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].globalAlpha=1,ut[pt].rect(e,t,a,r),ut[pt].font="15px serif",ut[pt].strokeText(this.m_szText,e,t+15),ut[pt].stroke()}},a.drag=function(e,t){var a=this.m_aPoint.length,r=0;if("0"===this.m_szAlignment){for(r=0;r<a;r++)if(this.m_aPoint[r][1]+t-this.m_iDriftStartY>ut.m_iCanvasHeight||this.m_aPoint[r][0]+e-this.m_iDriftStartX<0||this.m_aPoint[r][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(r=0;r<a;r++)this.m_aPoint[r][0]=this.m_aPoint[r][0]+e-this.m_iDriftStartX,this.m_aPoint[r][1]=this.m_aPoint[r][1]+t-this.m_iDriftStartY}else if("1"===this.m_szAlignment||"2"===this.m_szAlignment){for(r=0;r<a;r++)if(this.m_aPoint[r][1]+t-this.m_iDriftStartY>ut.m_iCanvasHeight||this.m_aPoint[r][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(r=0;r<a;r++)this.m_aPoint[r][1]=this.m_aPoint[r][1]+t-this.m_iDriftStartY}this.m_iDriftStartX=e,this.m_iDriftStartY=t,this.setEdgePoints(this.m_aPoint),Ct()},a.stretch=function(){},t}(At),Lt=function(e){function t(){var t;return(t=e.call(this)||this).m_szType="Grid",t.m_iGridColNum=22,t.m_iGridRowNum=18,t.m_szGridMap="",t.m_aAddGridMap=[],t}ft(t,e);var a=t.prototype;return a.draw=function(){for(var e=ut.m_iCanvasWidth/this.m_iGridColNum,t=ut.m_iCanvasHeight/this.m_iGridRowNum,a="",r=0;r<this.m_iGridRowNum;r++){for(var i=this.m_szGridMap.substring(6*r,6*r+6),n=parseInt("f"+i,16).toString(2).split("").slice(4),s="",x=0;x<this.m_iGridColNum;x++){var o="";"1"===n[x]?(ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].globalAlpha=1,ut[pt].strokeRect(e*x,t*r,e,t),o="1"):o="0",this.m_aAddGridMap.length&&1===this.m_aAddGridMap[r][x]&&(ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].strokeRect(e*x,t*r,e,t),o="1"),s+=o}a+=parseInt("1111"+s+"00",2).toString(16).substring(1)}this.m_szGridMap=a},a.move=function(e,t,a,r){var i=ut.m_iCanvasWidth/this.m_iGridColNum,n=ut.m_iCanvasHeight/this.m_iGridRowNum,s=Math.floor(e/i),x=Math.floor(t/n),o=Math.floor(Math.abs(a-e)/i),l=Math.floor(Math.abs(r-t)/n),_=1,h=1;_=a-e>0?1:-1,h=r-t>0?1:-1;for(var f=[],c=0;c<this.m_iGridRowNum;c++){f[c]=[];for(var u=0;u<this.m_iGridColNum;u++)f[c][u]=1===_?1===h?c>=x&&c<=x+l&&u>=s&&u<=s+o?1:0:c<=x&&c>=x-l&&u>=s&&u<=s+o?1:0:1===h?c>=x&&c<=x+l&&u<=s&&u>=s-o?1:0:c<=x&&c>=x-l&&u<=s&&u>=s-o?1:0}this.m_aAddGridMap=f,this.draw()},t}(At),wt=function(e){function t(){var t;return(t=e.call(this)||this).m_szType="Line",t.m_iLineType=0,t.m_iDirection=0,t.m_iArrowType=0,t.m_aCrossArrowPoint=[],t}ft(t,e);var a=t.prototype;return a.draw=function(){0===this.m_iLineType?this.drawNormalLine():1===this.m_iLineType?this.drawArrowLine():3===this.m_iLineType?this.drawCrossLine():4===this.m_iLineType&&this.drawLineCount()},a.drawNormalLine=function(){if(ut[pt].globalAlpha=1,this.m_aPoint.length>0){ut[pt].beginPath(),ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].lineWidth=2,ut[pt].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(var e=1,t=this.m_aPoint.length;e<t;e++)ut[pt].lineTo(this.m_aPoint[e][0],this.m_aPoint[e][1]);if(ut[pt].stroke(),this.m_bChoosed)for(var a=0,r=this.m_aPoint.length;a<r;a++)ut[pt].beginPath(),ut[pt].fillStyle=this.m_szDrawColor,ut[pt].arc(this.m_aPoint[a][0],this.m_aPoint[a][1],3,0,2*Math.PI,!0),ut[pt].closePath(),ut[pt].fill();""!==this.m_szTips&&(ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].fillText(this.m_szTips,this.m_aPoint[0][0]+10,this.m_aPoint[0][1]+4))}},a.drawArrowLine=function(e,t,a,r,i,n,s,x){n=void 0!==n?n:30,s=void 0!==s?s:10,x=void 0!==x?x:1;var o=180*Math.atan2(a-i,t-r)/Math.PI,l=(o+n)*Math.PI/180,_=(o-n)*Math.PI/180,h=s*Math.cos(l),f=s*Math.sin(l),c=s*Math.cos(_),u=s*Math.sin(_);ut[pt].save(),ut[pt].beginPath();var d=t-h,p=a-f;ut[pt].moveTo(d,p),ut[pt].lineTo(t,a),d=t-c,p=a-u,ut[pt].lineTo(d,p),ut[pt].moveTo(t,a),ut[pt].lineTo(r,i),1===e&&(d=r+h,p=i+f,ut[pt].moveTo(d,p),ut[pt].lineTo(r,i),d=r+c,p=i+u,ut[pt].lineTo(d,p)),ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].lineWidth=x,ut[pt].stroke(),ut[pt].restore()},a.drawCrossLine=function(){this.drawNormalLine();var e=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2,t=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2,a=180*Math.atan2(t-this.m_aPoint[0][1],e-this.m_aPoint[0][0])/Math.PI,r=(a+90)*Math.PI/180,i=(a-90)*Math.PI/180,n=25*Math.cos(r),s=25*Math.sin(r),x=25*Math.cos(i),o=25*Math.sin(i),l=0,_=0;l=e-n,_=t-s;var h=0,f=0;0===this.m_iDirection?(h=-10,f=-15):1===this.m_iDirection?(h=10,f=10):(h=10,f=-15),0!==this.m_iDirection&&this.drawArrowLine(0,l,_,e,t),ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].font="8px",ut[pt].strokeText("A",l+h,_+4),l=e-x,_=t-o,1!==this.m_iDirection&&this.drawArrowLine(0,l,_,e,t),ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].font="8px",ut[pt].strokeText("B",l+f,_+4)},a.drawLineCount=function(){this.drawNormalLine();var e=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2,t=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2,a=180*Math.atan2(t-this.m_aPoint[0][1],e-this.m_aPoint[0][0])/Math.PI,r=(a+90)*Math.PI/180,i=(a-90)*Math.PI/180,n=25*Math.cos(r),s=25*Math.sin(r),x=25*Math.cos(i),o=25*Math.sin(i),l=0,_=0;l=e-n,_=t-s,1===this.m_iArrowType?(l=e-x,_=t-o,this.drawArrowLine(0,l,_,e,t)):0===this.m_iArrowType&&this.drawArrowLine(0,l,_,e,t),this.m_aCrossArrowPoint=[[e,t],[l,_]]},a.inShape=function(e,t){for(var a=!1,r=0,i=this.m_aPoint.length-1;r<i;r++){var n=Math.sqrt((this.m_aPoint[r+1][0]-this.m_aPoint[r][0])*(this.m_aPoint[r+1][0]-this.m_aPoint[r][0])+(this.m_aPoint[r+1][1]-this.m_aPoint[r][1])*(this.m_aPoint[r+1][1]-this.m_aPoint[r][1]));Math.sqrt((e-this.m_aPoint[r][0])*(e-this.m_aPoint[r][0])+(t-this.m_aPoint[r][1])*(t-this.m_aPoint[r][1]))+Math.sqrt((e-this.m_aPoint[r+1][0])*(e-this.m_aPoint[r+1][0])+(t-this.m_aPoint[r+1][1])*(t-this.m_aPoint[r+1][1]))-n<1&&(a=!0)}return a},t}(At),Ot=function(e){function t(){var t;return(t=e.call(this)||this).m_szType="Polygon",t.m_iPolygonType=1,t}ft(t,e);var a=t.prototype;return a.setPointInfo=function(e){if(null!=e){if(0===this.m_iPolygonType){for(var t=e[0][0],a=e[0][1],r=e[0][0],i=e[0][1],n=0,s=e.length;n<s;n++)t>e[n][0]&&(t=e[n][0]),a>e[n][1]&&(a=e[n][1]),r<e[n][0]&&(r=e[n][0]),i<e[n][1]&&(i=e[n][1]);this.m_aPoint=[[t,a],[r,a],[r,i],[t,i]]}else this.m_iPolygonType,this.m_aPoint=e;this.setEdgePoints(e)}},a.draw=function(){if(this.m_aPoint.length>0){ut[pt].fillStyle=this.m_szFillColor,ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].globalAlpha=1;var e=0,t=0;if(this.m_bChoosed)for(e=0,t=this.m_aPoint.length;e<t;e++)ut[pt].beginPath(),ut[pt].arc(this.m_aPoint[e][0],this.m_aPoint[e][1],3,0,360,!1),ut[pt].fillStyle=this.m_szDrawColor,ut[pt].closePath(),ut[pt].fill();for(ut[pt].beginPath(),ut[pt].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]),e=0,t=this.m_aPoint.length;e<t;e++)0!==e&&ut[pt].lineTo(this.m_aPoint[e][0],this.m_aPoint[e][1]);ut[pt].stroke(),this.m_bClosed&&(ut[pt].fillText(this.m_szTips,(this.m_oEdgePoints.left.x+this.m_oEdgePoints.right.x)/2,(this.m_oEdgePoints.top.y+this.m_oEdgePoints.bottom.y)/2),ut[pt].closePath(),ut[pt].stroke(),ut[pt].globalAlpha=this.m_iTranslucent,ut[pt].fill())}},a.move=function(e,t,a,r){if(1===this.m_iPolygonType){if(this.m_aPoint.length<this.m_iMaxPointNum&&this.m_aPoint.length>0){ut[pt].fillStyle=this.m_szFillColor,ut[pt].strokeStyle=this.m_szDrawColor,ut[pt].globalAlpha=1;var i=0,n=0;for(i=0,n=this.m_aPoint.length;i<n;i++)ut[pt].beginPath(),ut[pt].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,360,!1),ut[pt].fillStyle=this.m_szDrawColor,ut[pt].closePath(),ut[pt].fill();for(ut[pt].beginPath(),ut[pt].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]),i=0,n=this.m_aPoint.length;i<n;i++)0!==i&&ut[pt].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1]);ut[pt].lineTo(e,t),ut[pt].closePath(),ut[pt].stroke()}}else if(0===this.m_iPolygonType){this.m_bChoosed=!0;var s=a,x=r,o=e,l=t;this.setPointInfo([[s,x],[o,x],[o,l],[s,l]]),this.draw()}},a.stretch=function(e,t){0===this.m_iEditType&&(1===this.m_iPolygonType?-1!==this.m_iIndexChoosePoint&&(this.m_aPoint[this.m_iIndexChoosePoint][0]=e,this.m_aPoint[this.m_iIndexChoosePoint][1]=t):0===this.m_iIndexChoosePoint?e<this.m_aPoint[2][0]&&t<this.m_aPoint[2][1]&&(this.m_aPoint[0][0]=e,this.m_aPoint[0][1]=t,this.m_aPoint[3][0]=e,this.m_aPoint[1][1]=t):1===this.m_iIndexChoosePoint?e>this.m_aPoint[3][0]&&t<this.m_aPoint[3][1]&&(this.m_aPoint[1][0]=e,this.m_aPoint[1][1]=t,this.m_aPoint[2][0]=e,this.m_aPoint[0][1]=t):2===this.m_iIndexChoosePoint?e>this.m_aPoint[0][0]&&t>this.m_aPoint[0][1]&&(this.m_aPoint[2][0]=e,this.m_aPoint[2][1]=t,this.m_aPoint[1][0]=e,this.m_aPoint[3][1]=t):3===this.m_iIndexChoosePoint&&e<this.m_aPoint[1][0]&&t>this.m_aPoint[1][1]&&(this.m_aPoint[3][0]=e,this.m_aPoint[3][1]=t,this.m_aPoint[0][0]=e,this.m_aPoint[2][1]=t),this.setPointInfo(this.m_aPoint),Ct())},t}(At),Bt=function(e){function t(){var t;return(t=e.call(this)||this).m_szType="Point",t.m_szId="",t}ft(t,e);var a=t.prototype;return a.draw=function(){ut[pt].beginPath(),ut[pt].fillStyle=this.m_szDrawColor,ut[pt].globalAlpha=1,ut[pt].arc(this.m_aPoint[0][0],this.m_aPoint[0][1],10,0,2*Math.PI,!0),ut[pt].closePath(),ut[pt].fill()},a.drag=function(){},a.stretch=function(){},t}(At),kt=function(){function e(e){ut=this,this[dt]=document.createElement("canvas"),this[dt].width=e.clientWidth,this[dt].height=e.clientHeight,e.appendChild(this[dt]),this[dt].style.cssText="position: absolute; width: 100%; height: 100%; left: 0; top: 0;z-index: 1; border: 0; outline: none;",this[dt].classList.add("ezplayer-3d_draw"),this[pt]=this[dt].getContext("2d"),this[mt]=[],this[St]=!1,this[Rt]="Rect",this[Pt]=10,this[gt]=!0,this[Et]={},this[Ft]=null,this[yt]={szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:.7},this[bt]=!1,this.m_iCanvasWidth=this[dt].clientWidth,this.m_iCanvasHeight=this[dt].clientHeight,this.m_iHorizontalResolution=0,this.m_iVerticalResolution=0,this.m_szDisplayMode="",this.m_szVideoFormat="",Tt(),this[mt].length=0}var t=e.prototype;return t.setDrawMutiShapeOneTime=function(e){this[gt]=e},t.setMaxShapeSupport=function(e){this[Pt]=e},t.getMaxShapeSupport=function(){return this[Pt]},t.setDrawStatus=function(e,t){this[St]=e,t&&e&&(this[Ft]=t),e||(this[Ft]=null,Dt())},t.setShapeType=function(e){this[Rt]=e,Ct()},t.setCurrentShapeInfo=function(e){this[Et]=e||{szId:"",szTips:"",iMinClosed:3,iMaxPointNum:11,iPolygonType:1,iRedrawMode:0}},t.getShapeType=function(){return this[Rt]},t.getAllShapesInfo=function(){for(var e=[],t=0,a=this[mt].length;t<a;t++)"Grid"===this[mt][t].m_szType?e.push({szType:this[mt][t].m_szType,szGridMap:this[mt][t].m_szGridMap,iGridColNum:this[mt][t].m_iGridColNum,iGridRowNum:this[mt][t].m_iGridRowNum}):"RectOSD"===this[mt][t].m_szType?e.push({szType:this[mt][t].m_szType,szText:this[mt][t].m_szText,szEnabled:this[mt][t].m_szEnabled,szOSDType:this[mt][t].m_szOSDType,iPositionX:this[mt][t].m_aPoint[0][0],iPositionY:this[mt][t].m_aPoint[0][1],szDateStyle:this[mt][t].m_szDateStyle,szClockType:this[mt][t].m_szClockType,szDisplayWeek:this[mt][t].m_szDisplayWeek,szId:this[mt][t].m_szId,szAlignment:this[mt][t].m_szAlignment}):e.push({szType:this[mt][t].m_szType,aPoint:this[mt][t].m_aPoint,szId:this[mt][t].m_szId,bChoosed:this[mt][t].m_bChoosed});return e},t.deleteRepeatPolyonById=function(e){var t=this.getAllShapesInfo(),a=t.length;if(a>0)for(var r=0;r<a;r++)"Polygon"===t[r].szType&&t[r].szId===e&&this.deleteShape(r)},t.getShapesInfoByType=function(e){for(var t=[],a=0,r=this[mt].length;a<r;a++)this[mt][a].m_szType===e&&("Grid"===this[mt][a].m_szType?t.push({szType:this[mt][a].m_szType,szGridMap:this[mt][a].m_szGridMap,iGridColNum:this[mt][a].m_iGridColNum,iGridRowNum:this[mt][a].m_iGridRowNum}):"RectOSD"===this[mt][a].m_szType?t.push({szType:this[mt][a].m_szType,szText:this[mt][a].m_szText,szEnabled:this[mt][a].m_szEnabled,szOSDType:this[mt][a].m_szOSDType,iPositionX:this[mt][a].m_aPoint[0][0],iPositionY:this[mt][a].m_aPoint[0][1],szDateStyle:this[mt][a].m_szDateStyle,szClockType:this[mt][a].m_szClockType,szDisplayWeek:this[mt][a].m_szDisplayWeek,szId:this[mt][a].m_szId,szAlignment:this[mt][a].m_szAlignment}):"Polygon"===e?t.push({szType:this[mt][a].m_szType,szId:this[mt][a].m_szId,iPolygonType:this[mt][a].m_iPolygonType,iMinClosed:this[mt][a].m_iMinClosed,iMaxPointNum:this[mt][a].m_iMaxPointNum,iEditType:this[mt][a].m_iEditType,aPoint:this[mt][a].m_aPoint,bClosed:this[mt][a].m_bClosed,szTips:this[mt][a].m_szTips,szDrawColor:this[mt][a].m_szDrawColor,szFillColor:this[mt][a].m_szFillColor,iTranslucent:this[mt][a].m_iTranslucent}):"Line"===e?t.push({szType:this[mt][a].m_szType,szId:this[mt][a].m_szId,aPoint:this[mt][a].m_aPoint,szTips:this[mt][a].m_szTips,iLineType:this[mt][a].m_iLineType,iDirection:this[mt][a].m_iDirection,iArrowType:this[mt][a].m_iArrowType,szDrawColor:this[mt][a].m_szDrawColor,aCrossArrowPoint:this[mt][a].m_aCrossArrowPoint}):"Rect"===e?t.push({szType:this[mt][a].m_szType,iEditType:this[mt][a].m_iEditType,aPoint:this[mt][a].m_aPoint,szTips:this[mt][a].m_szTips,szDrawColor:this[mt][a].m_szDrawColor,szFillColor:this[mt][a].m_szFillColor,iTranslucent:this[mt][a].m_iTranslucent}):t.push({szType:this[mt][a].m_szType,aPoint:this[mt][a].m_aPoint}));return t},t.setShapesInfoByType=function(e,t){t||(t=[]);var a=null;if("Rect"===e||"Polygon"===e||"Line"===e||"Point"===e)for(var r=0,i=t.length;r<i;r++)"Rect"===e?((a=new It).m_iEditType=t[r].iEditType,a.m_szTips=t[r].szTips||"",a.m_szDrawColor=t[r].szDrawColor,a.m_szFillColor=t[r].szFillColor,a.m_iTranslucent=t[r].iTranslucent,a.m_iRedrawMode=t[r].iRedrawMode):"Polygon"===e?(a=new Ot,0===t[r].iPolygonType?a.m_bClosed=!0:a.m_bClosed=t[r].bClosed,a.m_szTips=t[r].szTips||"",a.m_szId=t[r].szId||"",a.m_iPolygonType=t[r].iPolygonType,a.m_iMinClosed=t[r].iMinClosed||3,a.m_iMaxPointNum=t[r].iMaxPointNum||11,a.m_iEditType=t[r].iEditType,a.m_szDrawColor=t[r].szDrawColor,a.m_szFillColor=t[r].szFillColor,a.m_iTranslucent=t[r].iTranslucent,a.m_iRedrawMode=t[r].iRedrawMode):"Line"===e?((a=new wt).m_iLineType=t[r].iLineType,a.m_szTips=t[r].szTips||"",a.m_szId=t[r].szId,a.m_iDirection=t[r].iDirection,a.m_iArrowType=t[r].iArrowType,a.m_szDrawColor=t[r].szDrawColor,a.setPointInfo(t[r].aPoint)):"Point"===e&&((a=new Bt).m_szId=t[r].szId,a.m_szDrawColor=t[r].szDrawColor,a.setPointInfo(t[r].aPoint)),a.setPointInfo(t[r].aPoint),0===r&&(a.m_bChoosed=!0),vt(a);else"Grid"===e&&((a=new Lt).m_szGridMap=t[0].szGridMap||"",a.m_iGridColNum=t[0].iGridColNum||22,a.m_iGridRowNum=t[0].iGridRowNum||18,vt(a));Ct()},t.addOSDShape=function(e,t,a,r,i){a||r||(a=0,r=0),i||(i={});var n=new Mt(e,t),s=10*e.replace(/[^x00-xff]/g,"rr").length;n.m_szOSDType=i.szOSDType||"",n.m_szDateStyle=i.szDateStyle||"",n.m_szClockType=i.szClockType||"",n.m_szDisplayWeek=i.szDisplayWeek||"",n.m_szId=i.szId||"",n.m_szAlignment=""+i.szAlignment||"0","0"===n.m_szAlignment?n.m_aPoint=[[a,r],[s+a,r],[s+a,r+20],[a,r+20]]:"1"===n.m_szAlignment?n.m_aPoint=[[0,r],[s,r],[s,r+20],[0,r+20]]:"2"===n.m_szAlignment?n.m_aPoint=[[this.m_iCanvasWidth-s,r],[this.m_iCanvasWidth,r],[this.m_iCanvasWidth,r+20],[this.m_iCanvasWidth-s,r+20]]:n.m_aPoint=[[a,r],[s+a,r],[s+a,r+20],[a,r+20]],vt(n),Ct()},t.selectShapeById=function(e,t){for(var a=0,r=ut[mt].length;a<r;a++)e===ut[mt][a].m_szType&&(t===ut[mt][a].m_szId?ut[mt][a].m_bChoosed=!0:ut[mt][a].m_bChoosed=!1);Ct()},t.setCanvasSize=function(e,t){e>0&&t>0&&(this.m_iCanvasWidth=e,this.m_iCanvasHeight=t,Ct())},t.setDrawStyle=function(e,t,a){this[yt]={szDrawColor:e,szFillColor:t,iTranslucent:a}},t.clearAllShape=function(){this[mt].length=0,ut[bt]=!1,Ct()},t.clearShapeByType=function(e){for(var t=this[mt].length;t>0;t--)this[mt][t-1].m_szType===e&&("Grid"===e?(this[mt][t-1].m_szGridMap="",this[mt][t-1].m_aAddGridMap=[]):this[mt].splice(t-1,1));"Polygon"===e&&(ut[bt]=!1),Ct()},t.deleteShape=function(e){this[mt].length>e&&this[mt].splice(e,1),Ct()},t.updateCanvas=function(e){this[dt]=document.getElementById(e),this[pt]=this[dt].getContext("2d"),this.m_iCanvasWidth=this[dt].clientWidth,this.m_iCanvasHeight=this[dt].clientHeight,Tt()},t.resizeCanvas=function(){this.m_iCanvasWidth=this[dt].clientWidth,this.m_iCanvasHeight=this[dt].clientHeight},t.canvasRedraw=function(){Ct()},t.resize=function(e,t){this[dt].width=e,this[dt].height=t,this.resizeCanvas(e,t)},t.destroy=function(){this[dt]&&this[dt].remove(),this[dt]=null,this[pt]=null,this[mt]=[],this[yt]={},this[bt]=!1,this.m_iCanvasWidth=0,this.m_iCanvasHeight=0},e}();function Nt(e){return e.esCanvas&&(e.esCanvas.setDrawStatus(!1),e.esCanvas.destroy(),e.esCanvas=null,e.__fCallback=null,e.__b3DZoom=!1),0}function Vt(e){return null==e||""===e}function Ut(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var Ht="object"===("undefined"==typeof window?"undefined":Ut(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":Ut(self))&&self.self===self?self:"object"===("undefined"==typeof global?"undefined":Ut(global))&&global.global===global?global:void 0;function Wt(e,t,a){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Jt(r.response,t,a)},r.onerror=function(){},r.send()}function Yt(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Gt(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(a){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Xt=Ht.navigator&&navigator.userAgent.includes("Macintosh")&&navigator.userAgent.includes("AppleWebKit")&&!navigator.userAgent.includes("Safari"),Jt="object"!==("undefined"==typeof window?"undefined":Ut(window))||window!==Ht?function(){}:"download"in HTMLAnchorElement.prototype&&!Xt?function(e,t,a){var r=Ht.URL||Ht.webkitURL,i=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",i.download=t,i.rel="noopener","string"==typeof e?(i.href=e,i.origin!==location.origin?Yt(i.href)?Wt(e,t,a):Gt(i,i.target="_blank"):Gt(i)):(i.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(i.href)}),4e4),setTimeout((function(){Gt(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,a){if(t=t||e.name||"download","string"==typeof e)if(Yt(e))Wt(e,t,a);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout((function(){Gt(r)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==(void 0===t?"undefined":Ut(t))&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,a),t)}:function(e,t,a,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return Wt(e,t,a);var i="application/octet-stream"===e.type,n=/constructor/i.test(Ht.HTMLElement)||Ht.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||i&&n||Xt)&&"undefined"!=typeof FileReader){var x=new FileReader;x.onloadend=function(){var e=x.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},x.readAsDataURL(e)}else{var o=Ht.URL||Ht.webkitURL,l=o.createObjectURL(e);r?r.location=l:location.href=l,r=null,setTimeout((function(){o.revokeObjectURL(l)}),4e4)}};function Zt(e,t,a,r,i,n,s){return void 0===a&&(a="jpeg"),void 0===n&&(n=!0),void 0===s&&(s=!1),a="jpeg",t=(Vt(t)?(new Date).getTime():t)+"."+a,new Promise((function(r,x){var o=function(a){if(a){var s=function(e){for(var t=new Uint8Array(e),a="",r=0;r<t.length;r++)a+=String.fromCharCode(t[r]);return"data:image/jpeg;base64,"+window.btoa(a)}(a);i&&zt(s,t);var x=e.getOSDTime();n&&e.emit(A.API.snapshot,F({fileName:t,base64:s,currentOSD:x})),r(g({fileName:t,base64:s,currentOSD:x}))}};s?jt(e,t,a,i,n).then((function(e){0===(null==e?void 0:e.code)&&r(e)})):1!=+e.wasmplayer.JSPlayM4_GetJPEG((function(e){o(e)}),!1)&&jt(e,t,a,i,n).then((function(e){0===(null==e?void 0:e.code)?r(e):x(e)}))}))}function jt(e,t,a,r,i){void 0===i&&(i=!1);var n=e.wasmplayer;return new Promise((function(s,x){1!==n.JSPlayM4_GetCanvasCapture((function(n,x,o){if(n&&x&&o){a=a||"jpeg",t=(Vt(t)?(new Date).getTime():t)+"."+a;var l=new ImageData(x,o);l.data.set(n);var _="image/"+a,h=document.createElement("canvas"),f=h.getContext("2d");h.width=x,h.height=o,null==f||f.putImageData(l,0,0);var c=h.toDataURL(_,.7);r&&zt(c,t);var u=e.getOSDTime();i&&e.emit(A.API.snapshot,F({fileName:t,base64:c,currentOSD:u})),s(g({fileName:t,base64:c,currentOSD:u}))}}))&&s(g(null,-1,"截图失败"))}))}function zt(e,t){Jt(function(e){void 0===e&&(e="");for(var t=e.split(","),a=atob(t[1]),r=t[0].replace("data:","").replace(";base64",""),i=a.length,n=new Uint8Array(i);i--;)n[i]=a.charCodeAt(i);return new File([n],"file",{type:r})}(e),t)}var Kt={.5:3,1:1,2:2,4:4,8:6,16:8};Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var a in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+a+")").test(e)&&(e=e.replace(RegExp.$1,1===RegExp.$1.length?t[a]:("00"+t[a]).substr((""+t[a]).length)));return e};var qt=function(e,t){var a=new RegExp("(\\?|#|&)"+e+"=(.*?)(#|&|$)"),r=(t||window.location.href).match(a);return decodeURIComponent(r?r[2]:"")},Qt=function(e,t){var a=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),r=t.match(a);return null!=r?unescape(r[2]):null};function $t(){return $t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},$t.apply(this,arguments)}function ea(e,t,a){var r=e.reduce((function(e,t,a){return 0===a?(null==t||delete t.coverPic,e.push($t({},t)),e):(e[e.length-1].downloadPath===t.downloadPath?e[e.length-1].endTime=t.endTime:(null==t||delete t.coverPic,e.push($t({},t))),e)}),[]);return r.length>0&&(r[0].startTime=t.valueOf(),r[r.length-1].endTime=a.valueOf()),r}function ta(e){var t=e.wasmplayer;t&&t.JSPlayM4_CloseStream(),e.playing=!1}function aa(){return aa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},aa.apply(this,arguments)}function ra(e,t,a,r){var i,n,s,x,o,l=(x=(s=t).split("?")[0].replace("/live","").replace("/playback",""),(o=(s.includes("/live")?"/live?":s.includes("cloudplayback")?"/cloudplayback?":"/playback?")+s.split("?")[1]).includes("/playback")&&(o=o.replace("stream=2","stream=1")),{websocketConnectUrl:x,websocketStreamingParam:o});if(l.websocketConnectUrl){var _,h=null!=(_=null==(n=e._options)||null==(i=n.env)?void 0:i.wsUrl)?_:l.websocketConnectUrl;sa(e,h,{playURL:l.websocketStreamingParam}).then((function(){return a(0)}),(function(t){e.logger.error("play error: ",t),e.emit(C,F(t)),r(1)}))}}function ia(e){var t=e._options.url;return e.service.getRealPlayUrl({ezopen:e._options.url}).then((function(a){var r=a.realUrl,i=Qt("checkCode",r);return i&&(e._validateCode=i),r.includes("playback")?function(e,t,a){var r,i=_(Qt("begin",t)||Qt("begin",a)||_().format("YYYY-MM-DD 00:00:00")),n=_(Qt("end",t)||Qt("end",a)||_().format("YYYY-MM-DD 23:59:59")),s=Qt("end",t)||Qt("end",a),x=+qt("timeZone",a);x<24&&x>-24?x=Math.round(x):(x=0,e.logger.warn("timeZone时区参数错误,取值范围为-23~23"));var o=_(i).add(x,"hour"),l=s?_(n).add(x,"hour"):_(_(o).format("YYYYMMDD 23:59:59"));o>=l&&(l=_(_(o).format("YYYYMMDD 23:59:59")),e.logger.warn("End time greater than or equal to start time"));var h,f="YYYYMMDDTHHmmss";t=t.replace("&begin="+qt("begin",t),""),t=t+"&begin="+o.format(f)+"Z",function(e,t){var a=_(e).startOf("day"),r=_(t).startOf("day");return!a.isSame(r)}(o,l)&&"cloud"===e.urlInfo.recType&&(l=_(_(o).format("YYYYMMDD 23:59:59")),e.logger.warn("The start and end times have crossed days"));t=t.replace("&end="+qt("end",t),""),t=t+"&end="+l.format(f)+"Z",qt("stream",t)||(t=t.replace("stream","&stream"));return"cloud"===e.urlInfo.recType&&"7"===(null==(r=e.urlInfo.searchParams)?void 0:r.busType)?function(e,t){return new Promise((function(a,r){e.service.getRecordCloudVideoByTime(t).then((function(t){e.emit(A.NETWORK.videoFragmentFiles,F(t.data||[],"云录制录像信息查询","RecordCloud")),a(t)})).catch((function(t){e.emit(A.NETWORK.error.error,F(t)),e.emit(A.NETWORK.error.videoFragmentFiles,F(t)),r(t)}))}))}(e,{channelNo:e.urlInfo.channelNo,startTime:_(_(o).format("YYYY-MM-DD 00:00:00")).valueOf(),endTime:_(_(l).format("YYYY-MM-DD 23:59:59")).valueOf(),spaceId:null==(h=e.urlInfo.searchParams)?void 0:h.spaceId}).then((function(e){var a=l;e.data.length>0&&_(e.data[e.data.length-1].endTime)<_(l)&&(a=_(e.data[e.data.length-1].endTime));var r=JSON.stringify(ea(e.data,o,a)).replace("\\","");return t+="&recSlice="+r.replace("\\","")+"&r="+Math.random()})):"cloud"===e.urlInfo.recType?et(e,{recType:1,channelNo:e.urlInfo.channelNo,startTime:_(_(o).format("YYYY-MM-DD 00:00:00")).valueOf(),endTime:_(_(l).format("YYYY-MM-DD 23:59:59")).valueOf()}).then((function(e){var a=l;e.data.length>0&&_(e.data[e.data.length-1].endTime)<_(l)&&(a=_(e.data[e.data.length-1].endTime));var r=JSON.stringify(ea(e.data,o,a)).replace("\\","");return t+="&recSlice="+r.replace("\\","")+"&r="+Math.random()})):(et(e,{recType:2,channelNo:e.urlInfo.channelNo,startTime:_(_(o).format("YYYY-MM-DD 00:00:00")).valueOf(),endTime:_(_(l).format("YYYY-MM-DD 23:59:59")).valueOf()}),Promise.resolve(t))}(e,r,t):Promise.resolve(r)}))}var na="";function sa(e,t,a,r){var i,n;return null==(n=e._playerWindow)||null==(i=n.reRenderCanvas)||i.call(n,!0),e.playing=!1,e._wss_info={wssUrl:t,oParams:a},new Promise((function(t,a){var r;(na="",e._oStreamClient.stopAll(),null===e._g_port)&&((null==(r=e._options)?void 0:r.debugDownloadData)&&e.wasmplayer.JSPlayM4_DownloadData(),e._g_port=e.wasmplayer.JSPlayM4_GetPort(),e.logger.log("1.获取播放库端口号 g_port:"+e._g_port));/^ws[s]?:\/\//.test(e._wss_info.wssUrl)?(e.emit(T,F({type:D.openStreamCallback,data:null})),xa(e).then(t,a)):(e.logger.error("wssUrl:",e._wss_info.wssUrl),a("Socket stream address invalid!"))}))}function xa(e,t){var a=!0,r=!0,i=0;return new Promise((function(n,s){oa(e),e._oStreamClient.openStream(e._wss_info.wssUrl,e._wss_info.oParams,(function(s){if(s.errorCode&&"1"!=s.errorCode&&e.emit(A.SOCKET.autoClose),null==s?void 0:s.bHead){var x;if(e.emit(T,F({type:D.getStreamHeaderCallback})),"resume"!==t&&function(e,t){var a=e.wasmplayer,r=a.JSPlayM4_OpenStream(t,40,4194304);e.emit("PlayM4_openStream",F(t)),e.setStreamInfoCallBackType(e._options.streamInfoCBType),void 0!==e._options.decodeEngine&&e.wasmplayer.JSPlayM4_SetDecodeEngine(e._options.decodeEngine);a.JSPlayM4_SetFirstFrameCallBack(1,(function(t){var a=t.decodeEngine;e.emit(T,F({type:D.firstFrameCallback,decodeEngine:a}))})),a.JSPlayM4_SetRunTimeInfoCallbackType(1,1024,1),a.JSPlayM4_SetRunTimeInfoCallbackType(2,352321537,1),a.JSPlayM4_SetRunTimeInfoCallbackType(4,262144,1);var i=0;e&&e.on("seek",(function(e){i=e.data.startTime.replace(/[TZ]/gi,"")}));a.JSPlayM4_SetRunTimeInfoCallBackEx(2,(function(t){var a,r,c,u,d=Date.now();1024===t.nErrorCode&&t.nFrameNum>0&&(t.nFrameNumInterval&&(o+=t.nFrameNumInterval),d-f>=3e3&&(e.emit(T,F({type:D.stutterDetectedCallback,data:{type:1,frameNumInterval:t.nFrameNum-l,frameLossNum:o}})),l=t.nFrameNum,f=d,o=0),e.emit(T,F({type:D.stutterDetectedCallback,data:{type:1,pstRuntimeInfo:t,errorTime:_(i||(null==e||null==(r=e.urlInfo)||null==(a=r.searchParams)?void 0:a.begin)||_().format("YYYYMMDD000000"))}})));(352321537===t.nErrorCode&&(n>0&&t.nAverageDecodeTime&&(x+=Math.floor(t.nAverageDecodeTime),s++),d-h>=1e3&&(n>0?(e.emit(T,F({type:D.stutterDetectedCallback,data:{type:2,runtimeInfo:t,averageDecodeTime:x,account:s}})),x=0,s=0):n++,h=d)),262144===t.nErrorCode)&&e.emit(T,F({type:D.stutterDetectedCallback,data:{type:4,pstRuntimeInfo:t,errorTime:_(i||(null==e||null==(u=e.urlInfo)||null==(c=u.searchParams)?void 0:c.begin)||_().format("YYYYMMDD000000"))}}));if(e){var p,m,S=e.getOSDTime();i=i||(Number.isNaN(S)?0:1e3*S),e.emit(T,F({type:D.setRunTimeInfoCallBack,data:{pstRuntimeInfo:t,errorTime:_(i||(null==e||null==(m=e.urlInfo)||null==(p=m.searchParams)?void 0:p.begin)||_().format("YYYYMMDD000000"))}})),i=0}}));var n=-3,s=0,x=0,o=0,l=0,h=0,f=0,c=48;function u(e){var t={};if(e)for(var a=c,r=0;r<1500&&!(a+28>e.additionDataBuffer.length);r++){var i={id:-1,x:0,y:0,type:0,viewAngleH:0,viewAngleV:0,r:0,r_max:0,north:0,res0:0,res1:0,res2:0};i.id=parseInt(e.additionDataBuffer[a])>244?parseInt(e.additionDataBuffer[a])+256:parseInt(e.additionDataBuffer[a]),i.x=e.additionDataBuffer[a+2],i.y=e.additionDataBuffer[a+4],i.type=e.additionDataBuffer[a+6],i.viewAngleH=e.additionDataBuffer[a+8],i.viewAngleV=e.additionDataBuffer[a+10],i.r=e.additionDataBuffer[a+12],i.r_max=e.additionDataBuffer[a+14],i.res0=e.additionDataBuffer[a+7],a+=28,t[i.id]=i}return t}a.JSPlayM4_SetAdditionDataCallBack(2052,1,(function(t){e&&e.emit(T,F({type:D.setAdditionDataCallBack,data:{additionInfo:aa({},t,{additionDataBufferView:new Int32Array(t.additionDataBuffer)}),labelMap:u(t)}}))})),e.logger.log("3.打开流 resO:"+r)}(e,s.buf),e._aHead=new Uint8Array(s.buf),(null==e||null==(x=e.urlInfo)?void 0:x.validateCode)||e._secretKey){var o,l,h,f=(null==e||null==(o=e.urlInfo)?void 0:o.validateCode)||e._secretKey;if(1==+(null==(l=e.wasmplayer)?void 0:l.JSPlayM4_SetSecretKey(f)))null==(h=e.logger)||h.log("set secretKey success, ",f);else e.logger.error("set secretKey fail, ",f)}if("resume"!==t){try{var c,u=function(e){var t=parseInt(e.slice(13,15));return t+3<60&&(t+=3),{year:parseInt(e.slice(0,4)),month:parseInt(e.slice(4,6)),day:parseInt(e.slice(6,8)),hour:parseInt(e.slice(9,11)),min:parseInt(e.slice(11,13)),second:t}}(qt("begin",null==(c=e._wss_info.oParams)?void 0:c.playURL));if(!isNaN(u.year)){e.logger.log("SetGlobalBaseTime",JSON.stringify(u));var d=e.wasmplayer.JSPlayM4_SetGlobalBaseTime(u.year,u.month,u.day,u.hour,u.min,u.second,0);e.logger.log("设置OSD时间res:",d)}}catch(t){e.logger.error("JSPlayM4_SetGlobalBaseTime:",t)}if(e.playing=!0,1!=+e.wasmplayer.JSPlayM4_SetFrameInfoCallBack(1)){var p=e.wasmplayer.JSPlayM4_GetLastError();e.logger.error("resFrameInfoError:",p)}a=!0,r=!0,e.emit("JSPlayM4_Play_Before",F(void 0));var m,S=e.wasmplayer.JSPlayM4_Play(e._playerWindow.canvasId);if(e._options.disableRenderPrivateData)e.wasmplayer.JSPlayM4_RenderPrivateData(1,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(2,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(4,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(8,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(16,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(32,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(64,!1),e.wasmplayer.JSPlayM4_RenderPrivateData(128,!1),null==(m=e.logger)||m.log("disable render private data");else e.wasmplayer.JSPlayM4_RenderPrivateData(4,1),e.wasmplayer.JSPlayM4_RenderPrivateData(8,1),e.wasmplayer.JSPlayM4_RenderPrivateData(32,1),e.wasmplayer.JSPlayM4_RenderPrivateData(64,1),e.wasmplayer.JSPlayM4_RenderPrivateData(128,1);e.emit("JSPlayM4_Play_After",F(void 0)),e.logger.log("4.开始播放 resP:"+S,e._playerWindow.canvasId),n(S)}}else{if(r&&s.buf&&(r=!1,e.emit(T,F({type:D.getVideoStreamCallback}))),a&&s.buf){var R=e.getFrameInfo();(null==R?void 0:R.width)&&(e.emit(T,F({type:D.appearFirstFrameCallback})),e.emit(T,F({type:D.averageStreamSuccessCallback})),a=!1)}var P=new Uint8Array(s.buf);s.statusString?e.emit(T,F({type:D.pluginErrorHandler,iWndIndex:0,code:1001,data:s})):s.type&&"exception"===s.type&&e.emit(T,F({type:D.pluginErrorHandler,iWndIndex:0,code:1002,data:s})),i+=P.length,e.wasmplayer.JSPlayM4_InputData(P,P.length),P=null}"resume"!==t&&(e.playing=!0),e.emit("recordInputData",F(s.buf))}),(function(t){na===t&&e&&(e.emit(T,F({type:D.pluginErrorHandler,iWndIndex:0,code:1003})),e.emit(A.SOCKET.close)),e.playing=!1,oa(e),s()}),(function(t,a){e&&(null==e||e.emit(T,F({type:D.pluginErrorHandler,iWndIndex:0,code:1004,msg:a})),null==e||e.emit(A.SOCKET.error))})).then((function(a){na=a,e._oStreamClient.startPlay().then((function(){var a;if("resume"===t){var r,i,x=null==(i=e.wasmplayer)||null==(r=i.JSPlayM4_Pause)?void 0:r.call(i,0);x?(e.playing=!0,e._tempPauseDate=null,n(x)):(e.logger.error("startPlay pause error"),s())}else{var o,l,_=null==(l=e.wasmplayer)||null==(o=l.JSPlayM4_SetStreamOpenMode)?void 0:o.call(l,1);e.logger.log("2.设置流模式 resSSOM:"+_)}e.emit(A.API.play),(null==e||null==(a=e._options)?void 0:a.url.includes(".rec"))&&(null==e?void 0:e._playbackRate)>0&&setTimeout((function(){e.setPlaybackRate(e._playbackRate||1)}),1e3)})).catch((function(t){e.playing=!1,e.logger.error("startPlay error:",t),oa(e),s(t.oError)})),e._detectTimer=setInterval((function(){e.emit(T,F({type:D.stutterDetectedCallback,data:{type:5,codeRate:(8*i/1e3).toFixed(2)}})),i=0}),1e3)}),(function(t){oa(e),e.playing=!1,e.logger.error("openStream error:",t),ta(e),s(t)}))}))}function oa(e){e._detectTimer&&(clearInterval(e._detectTimer),e._detectTimer=null)}function la(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _a(e){return(e=+e)<10&&(e="0"+e),e+""}var ha={startPos:{fX:.1,fY:.1},fontColor:{fR:0,fG:0,fB:0,fA:1},fontSize:{nFontWidth:20,nFontHeight:20},fontRotate:{fRotateAngle:0,fFillFullScreen:!1},fontFamily:"Arial",fontNumber:{nRowNumber:5,nColNumber:5},space:1,fontAlign:0,pstCanvasAdapt:{nCanvasAdaptMode:2,nRowSpace:0,nColSpace:0,nBaseCanvasWidth:0,nBaseCanvasHeight:0}};function fa(){return fa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},fa.apply(this,arguments)}function ca(e,t,a){return t&&function(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function ua(){return ua=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},ua.apply(this,arguments)}function da(e,t){return da=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},da(e,t)}var pa=function(t){function a(e){var a;return(a=t.call(this)||this).event=null,a.initializing=!0,a.loading=!1,a.playbackRate=1,a.playing=!1,a.volume=0,a.destroyed=!1,a.deviceCapacity={},a.deviceInfo={},a.error=null,a._aHead=null,a._detectTimer=null,a._g_port=null,a._secretKey="",a._tempPauseDate=null,a._tempPauseTime="",a._playbackRate=1,a.__videoInfo={},a.__audioInfo={},a._waterMarkParams=null,a._decoderStatus={},a._wss_info={wssUrl:"",oParams:{playURL:""}},a._setOptions(e),a.event={on:a.on.bind(a),emit:a.emit.bind(a),off:a.off.bind(a),once:a.once.bind(a),removeAllListeners:a.removeAllListeners.bind(a)},a._playerWindow=new nt({container:a.$container,id:a._options.id,dpr:a._options.dpr,player:a}),a._playerInit(),a._addEventListener(),a}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&da(e,t)}(a,t);var r=a.prototype;return r._playerInit=function(){var e,t=this;return(e=this,e.logger.log("player engine start init"),ht(e).then((function(t){return e.logger.log("player engine init success"),t}))).then((function(e){return t._wasmDecoderInfo=e,"loaded"===e.cmd&&t._options.autoPlay&&t.play(),e}))},r.play=function(e){var t=this;return this.loading=!0,this._destroyed(),e&&this._setOptions(null!=e?e:{}),new Promise((function(e,a){var r;(r=t,r._playerWindow.hide(),r.__videoInfo={},r.__audioInfo={},new Promise((function(e,t){r._options.accessToken&&p(r._options.url)?r._oStreamClient._streamUUID?r.stop().then((function(){ia(r).then((function(a){ra(r,a,e,t)})).catch((function(e){r.logger.error("play error: ",e),r.emit(C,F(e)),t(e)}))})).catch((function(e){t(e)})):ia(r).then((function(a){ra(r,a,e,t)})).catch((function(e){r.logger.error("play error: ",e),r.emit(C,F(e)),t(e)})):t(1)}))).then((function(){t._options.audio&&setTimeout((function(){t.setVolume(.8)}),100),t.loading=!1,e(0)})).catch((function(){t.loading=!1,a(1)}))}))},r._wss_play=function(e,t,a){var r=this;return void 0===t&&(t={playURL:""}),this._destroyed(),new Promise((function(a,i){var n=setInterval((function(){window.JSPlayerModuleLoaded&&(clearInterval(n),sa(r,e,t).then((function(e){a(e)})).catch((function(e){i(e)})))}),50)}))},r.pause=function(e){return function(e,t){if(!e.playing)return e._tempPauseDate?Promise.resolve(g(new Date(e._tempPauseDate),0)):Promise.reject(g(void 0,-1,"当前不是播放状态,不需要暂停"));e._detectTimer&&(clearInterval(e._detectTimer),e._detectTimer=null);var a=e.getFrameInfo(),r=new Date(a.year+"/"+a.month+"/"+a.day+" "+a.hour+":"+a.minute+":"+a.second).getTime()/1e3,i=new Date(1e3*r);return e._tempPauseDate=i.valueOf(),e._tempPauseTime=""+a.year+_a(a.month)+_a(a.day)+_a(a.hour)+_a(a.minute)+_a(a.second),new Promise((function(a,r){t?e.stop().then((function(){a(g(i,0,"暂停成功"))})).catch((function(e){r(g(i,-1,"暂停失败"))})):(e._oStreamClient.stopAll(),1==+e.wasmplayer.JSPlayM4_Pause(1)?(e.playing=!1,a(g(i))):r(g(i,-1,"暂停失败"))),e.emit("pause",F(void 0))}))}(this,e)},r.resume=function(e){return this._destroyed(),function(e,t){var a=e._tempPauseTime,r=e._tempPauseDate,i=e._wss_info;if(e.playing)return Promise.resolve();var n=!1;return new Promise((function(s,x){var o,l,_;t&&(a?a=a.slice(0,14-t.length)+t:(n=!0,a=t)),(null==(o=i.oParams)?void 0:o.playURL.includes("playback"))&&(i.oParams.playURL=null==i||null==(l=i.oParams)?void 0:l.playURL.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,"begin="+a.slice(0,8)+"T"+a.slice(8,14)+"Z")),i.oParams.playURL.includes("cloudplayback")&&(i.oParams.playURL=null==i||null==(_=i.oParams)?void 0:_.playURL.replace(/"startTime":[0-9]{13}/gi,'"startTime":'+r)),e.emit(A.API.resume,F(t)),t&&!n?e._wss_play(null==i?void 0:i.wssUrl,null==i?void 0:i.oParams).then((function(t){e._waterMarkParams&&e.setWaterMark(e._waterMarkParams),s(t)})).catch((function(e){x(e)})):xa(e,"resume").then((function(t){e._waterMarkParams&&e.setWaterMark(e._waterMarkParams),s(t)})).catch((function(e){x(e)}))}))}(this,e)},r.destroy=function(){return function(e){var t,a,r,i,n,s;if(e._detectTimer&&(clearInterval(e._detectTimer),e._detectTimer=null),e._oStreamClient&&(null==(t=e._oStreamClient)||t.destroy(),e._oStreamClient=null,null==(a=e.logger)||a.log("[destroy] StreamClient destroy")),e.wasmplayer&&(null==e.wasmplayer.JSPlayM4_Stop||e.wasmplayer.JSPlayM4_Stop.call(e.wasmplayer),null==(r=e.logger)||r.log("[destroy] stop")),ta(e),e.wasmplayer)try{var x,o,l;null==(o=e.wasmplayer)||null==(x=o.JSPlayM4_FreePort)||x.call(o),e.wasmplayer=null,null==(l=e.logger)||l.log("[destroy] free port")}catch(t){var _,h;null==(h=e.logger)||null==(_=h.error)||_.call(h,"[destroy] free port",t)}return e._g_port=null,e.pluginManager&&(e.pluginManager.destroy(),e.pluginManager=null,null==(i=e.logger)||i.log("[destroy] plugin destroy")),e._playerWindow&&(null==e._playerWindow.destroy||e._playerWindow.destroy.call(e._playerWindow),e._playerWindow=null,null==(n=e.logger)||n.log("[destroy] window destroy")),e.esCanvas&&(Nt(e),null==(s=e.logger)||s.log("[destroy] esCanvas destroy")),setTimeout((function(){e&&(e.emit(A.API.destroy),e.removeAllListeners(),e.event&&(e.event=null))}),0),e.__videoInfo={},e.__audioInfo={},e.destroyed=!0,Promise.resolve()}(this)},r._destroyed=function(){return function(e){if(e.destroyed)throw new Error("player is destroyed!")}(this)},r.stop=function(e){return void 0===e&&(e=!1),function(e,t){void 0===t&&(t=!1);var a=e.wasmplayer;return t||e._playerWindow.hide(),e.playbackRate=1,e._detectTimer&&(clearInterval(e._detectTimer),e._detectTimer=null),new Promise((function(r,i){if(t)try{Zt(e,"","jpeg",0,!1,!1,!0).then((function(t){var a;e.logger.log("保留最后一帧....",null==(a=t.data)?void 0:a.base64);var r,i,n,s=e.$container.querySelector(".ezplayer-poster-img");s||(s=e.$container),s&&null===e.fECCorrect._correctType&&((null==(r=t.data)?void 0:r.base64)?la(s,HTMLImageElement)?s.src=null==(i=t.data)?void 0:i.base64:(s.style.backgroundImage="url("+(null==(n=t.data)?void 0:n.base64)+")",s.style.backgroundSize="100% 100%"):la(s,HTMLImageElement)||(s.style.backgroundImage="none"))}))}catch(t){e.logger.warn("保留最后一帧....",t)}setTimeout((function(){e._oStreamClient&&e._oStreamClient.stopAll().then((function(){e.emit("stop",F(void 0)),e.emit("JSPlayM4_Stop",F(void 0));var t=a.JSPlayM4_Stop(!1);if(1===t)ta(e),r({resS:t});else{var i=a.JSPlayM4_GetLastError();if(35==+i)var n=setInterval((function(){t?clearInterval(n):1==+(t=a.JSPlayM4_Stop(!1))?(ta(e),r({resS:t})):(i=a.JSPlayM4_GetLastError(),e.logger.error("JSPlayM4_Stop error: ",i))}),50);else e.logger.error("stop - other error, still resolve: ",i),ta(e),r({resS:t,jsPluginErrorCode:i})}})).catch((function(t){ta(e);var r=a.JSPlayM4_GetLastError();e.logger.error("JSPlayM4_Stop error: ",r),i({jsPluginErrorCode:r})}))}),100)}))}(this,e)},r.snapshot=function(e,t,a,r){return void 0===t&&(t="jpeg"),Zt(this,e,t,0,r)},r.snapshotByCanvas=function(e,t,a){return void 0===t&&(t="jpeg"),jt(this,e,t,a)},r.resize=function(e,t){return function(e,t,a){var r=e._options.dpr||1,i="";/^\d+(\.\d+)?$/.test(t+"")?i+="width: "+t+"px;":t&&(i+="width: "+t+";"),/^\d+(\.\d+)?$/.test(a+"")?i+="height: "+a+"px;":a&&(i+="height: "+a+";"),e.$container&&(e.$container.style.cssText+=i);var n,s=e.$container.clientWidth,x=e.$container.clientHeight;if(s<16||x<16)return Promise.reject();if(e._playerWindow&&e.wasmplayer)try{null==e.wasmplayer.JSPlayM4_SetCanvasSize||e.wasmplayer.JSPlayM4_SetCanvasSize.call(e.wasmplayer,s*r,x*r)}catch(t){var o;null==(o=e.logger)||o.error("[engine] [resize] error:",t)}return e&&(null==e||e.emit("resize",F({width:x,height:x}))),e.logger&&(null==(n=e.logger)||n.log("[engine] [resize] width: "+x+" height: "+x+" dpr: "+r)),Promise.resolve({width:t,height:a})}(this,e,t)},r.setVolume=function(e){return function(e,t){var a=0;return t<0||t>1?(e.logger.warn("audio volume ("+t+") is invalid!"),0):(0===t?1===(a=e.wasmplayer.JSPlayM4_StopSoundShare())&&(e.volume=0):1===(a=e.wasmplayer.JSPlayM4_PlaySoundShare())&&(e.volume=t),e.emit(A.volumeChange,F(t)),a)}(this,e)},r.use=function(e){this.pluginManager.use(e)},r.setFECCorrectType=function(e,t){return this.fECCorrect.setFECCorrectType(e,t)},r.setFEC2DParam=function(e,t){return this.fECCorrect.setFEC2DParam(e,t)},r.setFEC3DViewParam=function(e){return this.fECCorrect.setFEC3DViewParam(e)},r.get3DViewParam=function(e){return this.fECCorrect.get3DViewParam(e)},r.setPoster=function(e){},r.setPlaybackRate=function(e){!function(e,t){var a,r;if(t=+t,Number.isNaN(t))throw new Error("rate is error, only support 0.5 | 1 | 2 | 4 | 8 | 16");if(![.5,1,2,4,8,16].includes(t))throw new Error("rate is error, only support 0.5 | 1 | 2 | 4 | 8 | 16");null==(r=e._oStreamClient)||null==(a=r.setPlayRate)||a.call(r,Kt[t]);var i,n,s=e.playbackRate;if(s>t)for(var x=t;x<s;){var o,l;x*=2,null==(l=e.wasmplayer)||null==(o=l.JSPlayM4_Slow)||o.call(l)}else if(s<t)for(var _=s;_<t;){var h,f;_*=2,null==(f=e.wasmplayer)||null==(h=f.JSPlayM4_Fast)||h.call(f)}+t>=4&&(null==(n=e.wasmplayer)||null==(i=n.JSPlayM4_SetDecodeThreadNum)||i.call(n,4)),e.emit(A.API.rateChange,F(t)),e.playbackRate=t,e._playbackRate=t}(this,e)},r.seek=function(e,t){return function(e,t,a){return e.wasmplayer.JSPlayM4_ResetBuffer(1),e.emit(A.API.seek,F({startTime:t,endTime:a})),e._oStreamClient.seek(t,a).then((function(t){e._waterMarkParams&&e.setWaterMark(e._waterMarkParams)})),Promise.resolve()}(this,e,t)},r._setOptions=function(e){tt(this,e)},r.enable3DZoom=function(e){return function(e,t){if(!e.playing)return-1;var a=e.wasmplayer,r=null==a.JSPlayM4_GetFrameInfo?void 0:a.JSPlayM4_GetFrameInfo.call(a);return new Promise((function(t,i){t({code:0,data:null==a.JSPlayM4_SetDisplayRegion?void 0:a.JSPlayM4_SetDisplayRegion.call(a,e._playerWindow.canvasId,0,r.width,0,r.height,!1,!0)})})),e.__fCallback=t,e.esCanvas=new kt(e.$container),e.esCanvas.setShapeType("Rect"),e.esCanvas.setDrawStyle("#ff0000","",0),e.esCanvas.setDrawStatus(!0,(function(e){"function"==typeof t&&t(e)})),e.__b3DZoom=!0,0}(this,e)},r.disable3DZoom=function(){return Nt(this)},r.getOSDTime=function(){var e=this.getFrameInfo();return(null==e?void 0:e.year)?new Date((null==e?void 0:e.year)+"/"+(null==e?void 0:e.month)+"/"+(null==e?void 0:e.day)+" "+(null==e?void 0:e.hour)+":"+(null==e?void 0:e.minute)+":"+(null==e?void 0:e.second)).getTime()/1e3:0},r.getFrameInfo=function(){var e,t,a,r,i,n=null==(t=this.wasmplayer)||null==(e=t.JSPlayM4_GetFrameInfo)?void 0:e.call(t);if(!n)return null==(i=this.logger)||i.warn("[getFrameInfo] error",n),{};var s=at[null==n?void 0:n.codecType];return n.videoFormatName=s,(null==n?void 0:n.width)>0&&(null==n?void 0:n.height)>0&&((null==(a=this.__videoInfo)?void 0:a.width)!==(null==n?void 0:n.width)||(null==(r=this.__videoInfo)?void 0:r.height)!==(null==n?void 0:n.height))&&(n.videoFormatName||(n.videoFormatName=this.__videoInfo.videoFormatName),n.frameRate||(n.frameRate=this.__videoInfo.frameRate),this.__videoInfo=ua({},this.__videoInfo,n),this.emit(A.videoInfo,F(this.__videoInfo))),n},r.setDisplayRegion=function(e,t,a,r,i,n){void 0===i&&(i=!0),void 0===n&&(n=!1);var s=function(e,t,a,r,i,n,s){void 0===n&&(n=!0),void 0===s&&(s=!1);var x=e.wasmplayer,o=e.getFrameInfo(),l=e._playerWindow.canvasId,_=document.getElementById(l);if(_){var h=function(e){return{width:(null==e?void 0:e.style.width)?+(null==e?void 0:e.style.width.replace("px","")):e.width||e.offsetWidth,height:(null==e?void 0:e.style.height)?+(null==e?void 0:e.style.height.replace("px","")):e.height||e.offsetHeight}}(_);e._options.dpr;var f=h.width,c=h.height;return s&&(c=h.width,f=h.height),null==e||e.emit("setDisplayRegion",F({left:t,right:a,top:r,bottom:i,flag:n,isFullscreen:s})),x.JSPlayM4_SetDisplayRegion(l,f*t/o.width,f*a/o.width,c*r/o.height,c*i/o.height,!n,!1)}}(this,e,t,a,r,i,n);return 1===s},r.setSecretKey=function(e){null!=e&&""!==e&&(this._secretKey=e)},r.getOptions=function(){return this._options},r.setLogger=function(t){var a,r;this._options=e(this._options,{logger:t},{clone:!1}),null==(r=this.logger)||null==(a=r.setOptions)||a.call(r,t)},r.getVersion=function(){var e=this.wasmplayer.JSPlayM4_GetSDKVersion();return{version:"8.2.2-beta.3",decoder:this._wasmDecoderInfo.bSupHardOrSoft?"V3":"V1",decoderVersion:e.toString(16)}},r.setWaterMark=function(t){return this._waterMarkParams=t,function(t,a){var r=t.wasmplayer,i=t.$container.getBoundingClientRect(),n=i.width,s=i.height,x={nCanvasAdaptMode:2,nRowSpace:0,nColSpace:0,nBaseCanvasWidth:Math.floor(n),nBaseCanvasHeight:Math.floor(s)};return a=e.all([{},ha,a||{},{pstCanvasAdapt:x}],{clone:!1}),new Promise((function(e,t){var i;1===(i=a&&a.fontString?r.JSPlayM4_SetWaterMarkFont({pFontString:a.fontString,pstStartPos:a.startPos,pstFontColor:a.fontColor,pstFontSize:a.fontSize,pstFontRotate:a.fontRotate,pstFontNumber:a.fontNumber,pFontFamily:a.fontFamily,pSpace:a.space,pstCanvasAdapt:a.pstCanvasAdapt}):r.JSPlayM4_SetWaterMarkFont(null))?e({code:0,msg:"水印设置成功"}):t({code:-1,msg:i})}))}(this,t)},r.setMirrorFlip=function(e){return function(e,t){var a;return e.service.setMirrorFlip({command:t,channelNo:null==(a=e.urlInfo)?void 0:a.channelNo})}(this,e)},r.setStreamInfoCallBackType=function(e,t){!function(e,t,a){var r,i,n,s;[0,1].includes(t)?e.wasmplayer?e.wasmplayer.JSPlayM4_SetStreamInfoCallBack(t,(function(t){null==a||a(t),e.emit(A.streamInfoCB,F({systemFormat:t.nSystemformat,videoFormat:t.nVideoformat,videoFormatName:at[t.nVideoformat],audioFormat:t.nAudioformat,audioFormatName:rt[t.nAudioformat],audioChannels:t.nAudiochannels,audioBitsPerSample:t.nAudiobitspersample,audioSamplesRate:t.nAudiosamplesrate,audioBitRate:t.nAudiobitrate,width:t.nWidth,height:t.nHeight,frameRate:t.fFrameRate,intervalOfIFrame:t.nIntervalOfIFrame})),e.__videoInfo.width===t.nWidth&&e.__videoInfo.height===t.nHeight&&e.__videoInfo.frameRate===t.fFrameRate&&e.__videoInfo.videoFormatName===at[t.nVideoformat]||(e.__videoInfo={videoFormat:t.nVideoformat,videoFormatName:at[t.nVideoformat],width:t.nWidth,height:t.nHeight,frameRate:t.fFrameRate,intervalOfIFrame:t.nIntervalOfIFrame},e.emit(A.videoInfo,F(fa({},e.__videoInfo,{from:"setStreamInfoCallBack"})))),e.__audioInfo.audioFormat===t.nAudioformat&&e.__audioInfo.audioChannels===t.nAudiochannels&&e.__audioInfo.audioBitsPerSample===t.nAudiobitspersample&&e.__audioInfo.audioSamplesRate===t.nAudiosamplesrate&&e.__audioInfo.audioBitRate===t.nAudiobitrate||(e.__audioInfo={audioFormat:t.nAudioformat,audioFormatName:rt[t.nAudioformat],audioChannels:t.nAudiochannels,audioBitsPerSample:t.nAudiobitspersample,audioSamplesRate:t.nAudiosamplesrate,audioBitRate:t.nAudiobitrate},e.emit(A.audioInfo,F(e.__audioInfo)))})):null==(i=e.logger)||null==(r=i.warn)||r.call(i,"player.wasmplayer is not defined"):null==(s=e.logger)||null==(n=s.warn)||n.call(s,"type "+t+" not supported")}(this,e,t)},r._addEventListener=function(){var e,t,a,r,i=this;this.on(A.videoInfo,(e=function(e){e.data.width&&e.data.height&&i._playerWindow.resize(e.data.width,e.data.height)},t=500,a=null,r=0,function(){for(var i=this,n=arguments.length,s=new Array(n),x=0;x<n;x++)s[x]=arguments[x];var o=Date.now(),l=t-(o-r);l<=0?(r=o,e.apply(this,s)):a||(a=setTimeout((function(){r=Date.now(),a=null,e.apply(i,s)}),l))})),this.on("Control.contentRerender",(function(e){e.width&&e.height&&i._waterMarkParams&&i.setWaterMark(i._waterMarkParams)}))},ca(a,[{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}]),a}(l);function ma(e,t,a){return t&&function(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Sa(){return Sa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},Sa.apply(this,arguments)}pa.EVENT_TYPE=A,pa.version="8.2.2-beta.3";var Ra=function(){function e(e){var t=e.szId;delete e.szId,this.iWidth=e.iWidth,this.iHeight=e.iHeight,this.player=new pa(Sa({},e,{decoderType:!0===e.isCloudRecord?"v1":e.decoderType||"auto",id:t})),this.i18n=this.player.i18n,this.downloadRecord=e.downloadRecord,this._recordPlugin=new h({downloadRecord:this.downloadRecord}),this.player.use(this._recordPlugin),this.nWidth=0,this.nHeight=0,this.oStreamClient=this.player._oStreamClient,this.g_port=0,this._initEventCallback()}var t=e.prototype;return t._initEventCallback=function(){var e=this;this.player.on(T,(function(t){var a,r,i,n,s,x,o,l,_,h,f,c;(t.data.type===D.openStreamCallback&&(null==(a=e.EventCallback)?void 0:a.openStreamCallback)&&e.EventCallback.openStreamCallback(),t.data.type===D.pluginErrorHandler&&(null==(r=e.EventCallback)?void 0:r.pluginErrorHandler)&&e.EventCallback.openStreamCallback(t.data.iWndIndex,t.data.code,t.data.data),t.data.type===D.getStreamHeaderCallback&&(null==(i=e.EventCallback)?void 0:i.getStreamHeaderCallback)&&e.EventCallback.getStreamHeaderCallback(),t.data.type===D.getVideoStreamCallback&&(null==(n=e.EventCallback)?void 0:n.getVideoStreamCallback)&&e.EventCallback.getVideoStreamCallback(),t.data.type===D.appearFirstFrameCallback&&(null==(s=e.EventCallback)?void 0:s.appearFirstFrameCallback)&&e.EventCallback.appearFirstFrameCallback(),t.data.type===D.firstFrameCallback&&(null==(x=e.EventCallback)?void 0:x.firstFrameCallback)&&e.EventCallback.firstFrameCallback(t.data.decodeEngine),t.data.type===D.averageStreamSuccessCallback&&(null==(o=e.EventCallback)?void 0:o.averageStreamSuccessCallback)&&e.EventCallback.averageStreamSuccessCallback(),t.data.type===D.pluginErrorHandler&&(null==(l=e.EventCallback)?void 0:l.pluginErrorHandler))&&e.EventCallback.pluginErrorHandler(t.data.iWndIndex,t.data.code,null==(c=t.data)?void 0:c.data);t.data.type===D.setRunTimeInfoCallBack&&(null==(_=e.EventCallback)?void 0:_.setRunTimeInfoCallBack)&&e.EventCallback.setRunTimeInfoCallBack(t.data.data),t.data.type===D.stutterDetectedCallback&&(null==(h=e.EventCallback)?void 0:h.stutterDetectedCallback)&&e.EventCallback.stutterDetectedCallback(t.data.data),t.data.type===D.setAdditionDataCallBack&&(null==(f=e.EventCallback)?void 0:f.setAdditionDataCallBack)&&e.EventCallback.setAdditionDataCallBack(t.data.data)}))},t.JSPlayM4_SetDecodeEngine=function(e){this.useHard=e},t.JS_Play=function(e,t,a,r,i){return void 0===e&&(e=""),void 0===t&&(t={playURL:""}),this.player._wss_play(e,t,a,r,i)},t.JS_SetSecretKey=function(e,t){this.secretKey=t,this.player.setSecretKey(t)},t.JS_OpenSound=function(){return this.player.setVolume(.8)},t.JS_CloseSound=function(){return this.player.setVolume(0)},t.JS_Enable3DZoom=function(e,t){return this.player.enable3DZoom(t,e)},t.JSPlayM4_SetDisplayRegion=function(e,t,a,r){var i=this;new Promise((function(n,s){n({code:0,data:window["wasmplayer-"+i.szId].JSPlayM4_SetDisplayRegion(i.szId+"-player",e,t,a,r,!1,!0)})}))},t.JS_Disable3DZoom=function(){return this.player.disable3DZoom(fCallback,iWin)},t.JS_StartSave=function(e,t,a){return void 0===e&&(e=""+(new Date).getTime()),this._recordPlugin.startRecord(e,t,a)},t.JS_StopSave=function(e){return void 0===e&&(e=!0),this._recordPlugin.stopRecord(e)},t._JSPlayM4_GetFrameInfo=function(){return this.player.getFrameInfo()},t._JSPlayM4_SetDisplayRegion=function(e,t,a,r,i,n){return this.player.setDisplayRegion(e,t,a,r,!0,n)},t.JS_CapturePicture=function(e,t,a,r,i){var n=this;return new Promise((function(e,a){n.player.snapshot(t,"jpeg","base",i).then((function(t){0===t.code?("function"==typeof r&&r({fileName:t.data.fileName,base64:t.data.base64}),e(Sa({},t,{code:1}))):a(t)}))}))},t.JS_GetOSDTime=function(){return Promise.resolve(this.player.getOSDTime())},t.JS_Resize=function(e,t){this.player.resize(e,t)},t.JS_GetSDKVersion=function(){return this.player.getVersion().decoderVersion},t.JS_Stop=function(e){return this.player.stop(e)},t.JS_DestroyWorker=function(){this.player.destroy()},t.JS_Speed=function(e){this.player.setPlaybackRate(3!=+e?e:.5)},t.JS_Seek=function(e,t,a){return this.player.seek(t,a)},t.JS_Pause=function(e,t){var a=this;return new Promise((function(e,r){a.player.pause(t).then((function(t){e({pauseDate:t.pauseDate,code:1,msg:null==t?void 0:t.msg})}),(function(){r()}))}))},t.JS_Resume=function(e){return this.player.resume(e)},t.JS_FECCorrectType=function(e,t){return this.player.setFECCorrectType(e,t)},t.JS_FECSetParam2D=function(e,t){return this.player.setFEC2DParam(e,t)},t.FEC_Set3DViewParam=function(e){return this.player.setFEC3DViewParam(e)},t.FEC_Get3DViewParam=function(e){return this.player.get3DViewParam(e)},t.JS_SetWaterMarkFont=function(e){return this.player.setWaterMark(e)},ma(e,[{key:"bPlay",get:function(){return this.player.playing}},{key:"iRate",get:function(){return this.player.playbackRate}},{key:"playURL",get:function(){return this.player._wss_info.oParams.playURL},set:function(e){this.player._wss_info=Sa({},this.player._wss_info,{oParams:{playURL:e}})}},{key:"FECSplitIds",get:function(){return this.player.fECCorrect._FECSplitIds},set:function(e){this.player.fECCorrect._FECSplitIds=e}},{key:"correctType",get:function(){return this.player.fECCorrect._correctType},set:function(e){this.player.fECCorrect._correctType=e}}]),e}();export{Ra as default};