<!-- SOLID-PLAYTIME · part 90 -->
ation)}static toJSON(t){let e=t.constructor,n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:uf(t.times,Array),values:uf(t.values,Array)};let i=t.getInterpolation();if(i!==t.DefaultInterpolation)n.interpolation=i}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new DU(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new CU(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new wU(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(t!==1){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){let n=this.times,i=n.length,s=0,a=i-1;while(s!==i&&n[s]<t)++s;while(a!==-1&&n[a]>e)--a;if(++a,s!==0||a!==i){if(s>=a)a=Math.max(a,1),s=a-1;let r=this.getValueSize();this.times=n.slice(s,a),this.values=this.values.slice(s*r,a*r)}return this}validate(){let t=!0,e=this.getValueSize();if(e-Math.floor(e)!==0)console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1;let n=this.times,i=this.values,s=n.length;if(s===0)console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1;let a=null;for(let r=0;r!==s;r++){let o=n[r];if(typeof o==="number"&&isNaN(o)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,r,o),t=!1;break}if(a!==null&&a>o){console.error("THREE.KeyframeTrack: Out of order keys.",this,r,o,a),t=!1;break}a=o}if(i!==void 0){if(zS(i))for(let r=0,o=i.length;r!==o;++r){let l=i[r];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,r,l),t=!1;break}}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===2302,s=t.length-1,a=1;for(let r=1;r<s;++r){let o=!1,l=t[r],c=t[r+1];if(l!==c&&(r!==1||l!==t[0]))if(!i){let u=r*n,f=u-n,h=u+n;for(let p=0;p!==n;++p){let v=e[u+p];if(v!==e[f+p]||v!==e[h+p]){o=!0;break}}}else o=!0;if(o){if(r!==a){t[a]=t[r];let u=r*n,f=a*n;for(let h=0;h!==n;++h)e[f+h]=e[u+h]}++a}}if(s>0){t[a]=t[s];for(let r=s*n,o=a*n,l=0;l!==n;++l)e[o+l]=e[r+l];++a}if(a!==t.length)this.times=t.slice(0,a),this.values=e.slice(0,a*n);else this.times=t,this.values=e;return this}clone(){let t=this.times.slice(),e=this.values.slice(),i=new this.constructor(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}Ri.prototype.ValueTypeName="";Ri.prototype.TimeBufferType=Float32Array;Ri.prototype.ValueBufferType=Float32Array;Ri.prototype.DefaultInterpolation=2301;class pr extends Ri{constructor(t,e,n){super(t,e,n)}}pr.prototype.ValueTypeName="bool";pr.prototype.ValueBufferType=Array;pr.prototype.DefaultInterpolation=2300;pr.prototype.InterpolantFactoryMethodLinear=void 0;pr.prototype.InterpolantFactoryMethodSmooth=void 0;class PU extends Ri{constructor(t,e,n,i){super(t,e,n,i)}}PU.prototype.ValueTypeName="color";class HU extends Ri{constructor(t,e,n,i){super(t,e,n,i)}}HU.prototype.ValueTypeName="number";class IU extends Ko{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,a=this.sampleValues,r=this.valueSize,o=(n-e)/(i-e),l=t*r;for(let c=l+r;l!==c;l+=4)Qn.slerpFlat(s,0,a,l-r,a,l,o);return s}}class kf extends Ri{constructor(t,e,n,i){super(t,e,n,i)}InterpolantFactoryMethodLinear(t){return new IU(this.times,this.values,this.getValueSize(),t)}}kf.prototype.ValueTypeName="quaternion";kf.prototype.InterpolantFactoryMethodSmooth=void 0;class mr extends Ri{constructor(t,e,n){super(t,e,n)}}mr.prototype.ValueTypeName="string";mr.prototype.ValueBufferType=Array;mr.prototype.DefaultInterpolation=2300;mr.prototype.InterpolantFactoryMethodLinear=void 0;mr.prototype.InterpolantFactoryMethodSmooth=void 0;class FU extends Ri{constructor(t,e,n,i){super(t,e,n,i)}}FU.prototype.ValueTypeName="vector";var hf={enabled:!1,files:{},add:function(t,e){if(this.enabled===!1)return;this.files[t]=e},get:function(t){if(this.enabled===!1)return;return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class NU{constructor(t,e,n){let i=this,s=!1,a=0,r=0,o=void 0,l=[];this.onStart=void 0,this.onLoad