!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 r=0;r1?s(t[n],t[n-1],n-i):s(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){for(var n=0,i=t.length-1,r=Math.pow,s=a.Utils.Bernstein,o=0;o<=i;o++)n+=r(1-e,i-o)*r(e,o)*t[o]*s(i,o);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),s=a.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[r?r-1:0],t[r],t[n1;i--)n*=i;return t[e]=n,n}),CatmullRom:function(t,e,n,i,r){var a=.5*(n-t),s=.5*(i-e),o=r*r;return(2*e-2*n+a+s)*(r*o)+(-3*e+3*n-2*a-s)*o+a*r+e}}},s=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),o=function(){function t(t,e){void 0===e&&(e=c),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=c.Easing.Linear.None,this._interpolationFunction=c.Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=c.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?c.now()+parseFloat(t):t:c.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 r in n){var a=t[r],s=Array.isArray(a),o=s?"array":typeof a,u=!s&&Array.isArray(n[r]);if("undefined"!==o&&"function"!==o){if(u){var c=n[r];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,a)),n[r]=[a].concat(c)}if("object"!==o&&!s||!a||u)void 0===e[r]&&(e[r]=a),s||(e[r]*=1),i[r]=u?n[r].slice().reverse():e[r]||0;else{for(var h in e[r]=s?[]:{},a)e[r][h]=a[h];i[r]=s?[]:{},this._setupProperties(a,e[r],n[r],i[r])}}}},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?c.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?c.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 r=0,a=this._chainedTweens.length;rc.src.length?c.src.length-1:n,r=e.get("backurl")?e.get("backurl"):"../";if(c.backurl=r,-1!==i){document.getElementById("descriptTitle").innerHTML=c.src[i].title,document.getElementById("descriptContent").innerHTML=d(c.src[i].descript);const t=document.getElementById("cover");t.src="./yao/"+c.src[i].name+"4k_f.jpg",t.setAttribute("data-id",i)}else{i=0;document.getElementById("descriptTitle").innerHTML=c.title;document.getElementById("descriptContent").innerHTML=d(c.descript);document.getElementById("cover").setAttribute("data-id",i)}c.idx=i,console.log("panoId",i);document.getElementById("listTitle").innerHTML="剧集列表("+c.src.length+"集全)";for(var a=document.getElementById("listContent");a.firstChild;)a.removeChild(a.firstChild);let s=0;for(let t of c.src){const e=document.createElement("div");e.className="pano",t.id-1==1*n&&(e.className="panoSelect"),s=t.id,1==s&&(e.style.marginLeft=0),e.setAttribute("data-id",s);const i=document.createElement("div");i.className="title",i.innerHTML=t.title;const r=document.createElement("div");r.className="thumb";const o=document.createElement("img");o.src="./yao/"+t.name+"4k_f.jpg",r.appendChild(o),e.appendChild(i),e.appendChild(r),a.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.addEventListener("keyup",_),document.getElementById("play").addEventListener("click",f)}function l(t){const e=document.getElementById("listContent").childNodes;for(let t=0;t160&&(e=e.substr(0,160)+"..."),e}function p(t){const e=document.getElementById("listContent").childNodes;for(let n=0;n1&&a[1].clientWidth?a[1].clientWidth:180)*i,o={x:document.getElementById("listContent").scrollLeft,y:0};new TWEEN.Tween(o).to({x:s,y:200},1e3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(()=>{document.getElementById("listContent").scrollLeft=o.x}).start();n=e.length}}function f(){const t="jingqu.html?id="+document.getElementById("cover").getAttribute("data-id")+"&backurl="+c.backurl;window.location.href=t}function _(t){switch(t.keyCode){case 38:l(!1);break;case 40:l(!0);break;case 37:p(!1);break;case 39:p(!0)}}function m(){requestAnimationFrame(m),TWEEN.update()}h(),m();var y=new tvSysBtnBind({id:"Jdoc",className:"ctrlBtn",currentClass:"current",keyRemoveDefault:!1,effect:"base",currentIndex:0,onLoad:function(t){},onPress:function(){this.event.keyCode},onEnterPress:function(){f()},onBack:function(){const t=c.backurl;window.location.href=t}});window.onBackEvent=function(){const t=c.backurl;window.location.href=t};