!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.TWEEN=e()}(this,(function(){"use strict";var t,e,n="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){var i=Object.keys(this._tweens);if(0===i.length)return!1;for(t=void 0!==t?t:n();i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?a(t[n],t[n-1],n-i):a(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,a=s.Utils.Bernstein,r=0;r<=i;r++)n+=o(1-e,i-r)*o(e,r)*t[r]*a(i,r);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),a=s.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),a(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):a(t[o?o-1:0],t[o],t[n1;i--)n*=i;return t[e]=n,n}),CatmullRom:function(t,e,n,i,o){var s=.5*(n-t),a=.5*(i-e),r=o*o;return(2*e-2*n+s+a)*(o*r)+(-3*e+3*n-2*s-a)*r+s*o+e}}},a=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),r=function(){function t(t,e){void 0===e&&(e=l),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=l.Easing.Linear.None,this._interpolationFunction=l.Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=l.nextId(),this._isChainStopped=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){for(var n in t)this._valuesEnd[n]=t[n];return void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?l.now()+parseFloat(t):t:l.now(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,n,i){for(var o in n){var s=t[o],a=Array.isArray(s),r=a?"array":typeof s,u=!a&&Array.isArray(n[o]);if("undefined"!==r&&"function"!==r){if(u){var l=n[o];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,s)),n[o]=[s].concat(l)}if("object"!==r&&!a||!s||u)void 0===e[o]&&(e[o]=s),a||(e[o]*=1),i[o]=u?n[o].slice().reverse():e[o]||0;else{for(var d in e[o]=a?[]:{},s)e[o][d]=s[d];i[o]=a?[]:{},this._setupProperties(s,e[o],n[o],i[o])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this.update(1/0),this},t.prototype.pause=function(t){return this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=void 0===t?l.now():t,this._group.remove(this)),this},t.prototype.resume=function(t){return this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=(void 0===t?l.now():t)-this._pauseStart,this._pauseStart=0,this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;tthis._startTime+this._duration&&!this._isPlaying)return!1;if(this.isPlaying||this.start(t),t1?1:n;var i=this._easingFunction(n);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[e]||(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo&&this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,s=this._chainedTweens.length;ol.src.length?l.src.length-1:n;if(document.getElementById("descriptContent").innerHTML=h(l.descript),-1!==o){const t=document.getElementById("cover");t.setAttribute("data-id",o),t.setAttribute("data-backurl",i)}else{o=0;const t=document.getElementById("cover");t.setAttribute("data-id",o),t.setAttribute("data-backurl",i)}l.idx=o,console.log("panoId",o);document.getElementById("listTitle").innerHTML="剧集列表("+l.src.length+"集全)";for(var s=document.getElementById("listContent");s.firstChild;)s.removeChild(s.firstChild);let a=0;for(let t of l.src){const e=document.createElement("div");e.className="pano",t.id-1==1*n&&(e.className="panoSelect"),a=t.id,1==a&&(e.style.marginLeft=0),e.setAttribute("data-id",a);const i=document.createElement("div");i.className="title",i.innerHTML=t.title;const o=document.createElement("div");o.className="thumb";const r=document.createElement("img");r.src="./panos/"+t.name+"4k_f.jpg",o.appendChild(r),e.appendChild(i),e.appendChild(o),s.appendChild(e)}if(-1!=n){const t=document.getElementsByClassName("thumb"),e=(t.length>1&&t[1].clientWidth?t[1].clientWidth:180)*n,i={x:document.getElementById("listContent").scrollLeft,y:0};new TWEEN.Tween(i).to({x:e,y:200},1e3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(()=>{document.getElementById("listContent").scrollLeft=i.x}).start()}document.getElementById("play").addEventListener("click",y)}function c(){document.getElementById("play").removeEventListener("click",y)}function p(t){if(1==l.yy_step)t?(document.getElementById("yuyue_ok").src="./nanimages/qd_sel.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!0),document.getElementById("yd_phone").blur()):(document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),document.getElementById("yd_phone").focus());else{const e=document.getElementById("listContent").childNodes;for(let t=0;t180&&(e=e.substr(0,180)+"..."),e}function m(t){const e=document.getElementById("listContent").childNodes;let n=!0;l.select_status=0;for(let i=0;i1&&s[1].clientWidth?s[1].clientWidth:180)*o,r={x:document.getElementById("listContent").scrollLeft,y:0};new TWEEN.Tween(r).to({x:a,y:200},1e3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(()=>{document.getElementById("listContent").scrollLeft=r.x}).start();i=e.length,n=!1}console.log("is_yuyue",n),!0===n&&(t?(document.getElementById("play").style.backgroundImage='url("./nanimages/play4.png")',document.getElementById("ybf_yuyue").style.backgroundImage='url("./nanimages/yykf2_sel.png")',l.select_status=1):(document.getElementById("play").style.backgroundImage='url("./nanimages/play_click.png")',document.getElementById("ybf_yuyue").style.backgroundImage='url("./nanimages/yykf2_non.png")'))}function y(){if(console.log("dsddddddddddd"),0==l.select_status){const t=document.getElementById("cover"),e="tip.html?id="+t.getAttribute("data-id")+"&backurl="+t.getAttribute("data-backurl");console.log("url",e),c(),window.location.href=e}else _()}function _(){const t=document.getElementById("yuyue_ok").getAttribute("data-sel");switch(l.yy_step){case 0:l.yy_step++,l.is_yuyue=!0,document.getElementById("kanfang_yuding").style.display="flex",document.getElementById("yd_phone").style.display="flex",document.getElementById("yd_phone").focus();break;case 1:if("true"==t){0==document.getElementById("yd_phone").value.length?(l.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),l.is_yuyue=!1):(l.yy_step++,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yy_success.png)",document.getElementById("yd_phone").style.display="none")}break;case 2:"true"==t&&(l.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),l.is_yuyue=!1)}}function g(){requestAnimationFrame(g),TWEEN.update()}d(),g();var f=new tvSysBtnBind({id:"Jdoc",className:"ctrlBtn",currentClass:"current",keyRemoveDefault:!1,effect:"base",currentIndex:0,onLoad:function(t){},onPress:function(){switch(this.event.keyCode){case 37:m(!1);break;case 39:m(!0);break;case 38:p(!1);break;case 40:p(!0)}},onEnterPress:function(){y()},onBack:function(){if(console.log(l.is_yuyue),l.is_yuyue){if(1==l.yy_step){const t=document.getElementById("yd_phone").value,e=t.length>1?t.substring(0,t.length-1):"";document.getElementById("yd_phone").value=e}}else{const t=l.backurl;console.log("backurl"),window.location.href=t}}});window.onBackEvent=function(){if(l.is_yuyue)l.yy_step=0,document.getElementById("kanfang_yuding").style.backgroundImage="url(./nanimages/tc_yuyue.png)",document.getElementById("kanfang_yuding").style.display="none",document.getElementById("yd_phone").style.display="flex",document.getElementById("yuyue_ok").src="./nanimages/qd_non.png",document.getElementById("yuyue_ok").setAttribute("data-sel",!1),l.is_yuyue=!1;else{const t=document.getElementById("cover").getAttribute("data-backurl");console.log("backurl",t),c();const e="pano3.html?backurl="+t;document.getElementById("debug").innerHTML+="
"+e,window.location.href=e}};