1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e)}(this,function(e){var t=function(e,t,i,o,a,r){console.log("version 1.2.26");var s=null;if(!n.Broswer.webglAvailable())return void console.log("Your browser does not support webgl");if(1===arguments.length&&!(e instanceof THREE.Scene)){if(s=e,!s.id)return void console.error("player container id required!");i=null,t=null,t=n.Broswer.isIE()?new THREE.CanvasRenderer:new THREE.WebGLRenderer,t.setPixelRatio(window.devicePixelRatio),"string"==typeof s.id?i=document.getElementById(s.id):s.id instanceof HTMLElement&&(i=s.id),i.appendChild(t.domElement),e=new THREE.Scene,o=s.camera_para?s.camera_para:null,a=s.camera_position?s.camera_position:null}console.log(s),this.scene=e,this.renderer=t,this.container=i,n.initDomStyle(i),n.setCameraPara(this,o,a),this.vrbox={radius:2,widthSegments:180,heightSegments:180,width:2,height:2,depth:2},this.liveSettings={forceUseHls:!1,forceUseVndAppleMpegUrl:!1,forceUseXmpegUrl:!1,usePlugin:!1,loadPlugin:function(e){console.log("load video",e)}},this.hlsConfig={autoStartLoad:!0},this.flvConfig={type:"flv",isLive:!0},this.destoryed=!1,this.video=null,this.audio=null,this.toolBar=null,this.clock=new THREE.Clock,this.VRObject=new THREE.Object3D,this.defaultAutoHideLeftTime=3,this.defaultVoiceHideLeftTime=2,this.defaultVolume=.5,this.sliceSegment=0,this._controlTarget=new THREE.Vector3(0,0,1e-4),this._cubeCameraTimes=.96,this.playCfg={muted:!1,autoplay:!1,shape:"sphere",loop:!0},this.shapeList={sphere:"sphere",box:"box"},this.resType={video:"video",box:"box",slice:"slice",sliceVideo:"sliceVideo",flvVideo:"flvVideo"},this.videoPlayHook=function(){},this.videoPauseHook=function(){},this.asteroidConfig={enable:!1,asteroidFPS:10,asteroidFov:135,asteroidForwardTime:2600,asteroidWaitTime:2e3,asteroidDepressionRate:.5,asteroidTop:1,cubeResolution:2048,rotationAngleOfZ:0},this.VRhint="è¯·åæ¶å±å¹ç¿»è½¬éå®åè£
å
¥VRçåä¸",this.camera=new THREE.PerspectiveCamera(this.cameraPara.fov,this.cameraPara.aspect,this.cameraPara.near,this.cameraPara.far),this.camera.lookAt(this._controlTarget),this.cameraEvt={controlGroup:function(){},updatePosition:function(){},hover:function(){},leave:function(){}},this._takeScreenShot=!1,this.timerList={},this.camera.position.set(this.cameraPosition.x,this.cameraPosition.y,this.cameraPosition.z),this.loadProgressManager=new THREE.LoadingManager(function(e){console.log("loaded")},function(e,t,i){console.log("item=",e,"loaded",t,"total=",i)},function(e,t){console.log(e,t)}),this.scene.add(this.camera),this.scene.add(this.VRObject),this.effect=n.stereoEffect(this.renderer),n.bindOrientationEvent(this,this._controlTarget),r&&"function"==typeof r&&r(),s&&s.onload&&"function"==typeof s.onload&&s.onload()};t.prototype.destroy=function(){var e=this;e.video&&(e.video.pause(),e.video=null),e.audio&&(e.audio.pause(),e.audio=null),e.hlsPlayer&&e.hlsPlayer.destroy(),e.flvPlayer&&e.flvPlayer.destroy();for(var t in e.timerList)clearInterval(e.timerList[t]);if(e.boxRenderFrame&&cancelAnimationFrame(e.boxRenderFrame),e.container){const i=e.container.children;for(var n=i.length-1;n>=0;n--)e.container.removeChild(i[n])}e.destoryed=!0},t.prototype.init=function(e,t){function i(e){g.isMouseDown=!0;var t=e.clientX||e.changedTouches[0].clientX,i=e.clientY||e.changedTouches[0].clientY;m.set(t,i),p.set(t,i),h.autoHideLeftTime=h.defaultAutoHideLeftTime,g.isActive=!0}function o(e){g.isMouseDown=!1}function a(e){if(e.preventDefault(),h.autoHideLeftTime=h.defaultAutoHideLeftTime,h.toolBar.isActive=!0,g.isMouseDown){var t=e.clientX||e.changedTouches[0].clientX,i=e.clientY||e.changedTouches[0].clientY,n=p.y-i;n>=5&&s(6),n<=-5&&s(-10),p.set(t,i)}}function r(e){if(void 0===h.controls.defaultDampingFactor&&(h.controls.defaultDampingFactor=h.controls.dampingFactor),void 0===h.controls.object.defaultFov&&(h.controls.object.defaultFov=h.controls.object.fov),e){var t=0,i=[];[].forEach.call(e,function(e){var n=E[e.identifier];if(n&&(n.y=e.pageY,n.x=e.pageX,i.push(e.identifier)),t++,t>=2){var o=E[i[0]],a=E[i[1]],r=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),s=(r-b)/4;return h.controls.object.fov-s<140&&h.controls.object.fov-s>10&&b&&(h.controls.enable=!1,h.controls.object.fov-=s,h.controls.dampingFactor=h.controls.defaultDampingFactor*h.controls.object.defaultFov/h.controls.object.fov),b=r,void(t=0)}})}}function s(e){clearInterval(h.timerList.slideBarAniateTimer),h.timerList.slideBarAniateTimer=animateTimer=setInterval(function(){var t=g.toolbar.clientHeight+e;t>=g.defaultHeight&&t<=g.defaultMaxHeight?(g.toolbar.style.height=t+"px",g.isActive=!0):(clearInterval(animateTimer),e>0?(g.isActive=!0,g.toolbar.style.height=g.defaultMaxHeight+"px"):(g.isActive=!1,g.toolbar.style.height=g.defaultHeight+"px")),h.autoHideLeftTime=h.defaultAutoHideLeftTime},1)}function c(e){if(e.style.background="url(https://img.yangshipin.cn/assets/57-kzwgs1tofyqq.png)",e.style.backgroundSize="100% 100%",e.classList.remove("fullBtn"),e.classList.add("exitfullBtn"),h.cameraEvt.controlGroup.length){var t=h.cameraEvt.controlGroup.getObjectByName("__focus");t.visible=!0}}function l(e){if(e.style.background="url(https://img.yangshipin.cn/assets/15-l1ys6app3c2a.png)",e.style.backgroundSize="100% 100%",e.classList.remove("exitfullBtn"),e.classList.add("fullBtn"),h.cameraEvt.controlGroup.length){var t=h.cameraEvt.controlGroup.getObjectByName("__focus");t.visible=!1}}function d(){if(!h.destoryed){var t=h.container.offsetWidth,i=h.container.offsetHeight;if(h.camera.aspect=t/i,n.isMobileDevice()&&n.isCrossScreen()&&n.enableVrMode?(h.cameraEvt.updatePosition(),h.effect.setSize(t,i),h.effect.render(h.scene,h.camera)):(h.renderer.setSize(t,i),h.renderer.setClearColor(new THREE.Color(16777215)),h.renderer.render(h.scene,h.camera)),h._takeScreenShot){h._takeScreenShot=!1;var o=h.renderer.domElement.toDataURL("image/jpeg");h._takeScreenShotCallback(o)}h.camera.updateProjectionMatrix(),h.controls&&h.controls.update(),e()}}function u(){d(),requestAnimationFrame(u)}var h=this,m=new THREE.Vector2,p=new THREE.Vector2;h.toolBar=n.toolBar(h.container,t);var v,f,g=h.toolBar,E={},b=0;g.defaultHeight=g.toolbar.clientHeight,g.defaultMaxHeight=5*g.defaultHeight,g.isMouseDown=!1,h.container.addEventListener("click",function(){h.autoHideLeftTime=h.defaultAutoHideLeftTime,g.toolbar.style.display="block"}),h.container.addEventListener("mousemove",function(){h.autoHideLeftTime=h.defaultAutoHideLeftTime,g.toolbar.style.display="block"}),h.container.addEventListener("dblclick",function(e){var t=n.getBoundingClientRect(h.container),i=t.height-(e.clientY-t.top);i>48&&h.vrBtnClick1()},!1),g.vrBtn.addEventListener("click",function(){h.vrBtnClick1()},!1),h.container.addEventListener("touchstart",function(e){h.touchStart(e)},!1),h.container.addEventListener("touchmove",function(e){h.touchMove(e)},!1),h.container.addEventListener("touchend",function(e){h.touchEnd(e)},!1),g.toolbar.addEventListener("mousedown",i,!1),g.toolbar.addEventListener("touchstart",i,!1),g.toolbar.addEventListener("mousemove",a,!1),g.toolbar.addEventListener("touchmove",a,!1),g.toolbar.addEventListener("mouseup",o,!1),g.toolbar.addEventListener("touchend",o,!1),g.toolbar.addEventListener("mouseout",function(e){h.autoHideLeftTime=h.defaultAutoHideLeftTime,g.isActive=!1},!1),h.vrBtnClick=function(e){var t=h.toolBar.vrBtn;n.isMobileDevice()?n.OS.isWeixin()&&!n.OS.isiOS()?"landscape"==h.video.getAttribute("x5-video-orientation")?(h.video.setAttribute("x5-video-orientation","portraint"),l(t)):(h.video.setAttribute("x5-video-orientation","landscape"),c(t)):n.isCrossScreen()?(c(t),n.fullscreen(h.container)):(l(t),n.msgBox(h.VRhint,5,h.container)):(t.getAttribute("fullscreen")?(l(t),t.removeAttribute("fullscreen")):(c(t),t.setAttribute("fullscreen","true")),n.fullscreen(h.container))},h.vrBtnClick1=function(e){var t=h.toolBar.vrBtn;if(t.getAttribute("fullscreen")){l(t),t.removeAttribute("fullscreen");var i=new Event("exitFullscreen",{bubbles:!0,cancelable:!1});window.dispatchEvent(i)}else{c(t),t.setAttribute("fullscreen","true");var n=new Event("requestFullscreen",{bubbles:!0,cancelable:!1});window.dispatchEvent(n)}},h.touchStart=function(e){e.targetTouches&&([].forEach.call(e.targetTouches,function(e){E[e.identifier]||(E[e.identifier]=new THREE.Vector2(0,0))}),clearInterval(h.timerList.renderTouchersRimer),h.timerList.renderTouchersRimer=setInterval(function(){r(v)},1))},h.touchEnd=function(e){e.targetTouches&&([].forEach.call(e.changedTouches,function(e){var t=E[e.identifier];t&&delete E[e.identifier]}),0===e.targetTouches.length&&(b=0,h.controls.enable=!0,clearInterval(f)))},h.touchMove=function(e){v=e.touches},h.windowResize=function(){n.isFullscreen()?n.isMobileDevice()?n.isCrossScreen()?c(h.toolBar.vrBtn):l(h.toolBar.vrBtn):c(h.toolBar.vrBtn):n.OS.isWeixin()&&!n.OS.isiOS()?("landscape"==h.video.getAttribute("x5-video-orientation")?c(h.toolBar.vrBtn):l(h.toolBar.vrBtn),n.isCrossScreen()?c(h.toolBar.vrBtn):l(h.toolBar.vrBtn)):(n.isCrossScreen()?c(h.toolBar.vrBtn):l(h.toolBar.vrBtn),l(h.toolBar.vrBtn))},h._play=function(){g.btn.style.background="url(https://img.yangshipin.cn/assets/53-kzwgs1tngkqk.png)",g.btn.style.backgroundSize="100% 100%",g.btn.classList.remove("pauseBtn"),g.btn.classList.add("playBtn")},h._pause=function(){g.btn.style.background="url(https://img.yangshipin.cn/assets/54-kzwgs1to80z7.png)",g.btn.style.backgroundSize="100% 100%",g.btn.classList.remove("playBtn"),g.btn.classList.add("pauseBtn")},h.playVr=function(){if(h.video.paused){var e=h.video.play();void 0!==e&&e&&e.then&&e.then(function(){h._play(),h.videoPlayHook()})["catch"](function(e){})}},h.pauseVr=function(){h.video.paused||(h._pause(),h.video.pause(),h.videoPauseHook())},h.getFullscreen=function(){if(!n.isFullscreen()){var e=h.toolBar.vrBtn;n.isMobileDevice()?n.OS.isWeixin()&&!n.OS.isiOS()?"landscape"!=h.video.getAttribute("x5-video-orientation")&&(h.video.setAttribute("x5-video-orientation","landscape"),c(e)):n.isCrossScreen()&&(c(e),n.fullscreen(h.container)):(e.getAttribute("fullscreen")||(c(e),e.setAttribute("fullscreen","true")),n.fullscreen(h.container))}},h.exitFullscreen=function(){if(n.isFullscreen()){var e=h.toolBar.vrBtn;n.isMobileDevice()?n.OS.isWeixin()&&!n.OS.isiOS()?"landscape"==h.video.getAttribute("x5-video-orientation")&&(h.video.setAttribute("x5-video-orientation","portraint"),l(e)):n.isCrossScreen()||(l(e),n.msgBox(h.VRhint,5,h.container)):(e.getAttribute("fullscreen")&&(l(e),e.removeAttribute("fullscreen")),n.fullscreen(h.container))}},u(),clearInterval(h.timerList.toolBarAutoHideTimer),h.timerList.toolBarAutoHideTimer=setInterval(function(){g.isActive||g.voice_bar.isActive||(h.autoHideLeftTime<0?(g.toolbar.style.display="none",h.autoHideLeftTime=h.defaultAutoHideLeftTime,g.isActive=!1):h.autoHideLeftTime--),h.windowResize()},1e3)},t.prototype.takeScreenShot=function(e){this._takeScreenShot=!0,this._takeScreenShotCallback=e},Object.defineProperty(t.prototype,"playPanorama",{get:function(){return console.warn("playPanorama() no longer supports. Use play() instead."),t.prototype.play}}),t.prototype.changeDefinition=function(e,t,i){var n=this.video.currentTime,o=this.video.paused;this.delListeners(),i.from="changeDefinition",this.play(e,t,i),this.video.currentTime=n,o?this.pauseVr():this.playVr()},t.prototype.play=function(e,t,i){function o(){console.log(JSON.stringify(C.hls)),k.hlsPlayer=new Hls(C.hls),k.hlsPlayer.loadSource(e),k.hlsPlayer.attachMedia(Y),k.hlsPlayer.on(Hls.Events.MANIFEST_PARSED,function(){})}function a(){var t=n.createTag("source",{src:e,type:"application/x-mpegURL"},null);Y.appendChild(t)}function r(){Y.src=e,Y.addEventListener("loadedmetadata",function(){})}function s(){if(re&&(re.volume=k.defaultVolume,ne.style.height=re.volume*oe+"px",ie.innerHTML=Math.round(100*re.volume)+"%",K.addEventListener("mousedown",E,!1),K.addEventListener("mousemove",b,!1),K.addEventListener("mouseup",x,!1),document.addEventListener("mouseup",x,!1),Q.addEventListener("click",g,!1),ee.addEventListener("mouseenter",m,!1),ee.addEventListener("mouseleave",p,!1),K.addEventListener("mouseenter",v,!1),K.addEventListener("mouseleave",f,!1),Z&&Z.addEventListener("mouseenter",u,!1),Z&&Z.addEventListener("mouseleave",h,!1),J&&J.addEventListener("mouseenter",u,!1),J&&J.addEventListener("mouseleave",h,!1),$&&$.length>0))for(var e=0;e<$.length;e++)$[e].addEventListener("click",d,!1)}function c(e){if(Y.paused){var t=Y.play();void 0!==t&&t&&t.then&&t.then(function(){k._play(),k.videoPlayHook()})["catch"](function(e){})}else k._pause(),Y.pause(),k.videoPauseHook()}function l(e){rect=n.getBoundingClientRect(k.container);var t=(e.clientX||e.changedTouches[0].clientX)-rect.left;Y.currentTime=Y.duration*(t/this.clientWidth)}function d(e){if(n.clickFn=e.target.dataset.fn,!e.target.classList.contains("selected")){var t=new Event("change_definition",{bubbles:!0,cancelable:!1});t.fn=e.target.dataset.fn,window.dispatchEvent(t)}}function u(e){e.stopPropagation(),B.def_bar.style.display="block",B.def_icon.classList.add("active")}function h(e){e.stopPropagation(),B.def_bar.style.display="none",B.def_icon.classList.remove("active")}function m(e){e.stopPropagation(),B.voice_bar.style.display="block",B.voice_bar.isActive=!0,B.voice_icon.classList.add("active")}function p(e){e.stopPropagation(),B.voice_bar.style.display="none",B.voice_bar.isActive=!1,B.voice_bar.isStart=!1,B.voice_bar.isMoving=!1,B.voice_icon.classList.remove("active")}function v(e){e.stopPropagation(),B.voice_bar.style.display="block",B.voice_bar.isActive=!0,B.voice_icon.classList.add("active")}function f(e){e.stopPropagation(),B.voice_bar.style.display="none",B.voice_bar.isActive=!1,B.voice_bar.isStart=!1,B.voice_bar.isMoving=!1,B.voice_icon.classList.remove("active")}function g(e){0==re.volume?(re.volume=.5,ne.style.height=oe*k.defaultVolume+"px",ie.innerHTML=100*k.defaultVolume+"%",y()):(re.volume=0,ne.style.height="0px",
1ie.innerHTML="0%",T())}function E(e){e.stopPropagation();var t=te.getBoundingClientRect(),i=e.clientY||e.changedTouches[0].clientY,n=t.height-(i-t.top),o=n/oe;ae.h=n,ae.clientY=i,o<-2||(o<0?(o=0,n=0):o>1&&(o=1,n=oe),ne.style.height=n+"px",re.volume=o,ie.innerHTML=Math.floor(100*o)+"%",B.voice_bar.isStart=!0,0==o?T():y())}function b(e){if(B.voice_bar.isStart){e.preventDefault(),e.stopPropagation(),B.voice_bar.isMoving=!0;var t=ae.h-e.clientY+ae.clientY,i=t/oe;i<-2||(i<0?(i=0,t=0):i>1&&(i=1,t=oe),ne.style.height=t+"px",re.volume=i,ie.innerHTML=Math.round(100*i)+"%",0==i?T():y())}}function y(){Q.style.background="url(https://sapi.yangshipin.cn/assets/2022/playerpng/player_sound_on.png)",Q.style.backgroundSize="100% 100%",Q.classList.remove("novoiceBtn"),Q.classList.add("voiceBtn")}function T(){Q.style.background="url(https://sapi.yangshipin.cn/assets/2022/playerpng/player_sound_off.png)",Q.style.backgroundSize="100% 100%",Q.classList.remove("voiceBtn"),Q.classList.add("novoiceBtn")}function x(e){B.voice_bar.isStart=!1,B.voice_bar.isMoving=!1,document.removeEventListener("mouseup",x)}function w(e){k.video.buffTimer||(clearInterval(k.timerList.videoBuffTimer),k.timerList.videoBuffTimer=k.video.buffTimer=setInterval(function(e){var t=0;0!=Y.buffered.length&&(t+=Y.buffered.end(0)),t>=Y.duration&&clearInterval(k.video.buffTimer),B.loadedProgress&&(B.loadedProgress.style.width=t/Y.duration*100+"%")},500))}function R(e){k._pause()}function S(e){k._play()}function _(e){k._pause()}function L(e,t){t=t||!1;var i=new THREE.MeshBasicMaterial({overdraw:!0,map:e}),n=k.VRObject.getObjectByName("__mxrealityDefault");if(n)n.material=i,n.visible=!0;else{var o=-Math.PI/2,a=new THREE.SphereBufferGeometry(k.vrbox.radius,k.vrbox.widthSegments,k.vrbox.heightSegments,o);a.scale(-1,1,1),mesh=new THREE.Mesh(a,i),mesh.visible=!0,mesh.name="__mxrealityDefault",t&&(mesh.matrixAutoUpdate=!1,mesh.updateMatrix(),k.toolBar.timeInfo.style.display="none"),k.VRObject.add(mesh)}k.asteroidConfig.enable&&(k.asteroidForward=function(e){H(e)})}function H(e){k.controls&&(k.controls.reset(),k.controls.enable=!1);var t=k.asteroidConfig,i=k.camera.fov,n=k._containerRadius*(.9*k._cubeCameraTimes);k.camera.position.y=n*t.asteroidTop,k.camera.rotation.x=THREE.Math.degToRad(-90),k.camera.fov=t.asteroidFov;var o=t.asteroidForwardTime*t.asteroidFPS/300,a=n/o,r=k.camera.fov-i,s=r/o,c=(Math.PI/2/o,!1),l=!1,d=new THREE.Vector3(k._controlTarget.x,k._controlTarget.y,k._controlTarget.z);setTimeout(function(){k.timerList.asteroidForwardTimer=asteroidForwardTimer=setInterval(function(){t.asteroidTop*k.camera.position.y-a>=0?(k.camera.position.y-=a*t.asteroidTop,k.camera.lookAt(d),d.z*=1.25):c=!0,k.camera.fov-s>=i?k.camera.fov-=s:l=!0,c&&l&&(clearInterval(asteroidForwardTimer),k.controls.enable=!0,k.camera.position.y=0,k.camera.fov=i,void 0!==e&&e())},t.asteroidFPS)},t.asteroidWaitTime)}var C=Object.assign(this.playCfg,i),M=["__mxrealitySkybox","__mxrealitySlice","__mxrealityDefault"];for(var P in M){var A=this.VRObject.getObjectByName(M[P]);A&&(A.visible=!1),this.cubeCameraSphere&&(this.cubeCameraSphere.visible=!1)}var k=this,B=k.toolBar;if(k._containerRadius=k.resType.box==t||k.resType.slice==t?k.vrbox.width/2:k.vrbox.radius,k.autoHideLeftTime=k.defaultAutoHideLeftTime,k.voiceHideLeftTime=k.defaultVoiceHideLeftTime,k.boxRenderFrame&&cancelAnimationFrame(k.boxRenderFrame),k.resType.box==t){k.toolBar.timeInfo.style.display="none";var I=[],V=[],F=new Image;F.crossOrigin="Anonymous",F.src=e,F.onload=function(){for(var e,t,i=F.height,n=0;n<6;n++)I[n]=new THREE.Texture,e=document.createElement("canvas"),t=e.getContext("2d"),e.height=i,e.width=i,t.drawImage(F,i*n,0,i,i,0,0,i,i),I[n].image=e,I[n].needsUpdate=!0,V.push(new THREE.MeshBasicMaterial({map:I[n]}));var o=k.VRObject.getObjectByName("__mxrealitySkybox");if(o)o.material=V;else{var o=new THREE.Mesh(new THREE.CubeGeometry(k.vrbox.width,k.vrbox.height,k.vrbox.depth),new THREE.MultiMaterial(V));o.applyMatrix((new THREE.Matrix4).makeScale(1,1,-1)),o.visible=!0,o.name="__mxrealitySkybox",o.matrixAutoUpdate=!1,o.updateMatrix(),k.VRObject.add(o),B.btn.addEventListener("click",function(e){k.controls.autoRotate?k._pause():k._play(),k.controls.autoRotate=!k.controls.autoRotate})}k.loadProgressManager.onLoad()}}else if(k.resType.slice==t){k.toolBar.timeInfo.style.display="none";var O=new THREE.TextureLoader(k.loadProgressManager);O.mapping=THREE.UVMapping;
1for(var V=[],P=0;P<e.length;P++){var U=O.load(e[P]);V.push(new THREE.MeshBasicMaterial({map:U}))}for(var j=new THREE.CubeGeometry(k.vrbox.width,k.vrbox.height,k.vrbox.depth,k.sliceSegment,k.sliceSegment,k.sliceSegment),z=0,D=[new THREE.Vector2(0,0),new THREE.Vector2(1,0),new THREE.Vector2(1,1),new THREE.Vector2(0,1)],P=0,G=j.faces.length;P<G;P+=2)j.faces[P].materialIndex=z,j.faces[P+1].materialIndex=z,j.faceVertexUvs[0][P]=[D[3],D[0],D[2]],j.faceVertexUvs[0][P+1]=[D[0],D[1],D[2]],z++;var A=k.VRObject.getObjectByName("__mxrealitySlice");if(A)A.material=V,A.geometry=j,A.updateMatrix();else{var W=new THREE.Mesh(j,V);W.applyMatrix((new THREE.Matrix4).makeScale(1,1,-1)),W.name="__mxrealitySlice",W.visible=!0,W.matrixAutoUpdate=!1,W.updateMatrix(),k.VRObject.add(W),k.cubeCamera=new THREE.CubeCamera(k._containerRadius,k.cameraPara.far,k.asteroidConfig.cubeResolution);var X=k.cubeCamera.renderTarget.texture;X.minFilter=THREE.LinearMipMapLinearFilter,k.VRObject.add(k.cubeCamera),material=new THREE.MeshBasicMaterial({envMap:k.cubeCamera.renderTarget.texture,side:THREE.BackSide}),k.cubeCameraSphere=new THREE.Mesh(new THREE.SphereGeometry(k._containerRadius*k._cubeCameraTimes,180,180),material),k.cubeCameraSphere.position.set(0,0,0),k.cubeCameraSphere.name="__mxrealitySlice",k.cubeCameraSphere.visible=!0,k.cubeCameraSphere.matrixAutoUpdate=!1,k.cubeCameraSphere.updateMatrix(),k.VRObject.add(k.cubeCameraSphere),B.btn.addEventListener("click",function(e){k.controls.autoRotate?k._pause():k._play(),k.controls.autoRotate=!k.controls.autoRotate})}k.asteroidConfig.enable?(k.cubeCameraSphere.visible=!0,k.asteroidForward=function(e){k.cubeCamera.update(k.renderer,k.scene),H(e)}):k.cubeCameraSphere.visible=!1}else{var N=[k.resType.video,k.resType.sliceVideo,k.resType.flvVideo];if(N.indexOf(t)>=0){var Y=null;if(k.video){Y=k.video;for(var q=0;q<Y.childNodes.length;q++)Y.removeChild(Y.childNodes[q])}else Y=k.video=n.createTag("video",{"webkit-playsinline":!0,playsinline:!0,preload:"auto","x-webkit-airplay":"allow","x5-video-player-type":"h5","x5-video-player-fullscreen":!0,"x5-video-orientation":"portrait",style:"object-fit: fill"},{allowsInlineMediaPlayback:!0,crossOrigin:"Anonymous"});if(Y.muted=C.muted,k.resType.sliceVideo==t)k.liveSettings.usePlugin?k.liveSettings.loadPlugin(Y):k.liveSettings.forceUseHls?(o(),console.info("force use hls")):k.liveSettings.forceUseVndAppleMpegUrl?(r(),console.info("force use application/vnd.apple.mpegurl")):k.liveSettings.forceUseXmpegUrl?(a(),console.info("force use application/x-mpegURL")):Hls.isSupported()?o():Y.canPlayType("application/vnd.apple.mpegurl")?r():Y.canPlayType("application/x-mpegURL")?a():console.error("The browser does not support the current live stream,"+e);else if(k.resType.flvVideo==t){if(!flvjs.isSupported())return void console.error("Your browser does not support flvjs");k.flvPlayer&&k.flvPlayer.destroy(),k.flvConfig.url=e,k.flvPlayer=flvjs.createPlayer(k.flvConfig),k.flvPlayer.attachMediaElement(Y),k.flvPlayer.load()}else Y.canPlayType("application/vnd.apple.mpegurl")?Y.src=e:Y.src=e;Y.addEventListener("canplaythrough",w,!1),Y.addEventListener("ended",R,!1),Y.addEventListener("play",S,!1),Y.addEventListener("pause",_,!1),B.progressBar&&B.progressBar.addEventListener("click",l,!1),B.btn.addEventListener("click",c,!1),Y.load(),"changeDefinition"!=i.from&&C.autoplay?(Y.setAttribute("autoplay",!0),k.playVr()):Y.removeAttribute("autoplay"),C.loop?Y.setAttribute("loop","loop"):Y.removeAttribute("loop");var Q=B.voice_icon,K=B.voice_bar,Z=B.def_icon,J=B.def_bar,$=B.defIconChildList,ee=B.voice_icon_canr,te=B.voice_slide_bar,ie=B.voice_number,ne=te.firstChild,oe=90;B.voice_bar.isActive=!1,B.voice_bar.isStart=!1,B.voice_bar.isMoving=!1;var ae={},re=k.video||k.audio;if(i&&"changeDefinition"==i.from&&n.clickFn){for(var se=0;se<$.length;se++)$[se].classList.remove("selected");var ce=document.getElementsByClassName(n.clickFn);ce&&ce[0]&&ce[0].classList.add("selected"),B.def_icon_text.innerHTML=ce[0].dataset.name}if(s(),k.video.buffTimer=null,C.shape==k.shapeList.box)k.boxTexture(Y);else{var U=new THREE.VideoTexture(Y);U.generateMipmaps=!1,U.minFilter=THREE.NearestFilter,U.magFilter=THREE.NearestFilter,U.format=THREE.RGBAFormat,L(U)}clearInterval(k.timerList.videoProgressTimer),C.isLive||(k.timerList.videoProgressTimer=k.video.progressTimer=setInterval(function(e){B.playProgress.style.width=Y.currentTime/Y.duration*100+"%";var t=Y.duration-Y.currentTime<.6?Y.duration:Y.currentTime;B.curTime.innerText=n.formatSeconds(t),B.totalTime.innerText=n.formatSeconds(Y.duration),k.autoHideLeftTime<0&&!Y.paused&&!B.voice_bar.isActive?B.toolbar.style.display="none":k.autoHideLeftTime--},500)),k.loadProgressManager.onLoad()}else new THREE.TextureLoader(k.loadProgressManager).load(e,function(e){L(e,!0)})}k.delListeners=function(){if(Y.removeEventListener("canplaythrough",w,!1),B.progressBar&&B.progressBar.removeEventListener("click",l,!1),B.btn.removeEventListener("click",c,!1),Q.removeEventListener("click",g,!1),K.removeEventListener("mousedown",E,!1),K.removeEventListener("mousemove",b,!1),K.removeEventListener("mouseup",x,!1),ee.removeEventListener("mouseenter",m,!1),ee.removeEventListener("mouseleave",p,!1),K.removeEventListener("mouseenter",v,!1),K.removeEventListener("mouseleave",f,!1),Z&&Z.removeEventListener("mouseenter",u,!1),Z&&Z.removeEventListener("mouseleave",h,!1),J&&J.removeEventListener("mouseenter",u,!1),J&&J.removeEventListener("mouseleave",h,!1),$&&$.length>0)for(var e=0;e<$.length;e++)$[e].removeEventListener("click",d,!1)}},t.prototype.boxTexture=function(e){function t(){if(i.boxRenderFrame=requestAnimationFrame(t),e.videoWidth){for(var s=e.videoHeight,c=e.videoWidth,l=c/3,d=s/2,u=0;u<6;u++)a[u].height=d,a[u].width=l;r[0].drawImage(e,1*l,0*d,l,d,0,0,l,d),n[0].image=a[0],n[0].needsUpdate=!0,o.push(new THREE.MeshBasicMaterial({map:n[0]})),r[1].drawImage(e,0*l,0*d,l,d,0,0,l,d),n[1].image=a[1],n[1].needsUpdate=!0,o.push(new THREE.MeshBasicMaterial({map:n[1]})),r[2].drawImage(e,2*l,0*d,l,d,0,0,l,d),n[2].image=a[2],n[2].needsUpdate=!0,n[2].rotation=-Math.PI,n[2].center=new THREE.Vector2(.5,.5),o.push(new THREE.MeshBasicMaterial({map:n[2]})),r[3].drawImage(e,0*l,1*d,l,d,0,0,l,d),n[3].image=a[3],n[3].needsUpdate=!0,n[3].rotation=-Math.PI,n[3].center=new THREE.Vector2(.5,.5),o.push(new THREE.MeshBasicMaterial({map:n[3]})),r[4].drawImage(e,2*l,1*d,l,d,0,0,l,d),n[4].image=a[4],n[4].needsUpdate=!0,o.push(new THREE.MeshBasicMaterial({map:n[4]})),r[5].drawImage(e,1*l,1*d,l,d,0,0,l,d),n[5].image=a[5],n[5].needsUpdate=!0,o.push(new THREE.MeshBasicMaterial({map:n[5]}));var h=i.VRObject.getObjectByName("__mxrealitySkybox");h?h.material=o:(h=new THREE.Mesh(new THREE.CubeGeometry(i.vrbox.width,i.vrbox.height,i.vrbox.depth),new THREE.MultiMaterial(o)),h.applyMatrix((new THREE.Matrix4).makeScale(1,1,-1)),h.visible=!0,h.name="__mxrealitySkybox",h.matrixAutoUpdate=!1,h.updateMatrix(),i.VRObject.add(h)),o=[]}}var i=this;i.toolBar.timeInfo.style.display="block";for(var n=[],o=[],a=[],r=[],s=0;s<6;s++)n[s]=new THREE.Texture,a[s]=document.createElement("canvas"),r[s]=a[s].getContext("2d");t()},t.prototype.sphere2BoxPano=function(e,t,i,n){function o(e,t,i,n){var o=e.createTexture();if(!o)return console.log("Failed to create the texture object!"),!1;var r=e.getUniformLocation(t,"u_Sampler");return a(e,i,o,r,n),!0}function a(e,t,i,o,a){h.asteroidConfig.enable&&e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,-1),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,i),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.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,a),e.uniform1i(o,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_STRIP,0,t),v<5?v++:n(u())}function r(e,t){var i=new Float32Array([-1,1,0,1,-1,-1,0,0,1,1,1,1,1,-1,1,0]),n=4,o=e.createBuffer();if(!o)return console.log("Failed to create the buffer object!"),-1;e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW);var a=i.BYTES_PER_ELEMENT,r=e.getAttribLocation(t,"a_Position");e.vertexAttribPointer(r,2,e.FLOAT,!1,4*a,0),e.enableVertexAttribArray(r);var s=e.getAttribLocation(t,"a_TexCoord");return e.vertexAttribPointer(s,2,e.FLOAT,!1,4*a,2*a),e.enableVertexAttribArray(s),n}function s(e,t){var i,n=c(e,t),o=c(e);return i=e.createProgram(),e.attachShader(i,o),e.attachShader(i,n),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)?(e.useProgram(i),e.enableVertexAttribArray(i.vertexPositionAttribute),i.vertexColorAttribute=e.getAttribLocation(i,"aVertexColor"),i.pMatrixUniform=e.getUniformLocation(i,"uPMatrix"),i.mvMatrixUniform=e.getUniformLocation(i,"uMVMatrix"),i):null}function c(e,t){var i,n;if(t){if(i=l(t),!i)return null;n=e.createShader(e.FRAGMENT_SHADER)}else i=d(),n=e.createShader(e.VERTEX_SHADER);return e.shaderSource(n,i),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)?n:(console.log(e.getShaderInfoLog(n)),null)}function l(e){var t="",i="\n precision mediump float;\n varying vec2 v_TexCoord;\n uniform sampler2D u_Sampler;\n uniform float PI;\n",n="\n if(abs(theta)>PI){\n if(theta>PI){\n theta -= 2.0*PI;\n }
1else{\n theta += 2.0*PI;\n }\n }\n if(abs(phi)>PI/2.0){\n if(phi>PI/2.0){\n phi -= PI;\n }else{ phi += PI;\n }\n }\n float x = theta/PI*0.5 + 0.5;\n float y = phi/PI*2.0*0.5 + 0.5;\n gl_FragColor = texture2D(u_Sampler, vec2(x,y));\n";return"z"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(0.5-v_TexCoord.x,v_TexCoord.y-0.5);\n\t\t\t\tfloat theta = atan(orig.x,r);\n\t\t\t\tfloat phi = atan(orig.y*cos(theta),r);"+n+"\n\t\t\t}\n":"nz"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(0.5-v_TexCoord.x,v_TexCoord.y-0.5);\n\t\t\t\tfloat theta = atan(orig.x,r);\n\t\t\t\tfloat phi = atan(orig.y*cos(theta),r);\n \t\ttheta = theta+PI;\n"+n+"\n\t\t\t}\n":"x"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(v_TexCoord.x-0.5,v_TexCoord.y-0.5);\n\t\t\t\tfloat theta = atan(r,orig.x);\n\t\t\t\tfloat phi = atan(orig.y*sin(theta),r);"+n+"\n\t\t\t}\n":"nx"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(v_TexCoord.x-0.5,v_TexCoord.y-0.5);\n\t\t\t\tfloat theta = atan(r,orig.x);\n\t\t\t\tfloat phi = atan(orig.y*sin(theta),r);\n \t\ttheta = theta+PI;"+n+"\n\t\t\t}\n":"y"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(0.5-v_TexCoord.x,0.5-v_TexCoord.y);\n \t\tfloat theta = atan(orig.x,orig.y);\n \t\tfloat phi = atan(r*sin(theta),orig.x);"+n+"\n\t\t\t}\n":"ny"==e?t=i+"\n\t\t\tvoid main() {\n\t\t\t\tfloat r = 0.5;\n\t\t\t\tvec2 orig = vec2(0.5-v_TexCoord.x,v_TexCoord.y-0.5);\n\t\t\t\tfloat theta = atan(orig.x,orig.y);\n\t\t\t\tfloat phi = atan(r*sin(theta),orig.x);\n\t\t\t\tphi = -phi;"+n+"\n\t\t\t}\n":console.error("shader fragment type error!"),t}function d(){var e="\n attribute vec4 a_Position;\n attribute vec2 a_TexCoord;\n varying vec2 v_TexCoord;\n void main() {\n gl_Position= a_Position;\n v_TexCoord = a_TexCoord;\n }\n";return e}function u(){var e=document.createElement("canvas"),n=e.getContext("2d");e.width=6*t,e.height=i;var o=document.createElement("canvas"),a=o.getContext("2d");o.width=t,o.height=i;var r=180*Math.PI/180;if(a.rotate(r),h.sliceSegment){var s=[],c=document.createElement("canvas");c.width=i/h.sliceSegment,c.height=i/h.sliceSegment;var l=c.getContext("2d");for(var d in p){a.drawImage(p[d],0,0,-t,-i);for(var u=0;u<h.sliceSegment;u++)for(var m=0;m<h.sliceSegment;m++)l.putImageData(a.getImageData(m*(i/h.sliceSegment),u*(i/h.sliceSegment),i*(m+1)/h.sliceSegment,i*(u+1)/h.sliceSegment),0,0),s.push(c.toDataURL("image/jpeg"))}return s}for(var d in p)a.drawImage(p[d],0,0,-t,-i),n.drawImage(o,t*d,0,t,i);return e.toDataURL("image/jpeg")}var h=this,m={x:"x",nx:"nx",ny:"ny",y:"y",z:"z",nz:"nz"},p=[],v=0,f=0,g=new Image;g.crossOrigin="Anonymous",g.src=e,g.onload=function(){for(var e in m){var n=document.createElement("canvas");n.width=t,n.height=i,n.id="face_"+e,p[f]=n;var a=n.getContext("webgl",{preserveDrawingBuffer:!0}),c=s(a,e),l=r(a,c),d=a.getUniformLocation(c,"PI");a.uniform1f(d,Math.PI),a.clearColor(0,0,0,1),o(a,c,l,g)||console.log("Failed to intialize the texture."),f++}}};var i=function(e,t,i,o,a){var r=this;this.scene=e,this.renderer=t,this.container=i,n.setCameraPara(r,o,a),this.constraints={},this.video=null,this.openAudio=!1,this.cameraIndex=1,this._controlTarget=new THREE.Vector3(1e-4,0,0),this.camera=new THREE.PerspectiveCamera(this.cameraPara.fov,this.cameraPara.aspect,this.cameraPara.near,this.cameraPara.far),this.camera.position.set(this.cameraPosition.x,this.cameraPosition.y,this.cameraPosition.z),this.cameraReady=!1,this.scene.add(this.camera),this.clock=new THREE.Clock,this.tempCanvas=document.createElement("canvas"),this.effect=n.stereoEffect(this.renderer),this._takeScreenShot=!1};i.prototype.init=function(){function e(e){i.video.srcObject=e}function t(e){alert(e)}var i=this;if(n.bindOrientationEvent(i,i._controlTarget),this.video=n.createTag("video",{"webkit-playsinline":!0,playsinline:!0,preload:"auto","x-webkit-airplay":"allow","x5-playsinline":!0,"x5-video-player-type":"h5","x5-v
1ideo-player-fullscreen":!0,"x5-video-orientation":"portrait",style:"object-fit: fill",autoplay:"autoplay"},{allowsInlineMediaPlayback:!0 2}),this.video.style.zIndex="-99999",this.video.style.position="absolute",this.video.style.left="0px",this.video.style.top="0px",this.video.style.width="2px",this.video.style.height="2px",document.body.appendChild(this.video),this.video.oncanplaythrough=function(){i.cameraReady=!0,i.video.readyState===i.video.HAVE_ENOUGH_DATA&&(i.cameraTexture=new THREE.VideoTexture(i.video),i.cameraTexture.generateMipmaps=!1,i.cameraTexture.format=THREE.RGBAFormat,i.cameraTexture.maxFilter=THREE.NearestFilter,i.cameraTexture.minFilter=THREE.NearestFilter,i.scene.background=i.cameraTexture,i.cameraTexture.needsUpdate=!0)},navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,navigator.getUserMedia){var o={audio:i.openAudio,video:{facingMode:{exact:i.cameraIndex?"environment":"user"}}};navigator.getUserMedia(o,e,t)}else alert("Native device meadia streaming(getUserMdeia) not supported in this browser.")},i.prototype.takeCameraPhoto=function(){var e=this.tempCanvas.getContext("2d");return e.clearRect(0,0,window.innerWidth,window.innerHeight),e.drawImage(this.video,0,0,window.innerWidth,window.innerHeight),e.toDataURL("image/jpeg")},i.prototype.takeScreenShot=function(e){this._takeScreenShot=!0,this._takeScreenShotCallback=e},i.prototype.play=function(){function e(){if(i._takeScreenShot){i._takeScreenShot=!1;var e=i.renderer.domElement.toDataURL("image/jpeg");i._takeScreenShotCallback(e)}if(i.cameraReady){var t=window.innerWidzth,o=window.innerHeight;i.camera.aspect=t/o,i.cameraTexture.repeat.y=o/i.video.videoHeight,i.cameraTexture.offset.x=0,i.cameraTexture.offset.y=0,n.isMobileDevice()&&n.isCrossScreen()?(i.cameraTexture.repeat.x=t/(2*i.video.videoWidth),i.effect.setSize(t,o),i.effect.render(i.scene,i.camera)):(i.cameraTexture.repeat.x=t/i.video.videoWidth,i.renderer.setSize(t,o),i.renderer.setClearColor(new THREE.Color(16777215)),i.renderer.render(i.scene,i.camera)),i.camera.updateProjectionMatrix()}i.controls&&i.controls.update(i.clock.getDelta())}function t(){requestAnimationFrame(t),e()}var i=this;t()};var n={debug:!1,enableVrMode:!0,clickFn:"",startGyro:function(e){function t(t){e(t)}window.addEventListener("deviceorientation",t,!1)},stereoEffect:function(e){this.separation=1,this.focalLength=15;var t,i,n,o,a,r,s,c,l,d,u,h,m=new THREE.Vector3,p=new THREE.Quaternion,v=new THREE.Vector3,f=new THREE.PerspectiveCamera,g=new THREE.PerspectiveCamera;return e.autoClear=!1,this.setSize=function(n,o){t=n/2,i=o,e.setSize(n,o)},this.render=function(E,b){E.updateMatrixWorld(),void 0===b.parent&&b.updateMatrixWorld(),b.matrixWorld.decompose(m,p,v),n=THREE.Math.radToDeg(2*Math.atan(Math.tan(.5*THREE.Math.degToRad(b.fov)))),c=b.near/this.focalLength,d=Math.tan(.5*THREE.Math.degToRad(n))*this.focalLength,l=.5*d*b.aspect,r=d*c,s=-r,u=(l+this.separation/2)/(2*l),h=1-u,o=2*l*c*h,a=2*l*c*u,f.projectionMatrix.makePerspective(-o,a,r,s,b.near,b.far),f.position.copy(m),f.quaternion.copy(p),f.translateX(-this.separation/2),g.projectionMatrix.makePerspective(-a,o,r,s,b.near,b.far),g.position.copy(m),g.quaternion.copy(p),g.translateX(this.separation/2),e.setViewport(0,0,2*t,i),e.setViewport(0,0,t,i),e.render(E,f),e.setViewport(t,0,t,i),e.render(E,g)},this},orbitControls:function(e,t){var i=function(e,t){function i(){return 2*Math.PI/60/60*g.autoRotateSpeed}function o(e){g.defaultDirectionOfRotation?g.usingGyro?T.theta-=e:T.theta+=e:T.theta-=e}function a(e){g.defaultDirectionOfRotation?g.usingGyro?T.phi-=e:T.phi+=e:T.phi-=e}function r(e,t,i,n){var o,a,r,s=e*t+i*n;if(s>.499){r=2*Math.atan2(e,n),o=Math.PI/2,a=0;var c=new THREE.Vector3(o,a,r);return c}if(s<-.499){r=-2*Math.atan2(e,n),o=-Math.PI/2,a=0;var c=new THREE.Vector3(o,a,r);return c}var l=e*e,d=t*t,u=i*i;r=Math.atan2(2*t*n-2*e*i,1-2*d-2*u),o=Math.asin(2*s),a=Math.atan2(2*e*n-2*t*i,1-2*l-2*u);var c=new THREE.Vector3(o,a,r);return c}function s(e,t){return 2*Math.PI*e/t*g.rotateSpeed}function c(e,t){return 2*Math.PI*e/t*g.rotateSpeed}function l(e){A=!0;var t=e.clientX||e.changedTouches[0].clientX,i=e.clientY||e.changedTouches[0].clientY;x.set(t,i)}function d(e){var t=e.clientX||e.changedTouches[0].clientX,i=e.clientY||e.changedTouches[0].clientY;w.set(t,i),R.subVectors(w,x);var n=void 0!==g.domElement.clientWidth?g.domElement.clientWidth:window.innerWidth;o(s(R.x,n));var r=void 0!==g.domElement.clientHeight?g.domElement.clientHeight:window.innerHeight;a(c(R.y,r)),x.copy(w)}function u(e){A=!1}function h(e){A=!0,x.set(e.touches[0].pageX,e.touches[0].pageY),g.usingGyro=!1}function m(e){e.preventDefault(),w.set(e.touches[0].pageX,e.touches[0].pageY),R.subVectors(w,x);var t=void 0!=g.domElement.clientWidth?g.domElement.clientWidth:window.innerWidth;o(s(R.x,t));var i=void 0!==g.domElement.clientHeight?g.domElement.clientHeight:window.innerHeight;a(c(R.y,i)),x.copy(w),S.x+=s(R.x,t)+c(R.y,i),g.usingGyro=!1}function p(e){g.usingGyro=!!n.OS.isMobile(),A=!1}function v(e){g.deviceOrientation=e,void 0===g.beginAlpha&&(g.beginAlpha=g.deviceOrientation.alpha)}function f(e){g.screenOrientation=window.orientation||0}this.domElement=void 0!==t?t:document,this.object=e,this.object.rotation.reorder("YXZ"),this.enable=!0,this.target=new THREE.Vector3,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-(1/0),this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.rotateSpeed=.25,this.autoRotate=!1,this.autoRotateSpeed=1,this.deviceOrientation={},this.screenOrientation=0;var g=this;g.defaultDirectionOfRotation=!0,g.gyroEnable=!1,g.usingGyro=!!n.OS.isMobile(),g._defaultTargetY=g.target.y,g._defaultCameraFov=g.object.fov,g._defaultCameraY=g.object.position.y;var E={type:"change"},b=1e-6,y=new THREE.Spherical,T=new THREE.Spherical,x=new THREE.Vector2,w=new THREE.Vector2,R=new THREE.Vector2,S=new THREE.Vector3(0,0,0),_=0,L=0,H=0,C=0,M=0;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.rotation0=this.object.rotation.clone(),this.zoom0=this.object.zoom,this.arrowLeft=37,this.arrowUp=38,this.arrowRight=39,this.arrowDown=40,this.arrowSpeed=.05,this.getPolarAngle=function(){return y.phi},this.getAzimuthalAngle=function(){return y.theta},this.saveState=function(){g.target0.copy(g.target),g.position0.copy(g.object.position),g.rotation0.copy(g.object.rotation),g.zoom0=g.object.zoom},this.reset=function(e){this.resetVar(),g.dispatchEvent(E),e&&e.target0?g.target.copy(e.target0):g.target.copy(g.target0),e&&e.position0?g.object.position.copy(e.position0):g.object.position.copy(g.position0),e&&e.rotation0?g.object.rotation.copy(e.rotation0):g.object.rotation.copy(g.rotation0),e&&e.zoom0?g.zoom=zoom0:g.zoom0},this.resetVar=function(){H=0,C=0,M=0,_=0,L=0};var P=function(){var e=new THREE.Vector3(0,0,1),t=new THREE.Euler,i=new THREE.Quaternion,n=new THREE.Quaternion((-Math.sqrt(.5)),0,0,Math.sqrt(.5));return function(o,a,r,s,c){t.set(r,a,-s,"YXZ"),o.setFromEuler(t),o.multiply(n),o.multiply(i.setFromAxisAngle(e,-c))}}();
2this.update=function(){var t=new THREE.Vector3,n=(new THREE.Quaternion).setFromUnitVectors(e.up,new THREE.Vector3(0,1,0)),a=n.clone().inverse(),s=new THREE.Vector3,c=new THREE.Quaternion;return function(e){if(g.enable){e=e||{};var l=g.deviceOrientation.alpha?THREE.Math.degToRad(void 0===g.beginAlpha?g.deviceOrientation.alpha:g.deviceOrientation.alpha-g.beginAlpha):0,d=g.deviceOrientation.beta?THREE.Math.degToRad(g.deviceOrientation.beta):0,u=g.deviceOrientation.gamma?THREE.Math.degToRad(g.deviceOrientation.gamma):0,h=g.screenOrientation?THREE.Math.degToRad(g.screenOrientation):0;g.gyroEnable?(H=l,C=d,M=u):(l=H,d=C,u=M);var m=(new THREE.Quaternion).copy(g.object.quaternion);P(m,l,d,u,h);var p=r(m.x,m.y,m.z,m.w);e.init||o(_-p.z),L=p.y,_=p.z;var v=g.object.position;return t.copy(v).sub(g.target),t.applyQuaternion(n),y.setFromVector3(t),g.autoRotate&&o(i()),y.theta+=T.theta,y.phi+=T.phi,y.theta=Math.max(g.minAzimuthAngle,Math.min(g.maxAzimuthAngle,y.theta)),y.phi=Math.max(g.minPolarAngle,Math.min(g.maxPolarAngle,y.phi)),y.makeSafe(),t.setFromSpherical(y),t.applyQuaternion(a),v.copy(g.target).add(t),g.deviceOrientation&&g.gyroEnable?P(g.object.quaternion,l+Math.PI+S.x,d+S.y,u+S.z,h):g.object.lookAt(g.target),g.enableDamping&&!g.gyroEnable?(T.theta*=1-g.dampingFactor,T.phi*=1-g.dampingFactor):T.set(0,0,0),(s.distanceToSquared(g.object.position)>b||8*(1-c.dot(g.object.quaternion))>b)&&(g.dispatchEvent(E),s.copy(g.object.position),c.copy(g.object.quaternion),!0)}}}();var A=!1,k=null;"undefined"!=typeof DeviceMotionEvent&&(k=DeviceMotionEvent),"undefined"!=typeof DeviceOrientationEvent&&(k=DeviceOrientationEvent),window.addEventListener("orientationchange",f,!1),window.addEventListener("deviceorientation",v,!1),k&&"function"==typeof k.requestPermission&&window.addEventListener("click",function(){k.requestPermission().then(function(e){"granted"===e&&(window.addEventListener("devicemotion",f,!1),window.addEventListener("deviceorientation",v,!1))})["catch"](function(e){n.msgBox(e,3,document.body)})}),this.rotationLeft=o,this.rotationUp=a;var B=0,I=0;document.addEventListener("keydown",function(e){var t=e||window.event||arguments.callee.caller.arguments[0];t&&(t.keyCode==g.arrowLeft&&(I=1),t.keyCode==g.arrowRight&&(I=-1),t.keyCode==g.arrowUp&&(B=1),t.keyCode==g.arrowDown&&(B=-1),o(I*g.arrowSpeed),a(B*g.arrowSpeed))}),document.addEventListener("keyup",function(e){var t=e||window.event||arguments.callee.caller.arguments[0];t&&(t.keyCode==g.arrowLeft&&(I=0),t.keyCode==g.arrowRight&&(I=0),t.keyCode==g.arrowUp&&(B=0),t.keyCode==g.arrowDown&&(B=0))}),this.domElement.addEventListener("mousedown",l,!1),this.domElement.addEventListener("mousemove",function(e){g.enable&&A&&d(e)},!1),this.domElement.addEventListener("mouseup",u,!1),this.domElement.addEventListener("mouseleave",u,!1),this.domElement.addEventListener("touchstart",h,!1),this.domElement.addEventListener("touchend",p,!1),this.domElement.addEventListener("touchmove",m,!1);var V=void 0!==this.domElement.clientWidth?this.domElement.clientWidth:window.innerWidth,F=void 0!==this.domElement.clientHeight?this.domElement.clientHeight:window.innerHeight;return x.set(V/2,F/2),setTimeout(function(){g.update({init:!0}),g.saveState()},10),this};return i.prototype=Object.create(THREE.EventDispatcher.prototype),i.prototype.constructor=i,new i(e,t)},setCameraPara:function(e,t,i){if(e.cameraPara={fov:90,aspect:e.container.innerWidth/e.container.innerHeight,near:.001,far:1e3},e.cameraPosition={x:0,y:0,z:0},t)for(var n in t)e.cameraPara[n]=t[n];if(i)for(var n in i)e.cameraPosition[n]=i[n]},formatSeconds:function(e){var t=parseInt(e);if(!t)return"00:00";var i=0,n=0;t>60&&(i=parseInt(t/60),t=parseInt(t%60),i>60&&(n=parseInt(i/60),i=parseInt(i%60)));var o=""+(parseInt(t)<10?"0"+parseInt(t):parseInt(t));return o=i>=0&&n>0?(parseInt(n)<10?"0"+parseInt(n):parseInt(n))+":"+(parseInt(i)<10?"0"+parseInt(i):parseInt(i))+":"+o:i>0&&0==n?60==i?"01:00:"+o:(parseInt(i)<10?"0"+parseInt(i):parseInt(i))+":"+o:60==t?"01:00":"00:"+o},cameraVector:function(e,t){var i=new THREE.Vector3(0,0,(-1)),n=i.applyQuaternion(e.quaternion),o=n.clone(),a=new THREE.Vector3;return t&&(a.x=n.x*t,a.y=n.y*t,a.z=n.z*t),{vector:o,timesVector:a}},bindRaycaster:function(e,t,i){var o=n.screenPosTo3DCoordinate(e,t.container,t.camera),a=new THREE.Raycaster(t.camera.position,o.sub(t.camera.position).normalize()),r=a.intersectObjects(t.scene.children,!0);
2r.length?i.success(r):i.empty()},bindCameraEvent:function(e,t){t=t||{trigger:function(e){},empty:function(e){},move:function(e){}};var i=this,n=t.scale||.022,o=t.vectorRadius,a=o*n,r=o*(n/6),s=2,c=t.tubularSegments||60,l=t.speed||36,d=new THREE.Group;d.name="__controlHandle";for(var u=new THREE.TorusGeometry(a,r,s,c,2*Math.PI),h=[],m=0;m<u.faces.length/2;m++)h[m]=new THREE.MeshBasicMaterial({color:15194842,depthTest:!1});for(var p=0,v=[new THREE.Vector2(0,0),new THREE.Vector2(1,0),new THREE.Vector2(1,1),new THREE.Vector2(0,1)],m=0,f=u.faces.length;m<f;m+=2)u.faces[m].materialIndex=p,u.faces[m+1].materialIndex=p,u.faceVertexUvs[0][m]=[v[3],v[0],v[2]],u.faceVertexUvs[0][m+1]=[v[0],v[1],v[2]],p++;var g=new THREE.Mesh(u,h);g.name="__wait",g.visible=!1,d.add(g);var E=new THREE.Mesh(new THREE.CircleGeometry(r,4),new THREE.MeshBasicMaterial({color:15194842,wireframe:!0,depthTest:!1}));E.lookAt(e.camera.position),E.name="__focus",E.material.depthTest=!1,E.visible=!1,d.add(E),d.position.set(0,0,.1);var b=(new THREE.Vector3,function(){d.lookAt(0,0,0),g.lookAt(0,0,0);var n=i.cameraVector(e.camera,o);E.visible=!0,d.position.set(n.timesVector.x,n.timesVector.y,n.timesVector.z);var a=new THREE.Raycaster(e.camera.position,n.vector),r=a.intersectObjects(e.scene.children,!0);r.length?t.move(r):t.empty(r)}),y=null,T=function(e){g.visible=!0;var i=0,n=0;y||(y=setInterval(function(){n<u.faces.length/4?(h[n].color=new THREE.Color(14710133),u.needsUpdate=!0,u.faces[i].materialIndex=n,u.faces[i+1].materialIndex=n,u.faceVertexUvs[0][i]=[v[3],v[0],v[2]],u.faceVertexUvs[0][i+1]=[v[0],v[1],v[2]],i+=2):(clearInterval(y),y=null,t.trigger(e)),n++},l))},x=function(e){clearInterval(y),y=null,p=0;for(var t=0,i=u.faces.length;t<i;t+=2)h[p].color=new THREE.Color(15194842),u.needsUpdate=!0,u.faces[t].materialIndex=p,u.faces[t+1].materialIndex=p,u.faceVertexUvs[0][t]=[v[3],v[0],v[2]],u.faceVertexUvs[0][t+1]=[v[0],v[1],v[2]],p++;g.visible=!1};e.VRObject.add(d),e.cameraEvt.controlGroup=d,e.cameraEvt.updatePosition=b,e.cameraEvt.hover=T,e.cameraEvt.leave=x},screenPosTo3DCoordinate:function(e,t,i){var o=e.clientX||(e.touches?e.touches[0].clientX:0),a=e.clientY||(e.touches?e.touches[0].clientY:0);rect=n.getBoundingClientRect(t),x=o-rect.left,y=a-rect.top;var r=t.clientWidth,s=t.clientHeight,c=new THREE.Vector2;c.x=2*x/r-1,c.y=1-2*y/s;var l=new THREE.Vector3(c.x,c.y,0).unproject(i);return l.sub(i.position).normalize()},objectPosToScreenPos:function(e,t,i){var n=new THREE.Vector3;n.setFromMatrixPosition(e.matrixWorld).project(i);var o=n.x,a=n.y,r=t.clientWidth,s=t.clientHeight,c=new THREE.Vector2;return c.x=r/2*(o+1),c.y=s/2*(1-a),c},fullscreen:function(e){var t=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||!1;t?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():"":e.requestFullscreen&&e.requestFullscreen()||e.mozRequestFullScreen&&e.mozRequestFullScreen()||e.webkitRequestFullscreen&&e.webkitRequestFullscreen()||e.msRequestFullscreen&&e.msRequestFullscreen()},isFullscreen:function(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1},toolBar:function(e,t){var i="_toolBar",o=this.createTag("div",{style:"-moz-user-select:none;-webkit-user-select:none;user-select:none;position:absolute;background:rgba(0,0,0,.2);width:100%;height:48px;bottom:0px;display:flex;","class":i+"Area"}),a=this.createTag("div",{style:"position:absolute;left:10px;top:11px;color:#fff;cursor:pointer;line-height:100%;width:30px;height:30px;background:url(https://img.yangshipin.cn/assets/54-kzwgs1to80z7.png);background-size:100% 100%;","class":"pauseBtn"},{});if(o.appendChild(a),!t.isLive){var r=this.createTag("div",{style:"position: absolute;left:50px;display:inline-block;;height:48px;line-height:53px;color:#fff;font-size:12px"}),s=this.createTag("span",null,{innerText:"00:00"});r.appendChild(s);var c=this.createTag("span",null,{innerText:"/"});r.appendChild(c);var l=this.createTag("span",null,{innerText:"00:00"});r.appendChild(l),o.appendChild(r);
2var d="@keyframes moreTip{from {top:0.75rem;} to{top:1rem}}";n.Broswer.isIE()||(d+="@-webkit-keyframes moreTip{from {top:0.75rem;} to{top:1rem}}"),this.addCSS(d)}if(!t.isLive){var u=this.createTag("div",{style:"position:inherit;top:-5px;padding:5px 0;width:100%;height:2px;;cursor:pointer"}),h=this.createTag("div",{style:"position:inherit;width:0%;height:3px;"});u.appendChild(h);var m=this.createTag("div",{style:"position:inherit;width:0%;height:3px;background:rgba(215, 0, 15, 1)"});u.appendChild(m),o.appendChild(u)}var p=this.createTag("div",{style:"position:absolute;right:10px;cursor:pointer;top:11px;width:30px;height:30px;line-height:30px;backgrond:url(https://img.yangshipin.cn/assets/15-l1ys6app3c2a.png);background-size:100% 100%;","class":"fullBtn"});o.appendChild(p);var v=this.createTag("div",{style:"position:absolute;right:60px;top:0px;color:#fff;cursor:pointer;line-height:100%;width:24px;height:100%;","class":"voiceCarBtn"});o.appendChild(v);var f=this.createTag("div",{style:"position:absolute;left:0px;top:15px;color:#fff;cursor:pointer;line-height:100%;width:24px;height:24px;background:url(https://sapi.yangshipin.cn/assets/2022/playerpng/player_sound_on.png);background-size:100% 100%;","class":"voiceBtn"});v.appendChild(f);var g=this.createTag("div",{style:"-moz-user-select:none;-webkit-user-select:none;user-select:none;position:absolute;width:40px;height:130px;background:rgba(0,0,0);right:52px;bottom:48px;text-align:center;border-radius:12px;display:none;z-index:9;","class":"voice-bar"}),E=this.createTag("div",{style:"position:inherit;width:2px;background:rgba(255, 255, 255, 0.45);height:90px;top:30px;left:18px;cursor:pointer;border-radius:1rem;"});g.appendChild(E);var b=this.createTag("div",{style:"position:inherit;top:5px;left:0px;font-size:12px;color:#fff;width:100%;text-align:center;"});g.appendChild(b);var y=this.createTag("div",{style:"position:inherit;width:100%;background:#F1253D;bottom:0rem;;border-radius:1rem;"}),T=this.createTag("div",{style:"position:absolute;border-radius: 50%;left: -4px;top: -4px;display: inline-block;width: 10px;height: 10px;background: #fff;box-shadow: 0 0 6px rgba(0,0,0,0.5) ;"});y.appendChild(T),E.appendChild(y),e.appendChild(g);var x=t.definition;if(x&&x.defaultFn){for(var w="",R=0;R<x.list.length;R++)x.list[R].cname=x.list[R].cname.split(";")[0],x.list[R].longName=x.list[R].cname+" "+x.list[R].fn.toUpperCase(),x.list[R].fn==x.defaultFn?(x.list[R].selected=!0,w=x.list[R].cname):x.list[R].selected=!1;var S=this.createTag("div",{style:"position:absolute;right:105px;top:0px;color:#fff;cursor:pointer;line-height:53px;min-width:24px;height:100%;color:#fff;font-size:14px;","class":"def-icon"});o.appendChild(S);var _=this.createTag("div",{style:"","class":"def-icon-text"},{innerHTML:w});S.appendChild(_);var L=this.createTag("div",{style:"-moz-user-select:none;-webkit-user-select:none;user-select:none;position:absolute;background:rgba(0,0,0);left:50%;bottom:48px;transform:translateX(-50%);text-align:center;border-radius:12px;white-space:nowrap;padding:12px 9px 2px 9px;line-height:1;z-index:99;display:none;","class":"def-bar"});S.appendChild(L);for(var H=[],C=x.list.length-1;C>=0;C--){var M=this.createTag("div",{style:"-moz-user-select:none;-webkit-user-select:none;user-select:none;font-size:12px;color:#fff;margin-bottom:10px;","class":(x.list[C].selected?"selected def-icon-child ":"def-icon-child ")+x.list[C].fn,"data-fn":x.list[C].fn,"data-name":x.list[C].cname},{innerHTML:x.list[C].longName});if(x.showVipClock&&"vr_4k"==x.list[C].fn){var P=this.createTag("span",{style:"padding: 0 8px;margin-left: 10px;background: linear-gradient(135deg,#e1b376,#f9e1a4);border-radius: 4px;border: 1px solid #daac6c;font-size: 12px;color: #593300;"},{innerHTML:"ä¼å"});M.appendChild(P)}L.appendChild(M),H.push(M)}}return t.controls&&e.appendChild(o),{toolbar:o,btn:a,timeInfo:r,curTime:s,splitTime:c,totalTime:l,vrBtn:p,progressBar:u,loadedProgress:h,playProgress:m,voice_bar:g,voice_slide_bar:E,voice_icon:f,voice_number:b,voice_icon_canr:v,def_icon:S,def_icon_text:_,def_bar:L,defIconChildList:H}},addCSS:function(e){var t=document.createElement("style"),i=document.head||document.getElementsByTagName("head")[0];if(t.type="text/css",t.styleSheet){var n=function(){try{t.styleSheet.cssText=e}catch(i){}};t.styleSheet.disabled?setTimeout(n,10):n()}else{var o=document.createTextNode(e);t.appendChild(o)}i.appendChild(t)},msgBox:function(e,t,i){if(e){var n=this.createTag("div",{style:"position:absolute;bottom:50%;width:100%;padding:0.25rem;background:rgba(0,0,0,.6);color:#fff;text-align:center;"},{innerHTML:e});i.appendChild(n),setTimeout(function(){n.remove()},1e3*t)}},isMobileDevice:function(e){var t=navigator.userAgent.toLowerCase();if(e)return t.match(/ipad/i)||t.match(/iphone os/i)||t.match(/midp/i)||t.match(/rv:1.2.3.4/i)||t.match(/ucweb/i)||t.match(/android/i)||t.match(/windows ce/i)||t.match(/windows mobile/i);var i="ipad"==t.match(/ipad/i),n="iphone os"==t.match(/iphone os/i),o="midp"==t.match(/midp/i),a="rv:1.2.3.4"==t.match(/rv:1.2.3.4/i),r="ucweb"==t.match(/ucweb/i),s="android"==t.match(/android/i),c="windows ce"==t.match(/windows ce/i),l="windows mobile"==t.match(/windows mobile/i);return!!(i||n||o||a||r||s||c||l)},bindOrientationEvent:function(e){void 0===e.controls&&(e.controls=n.orbitControls(e.camera,e.renderer.domElement),e.controls.target=e._controlTarget.clone())},isCrossScreen:function(e){return 180!=window.orientation&&0!=window.orientation&&(90==window.orientation||window.orientation==-90||void 0)},initDomStyle:function(e){function t(e){e.preventDefault()}e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.overflow="hidden",document.body.addEventListener("touchmove",t),document.onkeydown=function(){if(!this.debug&&window.event&&123==window.event.keyCode)return event.keyCode=0,event.returnValue=!1,!1}},createTag:function(e,t,i){var n=document.createElement(e);
2if(t&&"object"==typeof t)for(var o in t)n.setAttribute(o,t[o]);if(i&&"object"==typeof i)for(var o in i)n[o]=i[o];return n},OS:{weixin:navigator.userAgent.indexOf("MicroMessenger")>-1,android:/android/i.test(navigator.userAgent.toLowerCase()),ios:/(iphone|ipad|ipod|ios)/i.test(navigator.userAgent.toLowerCase()),googlePixel:navigator.userAgent.match(/;\sPixel\sBuild\//),MiOS:navigator.userAgent.match(/;\sMI\s\d\sBuild\//),samsungOS:navigator.userAgent.match(/;\sSM\-\w+\sBuild\//),isGooglePixel:function(){return null!=this.googlePixel},isMiOS:function(){return null!=this.MiOS},isSamsung:function(){return null!=this.samsungOS},isMobile:function(){return this.android||this.ios},isAndroid:function(){return this.android},isiOS:function(){return this.ios},isWeixin:function(){return this.weixin}},Broswer:{win:window,nav:window.navigator,REG_APPLE:/^Apple/,ie:navigator.userAgent.match(/MSIE\s([\d.]+)/)||navigator.userAgent.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),edge:navigator.userAgent.match(/Edge\/([\d.]+)/),chrome:navigator.userAgent.match(/Chrome\/([\d.]+)/)||navigator.userAgent.match(/CriOS\/([\d.]+)/),webview:!(navigator.userAgent.match(/Chrome\/([\d.]+)/)||navigator.userAgent.match(/CriOS\/([\d.]+)/))&&navigator.userAgent.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),safari:!(navigator.userAgent.match(/Chrome\/([\d.]+)/)||navigator.userAgent.match(/CriOS\/([\d.]+)/))&&navigator.userAgent.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)||navigator.userAgent.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/),chromiumType:null,_getChromiumType:function(){if(null!=this.chromiumType)return this.chromiumType;var e=this.win;return this.isIE()||void 0===e.scrollMaxX||this.REG_APPLE.test(this.nav.vendor||"")?"":this._testExternal(/^sogou/i,0)?"sogou":this._testExternal(/^liebao/i,0)?"liebao":this.nav.mimeTypes[30]||!this.nav.mimeTypes.length?"360":e.clientInformation&&e.clientInformation.permissions?"chrome":""},_testExternal:function(e,t){var i=this.win.external||{};for(var n in i)if(e.test(t?i[n]:n))return!0;return!1},isIE:function(){return null!=this.ie},ieVersion:function(){return null!=this.ie&&parseInt(this.ie[1])},isEdge:function(){return null!=this.edge},isSafari:function(){return null!=this.safari},is360:function(){return this.chromiumType=this._getChromiumType(),"360"===this.chromiumType},isSogou:function(){return this.chromiumType=this._getChromiumType(),"sogou"===this.chromiumType},isChromium:function(){return"chrome"===this._getChromiumType()},webglAvailable:function(){try{var e=document.createElement("canvas");return!(!window.WebGLRenderingContext||!e.getContext("webgl")&&!e.getContext("experimental-webgl"))}catch(t){return!1}}},getBoundingClientRect:function(e){var t=e.getBoundingClientRect(),i=t.top-document.documentElement.clientTop+document.documentElement.scrollTop,n=t.bottom,o=t.left-document.documentElement.clientLeft+document.documentElement.scrollLeft,a=t.right,r=t.width||a-o,s=t.height||n-i;return{top:i,right:a,bottom:n,left:o,width:r,height:s}}},o=document.getElementsByTagName("head")[0];o.appendChild(n.createTag("meta",{name:"viewport",content:"width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0,minimal-ui,user-scalable=no"})),o.appendChild(n.createTag("meta",{name:"google",content:"notranslate"})),o.appendChild(n.createTag("meta",{name:"full-screen",content:"yes"})),n.debug&&(window.onerror=function(e,t,i){var o="There was an error on this page.\n\n";return o+="Error: "+e+"\n",o+="URL: "+t+"\n",o+="Line: "+i+"\n\n",n.msgBox(o,36,document.body),!0}),e.VR=t,e.AR=i,e.AVR=n});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.