index.min.js 15 KB

1
  1. !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 s=0;s<i.length;s++){var a=this._tweens[i[s]];a&&!1===a.update(t)&&!e&&delete this._tweens[i[s]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),s={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-s.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*s.Bounce.In(2*t):.5*s.Bounce.Out(2*t-1)+.5}}},a={Linear:function(t,e){var n=t.length-1,i=n*e,s=Math.floor(i),o=a.Utils.Linear;return e<0?o(t[0],t[1],i):e>1?o(t[n],t[n-1],n-i):o(t[s],t[s+1>n?n:s+1],i-s)},Bezier:function(t,e){for(var n=0,i=t.length-1,s=Math.pow,o=a.Utils.Bernstein,r=0;r<=i;r++)n+=s(1-e,i-r)*s(e,r)*t[r]*o(i,r);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,s=Math.floor(i),o=a.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(s=Math.floor(i=n*(1+e))),o(t[(s-1+n)%n],t[s],t[(s+1)%n],t[(s+2)%n],i-s)):e<0?t[0]-(o(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(o(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):o(t[s?s-1:0],t[s],t[n<s+1?n:s+1],t[n<s+2?n:s+2],i-s)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=a.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(t=[1],function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}),CatmullRom:function(t,e,n,i,s){var a=.5*(n-t),o=.5*(i-e),r=s*s;return(2*e-2*n+a+o)*(s*r)+(-3*e+3*n-2*a-o)*r+a*s+e}}},o=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 s in n){var a=t[s],o=Array.isArray(a),r=o?"array":typeof a,u=!o&&Array.isArray(n[s]);if("undefined"!==r&&"function"!==r){if(u){var l=n[s];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,a)),n[s]=[a].concat(l)}if("object"!==r&&!o||!a||u)void 0===e[s]&&(e[s]=a),o||(e[s]*=1),i[s]=u?n[s].slice().reverse():e[s]||0;else{for(var c in e[s]=o?[]:{},a)e[s][c]=a[c];i[s]=o?[]:{},this._setupProperties(a,e[s],n[s],i[s])}}}},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;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t){var e,n;if(t>this._startTime+this._duration&&!this._isPlaying)return!1;if(this.isPlaying||this.start(t),t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?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 s=0,a=this._chainedTweens.length;s<a;s++)this._chainedTweens[s].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,n,i){for(var s in n)if(void 0!==e[s]){var a=e[s]||0,o=n[s],r=Array.isArray(t[s]),u=Array.isArray(o);!r&&u?t[s]=this._interpolationFunction(o,i):"object"==typeof o&&o?this._updateProperties(t[s],a,o,i):"number"==typeof(o=this._handleRelativeValue(a,o))&&(t[s]=a+(o-a)*i)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t];"string"==typeof this._valuesEnd[t]?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t]):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},t}(),u=this&&this.__extends||(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),l=new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.version="18.5.0",e.now=n,e.Group=i,e.Easing=s,e.Interpolation=a,e.nextId=o.nextId,e.Tween=r,e}return u(e,t),e}(i));return l}));var t=!1,e=0,n=0,i=0,s=0,a=0,o=0,r=0,u=0;const l={idx:0,nextId:null,title:"南京世茂项目",backurl:"",descript:"",is_yuyue:!1,yy_step:0,src:[{id:0,name:"Kanfang",title:"",thumb:"nanimages/yykf_sel.png"},{id:1,name:"01frontGate",title:"A1户型 建面约165m2",thumb:"nanimages/sc_1.jpg"},{id:2,name:"02masterBedroom",title:"B1户型 建面约187m2",thumb:"nanimages/sc_2.jpg"},{id:3,name:"03masterBedroom",title:"C1户型 建面约210m2",thumb:"nanimages/sc_3.jpg"},{id:4,name:"04masterBedroom",title:"D1户型 建面约215m2",thumb:"nanimages/sc_4.jpg"}]};function c(){const t=window.location.search,e=new URLSearchParams(t);let n=e.get("backurl")?e.get("backurl"):"../";l.backurl=n;for(var i=document.getElementById("listContent_ybf");i.firstChild;)i.removeChild(i.firstChild);let s=0;for(let t of l.src){const e=document.createElement("div");e.className="pano",s=t.id,1==s&&(e.style.marginLeft=0),e.setAttribute("data-id",s);const n=document.createElement("div");n.className="title",n.innerHTML=t.title;const a=document.createElement("div");a.className=0===t.id?"kanfang":"thumb";const o=document.createElement("img");0==t.id&&(o.id="kanfang_image"),o.src=t.thumb,a.appendChild(o),e.appendChild(n),e.appendChild(a),i.appendChild(e)}document.getElementById("yd_phone").addEventListener("change",d,!1)}function d(t){console.log(t)}function h(t){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()))}function p(t){var e=t;return e.length>180&&(e=e.substr(0,180)+"..."),e}function y(t){const e=document.getElementById("listContent_ybf").childNodes;for(let t=0;t<e.length;t++)e[t].className="pano";pano_select=t?l.idx===e.length-1?0:l.idx+1:0===l.idx?e.length-1:l.idx-1,0===pano_select?document.getElementById("kanfang_image").src="./nanimages/yykf_sel.png":(document.getElementById("kanfang_image").src="./nanimages/yykf_non.png",e[pano_select].className="panoSelect"),l.idx=pano_select}function _(){const t="ybf.html?&backurl="+l.backurl;window.location.href=t}function f(){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)}}c();var m=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:y(!1);break;case 39:y(!0);break;case 38:h(!1);break;case 40:h(!0)}},onEnterPress:function(){0==l.idx?f():_()},onBack:function(){if(console.log(l.is_yuyue),l.is_yuyue){if(console.log("house.yy_step",l.yy_step),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=l.backurl;console.log("backurl"),window.location.href=t}};